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
 
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
This topic is locked: you cannot edit posts or make replies. Issue in suppressing leading zeros &a... Vijay_Sirisha COBOL Programming 21 Thu Jun 07, 2018 8:01 pm
No new posts VBS to VB in COBOL and JCL srajendran2 COBOL Programming 12 Fri Jun 01, 2018 3:04 am
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts How to convert 2 bytes into single by... pkmurali DB2 6 Fri May 25, 2018 1:41 pm
No new posts SYSADATA - COBOL - Structure displace... ganasrinivasan COBOL Programming 3 Thu May 24, 2018 9:45 pm

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