View previous topic :: View next topic
|
Author |
Message |
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
I have a Rexx exec that calls a program (actually I think it might be an assembler program, it's vendor supplied). When it runs, there are displays from the program that show up on the screen that I would like to capture to a dataset.
I've tried allocating SYSPRINT, SYSOUT, TERMINAL, etc. and assigning an output dataset name to these DD's, but nothing gets captured.
Is there another way that I can capture these displays ?
Thanks for any help. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Try OUTTRAP, but take heed of the restrictions:
Quote: |
In general, the OUTTRAP function traps all output from a TSO/E command. For example, OUTTRAP traps broadcast messages from LISTBC, the list of allocated data sets from LISTALC, catalog entries from LISTCAT, and so on.
If you plan to write your own command processors for use in REXX execs, and you plan to use the OUTTRAP external function to trap command output, note the OUTTRAP function does not trap command output that is sent to the terminal by:
TPUT
WTO macro
messages issued by TSO/E REXX (that is, messages beginning with IRX)
messages issued by TRACE output
However, OUTTRAP does trap output from the PUTLINE macro with DATA or INFOR keywords.
|
|
|
Back to top |
|
|
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
This is the way i tried Outrap
Open X = Outrap (......)
Address TSO ( <Rexx Command>)
Close Outrap.
But it did not capture the display statements in the outrap. Just wanted to make sure, Is this the same thing you meant.
I have tried this option earlier itself.
Thanks for the reply. Any other suggesstions |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
What are the "open" & "close"? Are those new REXX instructions?
O. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
Code: |
there are displays from the program that show up on the screen |
What do you mean by 'displays'? Are these ISPF panels?
You have mis-spelled 'outtrap'.
In general, allocating a DD name is of no help unless the program was already writing to that DD name. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Try using OUTTRAP the following way:
Code: |
X = OUTTRAP("Cmd.")
Address TSO "some tso command here"
X = OUTTRAP("OFF")
Do I = 1 To Cmd.0
Say Cmd.I
End |
|
|
Back to top |
|
|
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
Hi Pedro,
Thers is a TSO command exeuting (may b Assembler) and when I execute the command it displays some messages (not on panel). I suppose those are getting displayed in Sysprint, I wanted to capture these messages in to a dataset. |
|
Back to top |
|
|
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
Hi Marso,
That is what I have tried and it did not work.
The messages my command executes are displayed not the outrap count. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Check with the vendor. If they're using TPUT or WTO, as I pointed out earlier, then you can't capture the output. If they are indeed writing to a datatset, then you just need to read the contents of that dataset. |
|
Back to top |
|
|
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
Probably, that might be the case.
Just wanted to confirm One more thing,
When you execute rexx command with a simple statement SAY "Hello".
I assume the message "Hello" is displayed in ISPF panel (Is that correct??) |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
No, it is displayed on your default output device (usually SYSTSPRT/terminal).
O. |
|
Back to top |
|
|
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
Exactly.
So the message from SYSTSPRT cannot be captured ? ? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
The point is that putting text on the screen can be done using several methods. Some of those ways cannot be captured. Programs should use a method that allows capture, but some do not. It might simply be a case of the developer not knowing. You should be able to submit a requirement to the vendor. |
|
Back to top |
|
|
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
Oh...
Although I have to look for an alternative to change my process (since this does not wrok), Thanks a lot to all of you ,who has taken your time in responding to my query.
Thanks |
|
Back to top |
|
|
|