[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: Record delimiter clause and parse order





Greetings from a UNIX, PC-literate Mainframe Guy:
I have 20 years experience with COBOL and MVS, and would like to offer you any
help that I can.
Regarding Fixed vs Variable records in COBOL...
If I were to create a five byte fixed length file on the mainframe, It might
look like this:

RECD1
RECD2
RECD3

In  EBCDIC,
D9C5C3C4F1
D9C5C3C4F2
C9C5C3C4F3

If I were to FTP that to my PC using default conversion attributes, it would be

RECD1<CR><LF>
RECD2<CR><LF>
RECD3<CR><LF>

In ASCII
52454344310D0A
52454344320D0A
52454344330D0A

If I were to FTP that data to my PC for use with a COBOL program,
I would send it with EBCDIC 
************************************************************************
   This email and any files transmitted with it are intended only    
   for the use of the individual or entity to whom they are addressed. 
   If you received this email in error please forward the message to: 
   contentadmin@hormel.com                                            
************************************************************************

? ASCII Conversion=YES, but CRLF=NO

I would then expect my COBOL program to read (one BLOCK at a time) a record of
X bytes which is defined on my 01 level within the FD.

If variable records, my program would read the BDW (Block Descriptor word -
tells the length of the block) and the RDW (Record Descriptor word - Tells the
length of the record).

(My hat?s off to you guys for working on this project!)