Taking infinte time to execute the EXECIO 0 and FREE command



IBM's Command List programming language & Restructured Extended Executor

Taking infinte time to execute the EXECIO 0 and FREE command

Postby fornanthakumar » Tue Nov 09, 2010 3:32 am

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.?
Regards,
Nanthu.Y.
fornanthakumar
 
Posts: 69
Joined: Fri Oct 22, 2010 1:58 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby expat » Tue Nov 09, 2010 8:49 pm

HAve you processed the REXX using the TRACE option ?

If not, do so
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

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

Postby MrSpock » Tue Nov 09, 2010 9:52 pm

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.
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

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

Postby stevexff » Wed Nov 10, 2010 9:26 pm

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...
Steve
stevexff
 
Posts: 56
Joined: Wed Nov 10, 2010 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby fornanthakumar » Sun Nov 14, 2010 2:41 am

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.?
Regards,
Nanthu.Y.
fornanthakumar
 
Posts: 69
Joined: Fri Oct 22, 2010 1:58 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Sun Nov 14, 2010 2:57 am

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).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post