I coded a rexx program and it is working fine. But the problem is it is not updating the output dataset. Whenever, my rexx program runs it should give new values for every run. But in this case it is giving the same value. FYI, if I am manually deleting the data from output dataset then the new values are printed in output dataset, otherwise the old values are conitnuing for every run. Below is my sample code. I think I need to look at the ALLOC statements that's why I didn't pasted my whole logic.
/*REXX*/
"ALLOC FI(INDD) DA('ZADSTM.KK.ICF.DCOLLECT.VOLINFO') SHR REUSE"
"ALLOC FI(INDD1) DA('ZADSTM.KK.ICF.DCOLLECT.DTYPREC') SHR REUSE"
"ALLOC FI(OUTDD) DA('ZADSTM.ICF.CATALOG.OUTPUT.KK') SHR REUSE
VOLUME(SYSW01)"
"EXECIO * DISKR INDD(STEM LIN. FINIS"
"EXECIO * DISKR INDD1(STEM STEM4. FINIS"
my logic
"EXECIO * DISKW OUTDD(STEM OUT. FINIS"
"FREE FI(OUTDD)"
"FREE FI(INDD)"
EXIT 0
"ALLOC FI(INDD) DA('ZADSTM.KK.ICF.DCOLLECT.VOLINFO') SHR REUSE"
"ALLOC FI(INDD1) DA('ZADSTM.KK.ICF.DCOLLECT.DTYPREC') SHR REUSE"
"ALLOC FI(OUTDD) DA('ZADSTM.ICF.CATALOG.OUTPUT.KK') SHR REUSE
VOLUME(SYSW01)"
"EXECIO * DISKR INDD(STEM LIN. FINIS"
"EXECIO * DISKR INDD1(STEM STEM4. FINIS"
my logic
"EXECIO * DISKW OUTDD(STEM OUT. FINIS"
"FREE FI(OUTDD)"
"FREE FI(INDD)"
EXIT 0
Can somebody help me in this regard.
Thanks
Ravi Sankar
Code'd from Quote'd