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

Conditional setting of return-code after z/OS upgrade


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sanvan

New User


Joined: 22 Sep 2007
Posts: 3
Location: bellevue, wa

PostPosted: Wed Jan 31, 2018 11:05 pm
Reply with quote

Since upgrading z/OS from v1.13 to v2.1, the final return-code of a step running in production is behaving differently.

We have a cobol program that sets the return-code conditionally. This is executed in our STEP0010. This program also contains DB2 and Report Writer. It was compiled under Cobol v3.4 and is running under Cobol v4.2.

Example: IF A = 0

MOVE 4

TO RETURN-CODE

END-IF.



The next step is bypassed when the return-code of the previous step is not zero.

Example: //STEP0020 EXEC PGM=IEBGENER,COND=(0,NE,STEP0010)

Since our upgrade of z/OS from v1.13 to v2.1, we have seen our STEP0010 end with an RC 0 despite the condition having been met to set the return-code to 4. Pulling the program down to a test environment, I can see the return-code being set to 4 and displaying the return-code just before GOBACK shows it is set to 4 but the job output will show the step as ending in 0 and the next step then executes.

Could this behavior be related to our upgrade of z/OS?

Thank you
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Jan 31, 2018 11:16 pm
Reply with quote

Copy and paste the JOB card here,
Back to top
View user's profile Send private message
sanvan

New User


Joined: 22 Sep 2007
Posts: 3
Location: bellevue, wa

PostPosted: Wed Jan 31, 2018 11:23 pm
Reply with quote

Jobcard is:

//LVO04600 JOB (1,LVO),'PAY FILE MRG',
// MSGCLASS=Z,
// PERFORM=%JSSPRFRM,
// PRTY=%JSSPRTY,
// MSGLEVEL=(1,1),
// REGION=0K,
// CLASS=%JSSCLASS
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Jan 31, 2018 11:48 pm
Reply with quote

How are you invoking your DB2 program?

Are you calling IKJEFT01 or IKJEFT1B?

If you are using IKJEFT01 try using IKJEFT1B instead.
Back to top
View user's profile Send private message
sanvan

New User


Joined: 22 Sep 2007
Posts: 3
Location: bellevue, wa

PostPosted: Thu Feb 01, 2018 12:25 am
Reply with quote

The program is executed from a composite load.

INCLUDE SYSLIB(UUIOAD1)
INCLUDE SYSLIB(RSLVMKDT) RESOLVE IOMKDT9
INCLUDE SYSLIB(RSLVIVPB) RESOLVE IVHXPB1,PC8 - P B F
INCLUDE SYSLIB(RSLVIVEX) RESOLVE IVEXAI1 - DATA BASE ACCESS
INCLUDE PARMLIB(BATSERV) P-0041
INCLUDE PARMLIB(BATDSSC) P-0041
ENTRY UUIOAD1
NAME LUUIOAD(R)
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Thu Feb 01, 2018 12:27 am
Reply with quote

daveporcelan wrote:
How are you invoking your DB2 program?
Are you calling IKJEFT01 or IKJEFT1B?
If you are using IKJEFT01 try using IKJEFT1B instead.

The running program of TS is in COBOL.
It has nothing to do with neither IKJEFT01 nor IKJEFT1B. I hope so.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Feb 01, 2018 12:29 am
Reply with quote

I saw this in the original post:

Quote:
We have a cobol program that sets the return-code conditionally. This is executed in our STEP0010. This program also contains DB2 and Report Writer. It was compiled under Cobol v3.4 and is running under Cobol v4.2.


This is why I asked the question i did.

So what is the PGM= in the JCL?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Thu Feb 01, 2018 12:31 am
Reply with quote

daveporcelan wrote:
I saw this in the original post:
Quote:
We have a cobol program that sets the return-code conditionally. This is executed in our STEP0010. This program also contains DB2 and Report Writer. It was compiled under Cobol v3.4 and is running under Cobol v4.2.

This is why I asked the question i did.

DB2 also has nothing to do with neither IKJEFT01 nor IKJEFT1B.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Feb 01, 2018 12:39 am
Reply with quote

At our shop we invoke all of our DB2 programs as follows.

I understand that IKJEFT1B is actually TSO, it plays a part in DB2 execution.

I also understand that IKJEFT01 and IKJEFT1B perform differently.

Code:
//JSTEP010   EXEC PGM=IKJEFT1B
//** CONTROL CARD
//SYSTSIN    DD *
DSN SYSTEM(PROD)
RUN PROGRAM(PROG01) -
PLAN(PLAN01)
END
/*
Back to top
View user's profile Send private message
prino

Senior Member


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

PostPosted: Thu Feb 01, 2018 3:10 am
Reply with quote

sergeyken wrote:
daveporcelan wrote:
How are you invoking your DB2 program?
Are you calling IKJEFT01 or IKJEFT1B?
If you are using IKJEFT01 try using IKJEFT1B instead.

The running program of TS is in COBOL.
It has nothing to do with neither IKJEFT01 nor IKJEFT1B. I hope so.

If is's a COBOL+DB2 program, it has everything to do with IKJEFT01 or IKJEFT1B.
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 REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top