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
 

 

FileManager using a REXX proc can't handle a non-zero return

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Sat Feb 09, 2013 3:57 am    Post subject: FileManager using a REXX proc can't handle a non-zero return
Reply with quote

I have a Batch Edit in File Manager for IMS that I want to use a REXX proc.

Everything seemed to be going OK until I tried to read in a flat file one line at a time using EXECIO 1. That gets a return code of 2 at end of file and that's what all of the examples in the REXX manual use to check for EOF.

HOWEVER, when I use this in the IEB proc, the whole thing bails out when the RC of 2 occurs:

Code:

      8 *-* DO UNTIL RC=2                           
      9 *-*  ADDRESS MVS "EXECIO 1 DISKR FILEIN "   
        >>>    "EXECIO 1 DISKR FILEIN "             
        +++ RC(2) +++                               
     36 *-* exbad:                                   
        *-* EXIT "BAD" RC                           
0FMNBB382 REXX exec terminated with RC 2             
0FMNIB426 Function terminated                       


That line 36 is NOT mine. It seems to be coming from something between my code and the system.

Is there some other way to find the EOF with using the EXECIO *? Or maybe a way to trap that bad RC before the hidden layer kicks in?
Back to top
View user's profile Send private message

Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Sat Feb 09, 2013 4:14 am    Post subject: Reply to: FileManager using a REXX proc can't handle a non-z
Reply with quote

Found a temporary workaround:
Code:

MY_EOF = 0                             
DO UNTIL MY_EOF=2                     
  ADDRESS MVS "EXECIO 1 DISKR FILEIN "
  PARSE PULL INREC                     
  say INREC                           
  IF SUBSTR(INREC,1,3) = 'EOF' THEN   
  DO                                   
    MY_EOF = 2                         
  END                                 
  ELSE                                 
  DO                                   
    REC_CNT = REC_CNT + 1             
  END                                 
END                                   


Added an extra line that reads 'EOF' and check for that. Not the best thing in the world, but this is a personal utility.
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 -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 2 Tue Jan 24, 2017 1:23 pm


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