Walls, Lucious G CONT , SITC
2005-06-22 03:16:44 UTC
Hello,
I've just about given up trying to create a new generation data set using the TSO ALLOCATE command and the EXECIO command. Would someone provide a sample Rexx procedure that creates a new generation data set or point out the mistakes in the following one I created?
/* REXX */
/* THIS Pgm WILL read 10 records onto the data stack and then */
/* Write them to an output file using the rexx EXECIO command. */
/* P-L-E-A-S-E D-O-N-T D-E-L-E-T-E */
/*********************************************************************/
SAY "ENTER INPUT DATA SET NAME:"
SAY
PARSE EXTERNAL INFILE
IF INFILE = '' THEN DO
SAY "NO INPUT DATASET NAME ENTERED - ",
"PROGRAM TERMINATED!"
EXIT 12
END
SAY "ENTER OUTPUT DATA SET NAME:"
SAY
PARSE EXTERNAL OUTFILE
IF OUTFILE = '' THEN DO
SAY "NO OUTPUT DATASET NAME ENTERED - ",
"PROGRAM TERMINATED!"
EXIT 12
END
"NEWSTACK"
"ALLOCATE DSNAME('"INFILE"') DDNAME(INRECS) OLD"
SAY "NO OUTPUT DATASET NAME ENTERED - ",
"PROGRAM TERMINATED!"
EXIT 12
END
"NEWSTACK"
"ALLOCATE DSNAME('"INFILE"') DDNAME(INRECS) OLD"
"EXECIO 10 DISKR INRECS (FINIS"
QUEUE ""
"ALLOCATE DSNAME('"OUTFILE"') DDNAME(NEWGENR)",
"NEW CATALOG DSORG(PS) RECFM(F,B) LRECL(80) SPACE (1 1) TRACKS"
"EXECIO * DISKW NEWGENR (FINIS"
"DELSTACK"
"FREE DDNAME(INRECS NEWGENR)"
SELECT
WHEN RC=0 THEN
SAY "EXECIO COMMAND EXECUTED SUCCESSFULLY."
WHEN RC=2 THEN
SAY "EXECIO COMMAND DID NOT EXECUTE SUCCESSFULLY, ",
"BECAUSE THE DATA QUEUE IS EMPTY."
OTHERWISE DO
SAY "EXECIO COMMAND DID NOT EXECUTE SUCCESSFULLY."
SAY "EXECIO ERROR CODE IS - " RC
END
END
I got the following error message when I executed this REXX procedure:
IKJ56709I INVALID DATA SET NAME, 'ORPT.P.GHIT1AP4.GHR03CN1(+1)'
IKJ56701I MISSING DATA SET NAME OR *+
IKJ56701I MISSING NAME OF DATA SET TO BE ALLOCATED
IRX0555E The input or output file NEWGENR is not allocated. It cannot be opened
for I/O.
IRX0670E EXECIO error while trying to GET or PUT a record.
IKJ56247I FILE NEWGENR NOT FREED, IS NOT ALLOCATED
EXECIO COMMAND DID NOT EXECUTE SUCCESSFULLY.
EXECIO ERROR CODE IS - 12
***
Thanks,
Lucious Walls
SPAWAR ITC (Washington)
***@navy.mil
703-693-0940 DSN 223-0940
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
I've just about given up trying to create a new generation data set using the TSO ALLOCATE command and the EXECIO command. Would someone provide a sample Rexx procedure that creates a new generation data set or point out the mistakes in the following one I created?
/* REXX */
/* THIS Pgm WILL read 10 records onto the data stack and then */
/* Write them to an output file using the rexx EXECIO command. */
/* P-L-E-A-S-E D-O-N-T D-E-L-E-T-E */
/*********************************************************************/
SAY "ENTER INPUT DATA SET NAME:"
SAY
PARSE EXTERNAL INFILE
IF INFILE = '' THEN DO
SAY "NO INPUT DATASET NAME ENTERED - ",
"PROGRAM TERMINATED!"
EXIT 12
END
SAY "ENTER OUTPUT DATA SET NAME:"
SAY
PARSE EXTERNAL OUTFILE
IF OUTFILE = '' THEN DO
SAY "NO OUTPUT DATASET NAME ENTERED - ",
"PROGRAM TERMINATED!"
EXIT 12
END
"NEWSTACK"
"ALLOCATE DSNAME('"INFILE"') DDNAME(INRECS) OLD"
SAY "NO OUTPUT DATASET NAME ENTERED - ",
"PROGRAM TERMINATED!"
EXIT 12
END
"NEWSTACK"
"ALLOCATE DSNAME('"INFILE"') DDNAME(INRECS) OLD"
"EXECIO 10 DISKR INRECS (FINIS"
QUEUE ""
"ALLOCATE DSNAME('"OUTFILE"') DDNAME(NEWGENR)",
"NEW CATALOG DSORG(PS) RECFM(F,B) LRECL(80) SPACE (1 1) TRACKS"
"EXECIO * DISKW NEWGENR (FINIS"
"DELSTACK"
"FREE DDNAME(INRECS NEWGENR)"
SELECT
WHEN RC=0 THEN
SAY "EXECIO COMMAND EXECUTED SUCCESSFULLY."
WHEN RC=2 THEN
SAY "EXECIO COMMAND DID NOT EXECUTE SUCCESSFULLY, ",
"BECAUSE THE DATA QUEUE IS EMPTY."
OTHERWISE DO
SAY "EXECIO COMMAND DID NOT EXECUTE SUCCESSFULLY."
SAY "EXECIO ERROR CODE IS - " RC
END
END
I got the following error message when I executed this REXX procedure:
IKJ56709I INVALID DATA SET NAME, 'ORPT.P.GHIT1AP4.GHR03CN1(+1)'
IKJ56701I MISSING DATA SET NAME OR *+
IKJ56701I MISSING NAME OF DATA SET TO BE ALLOCATED
IRX0555E The input or output file NEWGENR is not allocated. It cannot be opened
for I/O.
IRX0670E EXECIO error while trying to GET or PUT a record.
IKJ56247I FILE NEWGENR NOT FREED, IS NOT ALLOCATED
EXECIO COMMAND DID NOT EXECUTE SUCCESSFULLY.
EXECIO ERROR CODE IS - 12
***
Thanks,
Lucious Walls
SPAWAR ITC (Washington)
***@navy.mil
703-693-0940 DSN 223-0940
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX