I am trying to capture "TSO ISRDDN E" output into a variable, using REXX program(interactive mode).
Tried the below program, but it invokes the ISRDDN E ISPF panel in interactive mode and does not store the data in DATAS1.x variables.
I = OUTTRAP(DATAS1.)
ADDRESS 'TSO' "ISRDDN E" "'"DSN"'"
I = OUTTRAP(OFF)
SAY 'DATAS1.0 IS ' DATAS1.0
SAY 'DATAS1.1 IS ' DATAS1.1
SAY 'DATAS1.2 IS ' DATAS1.2
SAY 'DATAS1.3 IS ' DATAS1.3
SAY 'DATAS1.4 IS ' DATAS1.4
SAY 'DATAS1.5 IS ' DATAS1.5
SAY 'DATAS1.6 IS ' DATAS1.6
Could you please let me know how this could be achieved.
Thanks for viewing.
After reading an article on ISRDDN (found via Google) it seems that PF1 is a good place to look. But. my thought is, you do not want to see the ISRDDN output at all? OUTTRAP traps messages - not panels and ISRDDN writes it output to panels.
Hello All, Thanks for your time & suggestions.
@Expat SAVE command worked for saving dataset list from ISPF 3.4 option, but did not work on ISRDDN panel. So I assume that SAVE might not work when issued via
@Enrico Many thanks for your snippet code, Unfortunately I do not have access to CONSOLE . but I have access to issue console commands via SDSF(interactive mode), The command you suggested,
"D GRS,RES=(*,<dataset name>/<dataset mask>)" works well when issued via SDSF(interactive mode).
But I have a problem in which I am unable to issue console commands via batch. http://www.ibmmainframes.com/viewtopic.php?t=54392&postdays=0&postorder=asc&start=0
Regarding QueryEnq function, I am not sure if the Assembler is installed in our shop, but still ran a test REXX job,
/* Rexx - QueryEnq example */
Say center(' TESTING ')
s = queryenq("'some.dataset.opened.in.edit.mode'")
Do a = 1 to enqjob.0
Say enqjob.a enqtype.a
The above REXX was running in an infinite loop printing the first SAY command only, over and over.
I think I will settle with "D GRS,RES=(*,<dataset name>/<dataset mask>)" for now, untill access issues are sorted out.
you do not want to see the ISRDDN output at all?
nope, the panel is not required, but the data is needed.
OUTTRAP traps messages - not panels and ISRDDN writes it output to panels.
By 'the assembler' i meant the assembler code found on sillysot website.
Anyway thanks Enrico for the hint with QUERYENQ Upon searching I got the below code by Robert Zenuk & works well..
ARG MAJOR MINOR ASNAME
IF MAJOR = '' THEN MAJOR = '*'
IF MINOR = '' THEN MINOR = '*'
IF ASNAME = '' THEN ASNAME = USERID()
"QUERYENQ TABLE(QUERYENQ) QNAME(MAJOR) RNAME(MINOR)",
IF RC <> 0 THEN SAY 'QUERYENQ RC='RC