Thanks
Hello,
I would like to pass my REXX variables to an FDREPORT and then,if
possible, retrieve this information from the terminal to a dataset that
is prefixed with the user's ID.
Here is my REXX that generates a string of UCB addresses:
/* REXX */
/*TRACE ALL*/
ADDRESS TSO
"ALLOC F(AWRITE) DA('DCBE70.REXX.UCBOUT') MOD"
SAY 'ENTER A UNIT, STARTING AND ENDING'
PARSE PULL S E
DO II = X2D( S ) TO X2D( E )
QUEUE D2X( II )
SAY D2X( II )
END II
QUEUE ''
"EXECIO * DISKW AWRITE (OPEN FINIS)"
"FREE F(AWRITE) KEEP"
EXIT
Here is my FDREPORT that pulls a string of UCB addresses that are both
online and offline:
//STEP01 EXEC PGM=FDREPORT
//ABRMAP DD DSN=DCBE70.UCBGEN.FDR.OUT,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFAULT DATATYPE=VTOC
XSELECT UNIT>=1600,UNIT<=16FF
REPORT FIELD=(VOL,UNIT)
PRINT SORTALLOC=YES,DATATYPE=VOLDATA,ENABLE=SELECTOFFLIN
/*
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
From REXX you can put SYSIN stuff in the queue then
CALL *(FDREPORT)
Bobh
Edmond,
I saw your note yesterday, but I didn't immediately understand what you
were asking. Using my level of communications skills, I'm catching the
idea that you want to know how to invoke FDREPORT in REXX.
Here are a couple of examples of invoking programs in REXX:
1 - IEHLIST calls can exploit alternate DD names if you choose to do so.
2 - SUPERC is more straight forward, and a more typical example.
IEHLIST
Address TSO,
"ALLOC FI(BOUTDD) DA('"userid()".BLOADOUT') MOD DELETE REU",
"SPACE(1 1) TRACK"
Address TSO,
"ALLOC FI(COUTDD) DA('"userid()".CLOADOUT') MOD DELETE REU",
"SPACE(1 1) TRACK"
Address TSO, /* Pseudo IEFBR14 step */
"FREE FI(BOUTDD COUTDD)"
Address TSO,
"ALLOC FI(SYSPRINT) DA('QD.S.QDNDVR.DF.EMERSTAT("btoday")') SHR REU"
Address TSO,
"ALLOC FI(BLOAD) DA('ZE.EPROD.EEMER.LOADLIB') SHR REU"
Address TSO,
"ALLOC FI(SYSIN) DA('ZE.ACRO.DT.ISP.CNTL(EMERINB)') SHR REU"
/* To execute utilities, see example in:
2.5.9.2 The LINKMVS and ATTCHMVS Host Command Environments, in
SA22-7790-06 - z/OS: TSO/E REXX Reference - IKJ4A360.BOO/PDF
based on:
A.0 Appendix A. Invoking Utility Programs from an Application Program
in SC26-7414-03 - z/OS: DFSMSdfp Utilities - DGT2U120.BOO/PDF.
*/
prog = 'IEHLIST'
parm = '' /* Standard PARM, as from JCL */
ddlist = copies('00'x,8) , /* DDname 1 override: SYSLIN */
||copies('00'x,8) , /* DDname 2 override: n/a */
||copies('00'x,8) , /* DDname 3 override: SYSLMOD */
||copies('00'x,8) , /* DDname 4 override: SYSLIB */
||copies('00'x,8) , /* DDname 5 override: SYSIN */
||copies('00'x,8) , /* DDname 6 override: SYSPRINT */
||copies('00'x,8) , /* DDname 7 override: SYSPUNCH */
||left('BLOAD',8) , /* DDname 8 override: SYSUT1 */
||left('CLOAD',8) , /* DDname 9 override: SYSUT2 */
||copies('00'x,8) , /* DDname 10 override: SYSUT3 */
||copies('00'x,8) , /* DDname 11 override: SYSUT4 */
||copies('00'x,8) , /* DDname 12 override: SYSTERM */
||copies('00'x,8) , /* DDname 13 override: n/a */
||copies('00'x,8) /* DDname 14 override: SYSCIN */
address 'LINKMVS' prog 'PARM DDLIST'
If RC <> 0 then
Do
Say 'Error running IEHLIST for LOADLIB; RC:' rc
Exit rc
End
...
SUPERC
Address TSO,
"ALLOC FI(NEWDD) DA('QD.S.QDNDVR.DF.EMERSTAT("ctoday")') SHR REU"
Address TSO,
"ALLOC FI(OLDDD) DA('QD.S.QDNDVR.DF.EMERSTAT("lastC")') SHR REU"
Address TSO,
"ALLOC FI(OUTDD) DA('"userid()".CLOADOUT') CATALOG REU",
"TRACKS SPACE(1 1) LRECL(133) BLKSIZE(0) RECFM(F B)"
Address TSO,
"ALLOC FI(SYSIN) DA('ZE.ACRO.DT.ISP.CNTL(EMERSUPC)') SHR REU"
parm = 'DELTAL,LINECMP,COVSUM,DLMDUP,NOPRTCC,NARROW'
Address LINKMVS "ISRSUPC parm"
You can see that the TSO ALLOCATE command is used to establish DD
statements. The input to your FDREPORT can be QUEUEd to a data set just as
you did with the UCBs.
I noticed the OPEN FINIS in your EXECIO; I've only use OPEN when I intend
to do DISKR/DISKW for one or more records in subsequent EXECIOs, with a
(FINIS for a "close" when all done. Typically, you can use "EXECIO * DISKW
ddname (FINIS" to write out the queued lines without using OPEN.
I hope this helps - if I interpreted your need correctly.
Michael
-----Original Message-----
From: TSOREXX, @HW1SMTP On Behalf Of Michael Bradley
Sent: Friday, January 04, 2008 6:39 AM
To: TSOREXX, @HW1SMTP
---
Bob Bridges, rhb...@attglobal.net
cell 336 382-7313
hotel land line 330 668-9818 ext 7938
/* Times will change and even reverse many of your present opinions.
Refrain, therefore, awhile from setting yourself up as a judge of the
highest matters. -Plato */
-----Original Message-----
From: VanBebber, Edmond@DTS
Sent: Friday, January 4, 2008 09:08
This is only my second time posting and wanted to make sure this went
through and was posted yesterday. If it did, please disregard
.
.
.
-----Original Message-----
From: TSOREXX, @HW1SMTP On Behalf Of Bob Bridges
Sent: Friday, January 04, 2008 6:54 AM
To: TSOREXX, @HW1SMTP
Subject: Re: [TSO-REXX] FW: REXX Variable Passed to FDREPORT