Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Capturing TSO ISRDDN E output.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1522
Location: Chennai

PostPosted: Mon Jun 13, 2011 12:56 pm    Post subject: Capturing TSO ISRDDN E output.
Reply with quote

Hi,

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.
Code:
/*REXX*/
DSN='PS.FILE.NAME'           
   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       
EXIT

Could you please let me know how this could be achieved.
Thanks for viewing.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 13, 2011 1:28 pm    Post subject:
Reply with quote

Can't recall exactly, but I think that there is an option to write the output to a dataset, I think it may be SAVE.

Have a quick google, and you may then be able to read in the newly created file.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Mon Jun 13, 2011 1:35 pm    Post subject: Reply to: Capturing TSO ISRDDN E output.
Reply with quote

what You ask for cannot be done... ( thru isrddn )
isrddn output goes to a panel that' s it

if You need to pick up in rexx the enq You can
use the Adress console stuff to issue a
D GRS,RES=(*,<dataset name>/<dataset mask>)
ad process the returned data
see here for examples ( very old but still usable )
http://www.redbooks.ibm.com/abstracts/sg244626.html?Open

or look at
http://www.sillysot.com/mvs/index.htm?queryenq.htm

or look at the cbttape for more tools ( file 409/410) MXi by Rob scott
iirc it has a rexx interface

just found in my snippets library


Code:
****** ***************************** Top of Data ******************************
000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000002 /*                                                                   */
000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000004 Trace "O"
000005 Parse Source _sys _how _cmd .
000006 args = "d grs,res=(*,enrico.*)"
000007 cart     = "OPER0001"
000008 _msg = msg("OFF")
000009 zrc = $tsoex("CONSOLE DEACTIVATE ")
000010 zrc = $tsoex("CONSPROF SOLDISP(NO) SOLNUM(9999)" )
000011 zrc = $tsoex("CONSOLE ACTIVATE")
000012 if zrc = 0 then do
000013    zrc = $tsoex("CONSOLE SYSCMD("args") CART("cart") ")
000014    if zrc = 0 then do
000015       zrc = getmsg("console.",,cart,,120)
000016    end
000017    zrc = $tsoex("CONSOLE DEACTIVATE ")
000018 end
000019 do i = 1 to console.0
000020    say i console.i
000021 end
000022 _msg = msg(_msg)
000023 exit
000024
000025 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000026 $tsoex:
000027    tso_0tr = trace("O")
000028    Address TSO arg(1)
000029    tso_0rc = rc
000030    trace value(tso_0tr)
000031    return tso_0rc
000032
000033 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000034 $ispex:
000035    isp_tr = trace("O")
000036    Address ISPEXEC arg(1)
000037    isp_rc = rc
000038    trace value(isp_tr)
000039    return isp_rc
000040 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000041 $isred:
000042    isr_tr = trace("O")
000043    Address ISREDIT arg(1)
000044    isr_rc = rc
000045    trace value(isr_tr)
000046    return isr_rc
000047
****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1894
Location: UK

PostPosted: Mon Jun 13, 2011 1:47 pm    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1522
Location: Chennai

PostPosted: Mon Jun 13, 2011 3:40 pm    Post subject:
Reply with quote

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
REXX.

@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,
Code:
/* 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
End
Exit

The above REXX was running in an infinite loop printing the first SAY command only, over and over.
TESTING
TESTING
TESTING
TESTING
.
.
.
I think I will settle with "D GRS,RES=(*,<dataset name>/<dataset mask>)" for now, untill access issues are sorted out.
Quote:
you do not want to see the ISRDDN output at all?
nope, the panel is not required, but the data is needed.
Quote:
OUTTRAP traps messages - not panels and ISRDDN writes it output to panels.
Good to know. Thanks.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Mon Jun 13, 2011 3:53 pm    Post subject: Reply to: Capturing TSO ISRDDN E output.
Reply with quote

Quote:
Regarding QueryEnq function, I am not sure if the Assembler is installed in our shop, but still ran a test REXX job,


assembler is certainly installed in Your shop...

... about authorization
if You have the need to, somebody should take care of them
or You should be asked to satisfy the requiremens
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1522
Location: Chennai

PostPosted: Mon Jun 13, 2011 4:57 pm    Post subject:
Reply with quote

Hello,
Quote:
assembler is certainly installed in Your shop...

By 'the assembler' i meant the assembler code found on sillysot website.

Anyway thanks Enrico for the hint with QUERYENQ icon_biggrin.gif Upon searching I got the below code by Robert Zenuk & works well..
Code:
/*REXX*/
ARG  MAJOR MINOR ASNAME                               
IF MAJOR = '' THEN MAJOR  = '*'                       
IF MINOR = '' THEN  MINOR  = '*'                       
IF ASNAME = '' THEN ASNAME = USERID()                 
ADDRESS  ISPEXEC                                       
"QUERYENQ TABLE(QUERYENQ) QNAME(MAJOR)  RNAME(MINOR)",
"REQ("ASNAME") SAVE(ENQ)"                             
IF RC <> 0 THEN SAY  'QUERYENQ RC='RC                 
"TBEND QUERYENQ"                                       
"BROWSE  DATASET('"USERID()".ENQ.ENQLIST')"           
EXIT   


Invocation by
Code:
TSO QUERYENQ * dataset.under.concern *


Regards,
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us