Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Moved value '16' to return-code

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

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Mon May 15, 2006 3:19 pm    Post subject: Moved value '16' to return-code
Reply with quote

Hi,

i m having problem with return-code passing from cobol to jcl
my program is compiling perfectly
i moved value '16' to return-code
put a display of returncode also

but the job is executing with return-code =0
whereas in sysout t shows 16 ( display statements )

-Kapil .
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon May 15, 2006 3:21 pm    Post subject: Re: Return-code
Reply with quote

Could you please post both the COBOL and JCL code?
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Mon May 15, 2006 5:20 pm    Post subject: Re: Return-code
Reply with quote

hi ,

The source Code :
Code:

 DATA DIVISION.                                                   

   WORKING-STORAGE SECTION.                                         

   PROCEDURE DIVISION.                                             

            MOVE +3000 TO RETURN-CODE                                   
            DISPLAY 'RETURN-CODE : ' RETURN-CODE                       
             STOP RUN.                                                   


the Coressponding Jcl :

Code:
               
                         
//*                                                                     
//STEP0010 EXEC PGM=prg1                                             
//UTLITYF  DD  DUMMY                                                   
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 


This job is running with return code =0 , and display is still '3000'

could u plz c into it ,
do we need to provide anything else in code

Thanks ,
-Kapil .
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon May 15, 2006 5:51 pm    Post subject: Re: Return-code
Reply with quote

Hmmm. Don't know what to say.

I get this:

Quote:

08.19.33 JOB12345 $HASP165 MYJOB ENDED AT MVSJESX MAXCC=3000 CN(INTERNAL)


and this in the SYSOUT DD:

Quote:

RETURN-CODE : 3000
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Tue May 16, 2006 11:53 am    Post subject: Re: Moved value '16' to return-code
Reply with quote

hi....

now i got the return code

i used GOBACK instead of StOP RUN .

but now can any body make me clear why it doesn't work with stop run .i also want to confirm if this is happenning with my system only or it happens always .
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Tue May 16, 2006 3:23 pm    Post subject: Re: Moved value '16' to return-code
Reply with quote

Hi ,

Sorry to disturb everyone ,
i think there is some problem in my compile job .
i don't think if there is any relation to GOBACK or STOP RUN .

sorry if i created any confusion .

Thanks ,
-Kapil .
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 2 Tue Jan 24, 2017 1:23 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 2 Thu Jan 12, 2017 12:02 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us