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
 
Linkage variables during multiple calls

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

New User


Joined: 09 Apr 2007
Posts: 33
Location: India

PostPosted: Wed Sep 23, 2009 4:16 pm    Post subject: Linkage variables during multiple calls
Reply with quote

This is a bit lengthy question.

Program ABC has three parameters in procedure division. And statement
CALL 'ABC' using X, Y, Z
is passing all three parameters to ABC.

When I coded next statement
CALL 'ABC' using X, Y
This time I am not passing Z.

And will I be able to access variables present under Z? icon_smile.gif
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Wed Sep 23, 2009 4:31 pm    Post subject: Reply to: Linkage variables during multiple calls
Reply with quote

not at all...
what happened when You tried ??

most probably You should have got an abend...
the called subroutine expects to receive three parameters and only two were provided
Back to top
View user's profile Send private message
umanaga

New User


Joined: 09 Apr 2007
Posts: 33
Location: India

PostPosted: Wed Sep 23, 2009 4:41 pm    Post subject: Reply to: Linkage variables during multiple calls
Reply with quote

I also expected an abend. But surprised.

It is going good.

Is it like when
CALL 'ABC' using X, Y, Z is done and address exstablished Z in ABC is not lost once the program is completed, and during second call
CALL 'ABC' using X, Y i was able use variables under Z.

FYI..The way program ABC and Caller are linked static not dynamic load. Will this also cause above to work?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Wed Sep 23, 2009 4:52 pm    Post subject: Reply to: Linkage variables during multiple calls
Reply with quote

I would not trust such a behavior !
anway the behavior is ... wrong...
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 Sep 23, 2009 9:09 pm    Post subject:
Reply with quote

Hello,

Suggest you correct the code to specify all 3 variables for each/every call. It doesn't matter that it happens to work now - what would matter is when something causes an abend later. . . Or worse - it runs incorrectly and does not abend. . .
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
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

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