Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
REXX code - Outtrap is not working

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: REXX code - Outtrap is not working
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Fri Jul 03, 2009 8:11 pm    Post subject: Reply to: REXX code - Outtrap is not working
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: 1243
Location: Israel

PostPosted: Sat Jul 04, 2009 7:34 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Sat Jul 04, 2009 8:30 pm    Post subject: Reply to: REXX code - Outtrap is not working
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: 1243
Location: Israel

PostPosted: Sun Jul 05, 2009 10:22 pm    Post subject:
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    Post subject: Reply to: REXX code - Outtrap is not working
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

Site Director


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

PostPosted: Sun Jul 05, 2009 10:58 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 07, 2009 2:36 pm    Post subject:
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    Post subject: Reply to: REXX code - Outtrap is not working
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us