View previous topic :: View next topic
|
Author |
Message |
emir_soko
New User
Joined: 10 Mar 2022 Posts: 8 Location: Germany
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2145 Location: USA
|
|
|
|
What is LINES() - ???
What is LINEIN() - ??? |
|
Back to top |
|
|
emir_soko
New User
Joined: 10 Mar 2022 Posts: 8 Location: Germany
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2145 Location: USA
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
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 |
|
|
|