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

Routine not found...


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
emir_soko

New User


Joined: 10 Mar 2022
Posts: 8
Location: Germany

PostPosted: Tue Mar 22, 2022 1:52 am
Reply with quote

Hey guys, I was finishing my job but when I try to execute my rexx program on some members to compare it I get routine not found. here is a code error is on line 5

Code:

/*REXX*/                                                             
PARSE ARG DSN1 DSN2                                                 
DROP DATA1.                                                         
I=0                                                                 
DO WHILE LINES(DSN1) >0                                             
  LINE = LINEIN(DSN1)                                               
P = POS('IBM',LINE)                                                 
IF P>0 THEN DO                                                       
   IF DATATYPE(SUBSTR(LINE,P+3,4))='NUM' & SUBSTR(LINE,P+7,2)='I '   
     THEN DO                                                         
      I = I+1                                                       
      DATA1.I = LINE                                                 
      END                                                           
   END                                                               
END                                                                 
DATA1.0 = I                                                         
DROP DATA2.                                                         
I=0                                                                 
DO WHILE LINES(DSN2) > 0                                             
 LINE = LINEIN(DSN2)                                                 
 P = POS('IBM',LINE)                                                 
 IF P>0 THEN DO                                                     
  IF DATATYPE(SUBSTR(LINE,P+3,4))= 'NUM' & SUBSTR(LINE,P+7,2)='I '   
    THEN DO                                                         
     I = I+1                                                         
     DATA2.I = LINE                                                 
     END                                                             
  END                                                               
END                                                                 
DATA2.0 = I                                                         
SAY 'MATCHES FOR' DSN1                                               
DO I=1 TO DATA1.0                                                   
   SAY DATA1.I                                                       
   EMD                                                               
SAY '-------------------------------------'                         
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2119
Location: USA

PostPosted: Tue Mar 22, 2022 2:09 am
Reply with quote

What is LINES() - ???
What is LINEIN() - ???
Back to top
View user's profile Send private message
emir_soko

New User


Joined: 10 Mar 2022
Posts: 8
Location: Germany

PostPosted: Tue Mar 22, 2022 2:12 am
Reply with quote

In the above program the following things need to be noted.

The lines function reads the dsn1 file.

The while function is used to check if further lines exist in the dsn1 file.

For each line read from the file, the line variable holds the value of the current line.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10879
Location: italy

PostPosted: Tue Mar 22, 2022 2:36 am
Reply with quote

ask Your support to install the rexx stream I/O external package

You should then find in the load libraries for your tso session
or in the system linklist
the following load modules
EAGEFSIO, EAGIOHKP, IRXPARMS, IRXTSPRM

otrerwise EXECIO will work
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2119
Location: USA

PostPosted: Tue Mar 22, 2022 4:10 am
Reply with quote

emir_soko wrote:
In the above program the following things need to be noted.

The lines function reads the dsn1 file.

The while function is used to check if further lines exist in the dsn1 file.

For each line read from the file, the line variable holds the value of the current line.

0. Please, learn how to use the Code button to present ANY of your code and ANY of your data to the forum.

1. LINES is not a standard REXX function. Ask your support: where to get it from, and how to use it.

2. WHILE is not a function, but an option of the REXX’s DO statement. Please RTFM on REXX very carefully.

3. This question is supposed to go to the Students section of the forum.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2585
Location: Silicon Valley

PostPosted: Tue Mar 22, 2022 9:32 am
Reply with quote

I agree with Enrico: install the rexx stream I/O external package

but as a last resort...
about 30 years ago, I wrote a rexx program meant to run on IBM's OS/2 operating system for PCs (pre-Windows being prevalent). But I loved the ISPF editor, so I developed the programs on MVS by writing an inline LINES subroutine that, if the stem did not exist, used EXECIO to read the file into a stem variable and then returned the number of lines in the stem. And also a LINEIN subroutine that used the same stem variable and kept track of which line to return next.

In that way, I could develop and test the program on MVS but then later execute it on OS/2.

I no longer have the source. But each function is fairly simple. (it might be somewhat tricky for a beginner).
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2585
Location: Silicon Valley

PostPosted: Tue Mar 22, 2022 9:45 am
Reply with quote

Code:
blah blah ='I '

fyi. It seems like you are only looking for informational messages. IBM might use other message suffixes for more severe situations. Those are probably of more interest.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts A directory in the pathname was not f... ABENDS & Debugging 0
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
No new posts ACS exit routine JCL & VSAM 0
Search our Forums:

Back to Top