Page 1 of 1

System abend code 013 in REXX

PostPosted: Thu May 07, 2009 12:38 pm
by RAHUL DB2 DBA
when i am trying to execute teh code (which finds the string in a given PDS)

/ *THE REXX CODE*/
SAY "ENTER THE NAME OF STRING"
PDSNAME='BRM000U.BRM000U.RAHUL.WORK'
PULL str2fnd
call outtrap "mbrs."
"LISTD" pdsname "MEMBERS"
call outtrap "off"
do ndx=1 to mbrs.0
if mbrs.ndx = "--MEMBERS--" then leave
end
ndx=ndx+1
"ALLOC FI(XXOUT) DA('BRM000U.REXX.WORK(FRE1)') MOD REUSE"
call listdsi pdsname
fullname=sysdsname
lot.1="------------------------------------------------"
lot.2="--- Searching " pdsname " for string <" str2fnd ">"
lot.3="------------------------------------------------"
lot.0=3
"EXECIO" lot.0 "DISKW XXOUT (STEM lot."
do curmbr = ndx to mbrs.0
parse value mbrs.curmbr with memname
memname=strip(memname)
hdr=1
say "member="fullname"("memname")"
"ALLOC F(XXIN) DS('"fullname"("memname")') SHR REUSE"
"EXECIO * DISKR XXIN (FINIS STEM in."
"FREE F(XXIN)"
fnd=0
do recid=1 to in.0
if pos(str2fnd,in.recid) > 0 then
DO
if hdr = 1 then
DO
lot.1="------------------------------------------------"
lot.2="----> " memname " has the string <" str2fnd ">"
lot.3 = in.recid
lot.0=3
"EXECIO" lot.0 "DISKW XXOUT (STEM lot."
HDR=0
end
lot.1 = in.recid
lot.0=1
"EXECIO" lot.0 "DISKW XXOUT (STEM lot."
END
END
END
say '*** SEARCH COMPLETE ***'
lot.1="------------------------------------------------"
lot.2="-------------- END OF SEARCH ------------------"
lot.3="------------------------------------------------"
lot.0=3
"EXECIO" lot.0 "DISKW XXOUT (STEM lot."
"EXECIO 0 DISKW XXOUT (FINIS"
"FREE F(XXOUT)"
EXIT




I AM GETTING THE MESSAGE:

Abend in host command EXECIO or address environment routine TSO.
EXECIO error while trying to GET or PUT a record.
*** SEARCH COMPLETE ***
System abend code 013, reason code 00000020.
Abend in host command EXECIO or address environment routine TSO.
EXECIO error while trying to GET or PUT a record.
***

PLEASE CAN ANYONE ASSIST IN THIS

Re: GETTING PUT OR GET RECORD WHEN I AM TRYING TO RUN A REXX

PostPosted: Thu May 07, 2009 12:53 pm
by dick scherrer
Hello,

The dcb info for the file does not match.

Suggest you run a trace to help isloate which file and statement are in error.

Re: System abend code 013 in REXX

PostPosted: Thu May 07, 2009 3:22 pm
by MrSpock
First of all:

"ALLOC FI(XXOUT) DA('BRM000U.REXX.WORK(FRE1)') MOD REUSE"

You can never specify DISP=MOD processing for a member of a PDS. You should know that.

You should fix that logic, then as Dick suggested show us a runtime TRACE.

Re: System abend code 013 in REXX

PostPosted: Fri May 08, 2009 9:14 am
by RAHUL DB2 DBA
Thanks Spock and Dick
I have identified my mistake.The Rexx is working fine.
Trace is also running fine

Re: System abend code 013 in REXX

PostPosted: Fri May 08, 2009 9:51 am
by dick scherrer
I have identified my mistake.
And the problem was. . .?

Good to hear it is working :)

d