After I changed the DISP of temp PDS library to DISP=(NEW,PASS), the REXX program got executed. I have verified this by adding the SASLOG statement in REXX (ADDRESS SAS "++SASLOG Control is IN REXX pgm" ).
In the output report FT11F001 (is it SASLOG??), output "Control is IN REXX pgm" was shown. However, no statements got executed after this (ADDRESS TSO, IF statements). No output was shown regarding dataset allocation. Is there any problem with subcommand environment? Thank you for helping out.
//REXXSTEP EXEC PGM=IEBUPDTE,REGION=1024K,
// PARM='NEW'
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD DSN=&TEMP1,
// DISP=(NEW,PASS,DELETE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PO),
// SPACE=(CYL,(1,1,10)),UNIT=TEMPDISK
//SYSIN DD *
./ ADD NAME=TESTREXX
/**********************REXX******/
ADDRESS SAS "++SASLOG IN REXX"
ADDRESS TSO "ALLOC DA('NW4G.TEST') NEW CATALOG",
"DSORG(PS) RECFM(FB) LRECL(80) BLOCK SPACE(1,1) CYL"
IF RC = 0 THEN
ADDRESS SAS "++SASLOG ALLOC SUCCESSFUL"
ELSE
ADDRESS SAS "++SASLOG ALLOC UNSUCCESSFUL" RC
./ ENDUP
//STEP30 EXEC SAS
//SYSOUT DD SYSOUT=*
//SASREXX DD DSN=&TEMP1,DISP=(OLD,DELETE,DELETE)
//SYSIN DD *
OPTIONS REXXMAC ;
TESTREXX;