On Fri, 1 Jun 2007 03:25:00 +0530, Varun Manocha wrote:
>The other option that I know would be to temporarily allocate a dataset,
>EXECIO the control statements I need to that dataset and then delete the
>temporary dataset after the call to IEBCOPY. However, I was just wondering
>if I can 'pick-up' SYSIN control statements from a variable/queue?
>
Here's a code snippet I've used to build a SYSIN card for SORT from REXX. You
should be able to do something similar for IEBCOPY.
"ALLOC F(SYSIN),
RECFM(F,B) LRECL(80) BLKSIZE(27920),
SPACE(1) TRACKS CATALOG"
RetCode=RC
IF RetCode /= 0 THEN DO
SAY "*******************************************************
*****"
SAY "An ERROR was detected allocating the SYSIN file"
SAY " The return code from ALLOCate is: " RetCode
SAY "*******************************************************
*****"
maxRC=12
SIGNAL EXIT
END /* IF */
QUEUE " SORT FIELDS=(1,44,CH,A),EQUALS CATALOG NAME"
QUEUE " SUM FIELDS=NONE ELIMINATE DUPES"
QUEUE " END ++ DISASTER RECOVERY ACTIVE CATALOG IDENTIFICATION"
"EXECIO * DISKW SYSIN(FINIS"
RetCode=RC
IF RetCode /= 0 THEN DO
SAY "*******************************************************
*****"
SAY "An ERROR was detected loading the SYSIN SORT Control file"
SAY " The return code from DISKW is: " RetCode
SAY "*******************************************************
*****"
maxRC=12
SIGNAL EXIT
END /* IF */
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html