Hello All,
I am new into the Mainframe world. I have gone through rexx manuals and started off with few codes.
I have a scenario where i will get the input from the user and have to create a PDS dataset and then create members dynamically inside the PDS. Where there is a condition if the member is already present then i will reuse them and append the data to the member
SAY 'ENTER THE SETNAME:'
PULL SETNAME
NEWDSN = 'HLQ.REPORT'
NEWDSN = NEWDSN || '.' || SETNAME
SAY NEWDSN
ADDRESS TSO
"ALLOC F(LISTDAT) DS('"NEWDSN"') NEW SPACE (50,20) DIR (10),
DSORG (PO) RECFM (F,B) LRECL (80) BLKSIZE (8000)"
IF SYSDSN("'"NEWDSN"'") = 'OK' THEN
SAY "THE DATASET EXISTS."
ELSE
SAY "THE DATASET DOES NOT EXIST."
ADDRESS TSO
"ALLOC F(INFILE) SHR DS('"DSNAME"')"
/* READ THE DATA to STEM */
"EXECIO * DISKR INFILE (FINIS STEM INDATA."
SAY INDATA.0
INPD = INDATA.1
CALL MEMLIST NEWDSN,"MEM001",INPD
MEMLIST:
PARSE ARG PDS,MEM,DATA
DSN = PDS || "(" || MEM || ")"
SAY 'NEW OUTPUT MEMBER DSN:' DSN /* displaying HLQ.REPORT.SETNAME(MEM001)
ADDRESS TSO
"ALLOC DA('"PDS"("MEM")') F(MYOTDD) NEW"
"EXECIO 0 DISKW MYOTDD (STEM DATA. FINIS"
SAY 'RCE:' RC
"FREE F(MYOTDD)"
Using the above code i m able to create the dataset HLQ.REPORT.SETNAME but the member "MEM001" is not getting created
i checked via ispf panel and it is showing as no members found.
I checked the error code rc and it is 0 as well.
kindly share your thoughts and thanks in advance