Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10256
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: 1228
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: 4648
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: 1228
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: 210
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us