View previous topic :: View next topic
|
Author |
Message |
antonrino.b
New User
Joined: 10 Jan 2006 Posts: 76 Location: Germany
|
|
|
|
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 |
|
|
rpuhlman
New User
Joined: 11 Jun 2007 Posts: 80 Location: Columbus, Ohio
|
|
|
|
Give it a shot and see what happens. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
antonrino.b
New User
Joined: 10 Jan 2006 Posts: 76 Location: Germany
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|