I am trying to submit a JCL via REXX using file tailoring service. I have allocated personal ISPFILE to use.
TMPFIL = HLQ || '.' || UID || '.' || 'ISPFILE'
STATUS = SYSDSN("'"TMPFIL"'")
IF STATUS = 'OK' THEN
DO
"DELETE '"TMPFIL"' "
END
"ALLOC FI(ISPFILE) DA('"TMPFIL"') NEW TRACKS SPACE(5,5) " ,
"RECFM(F,B) LRECL(80) BLKSIZE(3120)"
STATUS = SYSDSN("'"TMPFIL"'")
IF STATUS = 'OK' THEN
DO
"DELETE '"TMPFIL"' "
END
"ALLOC FI(ISPFILE) DA('"TMPFIL"') NEW TRACKS SPACE(5,5) " ,
"RECFM(F,B) LRECL(80) BLKSIZE(3120)"
and then using below code snippet
ADDRESS
"ISPEXEC FTOPEN "
"ISPEXEC FTINCL MASED1SK"
"ISPEXEC FTINCL MASED3SK"
"ISPEXEC FTCLOSE"
"ISPEXEC VGET (ZTEMPF) SHARED"
X = OUTTRAP('VAR.')
ADDRESS TSO "SUBMIT" "'"ZTEMPF"'"
DO Z = 1 TO VAR.0
JOBDET = WORD(VAR.Z,2)
END
"ISPEXEC FTOPEN "
"ISPEXEC FTINCL MASED1SK"
"ISPEXEC FTINCL MASED3SK"
"ISPEXEC FTCLOSE"
"ISPEXEC VGET (ZTEMPF) SHARED"
X = OUTTRAP('VAR.')
ADDRESS TSO "SUBMIT" "'"ZTEMPF"'"
DO Z = 1 TO VAR.0
JOBDET = WORD(VAR.Z,2)
END
This is the error I am getting
97 *-* "ISPEXEC FTCLOSE"
>L> "ISPEXEC FTCLOSE"
98 *-* "ISPEXEC VGET (ZTEMPF) SHARED"
>L> "ISPEXEC VGET (ZTEMPF) SHARED"
ISPF system data set allocation error - press Enter to continue.
Temporary control card data set cannot be allocated.
Data set 'Txx.Txxxxx.SPFTEMP1.CNTL' in use by another user, try later.
100 *-* /* "ISPEXEC VIEW DATASET ('"ZTEMPF"')" */
102 *-* X = OUTTRAP('VAR.')
>L> "VAR."
>F> "VAR."
103 *-* ADDRESS TSO "SUBMIT" "'"ZTEMPF"'"
>L> "SUBMIT"
>L> "'"
>O> "SUBMIT '"
>V> ""
>O> "SUBMIT '"
>L> "'"
>O> "SUBMIT ''"
+++ RC(12) +++
104 *-* DO Z = 1 TO VAR.0
>L> "1"
>V> "1"
105 *-* JOBDET = WORD(VAR.Z,2)
>C> "VAR.1"
>V> "IKJ56709I INVALID DATA SET NAME, ''"
>L> "2"
>F> "INVALID"
106 *-* END
104 *-* DO Z = 1 TO VAR.0
108 *-* SAY "JOBDET:" JOBDET
>L> "JOBDET:"
>V> "INVALID"
>O> "JOBDET: INVALID"
>L> "ISPEXEC FTCLOSE"
98 *-* "ISPEXEC VGET (ZTEMPF) SHARED"
>L> "ISPEXEC VGET (ZTEMPF) SHARED"
ISPF system data set allocation error - press Enter to continue.
Temporary control card data set cannot be allocated.
Data set 'Txx.Txxxxx.SPFTEMP1.CNTL' in use by another user, try later.
100 *-* /* "ISPEXEC VIEW DATASET ('"ZTEMPF"')" */
102 *-* X = OUTTRAP('VAR.')
>L> "VAR."
>F> "VAR."
103 *-* ADDRESS TSO "SUBMIT" "'"ZTEMPF"'"
>L> "SUBMIT"
>L> "'"
>O> "SUBMIT '"
>V> ""
>O> "SUBMIT '"
>L> "'"
>O> "SUBMIT ''"
+++ RC(12) +++
104 *-* DO Z = 1 TO VAR.0
>L> "1"
>V> "1"
105 *-* JOBDET = WORD(VAR.Z,2)
>C> "VAR.1"
>V> "IKJ56709I INVALID DATA SET NAME, ''"
>L> "2"
>F> "INVALID"
106 *-* END
104 *-* DO Z = 1 TO VAR.0
108 *-* SAY "JOBDET:" JOBDET
>L> "JOBDET:"
>V> "INVALID"
>O> "JOBDET: INVALID"
I am not getting why temp dataset ''Txx.Txxxxx.SPFTEMP1.CNTL' is being used even I have allocated my own.
Please note the above REXX is being submitted via a JCL
the JCL looks like this
PS040 EXEC PGM=IKJEFT01,PARM='ISPSTART CMD(%MASCMPRX'
SYSEXEC DD DSN=Dxxx.Nxxxxx.Txxx.B1,DISP=SHR
SYSTSPRT DD SYSOUT=A
SYSTSIN DD DUMMY
MASCMPIN DD DISP=SHR,DSN=&HLQ..&LOGID..PARM.MASCMP
SRCHLIST DD DISP=SHR,DSN=&HLQ..&LOGID..ENDV.SRCH.LIST
ISPPROF DD DSN=&&TEMP01,DISP=(,DELETE),SPACE=(TRK,(5,5,10)),
DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=3120)
ISPLOG DD DSN=&&TEMP02,DISP=(,DELETE),SPACE=(TRK,(5,5,10)),
DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=3120)
ISPLLIB DD DISP=SHR,DSN=LMQS.SYSB.MQSERIES.SCSQLOAD.FIR
ISPPLIB DD DISP=SHR,DSN=SYS2.SB01.DMSLIB
ISPPLIB DD DISP=SHR,DSN=SYS2.SB01.DMSLIB
ISPSLIB DD DISP=SHR,DSN=SYS1.SISPSLIB
ISPTLIB DD DISP=SHR,DSN=SYS1.SISPTENU
ISPTABL DD DISP=SHR,DSN=TIB.A.DMSTAB
SYSEXEC DD DSN=Dxxx.Nxxxxx.Txxx.B1,DISP=SHR
SYSTSPRT DD SYSOUT=A
SYSTSIN DD DUMMY
MASCMPIN DD DISP=SHR,DSN=&HLQ..&LOGID..PARM.MASCMP
SRCHLIST DD DISP=SHR,DSN=&HLQ..&LOGID..ENDV.SRCH.LIST
ISPPROF DD DSN=&&TEMP01,DISP=(,DELETE),SPACE=(TRK,(5,5,10)),
DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=3120)
ISPLOG DD DSN=&&TEMP02,DISP=(,DELETE),SPACE=(TRK,(5,5,10)),
DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=3120)
ISPLLIB DD DISP=SHR,DSN=LMQS.SYSB.MQSERIES.SCSQLOAD.FIR
ISPPLIB DD DISP=SHR,DSN=SYS2.SB01.DMSLIB
ISPPLIB DD DISP=SHR,DSN=SYS2.SB01.DMSLIB
ISPSLIB DD DISP=SHR,DSN=SYS1.SISPSLIB
ISPTLIB DD DISP=SHR,DSN=SYS1.SISPTENU
ISPTABL DD DISP=SHR,DSN=TIB.A.DMSTAB
Could you please help me to get what is wrong with this code.