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

Rexx routine error - Please help.


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

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Fri Nov 22, 2013 8:13 pm
Reply with quote

I am trying to run the REXX pgm through the job. The Step is as follows:

Code:
//*********************************************************************/
/* EXECUTES THE REXX PROGRAM xxxxxxxx                               
//*********************************************************************
//STEP04   EXEC PGM=IKJEFT1A,DYNAMNBR=100,REGION=6M                     
//SYSEXEC  DD DSN=xyz,DISP=SHR                       
//ISPPROF  DD DSN=&&Temp1,                                               
//            DISP=(NEW,PASS,DELETE),                                   
//            SPACE=(TRK,(10,10,5)),                                   
//            DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=23440)           
//ISPPLIB  DD DSN=SYS1.ISPF.ISPPENU,DISP=SHR                           
//ISPMLIB  DD DSN=SYS1.ISPF.ISPMENU,DISP=SHR                           
//         DD DSN=SYS1.ISPF.ISPMENU,DISP=SHR                           
//ISPSLIB  DD DSN=SYS1.ISPF.ISRCLIB,DISP=SHR                           
//ISPTLIB  DD DSN=&&TEMP2,                                               
//            DISP=(NEW,DELETE,DELETE),                                 
//            SPACE=(TRK,(10,10,5)),                                   
//            DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=23440)           
//         DD DSN=SYS1.ISPF.ISPTENU,DISP=SHR                           
//ISPLIST  DD SYSOUT=*,DCB=(LRECL=121,RECFM=FBA)                       
//ISPLOG   DD SYSOUT=*,DCB=(LRECL=125,RECFM=VA)                         
//LOGFILE  DD SYSOUT=*                                                 
//DBRFIL   DD DSN=TEST1,DISP=SHR           
//OUTFIL   DD DSN=TEST2,                         
//            DISP=(NEW,CATLG,CATLG),                                   
//            RECFM=FB,LRECL=80,                                       
//            SPACE=(CYL,(15,20),RLSE)                                 
//SYSTSPRT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSPRINT DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//SYSTSIN  DD *                                                         
  ISPSTART CMD(%xxxxxxxx)                                               
/*                                                                     
Code'd

I am getting the following error :
READY
ISPSTART CMD(%xxxxxxxx)
IRX0250E System abend code 013, reason code 00000024.
IRX0255E Abend in host command EXECIO or address environment routine TSO.
IRX0670E EXECIO error while trying to GET or PUT a record.
ISRLS062Find member not done -/-For partitioned data sets, LMGET requires previous successful LMMFIND.

FYI - The REXX code xxxxxxxx is already present in xyz library.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 22, 2013 8:20 pm
Reply with quote

the error is in line 1234 of Your REXX
Back to top
View user's profile Send private message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Fri Nov 22, 2013 8:25 pm
Reply with quote

enrico-sorichetti wrote:
the error is in line 1234 of Your REXX


Thanks for your reply.

But my REXX code contains only the 105 lines.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 22, 2013 8:29 pm
Reply with quote

Hello and welcome to the forum,

Enrico meant we have no idea what is wrong because you have not shown the code . . . Hint - show the code.

The s013-24 has more info (i.e. which dd) and it will help to post this.

Also, running a trace is rather helpful.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Nov 22, 2013 8:31 pm
Reply with quote

Dr. Sorichetti is referring to the fact that you did not post your code, nor a trace thereof.

The ISRLS062 message ought to give you a hint as to what the error is.
Back to top
View user's profile Send private message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Fri Nov 22, 2013 8:47 pm
Reply with quote

Akatsukami wrote:
Dr. Sorichetti is referring to the fact that you did not post your code, nor a trace thereof.

The ISRLS062 message ought to give you a hint as to what the error is.


Code:
/* REXX */
ADDRESS TSO
"EXECIO * DISKR DBRFIL ( STEM INPFL. FINIS"
"FREE F(DBRFIL)"
I=1
J=0
H = '******************************************************************'
L = '                  DBRM CROSS REFERENCE REPORT                     '
M = '******************************************************************'
N = '   NAME        SYSPACKAGE        DBRM            LOAD_MODULE     *'
O = '******************************************************************'
PUSH H
"EXECIO  * DISKW OUTFIL"
PUSH L
"EXECIO  * DISKW OUTFIL"
PUSH M
"EXECIO  * DISKW OUTFIL"
PUSH N
"EXECIO  * DISKW OUTFIL"
PUSH O
"EXECIO  * DISKW OUTFIL"
     LOAD="'Lodlib name'"
     DBRM="'DBRM lib name'"
     DO WHILE I <= INPFL.0
     START:
     Y=INPFL.I
     Z=SUBSTR(INPFL.I,1,10)
     X=SUBSTR(INPFL.I,21,16)
     Z=STRIP(Z,'B')
     I = I+1
     DBRM=STRIP(DBRM,'B',"'")
     OTX=OUTTRAP("LC.")
     "ALLOC F(DBFILE) DS('"DBRM"("Z")') SHR REUSE"
     "EXECIO * DISKR DBFILE (FINIS STEM DBF."
     "FREE F(DBFILE)"
     OTX=OUTTRAP("OFF")
     IF RC > 0 THEN
      DO
      DBR_TOKEN = "DBR NOT FOUND"
      LOD_TOKEN = "NOT MATCHED"
      PKG_TOKEN = X
      END
     IF RC = 0 THEN
        DO
           DBRTOKEN=SUBSTR(DBF.1,25,8)
           CONTOKEN=STRIP(C2X(DBRTOKEN))
           DBRTOKEN=LEFT(CONTOKEN,8)||RIGHT(CONTOKEN,8)
           LODTOKEN=RIGHT(CONTOKEN,8)||LEFT(CONTOKEN,8)
           CALL LOADTOK
           IF MATCH_FOUND = 1 & DBRTOKEN = X THEN
            DO
              DBR_TOKEN = "MATCHED "
              LOD_TOKEN = "MATCHED "
              PKG_TOKEN = "MATCHED "
            END
           IF MATCH_FOUND = 0 & DBRTOKEN = X THEN
            DO
              DBR_TOKEN = "MATCHED "
              LOD_TOKEN = "NOT MATCHED"
              PKG_TOKEN = X
            END
           IF MATCH_FOUND = 0 & DBRTOKEN /= X THEN
            DO
              LOD_TOKEN = "NOT MATCHED"
              DBR_TOKEN = "NOT MATCHED"
              PKG_TOKEN = X
            END
           IF MATCH_FOUND = 1 & DBRTOKEN /= X THEN
            DO
              LOD_TOKEN = "MATCHED "
              DBR_TOKEN = "NOT MATCHED"
              PKG_TOKEN = X
            END
        END
P = LEFT(Z,8)'   'LEFT(X,16)'    'LEFT(DBR_TOKEN,12),
             '     'LEFT(LOD_TOKEN,12)
PUSH P
"EXECIO  * DISKW OUTFIL"
END
ADDRESS ISPEXEC "LMCLOSE DATAID("TEMP")"
ADDRESS ISPEXEC "LMFREE  DATAID("TEMP")"
RETURN
LOADTOK:
J=J+1
IF J = 1 THEN
  DO
   "ALLOC F(LODFL) DS("LOAD") SHR REU"
   ADDRESS ISPEXEC "LMINIT DATAID("TEMP") DDNAME(LODFL) ENQ(SHR)"
   ADDRESS ISPEXEC "LMOPEN DATAID("TEMP") OPTION(INPUT)"
  END
ADDRESS ISPEXEC "LMMFIND DATAID("TEMP") MEMBER("Z")"
XRC=0
MATCH_FOUND = 0
DO UNTIL XRC>0
ADDRESS ISPEXEC "LMGET  DATAID("TEMP") MODE(INVAR)" ,
"DATALOC(INPUTLIN) DATALEN(LEN) MAXLEN(28000)"
XRC=RC
LOADSTR1=C2X(INPUTLIN)
A=POS(LODTOKEN,LOADSTR1)
IF A > 0 THEN MATCH_FOUND = 1
END
RETURN


Attachment inlined and code'd
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Nov 22, 2013 9:27 pm
Reply with quote

In light of the ISRLS062 message, don't you think that you should check the return code and messages from the LMMFIND service?
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Nov 22, 2013 9:49 pm
Reply with quote

LMINIT should use the name of the dataid variable (it should be a constant value). Other services should use the value of the variable that is returned by LMINIT.

It should be:
Code:
   ADDRESS ISPEXEC "LMINIT DATAID(TEMP) DDNAME(LODFL) ENQ(SHR)"
   ADDRESS ISPEXEC "LMOPEN DATAID("TEMP") OPTION(INPUT)"
Back to top
View user's profile Send private message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Fri Nov 22, 2013 11:55 pm
Reply with quote

Pedro wrote:
LMINIT should use the name of the dataid variable (it should be a constant value). Other services should use the value of the variable that is returned by LMINIT.

It should be:
Code:
   ADDRESS ISPEXEC "LMINIT DATAID(TEMP) DDNAME(LODFL) ENQ(SHR)"
   ADDRESS ISPEXEC "LMOPEN DATAID("TEMP") OPTION(INPUT)"


Thanks a lot Pedro.

but i made the changes as suggested by you but i am getting the same error.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sat Nov 23, 2013 12:05 am
Reply with quote

You need to show us a trace.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sat Nov 23, 2013 7:08 am
Reply with quote

You seem to have multiple problems with the LMINIT statement.
1. It needs to use the name of the variable (you already fixed)
2. it needs to refer to a file that is allocated.

But, these statements are not correct:
Code:
LOAD="'Lodlib name'"
...
"ALLOC F(LODFL) DS("LOAD") SHR REU"

because the name is not a valid data set name. The allocation failed.

Of course, a trace would have shown you that the ALLOC failed. And your code should check the return code before proceeding to statements that rely on RC=0.
Back to top
View user's profile Send private message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Sat Nov 23, 2013 8:03 am
Reply with quote

Pedro wrote:
You seem to have multiple problems with the LMINIT statement.
1. It needs to use the name of the variable (you already fixed)
2. it needs to refer to a file that is allocated.

But, these statements are not correct:
Code:
LOAD="'Lodlib name'"
...
"ALLOC F(LODFL) DS("LOAD") SHR REU"

because the name is not a valid data set name. The allocation failed.

Of course, a trace would have shown you that the ALLOC failed. And your code should check the return code before proceeding to statements that rely on RC=0.


I provided the valid file name in LOAD, just for posting purpose, i mentioned the 'Loadlib name'.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Nov 24, 2013 6:58 am
Reply with quote

Hello,

This topic has been posted elsewhere (and multiple times at that). If this continues, the ones on this forum will be locked (or deleted).

d
Back to top
View user's profile Send private message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Tue Nov 26, 2013 11:34 am
Reply with quote

manas121 wrote:
Pedro wrote:
You seem to have multiple problems with the LMINIT statement.
1. It needs to use the name of the variable (you already fixed)
2. it needs to refer to a file that is allocated.

But, these statements are not correct:
Code:
LOAD="'Lodlib name'"
...
"ALLOC F(LODFL) DS("LOAD") SHR REU"

because the name is not a valid data set name. The allocation failed.

Of course, a trace would have shown you that the ALLOC failed. And your code should check the return code before proceeding to statements that rely on RC=0.


I provided the valid file name in LOAD, just for posting purpose, i mentioned the 'Loadlib name'.


Thanks a lot enrico,dick,Akatsukami and Pedro for all of yours help.

I followed the TRACE and resolved the problem. The actual problem was in RC handling and LMINIT syntax.
Back to top
View user's profile Send private message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Tue Nov 26, 2013 11:37 am
Reply with quote

manas121 wrote:
manas121 wrote:
Pedro wrote:
You seem to have multiple problems with the LMINIT statement.
1. It needs to use the name of the variable (you already fixed)
2. it needs to refer to a file that is allocated.

But, these statements are not correct:
Code:
LOAD="'Lodlib name'"
...
"ALLOC F(LODFL) DS("LOAD") SHR REU"

because the name is not a valid data set name. The allocation failed.

Of course, a trace would have shown you that the ALLOC failed. And your code should check the return code before proceeding to statements that rely on RC=0.


I provided the valid file name in LOAD, just for posting purpose, i mentioned the 'Loadlib name'.


Thanks a lot enrico,dick,Akatsukami and Pedro for all of yours help.

I followed the TRACE and resolved the problem. The actual problem was in RC handling and LMINIT syntax.


I changed the code as follows:

"ALLOC F(DBFILE) DS('"DBRM"("Z")') SHR REUSE"
"EXECIO * DISKR DBFILE (FINIS STEM DBF."
FIND_RC = RC
"FREE F(DBFILE)"
OTX=OUTTRAP("OFF")
IF FIND_RC > 0 THEN
DO
DBR_TOKEN = "DBR NOT FOUND"
LOD_TOKEN = "NOT MATCHED"
PKG_TOKEN = X
END
IF FIND_RC = 0 THEN
DO

Before it was setting RC=0 again and again.
and i changed the LMINIT syntax.
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 Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top