View previous topic :: View next topic
Author
Message
mox512 New User Joined: 04 Feb 2024Posts: 24 Location: united arab emirates
"I have written a REXX job on z/OS version 2.1 that backs up a dataset with the high-level qualifier (HLQ) CSC. When I execute the job directly using the EX command, it works correctly. However, when I run the same job through a batch JCL, it fails to work. How can I resolve this issue?"
REXX code:
Code:
/*REXX*/
DTIME = SUBSTR(DATE('S'),5)
I=0
QUEUE "//BACKDST JOB MSGLEVEL=(1,1),REGION=0M,CLASS=A,NOTIFY=&SYSUID"
QUEUE "//***********************************************************"
QUEUE "//* STEP01: DELETE BACKUP HLQ=BKUP41 *"
QUEUE "//***********************************************************"
QUEUE "//DELDS1 EXEC PGM=ADRDSSU,REGION=0M"
QUEUE "//SYSPRINT DD SYSOUT=*"
QUEUE "//DELETE DD DUMMY"
QUEUE "//SYSIN DD *"
QUEUE " DUMP DATASET(INCLUDE(BKUP41.**) -"
QUEUE " BY((CREDT,LT,*,-7))) - "
QUEUE " OUTDD(DELETE) DELETE "
/* STEP01: BACKUP DBA FILES HLQ */
"ISPEXEC LMDINIT LISTID(IDV) LEVEL(CSC)"
DO FOREVER
I=I+1
"ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR)"
IF RC = 0 THEN DO
QUEUE "//***********************************************************"
QUEUE "//STEP"I" EXEC PGM=IKJEFT01,COND=(5,LE,DELDS1)"
QUEUE "//SYSPRINT DD SYSOUT=*"
QUEUE "//SYSTSPRT DD SYSOUT=*"
QUEUE "//SYSTSIN DD *"
QUEUE " XMIT A.A DSN('"DSVAR"') -"
QUEUE " OUTDSN('BKUP41."DSVAR".T"DTIME"')"
END
ELSE LEAVE
END
"ISPEXEC LMDLIST LISTID("IDV") OPTION(FREE)"
JCL Batch JOB is:
Code:
//BACKDST JOB CLASS=A,NOTIFY=&SYSUID
//EREPMTN EXEC PGM=IKJEFT01,REGION=0K,PARM='BACKDST'
//SYSEXEC DD DSN=JOB.TEST,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY,BLKSIZE=80
Back to top
sergeyken Senior Member Joined: 29 Apr 2008Posts: 2146 Location: USA
What and how exactly "fails"?
Quote:
My car is not working. What should I do?
Back to top
Willy Jensen Active Member Joined: 01 Sep 2015Posts: 736 Location: Denmark
You don't have the required JCL for ISPF in batch.
Sample:
Code:
//ISP EXEC PGM=IKJEFT1B
//SYSEXEC DD DISP=SHR,DSN=your.EXEC
//SYSTSPRT DD SYSOUT=*
//MLRPT DD SYSOUT=*
//MLLST DD SYSOUT=*
//ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU
//ISPPLIB DD DISP=SHR,DSN=ISP.SISPPENU
//ISPSLIB DD DISP=SHR,DSN=ISP.SISPSENU
//ISPPROF DD UNIT=SYSDA,SPACE=(TRK,(1,1,1))
//ISPTLIB DD DISP=SHR,DSN=ISP.SISPTENU
//ISPLOG DD SYSOUT=*,RECFM=VA,LRECL=125,BLKSIZE=129
//ISPFILE DD SYSOUT=*,RECFM=FB,LRECL=80,BLKSIZE=6240
//SYSTSIN DD *
ISPSTART CMD(%MLCOMP)
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1338 Location: Bamberg, Germany
What is this for? Not needed IMO.
Code:
//MLRPT DD SYSOUT=*
//MLLST DD SYSOUT=*
Back to top
Willy Jensen Active Member Joined: 01 Sep 2015Posts: 736 Location: Denmark
Sorry, I just took the JCL from a existing job and overlooked those 2, they are not needed in general.
Back to top
Willy Jensen Active Member Joined: 01 Sep 2015Posts: 736 Location: Denmark
Also, the ISPPROF must have a DCB, like:
Code:
//ISPPROF DD UNIT=SYSDA,SPACE=(TRK,(1,1,1)),
// DCB=(ISP.SISPMENU)
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1338 Location: Bamberg, Germany
Willy Jensen wrote:
Also, the ISPPROF must have a DCB, like:
Code:
//ISPPROF DD UNIT=SYSDA,SPACE=(TRK,(1,1,1)),
// DCB=(ISP.SISPMENU)
Although not really necessary, I used to add here DSNTYPE=LIBRARY
Back to top
mox512 New User Joined: 04 Feb 2024Posts: 24 Location: united arab emirates
Thank You, I change My job and it's working:
Code:
//BACKUP JOB MSGLEVEL=(1,1),REGION=0M,CLASS=A,NOTIFY=&SYSUID
//STEP1 EXEC PGM=IKJEFT1B
//SYSEXEC DD DISP=SHR,DSN=USER.JOBS
//ISPLLIB DD DISP=SHR,DSN=ISP.SISPLOAD
//ISPPLIB DD DISP=SHR,DSN=ISP.SISPPENU
//ISPSLIB DD DISP=SHR,DSN=ISP.SISPSLIB
//ISPTLIB DD DISP=SHR,DSN=ISP.SISPTENU
//ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU
//ISPPROF DD DISP=OLD,DSN=USER.ISPF.ISPPROF
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
ISPSTART CMD(%#REXX)
Back to top
Please enable JavaScript!