View previous topic :: View next topic
|
Author |
Message |
kmdhandapani
New User
Joined: 13 Jul 2007 Posts: 10 Location: india
|
|
|
|
i am preparing new cobol batch program which gets record from input file and process , write the result in out put file .
My question :
1) How can i prepare Copy book for file layout .. if its recording mode is fixed(80 chars) and variable(10 to 80 chars ).
Note :
File layout is 80 , 800 for fixed files and record varying for 10 to 80 chars for variable files . |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
kmdhandapani,
please re-write your post. I am confused 80, 10-80, 800 ???? |
|
Back to top |
|
|
ntmartins
New User
Joined: 03 Mar 2008 Posts: 11 Location: Lisboa, Portugal
|
|
|
|
Yeah! The post is not very clear.
Any way, soome years ago I had the same trouble. Try to look into Cobol Manuals a loof for "Depending on" on variables definition. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
kmdhandapani wrote: |
1) How can i prepare Copy book for file layout .. if its recording mode is fixed(80 chars) and variable(10 to 80 chars ). |
Hi,
Forget about layout for a second, & let me know do you know how do we deifine FD entries in COBOL, if yes 'paste' those entries in member of some PDS, that'll work as COPYBOOK.
kmdhandapani wrote: |
File layout is 80 , 800 for fixed files and record varying for 10 to 80 chars for variable files . |
In variable layout, after 9th postion You might have a COBOl table entry like this
Code: |
05 SOME-DATA.
07 SOME-COUNT PIC S9(03) COMP-3.
07 SOME-TABLE OCCURS 0 TO 70 TIMES
DEPENDING ON SOME-COUNT
INDEXED BY SOME-IDX.
10 TABLE DEFINITION... |
which will make COPYBOOK of varaible length.
Not sure what exactly You are looking for, jsut hope above helps. If not, try to seach in Manuals on key word FD/COPYBOOKs, these things are well documented there. |
|
Back to top |
|
|
|