Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi can anyone help me out in unders

Status
Not open for further replies.

kurup

Programmer
Jun 1, 2001
32
IN
Hi can anyone help me out in understanding this...
FD EDI-FILE
RECORDING F
BLOCK CONTAINS 0 RECORDS
LABEL RECORD STANDARD
DATA RECORD IS FD-EDI-RECORD.
01 FD-EDI-RECORD PIC X(2322).

What does the Recording, block contains, label record standard ...etc mean?

thank you
Kurup

 
* Hint one *
Try this URL: If it does not work you go this way:
1. 2. click 'SUPPORT'
3. click 'Go to the new SupportLine'
4. in the left hand frame select 'Self-Service | Documentation'
5. click Mainframe Express
6. viola! Look in the Language Reference.
* Hint two *
This URL:

links to IBM's BookServer--your electronic library of books on the World Wide Web. Search for COBOL. It will give you quite a long list. Have a look for "Language Reference"-manuals, they describe the COBOL language (syntax) and if you want to know how to use COBOL look for "Programming Guide".
Good Luck!
Tohbbe in Sweden
 
Kurup,
I think these clauses are left over from old versions of mainframe cobol and are largely unnecessary. I think that you used to have to code them to tell the operating system what to expect the file to be like.

RECORDING F meant that it was a fixed length file
BLOCK CONTAINS 0 RECORDS meant that the program would not dictate how the records were to be blocked, but this would be left to the operating system.
LABEL RECORDS ARE STANDARD meant that it was a data file rather than LABEL RECORDS ARE OMITTED which meant it was a report file.

These are the sort of things that you learn what they mean, code them once, and then swiftly forget them. Unfortunately, I've done just that, so am not 100% certain of the above. Hopefully this will stimulate somebody with a better memory than me!
Marc
 
Marc,

Your last sentence almost stopped me from answering (I don't remember what I had for lunch), but I think BLOCK CONTAINS x is still required for O/P files if you want other than unblocked recs. x=0 is preferred to optimize blocking. It could get you in trouble in a non-SMS environmment if you're concatenating GDGs and the device type changes between generations.

Your're right, of course, about the others.

Jack
 
My compiler just ignores "label records are standard", and gives me a message if it is used. On some SYSTEMS there may be a default recording mode of F, but we still use that statement. I think you may be able to skip the block statement if you are not determining the blocking for the operating system. I haven't ever used block contains 0 records, but I might try it and see what happens. If you do not like my post feel free to point out your opinion or my errors.
 
Marc Lodge hit the nails on the head. ITs mainframe code.
The block 0 records means that Job Control (JCL) will dictate the size of the block, external to the program.

Otherwise if you put a value in there, it would put that many records into a data block, and depending on which disk drives were used in that shop, you would have either an efficient or inefficient use of the space.

Good Luck,

Steve
 
FD EDI-FILE
RECORDING F - Record has fixed length
BLOCK CONTAINS 0 RECORDS (not used anymore)
LABEL RECORD STANDARD (used earlyer in tapes)
DATA RECORD IS FD-EDI-RECORD. represent your record name
01 FD-EDI-RECORD PIC X(2322).


Latif
 
Thank u all for ur help...
regards
kurup
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top