DLTEXPSPLF

5 pts.
Tags:
AS/400
DLTEXPSPLF
IBM iSeries
How do I create cmd DLTEXPSPLF with EXPDATE and DAYS parameters? Do I use it OUTQ level or print file level etc.?

Answer Wiki

Thanks. We'll let you know when a new response is added.

EXPDATE and DAYS is specified on the print file level using Change Printer File (CHGPRTF), Create Printer File (CRTPRTF), Change Spooled File Attributes (CHGSPLFA), or Override with Printer File (OVRPRTF). You would then run DLTEXPSPLF periodically to clean up any expired spool files in the specified auxiliary storage pool group (ASPGRP).

For automation purposes, you could use the job scheduler function of i5/OS to run the DLTEXPSPLF command. An example of doing this can be found in the help text for DLTEXPSPLF.

Bruce Vining
<a href=”http://www.brucevining.com/”>http://www.brucevining.com/</a>
Providing integrated solutions for the System i user community
a

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • SILVARB
    Hi friends, I use the other form to resolve this situation. 1º CL 100 PGM PARM(&DATA1 &DATA2 &DIF) /* Calcula + 05/01/00 200 diferences betwin dates YYMMDD */ 05/01/00 300 DCL VAR(&DATA1) TYPE(*CHAR) LEN(6) 05/01/00 400 DCL VAR(&DATA2) TYPE(*CHAR) LEN(6) 05/01/00 500 DCL VAR(&DATA1J) TYPE(*CHAR) LEN(5) 05/01/00 600 DCL VAR(&DATA2J) TYPE(*CHAR) LEN(5) 05/01/00 700 DCL VAR(&DIF) TYPE(*DEC) LEN(5 0) 05/01/00 800 DCL VAR(&DIFDIA) TYPE(*DEC) LEN(5 0) 05/01/00 900 DCL VAR(&DIFANO) TYPE(*DEC) LEN(5 0) 05/01/00 1000 DCL VAR(&ANO1) TYPE(*DEC) LEN(4 0) 05/01/00 1100 DCL VAR(&DIA1) TYPE(*DEC) LEN(3 0) 05/01/00 1200 DCL VAR(&ANO2) TYPE(*DEC) LEN(4 0) 05/01/00 1300 DCL VAR(&DIA2) TYPE(*DEC) LEN(3 0) 05/01/00 1400 05/01/00 1500 CVTDAT DATE(&DATA1) TOVAR(&DATA1J) FROMFMT(*YMD) + 05/01/00 1600 TOFMT(*JUL) TOSEP(*NONE) 05/01/00 1700 CVTDAT DATE(&DATA2) TOVAR(&DATA2J) FROMFMT(*YMD) + 05/01/00 1800 TOFMT(*JUL) TOSEP(*NONE) 05/01/00 1900 CHGVAR VAR(&ANO1) VALUE(%SST(&DATA1J 1 2)) 05/01/00 2000 CHGVAR VAR(&ANO2) VALUE(%SST(&DATA2J 1 2)) 05/01/00 2100 CHGVAR VAR(&DIA1) VALUE(%SST(&DATA1J 3 3)) 05/01/00 2200 CHGVAR VAR(&DIA2) VALUE(%SST(&DATA2J 3 3)) 05/01/00 2300 05/01/00 2400 IF COND(%SST(&DATA1 1 1) *GE '8') THEN(CHGVAR + 05/01/00 2500 VAR(&ANO1) VALUE(&ANO1 + 1900)) 05/01/00 2600 ELSE CMD(CHGVAR VAR(&ANO1) VALUE(&ANO1 + 2000)) 05/01/00 2700 IF COND(%SST(&DATA2 1 1) *GE '8') THEN(CHGVAR + 05/01/00 2800 VAR(&ANO2) VALUE(&ANO2 + 1900)) 05/01/00 2900 ELSE CMD(CHGVAR VAR(&ANO2) VALUE(&ANO2 + 2000)) 05/01/00 3000 05/01/00 3100 CHGVAR VAR(&DIFDIA) VALUE(&DIA1 - &DIA2) 05/01/00 3200 CHGVAR VAR(&DIFANO) VALUE(&ANO1 - &ANO2) 05/01/00 3300 IF COND(&DIFDIA *LT 0) THEN(DO) 05/01/00 3400 CHGVAR VAR(&DIFANO) VALUE(&DIFANO - 1) 05/01/00 3500 CHGVAR VAR(&DIFDIA) VALUE(&DIFDIA + 365) 05/01/00 3600 ENDDO 05/01/00 3700 05/01/00 3800 CHGVAR VAR(&DIF) VALUE((&DIFANO * 365) + &DIFDIA) 05/01/00 3900 05/01/00 4000 ENDPGM 05/01/00 * * * * E N D O F S O U R C E * * * * ********************************************************************************************************* 2º CL 100 PGM PARM(&DIAS) /* Deleta spoolfiles com mais de + 05/01/00 200 NN dias */ 05/01/00 300 DCLF FILE(DLTOLDSPLF) /*este arquivo é gerado na QRY 05/01/00 400 DCL VAR(&DIAS) TYPE(*DEC) LEN(3 0) 05/01/00 500 DCL VAR(&DIF ) TYPE(*DEC) LEN(5 0) 05/01/00 600 DCL VAR(&DIFX) TYPE(*CHAR) LEN(5) 05/01/00 700 DCL VAR(&SYSDATE) TYPE(*CHAR) LEN(6) 05/01/00 800 DCL VAR(&CTDLT) TYPE(*DEC) LEN(5 0) 05/01/00 900 DCL VAR(&SPLNBRAUX) TYPE(*DEC) LEN(5 0) 05/01/00 1000 DCL VAR(&CTDLTX) TYPE(*CHAR) LEN(5) 05/01/00 1100 05/01/00 1200 WRKSPLF SELECT(*ALL) OUTPUT(*PRINT) 05/01/00 1300 CRTPF FILE(QTEMP/WRKSPLF) RCDLEN(170) SIZE(*NOMAX) 23/01/00 1400 MONMSG MSGID(CPF7302) 05/01/00 1500 CPYSPLF FILE(QPRTSPLF) TOFILE(QTEMP/WRKSPLF) + 05/01/00 1600 SPLNBR(*LAST) 05/01/00 1700 RUNQRY QRY(DLTOLDSPLF) 05/01/00 1800 05/01/00 1900 RTVSYSVAL SYSVAL(QDATE) RTNVAR(&SYSDATE) 05/01/00 2000 CVTDAT DATE(&SYSDATE) TOVAR(&SYSDATE) TOFMT(*YMD) + 05/01/00 2100 TOSEP(*NONE) 05/01/00 2200 05/01/00 2300 LER: 05/01/00 2400 RCVF 05/01/00 2500 MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(FIM)) 05/01/00 2600 CALL PGM(DIFDATA) PARM(&SYSDATE &SPLDAT &DIF) 05/01/00 2700 IF COND(&DIF *LE &DIAS) THEN(GOTO CMDLBL(LER)) 05/01/00 2800 CHGVAR VAR(&SPLNBRAUX) VALUE(&SPLNBR) 05/01/00 2900 CHGVAR VAR(&DIFX) VALUE(&DIF) 05/01/00 3000 DLTSPLF FILE(&SPLFNAM) JOB(&JOBNBR/&USRNAM/&JOBNAM) + 05/01/00 3100 SPLNBR(&SPLNBRAUX) 05/01/00 3200 MONMSG MSGID(CPF0000) 05/01/00 3300 SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) + 05/01/00 3400 MSGDTA('Deletando' *BCAT &SPLFNAM *TCAT + 05/01/00 3500 '/' *TCAT &USRNAM *TCAT '/' *TCAT &JOBNAM + 05/01/00 3600 *BCAT 'de' *BCAT &SPLDAT *BCAT 'no + 05/01/00 3700 sistema há' *BCAT &DIFX *BCAT 'dias') + 05/01/00 3800 TOPGMQ(*EXT) MSGTYPE(*STATUS) 05/01/00 3900 CHGVAR VAR(&CTDLT) VALUE(&CTDLT + 1) 05/01/00 4000 GOTO LER 05/01/00 4100 05/01/00 4200 ERROR: 05/01/00 4300 DMPCLPGM 05/01/00 4400 SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Erro no + 05/01/00 4500 programa. Verifique o joblog') + 05/01/00 4600 MSGTYPE(*ESCAPE) 05/01/00 4700 RETURN 05/01/00 4800 05/01/00 4900 FIM: 05/01/00 5000 CHGVAR VAR(&CTDLTX) VALUE(&CTDLT) 05/01/00 5100 SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&CTDLTX + 05/01/00 5200 *BCAT 'spoolfiles deletados') MSGTYPE(*COMP) 05/01/00 5300 LISTALOG 30/05/04 5400 RETURN 05/01/00 5500 ENDPGM 25/04/04 ***************************************************************************** 3º - A Command 100 CMD PROMPT('Delete old spooled files') 05/01/00 200 PARM KWD(RETAINDAYS) TYPE(*CHAR) LEN(3) MIN(1) + 23/04/04 300 PROMPT('Days to retain spooled files') 23/04/04 * * * * E N D O F S O U R C E * * * * ************************************************************************** 4º - A query with this characteristics Query . . . . . . . . . . . . . . . . . DLTOLDSPLF Library . . . . . . . . . . . . . . . STLIB Query text . . . . . . . . . . . . . . Extrai dados de WRKSPLF *ALL Selected files ID File Library Member Record Format T01 WRKSPLF QTEMP *FIRST WRKSPLF *** QRY1615- File WRKSPLF not found in QTEMP. Result fields Name Expression Column Heading Len Dec SPLFNAM SUBSTR(WRKSPLF,2,10) USRNAM SUBSTR(WRKSPLF,13,10) PRTDEV SUBSTR(WRKSPLF,24,10) USRDTA SUBSTR(WRKSPLF,35,10) STATUS SUBSTR(WRKSPLF,46,3) TOTPAG SUBSTR(WRKSPLF,51,5) SPLDAT SUBSTR(WRKSPLF,89,2)|| SUBSTR(WRKSPLF,86,2)|| SUBSTR(WRKSPLF,83,2) SPLTIM SUBSTR(WRKSPLF,92,8) SPLNBR SUBSTR(WRKSPLF,102,5) JOBNAM SUBSTR(WRKSPLF,108,10) JOBNBR SUBSTR(WRKSPLF,119,6) IBM Query for AS/400 9/10/06 20:55:06 Page 2 Result fields (continued) Name Expression Column Heading Len Dec QNAM SUBSTR(WRKSPLF,126,10) QLIB SUBSTR(WRKSPLF,137,10) Select record tests AND/OR Field Test Value (Field, Numbers, or 'Characters') SPLFNAM NLIST '5722SS1 V' 'File ' AND SPLFNAM NLIST ' * ' ' ' Ordering of selected fields Field Sort Ascending/ Break Field Name Priority Descending Level Text SPLFNAM USRNAM PRTDEV USRDTA STATUS TOTPAG SPLDAT 10 A SPLTIM SPLNBR JOBNAM JOBNBR QNAM QLIB Report column formatting and summary functions Summary functions: 1-Total, 2-Average, 3-Minimum, 4-Maximum, 5-Count Overrides Field Summary Column Dec Null Dec Numeric Name Functions Spacing Column Headings Len Pos Cap Len Pos Editing SPLFNAM 0 SPLFNAM 10 USRNAM 2 USRNAM 10 PRTDEV 2 PRTDEV 10 USRDTA 2 USRDTA 10 STATUS 2 STATUS 3 TOTPAG 2 TOTPAG 5 SPLDAT 2 SPLDAT 6 SPLTIM 2 SPLTIM 8 SPLNBR 2 SPLNBR 5 JOBNAM 2 JOBNAM 10 IBM Query for AS/400 9/10/06 20:55:06 Page 3 Report column formatting and summary functions (continued) Summary functions: 1-Total, 2-Average, 3-Minimum, 4-Maximum, 5-Count Overrides Field Summary Column Dec Null Dec Numeric Name Functions Spacing Column Headings Len Pos Cap Len Pos Editing JOBNBR 2 JOBNBR 6 QNAM 2 QNAM 10 QLIB 2 QLIB 10 Selected output attributes Output type . . . . . . . . . . . . . . Database file Form of output . . . . . . . . . . . . Detail Line wrapping . . . . . . . . . . . . . No Database file output File . . . . . . . . . . . . . . . . . DLTOLDSPLF Library . . . . . . . . . . . . . . . STLIB Member . . . . . . . . . . . . . . . . *FILE Data in file . . . . . . . . . . . . . Replace file For a new file: Authority . . . . . . . . . . . . . . *LIBCRTAUT Text about the file . . . . . . . . . . . . . Print definition . . . . . . . . . . . No ************************************************************************* 5º - Finally use this command DLTOLDSPLF+F4 to choose the number of the last days from the spools remain on the System. OBS: My English is not good, cause i'm having classes (I'm from Brazil).
    440 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following