Once in a while I get the question: How can I prevent the users from deleting their spooled files? For normal InterForm400 operations this is normally not an issue as InterForm400 is pretty fast when it comes to processing, but for e.g. faxing or even archiving you would want to prevent the users from deleting the spooled files prematurely.
The main problem here is, that some users do a WRKSPLF command and simply delete everything to have a nice and short list of his/her spooled files. It is not that easy to prevent the users from doing that for a specific output queue.
The best way to do that (in my point of view) is to build a validity checking program for the DLTSPLF command (or even better in a OS400 user exit program for QIBM_QSP_SECURITY) and here include the logics, but it can be a bit hard to build and you could be worried about nasty side effects in general on the machine..
A fairly simple low tech solution could be to copy the spooled file and create the new spooled file under another user profile e.g. on an output queue, with restricted authority. This copy is actually possible in InterForm400 via option 4=Copy Spooled file in Auto Forms Control:
Seqnbr Function 1,0 4 Copy Spooled File New output queue . . . . . . . <NEW_OUTQ> Library . . . . . . . . . . <MY_LIB> Hold output spooled file . . . *NO *NO, *YES Save output spooled file . . . *NO *NO, *YES Owner of new spooled file . . <NEW_USER> *INPUT, User
After copying the spooled file to another user, then the WRKSPLF command will not show the new spooled file and the probability for someone deleting the new spooled file is lower.
The downside is of course that the new owner is used when archiving and faxing and it is not ‘water proof’: Someone can still delete the spooled file or even clear the complete output queue.
You can also try to lock down the output queue with the command:
CHGOUTQ OUTQ(<LIB>/<OUTQ>) OPRCTL(*NO) AUTCHK(*OWNER) and set the public authority to *EXCLUDE.
-But if a user profile has *SPLCTL as special authorities, then this will not prevent a delete – even if the user profile is not authorized to the output queue.