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
 
Expanding one of the copybooks in Linkage

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

New User


Joined: 10 Jan 2006
Posts: 76
Location: Germany

PostPosted: Tue Nov 13, 2007 9:37 pm    Post subject: Expanding one of the copybooks in Linkage
Reply with quote

Hi,

I have two mainprograms MAINPRG1 and MAINPRG2 calling a subprogram SUBPROG1 as below.

Code:
CALL SUBPROG1 using SUBPROG1-LINKAGE1
                             SUBPROG1-LINKAGE2.

To add a new functionality as part of MAINPRG2, I have to expand SUBPROG1-LINKAGE1(i dont have enough filler, and i am adding the extra fields at the end of LINKAGE1).
i.e. I am using the new updated LINKAGE1 structure in MAINPRG1 and SUBPROG1, but not in MAINPRG2.

If I dont use the new LINKAGE Structure in MAINPRG1 and call the new SUBPROG1, will it work properly?

Please help me.
Back to top
View user's profile Send private message

rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Tue Nov 13, 2007 11:03 pm    Post subject:
Reply with quote

Give it a shot and see what happens.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Nov 13, 2007 11:20 pm    Post subject: Re: Expanding one of the copybooks in Linkage
Reply with quote

antonrino.b wrote:
I am using the new updated LINKAGE1 structure in MAINPRG1 and SUBPROG1, but not in MAINPRG2.
Don't you mean this the other way around?
Quote:
If I dont use the new LINKAGE Structure in MAINPRG1 and call the new SUBPROG1, will it work properly?
As long as the sub doesn't look at or touch the extra fields on the end (assuming you haven't changed the sizes or locations or order of the part that the main1 knows about), should work fine....
Back to top
View user's profile Send private message
antonrino.b

New User


Joined: 10 Jan 2006
Posts: 76
Location: Germany

PostPosted: Wed Nov 14, 2007 3:28 pm    Post subject: Reply to: Expanding one of the copybooks in Linkage
Reply with quote

Sorry, that was a typo.
Thanks for the reply.

MAINPRG1 will not use the newly added fields. but will there be any problem while using the data from SUBPROG1-LINKAGE2?

Just wanted to make sure, if LINKAGE2 will be properly passed from MAINPRG1 to New SUBPROG1.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 14, 2007 10:00 pm    Post subject:
Reply with quote

Hello,

If the "new" trailing area is not referenced, it should work.

I believe a more maintainable approach would be to make all 3 programs use the same definitions. If someone else has to make a later change requiring additional parm/linkage modifications, havig the modules "out of sync" may cause confusion and/or problems.
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. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
This topic is locked: you cannot edit posts or make replies. Put quotes in Symbolic parameter whil... Yashashri All Other Mainframe Topics 7 Mon Feb 15, 2016 12:24 pm
No new posts Number of parameters in Linkage kregen COBOL Programming 4 Wed Jan 27, 2016 5:13 pm
No new posts COBOL Parmlist and Associated Linkage... Bill O'Boyle COBOL Programming 10 Fri Dec 20, 2013 9:43 pm
No new posts Expanding occurrences in Fileaid Batch maki_psg Compuware & Other Tools 1 Tue Sep 03, 2013 10:49 am

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