kitvb1
5th February 2009, 20:47
To clear columns 1-5 in a source member:
cl: OVRDBF FILE(qrpglesrc) TOFILE(mylib/qrpglesrc) MBR(mymbr);
Update QRPGLESRC a
set a.srcdta = ' ' concat substr(a.srcdta, 6, 100)
where substr(a.srcdta, 1, 5) <> ' '
and a.srcseq < (select min(b.srcseq)
from qrpglesrc b
where substr(b.srcdta, 1, 2) = '**')
Notes:
If in a batch program, you will need to add an OVRSCOPE to the override command.
This will only remove entries until the first '**' (possible CTDATA entry) is found.
cl: OVRDBF FILE(qrpglesrc) TOFILE(mylib/qrpglesrc) MBR(mymbr);
Update QRPGLESRC a
set a.srcdta = ' ' concat substr(a.srcdta, 6, 100)
where substr(a.srcdta, 1, 5) <> ' '
and a.srcseq < (select min(b.srcseq)
from qrpglesrc b
where substr(b.srcdta, 1, 2) = '**')
Notes:
If in a batch program, you will need to add an OVRSCOPE to the override command.
This will only remove entries until the first '**' (possible CTDATA entry) is found.