Page 1 of 1

Taking infinte time to execute the EXECIO 0 and FREE command

PostPosted: Tue Nov 09, 2010 3:32 am
by fornanthakumar
Hi,
I am currently working in REXX program using files.
In my REXX program all the below necessary steps are working fine

RECORD=STEM.i
PUSH RECORD
"EXECIO 1 DISKW INPUTDD "


Above three line will execute 7000 times approximately in loop. After this loop i have mentioned

Say "LOOP FINISHED :) " command. then i have mentioned belwo commands
"EXECIO 0 DISKW INPUTDD (FINIS"
"FREE F(INPUTDD)"

My problem here is, the REXX exec will display "LOOP FINISHED :)" then hold on for infinite time.

Can some one please help me on this issue? Please tell me why this issue is happening.?

Re: Taking infinte time to execute the EXECIO 0 and FREE command

PostPosted: Tue Nov 09, 2010 8:49 pm
by expat
HAve you processed the REXX using the TRACE option ?

If not, do so

Re: Taking infinte time to execute the EXECIO 0 and FREE command

PostPosted: Tue Nov 09, 2010 9:52 pm
by MrSpock
I will make a comment of coding, though.

RECORD = STEM.i
PUSH RECORD

there's no real reason to assign a variable to a variable. This would work just as well:

PUSH STEM.i

Also:

"FREE F(INPUTDD)"

there's no reason to FREE a dataset or DD unless you have already issued a TSO ALLOCATE command.

Re: Taking infinte time to execute the EXECIO 0 and FREE command

PostPosted: Wed Nov 10, 2010 9:26 pm
by stevexff
Inside your loop:
push stem.i
afterwards:
"EXECIO " queued() "DISKW INPUTDD (FINIS)"
to write all the records in one go. If they come out in the wrong order, then use queue instead of push.

I'd also question the use of INPUTDD as an output file, as it isn't a very intuitive name...

Re: Taking infinte time to execute the EXECIO 0 and FREE command

PostPosted: Sun Nov 14, 2010 2:41 am
by fornanthakumar
Hi,

I just did as suggested,

"EXECIO " queued() "DISKW INPUTDD (FINIS)"

But it will keep on help up in this statement. It wont execute anything after this.

I used to purge my id from some other's and the beauty here,

1.It will write all the necessary data into the dataset.
2.If i execute the same REXX-EXEC from JCL then it will work fine.

Its happening only when executing this REXX-EXEC directly by using EX in 3.4 PDS member list.

Any reason behind this.?

Re: Taking infinte time to execute the EXECIO 0 and FREE command

PostPosted: Sun Nov 14, 2010 2:57 am
by dick scherrer
Hello,

The problem is possibly with dataset allocation/de-allocation. There may be system messages that have been overlooked.

How many places is INPUTDD used in the code (or any code that calles this code)?

Which misguided soul defined/permitted the use of "inputdd" for an output dataset? Hopefully, this code does not over-write the input dataset. If it does this should be recoded to write a new output file and then discard the input (if it is unneeded).