Hello again, OK, I did some pondering. I wanted to suppress the CP command and SETtting CMSTYPE of coarse did suppress it. so I used the PIPE approach. I would hope that userids should not match literals lke DISK or NOLOG, but I liked the 'NOT IN CP DIRECTORY' message from the spool command. I could link a disk, but that assumes a 191 and most service machine do have a 191. I always like it when other post what they have come up with so here goes:
/* REXX */ /* GET RDR FILES FOR LAST TWO DAYS FROM DIFFERENT SOURCES */ TRACE N ARG INPUT IW = WORDS(INPUT) TODAY = DATE(J) YESTERDAY = TODAY -1 YESTERDAY = RIGHT(YESTERDAY,5,'0') TODAY = DATE(U,TODAY,J) YESTERDAY = DATE(U,YESTERDAY,J) TODAY = SUBSTR(TODAY,1,5) YESTERDAY = SUBSTR(YESTERDAY,1,5) IF IW = 0 THEN DO SAY 'NO PARAMETERS PASSED' EXIT END ELSE 'CP DEF PUN 01D' DO X=1 TO IW CW = WORD(INPUT,X) CW = STRIP(CW) 'PIPE CP SPOOL 01D TO' CW '| STEM RESP.' IF WORD(RESP.1,1) = 'HCPCSP053E' THEN DO SAY CW 'IS NOT A VALID USERID' ITERATE END 'Q RDR' CW 'ALL (STACK' QR = QUEUED() DO Y=1 TO QR PARSE UPPER PULL RF RF = STRIP(RF) IF (WORD(RF,8) = TODAY) && (WORD(RF,8) = YESTERDAY) THEN 'TRANSFER' CW 'RDR' WORD(RF,2) 'TO * RDR' END /* DO Y */ END /* DO X */ 'CP DET 01D' You may pass multiple service machine names to this, so the CP DEF and CP DET are only done once. I will use it a disaster recovry to collect all the recent consoles. Thanks again, Dave H.