Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Prepare NEW COPYBOOK for files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Prepare NEW COPYBOOK for files
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: 6967
Location: porcelain throne

PostPosted: Tue Mar 04, 2008 7:28 pm    Post subject:
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: 12
Location: Lisboa, Portugal

PostPosted: Tue Mar 04, 2008 8:37 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Mar 04, 2008 11:14 pm    Post subject: Re: Prepare NEW COPYBOOK for files
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us