IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Expanding one of the copybooks in Linkage


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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: 3156
Location: Tucson AZ

PostPosted: Tue Nov 13, 2007 11:20 pm
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
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

Moderator Emeritus


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

PostPosted: Wed Nov 14, 2007 10:00 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts OPTLINK linkage convention PL/I & Assembler 3
No new posts "Output" internal table (OD... COBOL Programming 0
This topic is locked: you cannot edit posts or make replies. Invoke REXX thru JCL to expand the co... CLIST & REXX 2
No new posts how to use RDZ for converting cobol c... CICS 1
Search our Forums:

Back to Top