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

how to use Tso outtrap external function


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rebot

New User


Joined: 01 Apr 2023
Posts: 4
Location: Israel

PostPosted: Sat Apr 01, 2023 11:28 pm
Reply with quote

i need to capture a TSO message every time a user insert a data set name
and count that data set and display its name
im only able to do that once and then the script fail
im using the rexx code below
pleas advice me on how to solve this issue
```
Code:
[b]000002 DO WHILE (FINSHED<>"NO")               
 000003     SAY "ENTER DATA SET NAME"           
 000004     PULL DATA_SET_NAME                 
 000005     X=OUTTRAP(LINES.)                   
 000006     "LISTDS" DATA_SET_NAME             
 000007     X=OUTTRAP(OFF)                     
 000008     IF (LINES.0==1) THEN               
 000009       DO                               
 000010         SAY LINES.1                     
 000011         EXIT 0                         
 000012       END                               
 000013     ELSE                               
 000014       DO                               
 000015         SAY LINES.1                     
 000016         SAY "DO YOU WANT TO CONTINUE"   
 000017         PULL FINSHED                   
 000018       END                               
 000019 END                                     
 000020 EXIT 0         [/b]
```                 
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Sun Apr 02, 2023 12:47 am
Reply with quote

Quote:
The script fails

Please, translate this to plain English, for others to understand the situation.

There are a few either senseless or wrong statements in your REXX. Let’s start from the point: what exactly “fails” in your “script”?
Back to top
View user's profile Send private message
rebot

New User


Joined: 01 Apr 2023
Posts: 4
Location: Israel

PostPosted: Sun Apr 02, 2023 12:58 am
Reply with quote

first time i run the script i get the data set name , on the secound run when i
insert yes to continue the scrept fail with
BRX0003E - ABEND CAUGHT IN BREXX/370 error code
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Sun Apr 02, 2023 1:17 am
Reply with quote

rebot wrote:
first time i run the script i get the data set name , on the secound run when i
insert yes to continue the scrept fail with
BRX0003E - ABEND CAUGHT IN BREXX/370 error code

To start any analysis, use
Code:
TRACE R

And do not forget to present full output here.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Apr 02, 2023 3:09 am
Reply with quote

since You are running mvs 3.8 under hercules
( Brexx is a strong hint )

you might find more help here

groups.io/g/H390-MVS/messages
Back to top
View user's profile Send private message
rebot

New User


Joined: 01 Apr 2023
Posts: 4
Location: Israel

PostPosted: Sun Apr 02, 2023 10:33 am
Reply with quote

error message:

BRX0003E - ABEND CAUGHT IN BREXX/370

USER HERC01 RX ABEND S0C4
EPA 000F9B78 PSW 078D0000 00125494 ILC 04 INTC 0004
GR 0-3 00000000 00199EA8 00000000 00000000
GR 4-7 00000000 00000001 00000000 00000001
GR 8-11 002020A0 00112990 0012EC04 00199EA8
GR 12-15 00125380 00199EB8 00199FFC 00125380
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Sun Apr 02, 2023 7:22 pm
Reply with quote

I suggest once again: use TRACE R to find out exactly where it fails

If not, you would try guessing ad infinitum what has happened.
Back to top
View user's profile Send private message
rebot

New User


Joined: 01 Apr 2023
Posts: 4
Location: Israel

PostPosted: Sun Apr 02, 2023 7:47 pm
Reply with quote

I tried "trace I" and it seems on the second loop outtrap dosnt trap anything

error:
Code:

         yes                                             
        >>>      "        YES"                           
        >V>      "        YES"                           
        >L>      "NO"                                     
        >O>      "1"                                     
      3 *-* DO WHILE (FINSHED<>"NO")                     
      4 *-*  SAY "ENTER DATA SET NAME"                   
        >L>    "ENTER DATA SET NAME"                     
 ENTER DATA SET NAME                                     
      5 *-*  PULL DATA_SET_NAME                           
herc01.jcl.cntl                                           
        >>>    "HERC01.JCL.CNTL"                         
      6 *-*  X=OUTTRAP(LINES.)                           
        >V>    ""                                         
                                                         
 BRX0003E - ABEND CAUGHT IN BREXX/370                     
                                                         
 USER HERC01    RX        ABEND S0C4                     
 EPA 000F9B78  PSW 078D0000 00125494  ILC 04  INTC 0004   
 GR 0-3   00000000  00199EA8  00000000  00000000         
 GR 4-7   00000000  00000001  00000000  00000001         
 GR 8-11  002020B8  00112990  0012EC04  00199EA8         
 GR 12-15 00125380  00199EB8  00199FFC  00125380         
                                                         
 ***                                                     
                                                       
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Mon Apr 03, 2023 9:23 pm
Reply with quote

Please, take a look at OUTTRAP reference, like this one: www.ibm.com/docs/en/zos/2.2.0?topic=functions-using-outtrap-function

The parameter to OUTTRAP must be the name of a REXX variable/stem, but not the variable value!
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
No new posts INSYNC option with same function as I... JCL & VSAM 0
No new posts FUNCTION NUMVAL problem COBOL Programming 6
Search our Forums:

Back to Top