View previous topic :: View next topic
|
Author |
Message |
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
Hi ,
I am creating a dynamic JCL using the below REXX program :
"ISPEXEC LIBDEF ISPSLIB DATASET ID('ITA.TEST.M1')"
"ISPEXEC LIBDEF ISPFILE DATASET ID('ITA.TEST.M2')"
"ALLOC DA('ITA.TEST.M3') F(INPUT) SHR REUSE"
"EXECIO * DISKR INPUT (STEM LINES. FINIS)"
"ISPEXEC FTINCL REXXDULB"
K = 0
DO I = 1 TO LINES.0
PARSE VAR LINES.I VAR1 VAR2
OLDDSN1 = VAR2
IF VAR1 = 'MTRKJNL' THEN
DO
OLDDSN = 'ITA.TEST.'
NEWDSN = 'ITA.TEST.KISH'
END
ELSE
IF VAR1 = 'MTRKDTE' THEN
DO
OLDDSN = 'ITA.TEST.'
NEWDSN = 'ITA.TEST.MAS'
END
ELSE
Set Return-Code as 8 and fail the JCL with MAXCC=8
"ISPEXEC FTOPEN "
"ISPEXEC FTINCL REXXDULA"
END
"ISPEXEC FTCLOSE"
ADDRESS TSO
SUB "'ITA.TEST.M2'"
"FREE F(INPUT)"
EXIT
I mean to say If VAR1 is not equal to 'MTRKJNL' or 'MTRKDTE' ,the JCL to submit the above REXX program as below should fail with MAXCC=8
//ATCH EXEC PGM=IKJEFT01,DYNAMNBR=1500
//SYSTSPRT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=129)
//ISPPROF DD DSN=,DISP=(NEW,DELETE),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120,DSORG=PO),
// SPACE=(3120,(20,5,10))
//ISPMLIB DD DISP=SHR,DSN=
//ISPPLIB DD DISP=SHR,DSN=
//ISPTLIB DD DISP=SHR,DSN=
//ISPTABL DD DSN=,DISP=(NEW,DELETE),UNIT=SYSDA,
//ISPSLIB DD DISP=SHR,DSN=ITA.REXX.TEMP
//SYSPROC DD DISP=SHR,DSN=ITA.TEST.TEMP.F1
//SYSTSIN DD *
ISPSTART CMD(REXX1)
/*
Thanks! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
This is reasonably well documented in the manuals.
What did you find that you did not understand. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Search for ZISPFRC in the Dialog Developer's book.
O. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Or perhaps you need to use IKJEFT1A instead IKJEFT01 |
|
Back to top |
|
|
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
When I am setting the Return-Code in the Else part,it works fine.But the JCL runs with MAXCC=0.In the spool it writes,clist failed with MAXCC=8.
Thanks! |
|
Back to top |
|
|
kishpra
New User
Joined: 24 May 2010 Posts: 92 Location: Pune
|
|
|
|
Thanks!
The below code is working fine with -
ZISPFRC = 16
ADDRESS ISPEXEC "VPUT (ZISPFRC)" |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
IKJEFT01 returns 0 as that is the return code of IKJEFT01. If you want the return code of what was executed by IKJEFTxx then use 1A as stated above. |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Untrue; this is stated nowhere in the manual, nor does it correspond with reality. |
|
Back to top |
|
|
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
Quote: |
ikjeft01 returns the last command return code. |
I agree I have just spent a day testing this on a 1.12 system and the latest manual states quite clearly
Quote: |
The return code from |the next command replaces the return code. The return code returned by the |batch IKJEFT01 job (which is the job condition code) is basically the return |code of the last command that has been executed, so the IKJEFT01 return code |(such as a job condition code) is the rolling return code from each command |invoked with the condition code, which is the last return code of the last |command.
|
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
So, all you need to do is save the return code you want to see as THE return code and EXIT saved_return_code at the end. |
|
Back to top |
|
|
|