>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 16.09.04, 13:58:16, schrieb c62...@yahoo.com (Gary) zum Thema REXX
Listcat example in TSO 3.4 option?:
> Does anyone have an example of using REXX to do a Listcat in TSO under
> option 3.4? Thank you.
Hi
if you want to list the infos enter:
LISTC (/) ALL
if you want to page up and down:
MYCMD (on the line) or MYCMD (/)
MYCMD must contain:
parsing of the datasetname
alloc a tempfile
do a listcat writing the tempfile
browse, edit or view the tempfile
exit
thats all
Einen schoenen Tag
Andreas Lerch
What do you mean? LISTC is a TSO command which you could execute from
the commandline anywhere in ispf. Option 3.4 provides vtoc or catalog
search with wildcarded datasetnames, but doesn't use LISTC to do it.
If you want from within a rexx exec to provide equivalent function to
option 3.4, I think it's possible using certain ispf services - and I
think this has been covered on the tso and ispf mailing lists and/or
the bit/listserv.ibm-main & bit.listserv.ispf-l newsgroups fairly
recently.
--
Jeremy C B Nicoll - my opinions are my own.
>Does anyone have an example of using REXX to do a Listcat in TSO
>under option 3.4? Thank you.
/* REXX */
arg dsn
listcat ent'('dsn')'
You'll probably get better answers for that type of question on
ISPF-L, TSO-REXX or IBM-MAIN.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>
Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spam...@library.lspace.org
"Gary" <c62...@yahoo.com> wrote in message
news:a74756b8.04091...@posting.google.com...
In the 3.4 example above, I would like to enter a REXX Command located
where the '????????" is and get, for example, a listcat of DSN
TSO.VSAM.CLUSTER.
Currently I run a batch job to get a listcat.
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUD DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES (TSO.VSAM.CLUSTER) ALL
//
So in the VSAM file example above, I would be looking for EXACTLY the
information a batch Listcat would give me but just in 3.4 to be
displayed. I know there is a way! Thanks for any help.
c62...@yahoo.com (Gary) wrote in message news:<a74756b8.04091...@posting.google.com>...
type in abc where the ??? are, and tso should try to execute a clist
or exec called abc, so make sure you have one in your clist/rexx exec
library (ie SYSPROC or SYSEXEC etc).
Assuming it's in rexx:
/* REXX */
parse args allargs
say allargs
exit
should get you started, to see what parameters are passed to th 'abc'
rexx exec. I think it's simply dsname and maybe volume?
Alternatively iirc you can type, where the ??? are:
LISTC ENT(/)
and that will plug the dsn into a LISTC command. Try reading the help
panels for option 3.4!
>In the 3.4 example above, I would like to enter a REXX Command
>located where the '????????" is and get, for example, a listcat of
>DSN TSO.VSAM.CLUSTER.
Type LISTC ENT(/) ALL with a trailing space. You can also type
cmmands on more than one line, and they need not be the same.
I did finally find what I was looking for. The code for the REXX
Listcat is as follows:
/* REXX */
/* */
/* AUTHOR: MARK ZELDEN */
/* */
/* =================================================== */
/* LISTCAT LINE COMMAND FOR DSN PANEL OPTION 3.4 */
/* ALSO AN ISPF COMMAND IN THE ISPF COMMAND TABLE */
/* =================================================== */
/* ADDRESS ISPEXEC "VGET ZDLDSN SHARED" */
/* "LISTC ALL ENT("ZDLDSN")" */
/* TRACE ?I */
arg NAME
address TSO
if NAME = '' then do
say 'PLEASE ENTER DATASET NAME TO LIST:'
parse upper pull NAME
end
address ISPEXEC "CONTROL ERRORS RETURN"
ddnm = 'DD'random(1,99999) /* choose random ddname */
junk = msg(off)
"ALLOC FILE("ddnm") UNIT(VIO) NEW TRACKS SPACE(5,5) DELETE",
" REUSE LRECL(132) RECFM(F B) BLKSIZE(8976)"
junk = msg(on)
/* */
/* issue listcat cmd and trap output */
/* */
junk=outtrap(LINE.)
"LISTC ALL ENT("name")"
retcode = rc
junk=outtrap('off')
/* */
"EXECIO" line.0 "DISKW" ddnm "(STEM LINE. FINIS"
address ISPEXEC "LMINIT DATAID(LIST) DDNAME("ddnm")"
address ISPEXEC "BROWSE DATAID("list")"
address ISPEXEC "LMFREE DATAID("list")"
junk = msg(off)
"FREE FI("ddnm")"
zdlmsg = 'LISTED RC='retcode
address ispexec "VPUT ZDLMSG SHARED"