i used to run a rexx that write in a output which has been already cataloged, and it works (DISP=SHR)
But, when i run the rexx with an output dataset with DISP=(NEW,CATLG,), it doesn't work.
I have an empty output dataset even if i'am using the same rexx.
Jcl that works :
//VTS2 EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=5000K
//SYSEXEC DD DSN=REXX.LIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//IN DD DSN=DATA.IN(0),DISP=SHR
//* FICHIERS GDG ALRTVTS
//OUT DD DSN=DATA.OUT,DISP=SHR
//SYSTSIN DD *
%REXX01
//*
Jcl taht not works (empty output dataset)
//VTS2 EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=5000K
//SYSEXEC DD DSN=REXX.LIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//IN DD DSN=DATA.IN(0),DISP=SHR
//* FICHIERS GDG ALRTVTS
//OUT DD DSN=DATA.OUT(+1),DISP=(,CATLG),
// SPACE=(TRK,(1,1)),RECFM=FB,LRECL=133,BLKSIZE=27930
//SYSTSIN DD *
%REXX01
//*
and my rexx :
/*REXX*/
TRACE I
"EXECIO * DISKR IN (FINIS STEM DT."
DO J = 1 TO DT.0
PTL.J = SUBSTR(DT.J,22,9)
TEXT.J = SUBSTR(DT.J,1,80)
TX.J = SUBSTR(DT.J,34,2)
IF PTL.J = "PTL A" & TX.J > 10 THEN
DO
QUEUE TEXT.J
END
END
QUEUE ""
"EXECIO * DISKW OUT (FINIS"
EXIT;
the output dataset which is empty have a ? in %Used column.