0

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.

The script will only do that once and then the script fails with BRX0003E - ABEND CAUGHT IN BREXX/370 error code

The REXX code follows:

Please advice me on how to solve this issue

/* BREXX */                             
DO WHILE (FINSHED<>"NO")                
   SAY "ENTER DATA SET NAME"           
   PULL DATA_SET_NAME                  
   X=OUTTRAP(LINES.)                   
   "LISTDS" DATA_SET_NAME              
   X=OUTTRAP(OFF)                      
   IF (LINES.0==1) THEN                
     DO                                
       SAY LINES.1                     
       EXIT 0                          
     END                               
   ELSE                                
     DO                                
       SAY LINES.1                     
       SAY "DO YOU WANT TO CONTINUE"   
       PULL FINSHED                    
     END                               
END                                     
EXIT 0    

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
karam
  • 33
  • 7
  • I ran your program on my system and it worked fine so long as I was entering valid data set names. If you enter one that is not valud the REXX terminates. If it is valid, the REXX continues until you type no. I ran this on a z/OS 2.5 system ... what is your environment? – Hogstrom Apr 01 '23 at 19:42
  • i run my code on mvs environment – karam Apr 02 '23 at 05:43
  • i added the error code on the post – karam Apr 02 '23 at 05:44
  • I would report the issue to https://github.com/mvslovers/brexx370/issues This code runs correcly on REXX that is distributed on z/OS 2.5. I would also include the version of your MVS host (I'm assuming its 3.8?) – Hogstrom Apr 03 '23 at 13:19
  • I'm currently using mvs3.8 – karam Apr 03 '23 at 14:44

1 Answers1

1

Issue was solved by removing the STEM using the DROP command and stem name in my case lines. and clean its content

my source code:

 /* BREXX */                            
 TRACE I                                
 DO WHILE (FINSHED<>"NO")               
     SAY "ENTER DATA SET NAME"          
     PULL DATA_SET_NAME                 
     X=OUTTRAP(LINES.)                  
     "LISTDS" DATA_SET_NAME             
     X=OUTTRAP(OFF)                     
     IF (LINES.0==1) THEN               
       DO                               
         SAY LINES.1                    
         EXIT 0                         
       END                              
     ELSE                               
       DO                               
         SAY LINES.1                    
         SAY "DO YOU WANT TO CONTINUE"  
         PULL FINSHED                   
         DROP LINES.                    
       END                              
 END                                    
 EXIT 0                                 

my OUTTRAP command:
 X=OUTTRAP(LINES.)      
 "LISTDS" DATA_SET_NAME 
 X=OUTTRAP(OFF)         

my DROP command for MY STEM.
DROP LINES.
Hogstrom
  • 3,581
  • 2
  • 9
  • 25
karam
  • 33
  • 7
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 17 '23 at 09:46