Of course 1 operation is less overhead than >1 operations.
I would do this:
FsrcCompIn IF E K DISK PREFIX('SRC.')
F EXTDESC('SRCCOMP') EXTFILE('SRCCOMP')
FsrcCompOutO A E Disk PREFIX('OUT.')
F EXTDESC('SRCCOMP') EXTFILE('SRCCOMP')
D SRC E DS EXTNAME(SRCCOMP) QUALIFIED INZ
D OUT E DS EXTNAME(SRCCOMP) QUALIFIED INZ
/free
read srcCompIn SRC;
DOW NOT %EOF();
eval-corr out = src;
write srcCompOut OUT;
read srcCompIn SRC;
enddo;
Alternatively, this might work, if it does, it would be even better:
FsrcCompIn IF E K DISK PREFIX('SRC.')
F EXTDESC('SRCCOMP') EXTFILE('SRCCOMP')
FsrcCompOutO E DISK PREFIX('OUT.')
F EXTDESC('SRCCOMP')
D SRC E DS EXTNAME(SRCCOMP) QUALIFIED INZ
/free
read srcCompIn SRC;
DOW NOT %EOF();
write srcCompOut SRC;
read srcCompIn SRC;
enddo; |