IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Prepare NEW COPYBOOK for files


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kmdhandapani

New User


Joined: 13 Jul 2007
Posts: 10
Location: india

PostPosted: Tue Mar 04, 2008 7:03 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Mar 04, 2008 7:28 pm
Reply with quote

kmdhandapani,

please re-write your post. I am confused 80, 10-80, 800 ????
Back to top
View user's profile Send private message
ntmartins

New User


Joined: 03 Mar 2008
Posts: 11
Location: Lisboa, Portugal

PostPosted: Tue Mar 04, 2008 8:37 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Mar 04, 2008 11:14 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top