IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Moved value '16' to return-code


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Mon May 15, 2006 3:21 pm
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
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

Global Moderator


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

PostPosted: Mon May 15, 2006 5:51 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top