Hi,
another way of doing it without intrinsic call or variable record file is:
1- define 3 files with :
fd AAAA Record Length of 100 bytes.
fd BBBB Record Length of 125 bytes.
fd CCCC Record Length of 150 bytes.
and depending of the record type open the appropriate file.
Thanks
Michael
On Sat, 4 May 2002 19:34:55 -0700, Mary DeGallo <[log in to unmask]>
wrote:
>Hi Everybody!
>
> looks like I am investigating the dynamic
> record structure handling thru single COBOL
> executable.
>
> Here is the Scenario.
> I have to write a FAM (Fixed-ASCII-Msg) kind
> of files.
>
> My COBOL code just recieves a BLOB of DATA (BUFFER)
>
> and based on the type (identified by the first 4
> bytes) I have to write the data in different
>record
> structures.
>
> If TYPE = AAAA Record Length of 100 bytes.
> If TYPE = BBBB Record Length of 125 bytes.
> If TYPE = CCCC Record Length of 150 bytes.
>
> The TYPES and their CORRESPONDING RECORD LENGTHS
> have to be parameterised. So are dynamic.
>
> The solution, we are working on is INTRINSIC calls.
>
> For argument sake we can assume, that the file is
> already BUILD and exists.
>
> I build files before execution at OS level
> : BUILD FILEAAAA;REC=100,,F;Msg
>
> I am using following in COBOL code
> call intrinsic "FOPEN"
> WS-FILENAME
> %30105 %2300
> WS-SOME-FILE-POINTER.
>
> call instrinsic "FWRITE" ...
>
> I am facing some error at execution time.
>
>Issue 1: My build is giving me a VAM kind of file.
> I am looking for a FAM.
>
>Issue 2: At execution, it is not able to do
> what is required, and is giving me a
> STACK error.
>
> what could the problem be?
>
>Issue 3: If I can do a intrinsic call to open
> and close files, why can I not use
> instrinsic call to build files. If yes,
> which one is it?
>
>My help requests for INTRINSICS starts here.
>
>Thanx to all those who lend me a helping hand in
>pointing to right sources for this.
>
>-Mary
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Health - your guide to health and wellness
>http://health.yahoo.com
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|