Auto RGZPFM
But here is an CL program to RGZPFM files that > 15% deleted records. We auto-scheduled it to run on the weekends over selected libraries. It worked well, but we never had files with millions of records either. Terry
STRCLPGM: PGM PARM(&LIBRARY)
DCL VAR(&LIBRARY) TYPE(*CHAR) LEN(10)
DCL VAR(&PERCENT) TYPE(*DEC) LEN(4 3)
DCLF FILE(QTEMP/WORKFILE) RCDFMT(QWHFDMBR)
DSPFD FILE(&LIBRARY/*ALL) TYPE(*MBR) +
OUTPUT(*OUTFILE) OUTFILE(QTEMP/WORKFILE)
NEXT: RCVF RCDFMT(QWHFDMBR)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(ENDCLPGM))
IF COND(&MBFILA *EQ '*PHY') THEN(DO)
CHGVAR VAR(&PERCENT) VALUE(&MBNDTR / &MBNRCD)
MONMSG MSGID(MCH1211) EXEC(GOTO CMDLBL(NEXT))
IF COND(&PERCENT *GT .15) THEN(DO)
SBMJOB CMD(RGZPFM FILE(&MBLIB/&MBFILE) MBR(&MBNAME))
ENDDO
ENDDO
GOTO CMDLBL(NEXT)
ENDCLPGM: DLTF FILE(QTEMP/WORKFILE)
ENDPGM
阅读(1488) | 评论(0) | 转发(0) |