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
 

 

Conditional Includes in Cobol Copybook

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
drowelf
Warnings : 1

New User


Joined: 03 Mar 2006
Posts: 39
Location: Houston, Texas

PostPosted: Thu Aug 24, 2006 7:19 am    Post subject: Conditional Includes in Cobol Copybook
Reply with quote

Is there any way to conditional include only part of a Cobol CopyBook? I want to have a single copybook that will have mutliple Level 1 data structures. I want to be able to only include those Level 1 structures that are needed by a particular program. This is for ease of maintanence and reference. Is this even possible in Cobol (z/OS v1.4)

TIA
Back to top
View user's profile Send private message

prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Thu Aug 24, 2006 7:31 pm    Post subject:
Reply with quote

It is quite possible to have multiple 01 level records in the same copybook. You can redefine those records with the others and use the relevant record while reading the file.


Anyone correct me if I am wrong
Back to top
View user's profile Send private message
iamyinhe

New User


Joined: 27 Apr 2006
Posts: 7

PostPosted: Fri Aug 25, 2006 8:13 pm    Post subject: Re: Conditional Includes in Cobol Copybook
Reply with quote

drowelf wrote:
Is there any way to conditional include only part of a Cobol CopyBook? I want to have a single copybook that will have mutliple Level 1 data structures. I want to be able to only include those Level 1 structures that are needed by a particular program. This is for ease of maintanence and reference. Is this even possible in Cobol (z/OS v1.4)

TIA


Actually, we always use copybook to declare the structure of a file. So, if you want to get part of fields of a record in file, you can redefine the fields you don't want to get as FILLER.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Aug 25, 2006 11:36 pm    Post subject: Re: Conditional Includes in Cobol Copybook
Reply with quote

Eric,

There is no way of doing what you want in with the COBOL COPY. I think I know what you are getting at. You want all the '01' data definitions for say, a project, in one copybook and selectively copy the ones the program will use.

If my memory serves me, PANVALET could do this with the 'INCLUDE', but that scarcely does you any good.

Dave
Back to top
View user's profile Send private message
drowelf
Warnings : 1

New User


Joined: 03 Mar 2006
Posts: 39
Location: Houston, Texas

PostPosted: Wed Aug 30, 2006 9:02 am    Post subject: Re: Conditional Includes in Cobol Copybook
Reply with quote

DavidatK wrote:
Eric,

There is no way of doing what you want in with the COBOL COPY. I think I know what you are getting at. You want all the '01' data definitions for say, a project, in one copybook and selectively copy the ones the program will use.

If my memory serves me, PANVALET could do this with the 'INCLUDE', but that scarcely does you any good.

Dave


Dave,

Thanks, thats what I figured, but as Cobol is not one of my strong languages, asking never hurts.

Thanks to all.
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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


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