Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us