i am working in rexx, and my task is to update a file and used the following syntax
"execio * diskru outrec(stem out. "
i have to replace a particular string in a record ,which i have it in a variable st
do i = 1 to out.0
if pos('string',out.i) > 0 then
st = out.i
/*after changes in st*/
push st
'execio 1 diskw outrec"
if pos('string',out.i) > 0 then
st = out.i
/*after changes in st*/
push st
'execio 1 diskw outrec"
i got an error saying that "A commamnd entered in clist is invalid".
though the file is updating as i intented,i could not execute the code again,while doing so i got the above error
if i try to execute again i got
"EXTRANEOUS INFORMATION IS IGNORED" which contains records of file to be updated.
so i tried to empty things from stack as
do until queued() = 0
parse pull stackitem
end
parse pull stackitem
end
after the diskrw command,but still i am facing the same problem.
that particular file is to be updated lot of time whwnever i find strings to be replaced.
that is i have diskw command number of times(say more than 7) in my code.
Is emptying stack is the only solution?
somebody provide me with a solution...........
thanks..............