Following is the snippet of the code that performs this function:
CHECKAVAIL:
'TS'
STROBEDS = "'" || USERID() || ".STROBES.INPUT.PHASE2" || "'"
SAY SYSDSN(STROBEDS)
IF SYSDSN(STROBEDS) <> 'OK' THEN DO
SAY "STROBE INPUT NOT FOUND."
EXIT
END
RETURN
'TS'
STROBEDS = "'" || USERID() || ".STROBES.INPUT.PHASE2" || "'"
SAY SYSDSN(STROBEDS)
IF SYSDSN(STROBEDS) <> 'OK' THEN DO
SAY "STROBE INPUT NOT FOUND."
EXIT
END
RETURN
The dataset AAAA.STROBES.INPUT.PHASE2 is available. And this particular code works perfectly when executed in online mode.
However, when executed in batch, this code fails.
Here is the trace output when executed in Batch:
READY
ISPSTART CMD(EXEC 'AAAA.STROBE.PHASE2.TOOL.BACKUP(PHASE2)')
47 *-* STROBEDS = "'" || USERID() || ".STROBES.INPUT.PHASE2" || "'"
>>> "'AAAA.STROBES.INPUT.PHASE2'"
+++ Interactive trace. TRACE OFF to end debug, ENTER to continue. +++
48 *-* SAY SYSDSN(STROBEDS)
>>> "DATASET NOT FOUND"
DATASET NOT FOUND
49 *-* IF SYSDSN(STROBEDS) <> 'OK'
>>> "1"
*-* THEN
*-* DO
50 *-* SAY "STROBE INPUT NOT FOUND."
>>> "STROBE INPUT NOT FOUND."
STROBE INPUT NOT FOUND.
51 *-* EXIT
ISPSTART CMD(EXEC 'AAAA.STROBE.PHASE2.TOOL.BACKUP(PHASE2)')
47 *-* STROBEDS = "'" || USERID() || ".STROBES.INPUT.PHASE2" || "'"
>>> "'AAAA.STROBES.INPUT.PHASE2'"
+++ Interactive trace. TRACE OFF to end debug, ENTER to continue. +++
48 *-* SAY SYSDSN(STROBEDS)
>>> "DATASET NOT FOUND"
DATASET NOT FOUND
49 *-* IF SYSDSN(STROBEDS) <> 'OK'
>>> "1"
*-* THEN
*-* DO
50 *-* SAY "STROBE INPUT NOT FOUND."
>>> "STROBE INPUT NOT FOUND."
STROBE INPUT NOT FOUND.
51 *-* EXIT
The JCL:
//TSOEXEC JOB (TEST),'TEST2',MSGLEVEL=(1,1),CLASS=A,
// MSGCLASS=A,NOTIFY=&SYSUID
//STEP0010 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSPROC DD DSN=AAAA.STROBE.PHASE2.TOOL.BACKUP,DISP=SHR
//ISPPROF DD DSN=&&ISPPROF,DISP=(,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
// RECFM=FB,LRECL=80
//*ISPTLIB DD DSN=&&ISPPROF,DISP=(,DELETE),
//* UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
//* RECFM=FB,LRECL=80
//* DD DSN=SYNA2.ISPF.ISPPROF.ST06,DISP=SHR
//ISPTLIB DD DSN=SYS2.TCS.TABLE,DISP=SHR
// DD DSN=ISP.SISPTENU,DISP=SHR
// DD DSN=IMSV10.IMS1010.SDFSTLIB,DISP=SHR
// DD DSN=ISF.SISFTLIB,DISP=SHR
// DD DSN=SYS1.SBPXTENU,DISP=SHR
// DD DSN=EOY.SEOYTENU,DISP=SHR
// DD DSN=FMN.SFMNTENU,DISP=SHR
// DD DSN=SYS1.SERBTENU,DISP=SHR
//ISPPLIB DD DSN=SYS2.TCS.PANEL,DISP=SHR
// DD DSN=ISF.SISFPLIB,DISP=SHR
// DD DSN=IMSV10.IMS1010.SDFSPLIB,DISP=SHR
// DD DSN=ISP.SISPPENU,DISP=SHR
// DD DSN=SYS1.SBPXPENU,DISP=SHR
// DD DSN=EOY.SEOYPENU,DISP=SHR
// DD DSN=FMN.SFMNPENU,DISP=SHR
// DD DSN=SYS1.SERBPENU,DISP=SHR
//ISPMLIB DD DSN=SYS2.TCS.MSG,DISP=SHR
// DD DSN=ISF.SISFMLIB,DISP=SHR
// DD DSN=IMSV10.IMS1010.SDFSMLIB,DISP=SHR
// DD DSN=ISP.SISPMENU,DISP=SHR
// DD DSN=EOY.SEOYMENU,DISP=SHR
// DD DSN=SYS1.SBPXMENU,DISP=SHR
// DD DSN=DSN810.SDSNSPFM,DISP=SHR
// DD DSN=FMN.SFMNMENU,DISP=SHR
// DD DSN=SYS1.SERBMENU,DISP=SHR
//ISPSLIB DD DSN=SYS2.TCS.SKEL,DISP=SHR
// DD DSN=ISP.SISPSENU,DISP=SHR
// DD DSN=ISP.SISPSLIB,DISP=SHR
// DD DSN=DSN810.SDSNSPFS,DISP=SHR
// DD DSN=FMN.SFMNSLIB,DISP=SHR
//ISPLOG DD SYSOUT=*,DCB=(LRECL=125,RECFM=VBA)
//SYSTSIN DD *
ISPSTART CMD(EXEC AAAA.STROBE.PHASE2.TOOL.BACKUP(PHASE2)')
// MSGCLASS=A,NOTIFY=&SYSUID
//STEP0010 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSPROC DD DSN=AAAA.STROBE.PHASE2.TOOL.BACKUP,DISP=SHR
//ISPPROF DD DSN=&&ISPPROF,DISP=(,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
// RECFM=FB,LRECL=80
//*ISPTLIB DD DSN=&&ISPPROF,DISP=(,DELETE),
//* UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
//* RECFM=FB,LRECL=80
//* DD DSN=SYNA2.ISPF.ISPPROF.ST06,DISP=SHR
//ISPTLIB DD DSN=SYS2.TCS.TABLE,DISP=SHR
// DD DSN=ISP.SISPTENU,DISP=SHR
// DD DSN=IMSV10.IMS1010.SDFSTLIB,DISP=SHR
// DD DSN=ISF.SISFTLIB,DISP=SHR
// DD DSN=SYS1.SBPXTENU,DISP=SHR
// DD DSN=EOY.SEOYTENU,DISP=SHR
// DD DSN=FMN.SFMNTENU,DISP=SHR
// DD DSN=SYS1.SERBTENU,DISP=SHR
//ISPPLIB DD DSN=SYS2.TCS.PANEL,DISP=SHR
// DD DSN=ISF.SISFPLIB,DISP=SHR
// DD DSN=IMSV10.IMS1010.SDFSPLIB,DISP=SHR
// DD DSN=ISP.SISPPENU,DISP=SHR
// DD DSN=SYS1.SBPXPENU,DISP=SHR
// DD DSN=EOY.SEOYPENU,DISP=SHR
// DD DSN=FMN.SFMNPENU,DISP=SHR
// DD DSN=SYS1.SERBPENU,DISP=SHR
//ISPMLIB DD DSN=SYS2.TCS.MSG,DISP=SHR
// DD DSN=ISF.SISFMLIB,DISP=SHR
// DD DSN=IMSV10.IMS1010.SDFSMLIB,DISP=SHR
// DD DSN=ISP.SISPMENU,DISP=SHR
// DD DSN=EOY.SEOYMENU,DISP=SHR
// DD DSN=SYS1.SBPXMENU,DISP=SHR
// DD DSN=DSN810.SDSNSPFM,DISP=SHR
// DD DSN=FMN.SFMNMENU,DISP=SHR
// DD DSN=SYS1.SERBMENU,DISP=SHR
//ISPSLIB DD DSN=SYS2.TCS.SKEL,DISP=SHR
// DD DSN=ISP.SISPSENU,DISP=SHR
// DD DSN=ISP.SISPSLIB,DISP=SHR
// DD DSN=DSN810.SDSNSPFS,DISP=SHR
// DD DSN=FMN.SFMNSLIB,DISP=SHR
//ISPLOG DD SYSOUT=*,DCB=(LRECL=125,RECFM=VBA)
//SYSTSIN DD *
ISPSTART CMD(EXEC AAAA.STROBE.PHASE2.TOOL.BACKUP(PHASE2)')
I went through the forum for similar posts, and came across one here: http://ibmmainframes.com/about54723.html
The topic starter mentioned the use of DYNMNBR parameter helped him, so I tried this
//STEP0010 EXEC PGM=IKJEFT01,DYNMNBR=30
But of no use.
Could anyone help me out with this? Please could you tell me where I am wrong.