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: 6970
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 Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am
No new posts How to build one file from two input ... daniele DFSORT/ICETOOL 5 Tue Feb 27, 2018 6:45 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am

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