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
 

 

JCL to alter return code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mbalaji2585
Warnings : 1

New User


Joined: 10 Nov 2006
Posts: 11
Location: mumbai

PostPosted: Mon Sep 10, 2007 7:53 pm    Post subject: JCL to alter return code
Reply with quote

This is my code

Code:

//STEP03  EXEC PGM=IDCAMS                           
//SYSPRINT DD SYSOUT=*                           
//FILEIN   DD DSN=DOC.TCSOFF.SAMPLE.NEW02,DISP=SHR
//SYSIN    DD *                                   
  PRINT INFILE(FILEIN) -                         
      CHARACTER COUNT(1)                         
  IF LASTCC > 0 THEN SET MAXCC = 14     
/*                                               


Here I am checking whether file is cataloged & for containing data.
Now I want to set the return code to be set as 14 (not necessary 14, any return code which is distinct , other than 4,12) if file not present and for empty data set.

But even if file is present with data , the return code is set to 14.
In sysprint it is showing that the highest condition code is 0 for
PRINT INFILE(FILEIN) -
CHARACTER COUNT(1)
.

Is there any flaw in JCL?

Thanks,
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 Sep 10, 2007 8:47 pm    Post subject: Reply to: JCL to alter return code
Reply with quote

Try it the way is shows after a slight editing.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Sep 10, 2007 9:08 pm    Post subject:
Reply with quote

JCL given should work, please post your SYSOUT messages.
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 -> JCL & VSAM 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