Please enable JavaScript to view this site.

The CLRPPDQ command is provided to allow for selected queue entries to be deleted. Before running this command you should run the SAVPPDQ command to save the queue entries to a Save File for future reference.  This command may also be found on the Cobwebb Fax & Email Menu - System Maintenance - Housekeeping Menu - Option 3.

You can choose to clear the entries for up to 10 individual User IDs This may be useful if you have automatically generated messages that you do not wish to keep, and these are allocated a specific user id.

Notes:

Unless you enter a "Y" for the "Delete records" parameter then NO records will be deleted. This could be used to simply print records that would be deleted before running the command again to actually delete the records.

If you end the CPPD subsystem before running this command then any files with deleted records will be reorganised.

Check number of messages on the Cobwebb Queue

If you want so see the Current number of records in AFAXQ (the physical file holding the Cobwebb Queue entries) you can check using the following from a command line on your IBM i:

DSPFD FILE(CPPD/AFAXQ) TYPE(*MBR) OUTPUT(*) FILEATR(*PF)

By using the TYPE and FILEATR parameters this speeds up the command if you have a large number of records. Page down once and you will see the information e.g.

    Access path maintenance . . . . . . . . . : MAINT      *IMMED    

    Access path recovery  . . . . . . . . . . : RECOVER    *NO        

    Member size . . . . . . . . . . . . . . . : SIZE       *NOMAX    

    Current number of records . . . . . . . . :                 1810

    Number of deleted records . . . . . . . . :                     0

End the CPPD Subsystem

Best practice is to end the CPPD subsystem otherwise, it will delete the records but it will not reorganise the files to remove deleted records and re-allocate the space.

ENDSBS CPPD

Example Command

If for instance, you wished to clear the queue for anything older than 100 days, for all users and all statuses, then you could use:

CLRPPDQ CLRDAY(100) USR(*ALL) CLRS(Y) CLRR(Y) CLRW(Y) CLRD(Y) CLRQ(Y) QSRV(*ALL) DLTR(Y) PRTOPT(*NONE)

Note: If you find that this is taking a long time then you can end this job controlled and then run it again to carry on deleting records.

CLRPPDQ Options

You need to define the following parameters:

CLRDAY - Clear if older than (days)

Specify the number of days for which you wish to keep messages on the queue.  The selected queue records will be checked against this parameter and, if older, be printed / deleted according to subsequent entries.  If left blank then the default will be used. To change the default entry select Option 6 – Work with system parameters then Option 1 - System parameters and then Option 1 – System parameters again and change the Clear PPD Queue entry.  

USR - User Id

You can choose to clear the entries for up to 10 individual User IDs. This may be useful if you have automatically generated messages that you do not wish to keep, and these are allocated a specific user id. Enter *ALL to clear entries regardless of the User ID.

CLRS - Clear sent entries

If you enter a "Y" then entries with status "S" for Sent messages are selected. Note: If you wish to clear the Fax/Email log then you will need to enter "Y" for both this parameter and the "Clear received entries" parameter.

CLRR - Clear received entries

If you enter a "Y" then entries with status "R" for Received messages are selected.  Note: If you wish to clear the Fax/Email log then you will need to enter "Y" for both this parameter and the "Clear sent entries" parameter.

CLRW - Clear waiting entries

If you enter a "Y" then entries with status "W" for Wait messages are selected.

CLRD - Clear deleted entries

If you enter a "Y" then entries with status "D" for Deleted messages are selected.

PRTOPT - Print removed entries

Specify the entries that you would like to be printed. The queue details (not the text) are printed to give one line for each entry selected.

*NONE

Do not print any messages

*SND

Only print Sent messages being removed.

*RCV

Only print Received messages being removed.

*ALL

Print ALL messages being removed.

QSRV - Select service

Specify the type of messages that you would like to select.

*FAX

Only clear Fax message type

*EML

Only clear Email message type

*ALL

Clear all message types

DLTR - Delete records

If you select to Delete records then the following will happen to queue records matching the rest of the selection criteria:

Queue record will be deleted from AFAXQ

Fax message text will be deleted from AFAXDOC

Email message text will be deleted from AEMLDOC

Converted Fax images will be deleted from AFAXIMG

Received Fax images will be deleted from QAFFRCV

Also, if you have entered a "Y" to both "Clear sent entries" and "Clear Received entries", all logs entries will be removed from AFAXLOG that are older than the "No of days to retain".