IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Capture SYSPRINT


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
smaru

New User


Joined: 22 Oct 2008
Posts: 49
Location: India

PostPosted: Thu Oct 23, 2008 1:12 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Oct 23, 2008 1:19 am
Reply with quote

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
View user's profile Send private message
smaru

New User


Joined: 22 Oct 2008
Posts: 49
Location: India

PostPosted: Thu Oct 23, 2008 7:36 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Oct 23, 2008 12:04 pm
Reply with quote

What are the "open" & "close"? Are those new REXX instructions?

O.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Oct 23, 2008 8:53 pm
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Oct 23, 2008 9:58 pm
Reply with quote

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
View user's profile Send private message
smaru

New User


Joined: 22 Oct 2008
Posts: 49
Location: India

PostPosted: Fri Oct 24, 2008 12:39 am
Reply with quote

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
View user's profile Send private message
smaru

New User


Joined: 22 Oct 2008
Posts: 49
Location: India

PostPosted: Fri Oct 24, 2008 12:42 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Oct 24, 2008 1:00 am
Reply with quote

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
View user's profile Send private message
smaru

New User


Joined: 22 Oct 2008
Posts: 49
Location: India

PostPosted: Fri Oct 24, 2008 1:25 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Oct 24, 2008 2:01 am
Reply with quote

No, it is displayed on your default output device (usually SYSTSPRT/terminal).

O.
Back to top
View user's profile Send private message
smaru

New User


Joined: 22 Oct 2008
Posts: 49
Location: India

PostPosted: Fri Oct 24, 2008 2:27 am
Reply with quote

Exactly.
So the message from SYSTSPRT cannot be captured ? ?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Oct 24, 2008 3:40 am
Reply with quote

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
View user's profile Send private message
smaru

New User


Joined: 22 Oct 2008
Posts: 49
Location: India

PostPosted: Fri Oct 24, 2008 3:45 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Rexx to capture output from TSO HSEND... CLIST & REXX 9
No new posts Passing SYSPRINT to Invoked Program PL/I & Assembler 9
No new posts To capture the job from savers CLIST & REXX 4
No new posts outtrap does not capture within an ed... CLIST & REXX 1
No new posts Best way to Capture Auth ID of the so... COBOL Programming 1
Search our Forums:

Back to Top