Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
using CALL PLIRETC(somevalu)

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message

Global Moderator

Joined: 01 Sep 2006
Posts: 2205
Location: Silicon Valley

PostPosted: Wed May 09, 2018 10:25 pm    Post subject: using CALL PLIRETC(somevalu)
Reply with quote

My return code is somehow being lost. I added PUT statements to both the caller and the called program. The called program sets the return code correctly, but the caller does not get it.

1. PROG1 calls PROG2
2. PROG2 is a MAIN and ends with something like this:
retcode = 4;
put data(retcode)
Call PLIRETC(retcode);

3. PROG1 tries to retrieve the return code
dcl rc   bin fixed(31);
rc = pliretv();
put data(rc);

The called program sets RC=4 but the caller sees RC=0. Is there a trick to doing this?
Back to top
View user's profile Send private message


Senior Member

Joined: 07 Feb 2009
Posts: 1220
Location: Vilnius, Lithuania

PostPosted: Wed May 09, 2018 10:38 pm    Post subject:
Reply with quote

You're doing everything according to the Language Reference, so I'm puzzled. Try bringing both the caller and callee down to the minimum, by using, if your version of the compiler already supports it,

%do skip;   


%if 1 = 2 %then %do;


if it doesn't, to comment out everything except the PLIRETC/V statements in either.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1


Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Call Natural program with rexx shahaf CLIST & REXX 2 Tue Sep 08, 2020 11:22 am
No new posts CALL statement in COBOL for VSE Kirthishine COBOL Programming 3 Fri Jun 26, 2020 12:12 pm
No new posts Need example for CALL 'ISRSUPC' in COBOL Sue Adams COBOL Programming 2 Thu May 14, 2020 5:32 am
No new posts trigger enter key automatically call ... Ziko13 CICS 17 Fri Apr 03, 2020 2:53 pm
No new posts Call a transaction simulator froma st... John F Dutcher IMS DB/DC 0 Wed Jan 22, 2020 10:54 pm

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