Robert A. Rosenberg wrote:
At 23:15 +0800 on 08/26/2006, Johnny Luo wrote about Re: Z/os Performance issue: REWRITE a sequential data set:Because the pl/i program is simple, i'll put its main logic here: (It's our customer's production program) DO WHILE (!EOF_FILEA & !EOF_FILEB); DO WHILE (!EOF_FILEB & FILEA_ACT<=FILEB_ACT); IF (FILEA_ACT = FILEB_ACT) THEN DO; FILEB_AMT = FILEA_AMT; REWRITE FILE(FILEB) FROM(FILEB_REC); END; READ FILE(FILEB) INTO(FILEB_REC); END; READ FILE(FILEA) INTO(FILEA_REC); END;From the above, the "Record Length Change" hypothesis is shoot down. All you are doing is rewriting all the records in FileB that are in FileA (with FileA's AMT field replacing the contents of the FileB record's AMT field). Are you using BSAM or QSAM as your Access Method? It should be QSAM which only flushes updated blocks after you are done with the block. In BSAM the block gets flushed at update even though more records remain it in (thus your high IO count since you are updating ALL FileB records that exist in FileA.
It's pretty tough to use BSAM in COBOL, you almost always get QSAM or VSAM. I'm not sure how you'd force BSAM. Kind regards, -Steve Comstock ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

