OUTQ単位で保存日数を過ぎたスプールファイルを削除します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
CLEANUP OUTQ (CLNOUTQ) 選択項目を入力して,実行キーを押してください。 OUTQ . . . . . . . . . . . . . . 名前 LIBRARY . . . . . . . . . . . *LIBL 文字値 保存日数 . . . . . . . . . . . 数値 *HOLD の保存日数 . . . . . . . *RETAIN 数値 , *RETAIN *SAV の保存日数 . . . . . . . *RETAIN 数値 , *RETAIN 終り F3= 終了 F4=プロンプト F5= 最新表示 F12= 取り消し F13= この画面の使用法 F24= キーの続き |
<<< CMD:CLNOUTQ >>>
1 2 3 4 5 6 7 8 9 10 11 12 13 |
CMD PROMPT('CLEANUP OUTQ') PARM KWD(OUTQ) TYPE(NAME2) PROMPT('OUTQ') PARM KWD(RETAIN) TYPE(*DEC) LEN(5 0) MIN(1) + PROMPT('保存日数') PARM KWD(RTNHLD) TYPE(*DEC) LEN(5 0) DFT(*RETAIN) + SPCVAL((*RETAIN -1)) + PROMPT('*HOLDの保存日数') PARM KWD(RTNSAV) TYPE(*DEC) LEN(5 0) DFT(*RETAIN) + SPCVAL((*RETAIN -1)) + PROMPT('*SAV の保存日数') NAME2: QUAL TYPE(*SNAME) LEN(10) QUAL TYPE(*CHAR) LEN(10) DFT(*LIBL) + PROMPT('LIBRARY') |
<<< CLP:CLNOUTQC >>>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
PGM PARM(&QUALOUTQ &RETAIN &RTNHLD &RTNSAV) DCL VAR(&RTNLIB) TYPE(*CHAR) LEN(10) DCL VAR(&QUALOUTQ) TYPE(*CHAR) LEN(20) DCL VAR(&OUTQ) TYPE(*CHAR) LEN(10) DCL VAR(&OUTQLIB) TYPE(*CHAR) LEN(10) DCL VAR(&RETAIN) TYPE(*DEC) LEN(5 0) DCL VAR(&RTNHLD) TYPE(*DEC) LEN(5 0) DCL VAR(&RTNSAV) TYPE(*DEC) LEN(5 0) CHGVAR VAR(&OUTQ) VALUE(%SST(&QUALOUTQ 1 10)) CHGVAR VAR(&OUTQLIB) VALUE(%SST(&QUALOUTQ 11 10)) CHKOBJ OBJ(&OUTQLIB/&OUTQ) OBJTYPE(*OUTQ) MONMSG MSGID(CPF9801 CPF9810) EXEC(DO) SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('OUTQ' + |> &OUTQ |> 'IN LIBRARY' |> + &OUTQLIB |> 'NOT FOUND') MSGTYPE(*ESCAPE) ENDDO CHKOBJ OBJ(QTEMP/CLNOUTQP) OBJTYPE(*FILE) MONMSG MSGID(CPF9801) EXEC(DO) RTVOBJD OBJ(CLNOUTQP) OBJTYPE(*FILE) RTNLIB(&RTNLIB) CRTDUPOBJ OBJ(CLNOUTQP) FROMLIB(&RTNLIB) + OBJTYPE(*FILE) TOLIB(QTEMP) ENDDO OVRDBF FILE(CLNOUTQP) TOFILE(QTEMP/CLNOUTQP) /* P1=USER P2=OUTQ P3=OUTPUT MODE */ CALL PGM(CLNOUTQR1) PARM('*ALL' &QUALOUTQ '*REPLACE') CALL PGM(CLNOUTQR2) PARM(&RETAIN &RTNHLD &RTNSAV) DLTOVR FILE(CLNOUTQP) ENDPGM |
<<< PF:CLNOUTQP >>>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
A R CLNOUTR * A SPLNAME 10 TEXT('SPOOL FILE') A SPLJOBNAME 10 TEXT('JOB NAME') A SPLUSERPRF 10 TEXT('USER') A SPLNBR 5 0 TEXT('SPOOL NUMBER') A SPLJOBNBR 6 TEXT('JOB NUMBER') A SPLOUTQ 10 TEXT('*OUTQ') A SPLOUTQLIB 10 TEXT('*OUTQ LIBRARY') A SPLDEVICE 10 TEXT('DEVICE') A SPLUSRDTA 10 TEXT('USER DATA') A SPLSTATUS 10 TEXT('STATUS') A SPLTOTPAGE 5 0 TEXT('TOTAL PAGES') A SPLCURPAGE 5 0 TEXT('CURRENT PAGE') A SPLCPYLEFT 5 0 TEXT('COPIES LEFT') A SPLFORMTYP 10 TEXT('FORM TYPE') A SPLPRIORTY 2 TEXT('PRIORITY') A SPLDATE 6 0 TEXT('DATE') A SPLTIME 6 0 TEXT('TIME') A SPLINJOBID 16 TEXT('INTERNAL JOB IDENTIFIER') A SPLINSPLID 16 TEXT('INTERNAL SPOOL IDENTIFIER') A SPLDEVTYPE 10 TEXT('DEVICE TYPE') |
<<< RPGLE:CLNOUTQR1 >>>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
********************************************************************************************** * FILES: ********************************************************************************************** FCLNOUTQP O E DISK USROPN ********************************************************************************************** * ARRAYS: ********************************************************************************************** D ARR S 1 BASED(LSTPTR) DIM(32767) D KEYS S 9B 0 DIM(20) ********************************************************************************************** * DATA STRUCTURES: ********************************************************************************************** DQUSEC DS D QUSBPRV 1 4B 0 D QUSBAVL 5 8B 0 D QUSEI 9 15 D QUSERVED 16 16 * D DS D SPOOLNBR# 9B 0 D SPOOLNBRCHR 4 OVERLAY(SPOOLNBR#) * D DS D TOTPAGES# 9B 0 D TOTPAGESCHR 4 OVERLAY(TOTPAGES#) * D DS D CURPAGE# 9B 0 D CURPAGECHR 4 OVERLAY(CURPAGE#) * D DS D COPIESLEFT# 9B 0 D COPIESLEFTCHR 4 OVERLAY(COPIESLEFT#) * DQUSH0100 DS BASED(SPCPTR) D QUSUA 64 D QUSSGH 9B 0 D QUSSRL 4 D QUSFN 8 D QUSAU 10 D QUSDTC 13 D QUSIS 1 D QUSSUS 9B 0 D QUSOIP 9B 0 D QUSSIP 9B 0 D QUSOHS 9B 0 D QUSSHS 9B 0 D QUSOLD 9B 0 D QUSSLD 9B 0 D QUSNBRLE 9B 0 D QUSSEE 9B 0 D QUSSIDLE 9B 0 D QUSCID 2 D QUSLID 3 D QUSSLI 1 D QUSERVED00 42 * DQUSSPLKI DS 100 BASED(LSTPTR2) D QUSLFIR02 9B 0 D QUSKFFFR00 9B 0 D QUSTOD02 1 D QUSR300 3 * D QUSDL02 9B 0 DQUSF0200 DS BASED(LSTPTR) D QUSNBRFR00 9B 0 D CLRPFM DS D 80 INZ('CLRPFM FILE(QTEMP/CLNOUTQP)') ********************************************************************************************** * WORK FIELDS: ********************************************************************************************** D CMDLENGTH S 15 5 D CMDSTRING S 256 D EXT_ATTR S 10 D FORMAT S 8 D FORMTYPE S 10 D INDEX S 3 0 D JOBNAME S 26 D KEY# S 9B 0 INZ(20) D LSTPTR S * D LSTPTR2 S * D ONEPERCENT S 11 2 D OUTQUEUE S 20 D P_MARKER S 1 INZ(X'33') D P_PERCENT S 3 0 D P_TEXT S 20 D P#MBROPT S 8 D P#OUTQ S 20 D P#USER S 10 D RCDSREAD S 9 0 D REMAINDER S 9 0 D SPC_AUT S 10 D SPC_DOMAIN S 10 D SPC_INIT S 1 INZ(X'00') D SPC_NAME S 20 INZ('USERSPLF QTEMP ') D SPC_REPLAC S 10 D SPC_SIZE S 9B 0 INZ(2000) D SPC_TEXT S 50 D SPCPTR S * D SPLDATECHR S 7 D SPLTIMECHR S 6 D USER S 10 D USERDATA S 10 D X S 9 0 ********************************************************************************************** * ENTRY PARAMETERS: ********************************************************************************************** C *ENTRY PLIST C PARM P#USER C PARM P#OUTQ C PARM P#MBROPT ********************************************************************************************** * MAINLINE: ********************************************************************************************** C EXSR #INITS * C EVAL QUSBPRV = 0 * C DO 20 INDEX C EVAL KEYS(INDEX) = 200 + INDEX C ENDDO * C CALL 'QUSCRTUS' C PARM SPC_NAME C PARM 'QUSLSPL ' EXT_ATTR C PARM SPC_SIZE C PARM SPC_INIT C PARM '*ALL' SPC_AUT C PARM 'CLNOUTQ' SPC_TEXT C PARM '*YES' SPC_REPLAC C PARM QUSEC C PARM '*USER' SPC_DOMAIN * C CALL (E) 'QUSLSPL' C PARM SPC_NAME C PARM 'SPLF0200' FORMAT C PARM P#USER USER C PARM P#OUTQ OUTQUEUE C PARM '*ALL' FORMTYPE C PARM '*ALL' USERDATA C PARM QUSEC C PARM JOBNAME C PARM KEYS C PARM KEY# * C IF NOT %ERROR C CALL 'QUSPTRUS' C PARM SPC_NAME C PARM SPCPTR C PARM QUSEC * C IF QUSSRL = '0100' C IF QUSIS = 'C' C OR QUSIS = 'P' * C IF QUSNBRLE > 0 * C EVAL ONEPERCENT = QUSNBRLE / 100 C IF QUSNBRLE < 10 C EVAL ONEPERCENT = 0.1 C EVAL RCDSREAD = 10 - QUSNBRLE C ENDIF * C IF P#USER = '*ALL' C EVAL P_TEXT = 'LOADING ' + %SUBST(P#OUTQ : 1 : 10) C ELSE C EVAL P_TEXT = 'LOADING ' + P#USER C ENDIF * C EVAL LSTPTR = SPCPTR C EVAL LSTPTR = %ADDR(ARR(QUSOLD + 1)) * C DO QUSNBRLE C EVAL X = 5 C EVAL LSTPTR2 = %ADDR(ARR(X)) C DO QUSNBRFR00 C SELECT C WHEN QUSKFFFR00 = 201 C EVAL SPLNAME = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 202 C EVAL SPLJOBNAME = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 203 C EVAL SPLUSERPRF = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 204 C EVAL SPLJOBNBR = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 205 C EVAL SPOOLNBRCHR = %SUBST(QUSSPLKI:17:QUSDL02) C EVAL SPLNBR = SPOOLNBR# C WHEN QUSKFFFR00 = 206 C EVAL SPLOUTQ = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 207 C EVAL SPLOUTQLIB = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 208 C EVAL SPLDEVICE = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 209 C EVAL SPLUSRDTA = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 210 C EVAL SPLSTATUS = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 211 C EVAL TOTPAGESCHR = %SUBST(QUSSPLKI:17:QUSDL02) C EVAL SPLTOTPAGE = TOTPAGES# C WHEN QUSKFFFR00 = 212 C EVAL CURPAGECHR = %SUBST(QUSSPLKI:17:QUSDL02) C EVAL SPLCURPAGE = CURPAGE# C WHEN QUSKFFFR00 = 213 C EVAL COPIESLEFTCHR = %SUBST(QUSSPLKI:17:QUSDL02) C EVAL SPLCPYLEFT = COPIESLEFT# C WHEN QUSKFFFR00 = 214 C EVAL SPLFORMTYP = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 215 C EVAL SPLPRIORTY = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 216 C EVAL SPLDATECHR = %SUBST(QUSSPLKI:17:QUSDL02) C MOVE SPLDATECHR SPLDATE C WHEN QUSKFFFR00 = 217 C EVAL SPLTIMECHR = %SUBST(QUSSPLKI:17:QUSDL02) C MOVE SPLTIMECHR SPLTIME C WHEN QUSKFFFR00 = 218 C EVAL SPLINJOBID = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 219 C EVAL SPLINSPLID = %SUBST(QUSSPLKI:17:QUSDL02) C WHEN QUSKFFFR00 = 220 C EVAL SPLDEVTYPE = %SUBST(QUSSPLKI:17:QUSDL02) C IF SPLDEVTYPE = 'PRINTER' C EVAL SPLDEVICE = SPLOUTQ C ENDIF C OTHER C EXSR ERROR C ENDSL * C EVAL X = X + QUSLFIR02 C EVAL LSTPTR2 = %ADDR(ARR(X)) C ENDDO C WRITE CLNOUTR C EVAL LSTPTR = %ADDR(ARR(QUSSEE + 1)) C ENDDO C ENDIF C ENDIF C ENDIF C ENDIF * C EVAL *INLR = *ON C RETURN |