Page 1 of 1

EXECIO error while trying to GET or PUT a record.

PostPosted: Thu May 07, 2009 12:55 pm
by RAHUL DB2 DBA
WHEN I AM TRYING TO RUN THE REXX CODE WHICH SEARCHES THE STRING IN A PDS
I AM GETTING ERROR-
THE REXX CODE IS AS FOLLOWS


/*say "enter the name of the dataset" */
say "enter the string to search for"
pds_name ='brm000u.rahul.work'
pull string
if pds_name=""
then do say "no dataset name entered"
say "ending"
exit 8
end
if string =""
then do say "no string entered"
say "ending"
exit 8
end
if sysdsn(pds_name)<> "ok" then
do
say "Error: Specified PDS not found:" pds_name
say "Error: " pds_name " > " sysdsn(pds_name)
say "Press Enter to continue"
pull uresp
end
call outtrap trap.
"listd" pds_name "members"
call outtrap "off"
do i=1 to trap.0
if trap.i="-members-" then leave
end
call listdsi pds_name
dsname=sysdsname
say "the dsname is " dsname
i=i+1
do j=1 to trap.0
parse value trap.j with mem
mem=strip(mem)
say"checking member"
"alloc da ("dsname"("mem")) f(INPU) shr REUSE"
"execio * diskr INPU (finis stem in."
"free f(INPU)"
hit=0
do z=1 to in.0
do z=1 to in.0
if pos(string,in.z)>0
then hit=1
end
if hit=1 then
say "found in member " mem
end


I AM GETTING THE MESSAGE

GIVE THE NAME OF DATASET TO SEARCH
GIVE THE NAME OF STRING TO SEARCH

'BRM000U.BRM000U.RAHUL.WORK'
'YKM107'
the dsname is
checking member
INVALID DATA SET NAME, (YKM107)
MISSING DATA SET NAME OR *+
MISSING NAME OF DATA SET TO BE ALLOCATED
The input or output file INPU is not allocated. It cannot be opened for I/O.
EXECIO error while trying to GET or PUT a record.
FILE INPU NOT FREED, IS NOT ALLOCATED
checking member
INVALID DATA SET NAME, (DATA
INVALID KEYWORD, )
The input or output file INPU is not allocated. It cannot be opened for I/O.
EXECIO error while trying to GET or PUT a record.
FILE INPU NOT FREED, IS NOT ALLOCATED
***


CAN ANYONE HELP ON THIS???????????????

Re: EXECIO error while trying to GET or PUT a record.

PostPosted: Thu May 07, 2009 3:24 pm
by MrSpock
Please post a runtime TRACE.

Re: EXECIO error while trying to GET or PUT a record.

PostPosted: Fri May 08, 2009 4:13 pm
by expat
The input or output file INPU is not allocated. It cannot be opened for I/O.

Does this not give you a slight clue.

Look through your code, run it with TRACE and see where the error occurs.