Page 1 of 1

REXX EXECIO error while trying to GET or PUT a record

PostPosted: Thu Dec 06, 2007 9:06 am
by Halka
I am getting an error
The input or output file INFILE1 is not allocated. It cannot be opened for I/O.
EXECIO error while trying to GET or PUT a record.
FILE INFILE1 NOT FREED, IS NOT ALLOCATED

my code is

DSN_NAME = 'BDLT.USTRI.REXX.SB853.TOOLS'
DSNN = DSN_NAME||'('||SPACE('CPY')||')'
"ALLOCATE DDN(INFILE1) DSN('"DSNN"')"

/* IN THE SRCH JCL, REPLACE THE EXISTING SRCH STRING WITH USER INPUT */
IF RC = 0 THEN
"EXECIO * DISKR INFILE1 (FINIS STEM INREC."
"FREE F(INFILE1)"
end

please help

Re: REXX

PostPosted: Thu Dec 06, 2007 6:33 pm
by MrSpock
What does your output from a runtime TRACE look like, especially for this section of code:

DSN_NAME = 'BDLT.USTRI.REXX.SB853.TOOLS'
DSNN = DSN_NAME||'('||SPACE('CPY')||')'
"ALLOCATE DDN(INFILE1) DSN('"DSNN"')"

?

Re: REXX

PostPosted: Fri Dec 07, 2007 9:00 am
by Halka
'CPY' is a member in the pds 'BDLT.USTRI.SB853.TOOLS' and it is a JCL. In that I'm seraching for all the files in that. The problem is I'm getting the error FILE INFILE1 IS NOT FREED. I had given the statement "FREE F(INFILE1)" . I dont know why it is giving that error again. I'll be really thankful if you could help me.

Re: REXX

PostPosted: Sat Dec 08, 2007 4:50 pm
by Halka
this is the error i'm getting.......

EXECIO error while trying to GET or PUT a record.
FILE INFILE1 NOT FREED, IS NOT ALLOCATED

its a very urgent requirement....... could you pls help me?

Re: REXX

PostPosted: Sat Dec 08, 2007 7:03 pm
by MrSpock
I would've like to have seen the TRACE, but anyway, it would certainly appear that the TSO ALLOCATE command is failing. I think one problem is that there's no disposition specified for the dataset. Since it's a PDS, you might want to change the statement to:

"ALLOCATE DDN(INFILE1) DSN('"DSNN"') SHR REUSE"

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

PostPosted: Mon Dec 10, 2007 8:50 am
by Halka
I tried with SHR REUSE also it was not working. Sometimes it will work, sometimes not. it'll show file in use.