View previous topic :: View next topic
|
Author |
Message |
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
smaru
New User
Joined: 22 Oct 2008 Posts: 49 Location: India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
|