I know I can do this:
/* rexx */
alloc fi(sysin) da(in) shr reu /* assumes correct idcams stmts */
alloc fi(sysprint) da(*)
call 'sys1.linklib(idcams)'
and the output will be put up on the tso terminal
I need to find a way to feed idcams so I can capture the output via
outtrap.
Anyone have any examples / ideas on this simple aspect?
TIA
---SRO
Just about all of the IDCAMS commands can be typed as TSO
commands. Have you tried just executing the statements? (You may
have to put them into a wide dataset with one line per statement.)
As an alternative: Rather than allocating SYSPRINT to the
terminal, allocate it to a dataset, and read that dataset.
P.S.
Since you're not munging your address, anyway, you should
join and post via the Listserv. Your question will be seen by
many more people, that way.
--
Arthur T. - ar23hur "at" intergate "dot" com
Looking for a z/OS (IBM mainframe) systems programmer position
--------------------------------------------------------------
Since you're not munging your address, anyway, you should
join and post via the Listserv. Your question will be seen by
many more people, that way.
--------------------------------------------------------------
Can someone explain what "MUNGING your address" is and how do I join &
post via the Listserv?
I did think about allocating sysprint to a dataset and reading it but I
suspected there would be an easier way.... it's late and I'll need to
try it in the morning.. thanks
TIA
---SRO
Modify it to suit your needs.
/* REXX UTILITY CLIST
*/
PARSE UPPER ARG WITH '/' DEBUGVAR '/' FUNCVAR '/' SAYVAR
'/',
RESTDATA
'/'
IF DEBUGVAR = 'DEBUG' THEN TRACE
R
PASSBACK='ISPFREAD'()
PARSE VAR PASSBACK ISPFSID ISPFABBR ISPFMVS
REST
FUNCVAR =
STRIP(FUNCVAR)
SAYVAR =
STRIP(SAYVAR)
CALL
BKB_INIT
CALL MULTILBL
FUNCVAR
CALL
WRITE_SUN
IF FUNCVAR = 'CAMSIT' | FUNCVAR = 'CAMSEXIST'
THEN
CALL
ATTATCH_IDCAMS
ELSE
NOP
IF RCODE = 16
THEN
DO
SAY ' WE ARE GOING TO ABEND THIS SO WE GET NOTICED....
'
SAY 'CAMS LOCATE ERROR - ON A FILE VIA LISTCAT - VIEW SYSPRINT
DDNAME'
END
EXIT
RCODE
BKB_INIT:
DATAOUT =
0
RCODE =
0
T. =
0
SELECT
WHEN ISPFSID = "A70N"
THEN,
DO; SUNDBASE = "SMS10P.SYSA";
END;
WHEN ISPFSID = "SYS2"
THEN,
DO; SUNDBASE = "SMS10P.SYS2";
END;
WHEN ISPFSID = "H80C"
THEN,
DO; SUNDBASE = "SMS10P.SYSH";
END;
WHEN ISPFSID = "I90C"
THEN,
DO; SUNDBASE = "SMS10P.SYSH";
END;
WHEN ISPFSID = "L90C"
THEN,
DO; SUNDBASE = "SMS10P.SYSH";
END;
WHEN ISPFSID = "O90C"
THEN,
DO; SUNDBASE = "SMS10P.SYSH";
END;
WHEN ISPFSID = "VT2N"
THEN,
DO; SUNDBASE = "SMS10P.SYSSMS";
END;
OTHERWISE
SUNDBASE =
"INVALID.DATASET.NAME.BADISPFSYSID"
END
RETURN
0
/* MULTILBL: PROCEDURE
*/
MULTILBL:
ARG LABEL . /* ONE WORD, UPPER CASE
*/
/* CAN ADD CHECKS FOR VALID LABELS HERE
*/
SIGNAL VALUE LABEL /* TRANSFER CONTROL TO WHEREVER
*/
RETURN
0
SRNEW:
DATAOUT =
5
DDOUT =
"SUNOUT"
T.1="DATABASE "||
SUNDBASE||";"
T.2="SELECT
ADRAPPL,ADRJNAM,ADRJTYPE,ADRDESC"
T.3=" FROM ADR WHERE ADRAPPL = '$
$SRNEW';"
T.4=" ORDER BY ADRAPPL,
ADRJNAM"
T.5=" GROUP BY ADRAPPL,
ADRJNAM"
RETURN
0
CAMSIT:
DATAOUT =
6
DDOUT =
"SYSIN"
ADDRESS TSO "ALLOC FI(SYSIN) DA('SMS00P.SYSIN.SUNBKUTL') NEW
LRECL(80),
BLKSIZE(0) RECFM(F B)
DELETE"
T.1 = " LISTCAT ENT('"||RESTDATA||"')"||" GDG
NAME"
T.2 = " IF LASTCC = 4 THEN DO
"
T.3 = " SET MAXCC = 0
"
T.4 = " DEFINE GDG (NAME('"||RESTDATA||"') LIMIT(5)
SCRATCH)"
T.5 = "
END"
T.6 = " ELSE SET MAXCC =
0"
RETURN
0
CAMSEXIST:
DATAOUT =
5
DDOUT =
"SYSIN"
ADDRESS TSO "ALLOC FI(SYSIN) DA('SMS00P.SYSIN.SUNBKUTL') NEW
LRECL(80),
BLKSIZE(0) RECFM(F B)
DELETE"
T.1 = " LISTCAT ENT('"||RESTDATA||"')"||"
NAME"
T.2 = " IF LASTCC = 4 THEN DO
"
T.3 = " SET MAXCC =
16"
T.4 = "
END"
T.5 = " ELSE SET MAXCC =
0"
RETURN
0
ATTATCH_IDCAMS:
ADDRESS ATTCHMVS
"IDCAMS"
RCODE =
RC
SAY "IDCAMS RETURN CODE IS:"
RCODE
RETURN
RCODE
WRITE_SUN:
DO I = 1 TO
DATAOUT
QUEUE
T.I
IF SAYVAR = "SAY" THEN SAY
T.I
"EXECIO * DISKW" DDOUT
"( OPEN"
END
DELSTACK
QUEUE
""
"EXECIO 0 DISKW" DDOUT
"( FINIS"
RETURN
0
> ---SRO- Hide quoted text -
>
> - Show quoted text -
>Can someone explain what "MUNGING your address" is and how do I join &
>post via the Listserv?
Last first. At the bottom of every post made via the
Listserv are these lines:
>For TSO-REXX subscribe / signoff / archive access instructions,
>send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
First last. Notice my e-mail address in the headers. It's
<art...@munged.invalid>. Any bot harvesting e-mail addresses for
spam won't get anything from that. My sig has my actual e-mail
address. HOW you mung will depend on your newsreader, and I'm not
familiar enough with Thunderbird to give you details. I'd suggest
a Google on MUNG and THUNDERBIRD.
(Some Listservs auto-mung addresses when mirroring them to
Usenet. TSO-REXX doesn't, so I don't post via the Listserv,
here.)