I always call a subprogram using a 01 level CWXP119-LINKAGE in WS. ie. CALL 'CWXP119' USING CWXP119-LINKAGE. This always works. Because of this application, I want to call a subprogram directly from the calling program LINKAGE SECTION ie. :
PROGRAM ID. CWXP115.
LINKAGE SECTION.
01 LINKAGE-AREA.
05 SOMETHING PIC X(9000).
*** call the subprogram. This is what I want to do.
CALL 'CWXP119' USING LINKAGE-AREA.
*** this gets me to the subprogram CWXP119, it executes however when I hit the GOBACK and/or EXIT PROGRAM at the end of subprogram CWXP119, the last page of the program is displayed in debug and it gives me an addressing error. I think this method should work. Can someone give me a thumbs up or down? Or, if you have a solution please let me know. Thank you.
PROGRAM ID. CWXP115.
LINKAGE SECTION.
01 LINKAGE-AREA.
05 SOMETHING PIC X(9000).
*** call the subprogram. This is what I want to do.
CALL 'CWXP119' USING LINKAGE-AREA.
*** this gets me to the subprogram CWXP119, it executes however when I hit the GOBACK and/or EXIT PROGRAM at the end of subprogram CWXP119, the last page of the program is displayed in debug and it gives me an addressing error. I think this method should work. Can someone give me a thumbs up or down? Or, if you have a solution please let me know. Thank you.
Comment