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

REXX code - Outtrap is not working


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
knickraj
Warnings : 1

New User


Joined: 11 Jun 2007
Posts: 50
Location: Euro

PostPosted: Fri Jul 03, 2009 6:10 pm
Reply with quote

HI ,
below is the code snipet were i am submiting a jcl and trapping it,but my Outtrap is not working...its not trapping the message . can anyone of you help me in this.

calling code
Code:

/* REXX */                                                     
"ISPEXEC VIEW DATASET('Xxxx.TOOL(Uxx)') MACRO(macroA) CONFIRM(YES)"


macro being called(macroA)
Code:

/* REXX */     
ISREDIT MACRO                                                                               
ADDRESS TSO
X = OUTTRAP(JOB.)                                                       
ISREDIT SUBMIT                                                         
X = OUTTRAP(OFF)                   



thanks .
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jul 03, 2009 8:11 pm
Reply with quote

Quote:
,but my Outtrap is not working...its not trapping the message


how sad icon_sad.gif , we all hope that You can fix it soon

not working does not give any useful info for problem determination and solution
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sat Jul 04, 2009 7:34 pm
Reply with quote

Your OUTTRAP is working perfectly: nothing is trapped because there is nothing to trap.

Quote:
i am submiting a jcl and trapping it
Quote:
its not trapping the message

Can you explain exactly what you try to do?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sat Jul 04, 2009 8:30 pm
Reply with quote

Well, I tried the same code and see the same issue. Looking through the manual on the Outtrap function, it's a little vague as to whether or not it should work in this situation. It does specifically state that Outtrap works on output for TSO commands. It doesn't talk about output from ISPF, so I have to presume that it won't work in that manner.

I'll have to see if there's a method within ISPF of trapping ISPF output (maybe a specific ISPF "z" variable).

Is there any way you can save yourself the headaches and just substitute a TSO/E SUBMIT command (which I know for a fact will work) for the ISPF SUBMIT command?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Jul 05, 2009 10:22 pm
Reply with quote

Marso wrote:
Your OUTTRAP is working perfectly: nothing is trapped because there is nothing to trap.
I said that yesterday because the ISPF submit was used, not the TSO submit.

However, after some checking, I found that "ISPF uses the TSO SUBMIT command to submit the job."
And yet, OUTTRAP and even MSG have no effect...

So I went back to my drawing board and worked this out:
Code:
"ISREDIT (LastLine) = LINENUM .ZLAST"
Do Q = 1 To LastLine                 
   "ISREDIT (LData) = Line " Q       
   Queue LData                       
End                                 
Queue ""                             
                                     
x = OUTTRAP(OUT.)                   
Address TSO "SUBMIT *"               
x = OUTTRAP('OFF')                   

The OUT. stem contained 2 lines:
Code:
IKJ56274A ENTER INPUT JOB STREAM:       
IKJ56250I JOB XYZ1600(JOB55881) SUBMITTED
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Sun Jul 05, 2009 10:54 pm
Reply with quote

i think a tso submit * always submits the job uppercase-translated. can be a problem in some cases
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: Sun Jul 05, 2009 10:58 pm
Reply with quote

Hello,

I'm confused. . .

How does upper/lower case relate to OUTTRAP icon_confused.gif
Back to top
View user's profile Send private message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Mon Jul 06, 2009 9:56 am
Reply with quote

Hi knickraj,
I think you are trying to open a dataset which has the job and trying to submit that from REXX.But when you open the dataset using ISPEXEC,the dataset will open in view mode.But the SUBMIT which you given will work only if the control back from that dataset.So when you execute the submit command nothing will submit and the outtrap will not trap anything.

Correct me if i'm wrong.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 07, 2009 2:36 pm
Reply with quote

bipinpeter wrote:
Hi knickraj,
I think you are trying to open a dataset which has the job and trying to submit that from REXX.But when you open the dataset using ISPEXEC,the dataset will open in view mode.But the SUBMIT which you given will work only if the control back from that dataset.So when you execute the submit command nothing will submit and the outtrap will not trap anything.

Correct me if i'm wrong.

Can you explain exactly why you think this ?
Back to top
View user's profile Send private message
hirschel

New User


Joined: 24 Mar 2010
Posts: 5
Location: Vancouver, BC

PostPosted: Thu Mar 25, 2010 10:08 pm
Reply with quote

from the REXX reference manual
"To trap the output of TSO/E commands under ISPF, you must invoke an exec with command output after ISPF or one of its services has been invoked. "

in the case mentioned, you are trying to outtrap the output of an invoked ISPF service, hence nothing is captured, and it appears to be 'not working'.
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 Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top