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

Regarding SYSPRINT and SYSTERM


IBM Mainframe Forums -> TSO/ISPF
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: Wed Feb 04, 2009 6:50 am
Reply with quote

I have the following simple Rexx command in one of a member in my pds,

/* REXX */
Say 'HI'
Exit

When I execute the above rexx, I can see the display as 'HI' on a SCREEN.

Please let me know, Is that the TERMINAL where I see the output.

if so, how this is dirested to my terminal.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Feb 04, 2009 7:14 am
Reply with quote

Hello,

At the top of the page is a link to "IBM Manuals". QAmong them it the REXX Reference.

Search that manual (using the flashlight/tubelight near the top left) for SAY.

If you find something that is not clear in the manual, post what you found and your question about it. Someone will be able to clarify.
Back to top
View user's profile Send private message
smaru

New User


Joined: 22 Oct 2008
Posts: 49
Location: India

PostPosted: Wed Feb 04, 2009 9:23 am
Reply with quote

As mentioned in the manual, if the above function is executed as a TSO command the output is directed to SYSTSPRT. My query is about capturing this Output to a dataset.

Is that Possible?

I have tried the following options,

Example1:
Executed the LISTD command in rexx and was able to capture the output through OUTTRAP into a dataset.

/* rexx */
call outtrap ‘trap.’
“Listd ’sys1.parmlib’ mem”
call outtrap ‘off’
do i = 1 to trap.0
say trap.i
end
"Alloc f(ex4dd) ds(ex4.temp) new spa(30,30) tr",
"recfm(f b) lrecl(133) blksize(0)"
"Execio * diskw ex4dd (finis stem trap."
Address ISPExec "Browse Dataset(ex4.temp)"
"Free f(ex4dd) delete"

Example2:
/* rexx */
call outtrap stem.
say '1'
say '2'
say '3'
say '4'
call outtrap 'off'
do i = 1 to stem.0
say stem.i
end

The execution of Example1 was successfull. In the same way I wanted the Example2 to capture values 1 2 3 4 into stem.i, which is not happenning.

Please let me know, What is differing between Example 1 and 2.

I have tried my best to explain it. Let me know incase you need some more information.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Feb 04, 2009 9:43 pm
Reply with quote

You do not need to use OUTTRAP and SAY. You can work directly with stem variables:
Code:

stem.1 = '1'
stem.2 = '2'
stem.3 = '3'
stem.4 = '4'

stem.0 = 4

Then follow with EXECIO to write your stem to a file.
Back to top
View user's profile Send private message
smaru

New User


Joined: 22 Oct 2008
Posts: 49
Location: India

PostPosted: Thu Feb 05, 2009 2:13 am
Reply with quote

The reason behind posting the example 2 is,

There is a Rexx command in my mainframe environment (i really dont no from where it executes) and when its executed i see some displays. I think those display where a part of the SAY statement in that rexx command.
My intension is to capture those displays in to a dataset. I am still looking for options and wanted to knowif any has already tried anything of this sort.
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 Feb 05, 2009 2:15 am
Reply with quote

Srikanth, you need to read the documentation regarding the usage of the OUTTRAP command. It details what types of messages are available to be trapped, and which ones aren't.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Passing SYSPRINT to Invoked Program PL/I & Assembler 9
No new posts fetch the record number from FMNMAIN ... CLIST & REXX 10
No new posts "Standard" SYSIN, SYSPRINT ... PL/I & Assembler 0
No new posts Default attributes for undeclared SYS... PL/I & Assembler 3
No new posts ICETOOL/SYNCSORT - SYSPRINT output DFSORT/ICETOOL 17
Search our Forums:

Back to Top