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: 4649
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: 4649
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 EXIT or RETURN cvnlynn CLIST & REXX 16 Wed Jul 19, 2017 2:50 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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