Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us