Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Pro*COBOL and CLOB Columns
All:

I have another interesting scenario.

I have a data item in a COBOL program that is declared as follows:

EXEC SQL BEGIN DECLARE SECTION END-EXEC.

01  LogBuffer          PIC  X(262146)  VARYING.

EXEC SQL END DECLARE SECTION.


The Pro*COBOL pre-compiler expands this to:

01  LogBuffer.
02  LogBuffer-LEN     PIC S9(4) COMP.
02  LogBuffer-ARR     PIC  X(262146).


As you can see - the exploded definition produced by Pro*COBOL is not
correct. I cannot seem to find a decent way around this - does anyone
have a good suggestion.

Standard Info:

COBOL: MF Server Express 4.0 SP1
Oracle: 9i
Pro*COBOL: 1.8 (don't ask why ...)
OS: HP-UX 11i


Thanks in advance,
Chris


Report this thread to moderator Post Follow-up to this message
Old Post
Chris
12-17-04 08:55 PM


Re: Pro*COBOL and CLOB Columns
That is right, because the length info of string is needed for
intercommunication between COBOL and SQL modules.

There are directions when using them:
From COBOL to SQL, writing both ,
From SQL to COBOL, reading LogBuffer-ARR,

Good luck,

Thomas Li
Corporola Inc.


"Chris" <ctaliercio@yahoo.com> wrote in message
news:1103294765.387986.37710@z14g2000cwz.googlegroups.com...
> All:
>
> I have another interesting scenario.
>
> I have a data item in a COBOL program that is declared as follows:
>
> EXEC SQL BEGIN DECLARE SECTION END-EXEC.
>
> 01  LogBuffer          PIC  X(262146)  VARYING.
>
> EXEC SQL END DECLARE SECTION.
>
>
> The Pro*COBOL pre-compiler expands this to:
>
> 01  LogBuffer.
> 02  LogBuffer-LEN     PIC S9(4) COMP.
> 02  LogBuffer-ARR     PIC  X(262146).
>
>
> As you can see - the exploded definition produced by Pro*COBOL is not
> correct. I cannot seem to find a decent way around this - does anyone
> have a good suggestion.
>
> Standard Info:
>
> COBOL: MF Server Express 4.0 SP1
> Oracle: 9i
> Pro*COBOL: 1.8 (don't ask why ...)
> OS: HP-UX 11i
>
>
> Thanks in advance,
> Chris
>



Report this thread to moderator Post Follow-up to this message
Old Post
Thomas A. Li
12-17-04 08:55 PM


Re: Pro*COBOL and CLOB Columns
Thomas,

Thanks for the feedback, but the reson I am saying that the Pro*COBOL
exploded definition is wron is this: it only allows for a length of
9999. Clearly in this situation that maximum is insufficient.

The LogBuffer field is being inserted into a CLOB column, so there is
no reason to restrict the length of the string field here.
Thanks,
Chris


Report this thread to moderator Post Follow-up to this message
Old Post
Chris
12-18-04 05:46 PM


Re: Pro*COBOL and CLOB Columns
That is right, because the length info of string is needed for
intercommunication between COBOL and SQL modules.

There are directions when using them:
From COBOL to SQL, writing both ,
From SQL to COBOL, reading LogBuffer-ARR,

Good luck,

Thomas Li
Corporola Inc.


"Chris" <ctaliercio@yahoo.com> wrote in message
news:1103294765.387986.37710@z14g2000cwz.googlegroups.com...
> All:
>
> I have another interesting scenario.
>
> I have a data item in a COBOL program that is declared as follows:
>
> EXEC SQL BEGIN DECLARE SECTION END-EXEC.
>
> 01  LogBuffer          PIC  X(262146)  VARYING.
>
> EXEC SQL END DECLARE SECTION.
>
>
> The Pro*COBOL pre-compiler expands this to:
>
> 01  LogBuffer.
> 02  LogBuffer-LEN     PIC S9(4) COMP.
> 02  LogBuffer-ARR     PIC  X(262146).
>
>
> As you can see - the exploded definition produced by Pro*COBOL is not
> correct. I cannot seem to find a decent way around this - does anyone
> have a good suggestion.
>
> Standard Info:
>
> COBOL: MF Server Express 4.0 SP1
> Oracle: 9i
> Pro*COBOL: 1.8 (don't ask why ...)
> OS: HP-UX 11i
>
>
> Thanks in advance,
> Chris
>



Report this thread to moderator Post Follow-up to this message
Old Post
Thomas A. Li
12-21-04 01:55 AM


Re: Pro*COBOL and CLOB Columns
Thomas,

Thanks for the feedback, but the reson I am saying that the Pro*COBOL
exploded definition is wron is this: it only allows for a length of
9999. Clearly in this situation that maximum is insufficient.

The LogBuffer field is being inserted into a CLOB column, so there is
no reason to restrict the length of the string field here.
Thanks,
Chris


Report this thread to moderator Post Follow-up to this message
Old Post
Chris
12-21-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:43 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.