Auto RGZPFM
发表于:2007-06-08来源:作者:点击数:
标签:
AutoRGZPFM ButhereisanCLprogramtoRGZPFMfilesthat15%deletedrecords.Weauto-scheduledittorunontheweekendsoverselectedlibraries.Itworkedwell,butweneverhadfileswithmillionsofrecordseither.Terry STRCLPGM:PGMPARM(nbsp;DCLVAR(nbsp;TYPE(*CHAR)LEN(1
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
| hanyu 回复于:2003-07-15 19:39:40
|
收藏ed
|
| 向唐 回复于:2003-07-15 23:33:23
|
非常有用!!!
|
| stephenxie2003 回复于:2003-10-16 14:12:07
|
CHGVAR VAR(&PERCENT) VALUE(&MBNDTR / &MBNRCD)
这个句子的两个变量没有定义!
|
| stephenxie2003 回复于:2003-10-16 14:25:52
|
我在写句子的时候就报错了!
请版主帮忙! 
|
原文转自:http://www.ltesting.net