hello every one .
i have a question i write a rexx to save all dataset start with (ucat ) means ucat* and retrieved informaiton (Tracks, %Used,XT,) and if their XT is larger than 16 save them in output file.
i write a pgm to do that when execute it it woprks but when run it by jcl is returned max-rc 0 but didnt work and dont allocate empty output file :
here is my code :
rexx:
/* REXX */
TRACE OFF
"DELSTACK"
CNT=0
I=0
X=1
USEDSN="'DBKISA3.REP.OUT'"
B='DBKISA3.*'
CALL ALLOCATE_TEMP_DATASET
"ISPEXEC LMDLIST LISTID("NJF") OPTION(FREE)"
"ISPEXEC LMDINIT LISTID("NJF") LEVEL(&B)"
/*
IF RC=0 THEN DO
SAY "* UCAT.TS2TSO * 50 * * * "
SAY "**********************************************************************",
"***********************************************************"
SAY "* DSNAME * EXT_NO * CR_DATE * VOLSER * TRACKS ",
"* USED * REF_DATE * DEF_EXT * EXECUTE_PROGRAM *"
SAY "**********************************************************************" ,
"***********************************************************"
/*
SAY '*****************************************************************'
SAY '* DSNAME * NUMBER OF EXTENTS *'
SAY '*****************************************************************'
*/
END */
DO FOREVER
"ISPEXEC LMDLIST LISTID("NJF") STATS(YES) OPTION(LIST) DATASET(DSVAR)"
IF RC = 0 THEN
DO
QUEUE'* '||LEFT(DSVAR,20)||'* '||LEFT(ZDLEXTX,10)||'* '||LEFT(ZDLCDATE,10),
||'* '||LEFT(ZDLVOL,11)||'* '||LEFT(ZDLSIZE,11)||'* '||LEFT(ZDLUSED,11)||'* ',
||LEFT(ZDLRDATE,10)||'* '||LEFT(DATE(S)||'_'TIME(N),20)
/* SAY'* 'ZDLCDATE
SAY'* 'ZDLVOL
SAY'* 'ZDLSIZE
SAY'* 'ZDLUSED
SAY'* 'ZDLRDATE */
END
ELSE LEAVE
END
TRACE OFF
"ALLOC F(OUT1) DA("USEDSN") MOD REUSE"
"EXECIO * DISKW OUT1 ( FINIS "
"FREE FI(OUT1)"
SAY'****************************'
SAY'* TEMPDS.REPORT UPDATED. *'
SAY'****************************'
/********************************************************************/
/* ALLOCATING TEMP SHARE TEMP DATASETS */
/********************************************************************/
ALLOCATE_TEMP_DATASET:
X=MSG(OFF)
ADDRESS TSO
CREAT_TEMPDS= "ALLOC DSNAME("||USEDSN||") NEW REUSE UNIT(SYSDA)
DSORG(PS) RECFM(F,B) LRECL(140) BLKSIZE(1400) SPACE(15,15) CYL"
ALLOC_OUTPUT_FILE ="ALLOC DD(DATA) DA("||USEDSN||") SHR REUSE"
FREEDSN="FREE DSNAME("||USEDSN||")"
ALLOC_OUTPUT_FILE
IF RC<>0 THEN DO
CREAT_TEMPDS
IF RC<>0 THEN SAY "CREATING INFORMATION DATASET FAILED"
ALLOC_OUTPUT_FILE
PUSH "* DSNAME * EXT_NO * CR_DATE * VOLSER * TRACKS ",
"* USED * REF_DATE * EXECUTE_PROGRAM_DATE *"
"EXECIO * DISKW DATA (FINIS"
"FREE DD(DATA)"
FREEDSN="FREE DSNAME("||USEDSN||")"
FREEDSN
END
FREEDSN
RETURN
my jcl :
//TSOTEST JOB CLASS=A,MSGCLASS=X
//STEP10 EXEC PGM=IKJEFT01,REGION=0M,DYNAMNBR=30,
// PARM='LIST3'
//SYSEXEC DD DSN=DBKISA3.JCLS,DISP=SHR
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*
//ISP EXEC PGM=IKJEFT1B,PARM='ISPSTART CMD(XXXX) TEST'
//SYSEXEC DD DISP=SHR,DSN=your.local.exec
//SYSTSPRT DD SYSOUT=*
//ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU
//ISPPLIB DD DISP=SHR,DSN=ISP.SISPPENU
//ISPSLIB DD DISP=SHR,DSN=ISP.SISPSENU
//ISPTLIB DD DISP=SHR,DSN=ISP.SISPTENU
//ISPPROF DD UNIT=SYSDA,SPACE=(TRK,(5,5,4)),RECFM=FB,LRECL=80
//ISPLOG DD SYSOUT=*,RECFM=VA,LRECL=125,BLKSIZE=129
//ISPFILE DD SYSOUT=*,RECFM=FB,LRECL=80,BLKSIZE=6240
//SYSTSIN DD *