Tuesday, June 9, 2009

(Q&A) How To Delete Old Spool File

(From: Prabhu)

Question:
hi want to create tool to delete old spool files. any please help me to give the code

Answer:
In creating you program just follow these simple steps:
1. Create a user space (QUSCRTUS API).
2. Generate a list of spooled files (QUSLSPL API).
3. Retrieve information from a user space using one of the following:
* QUSRTVUS API
* QUSPTRUS API
4. Retrieve more spooled file attribute information received from the user space
(QUSRSPLA API).
5. Call the created CL program to delete the spooled files.
CL program should contain the following:
a) Delete the specified spooled files (DLTSPLF command).
b) Send a message if the spooled file was deleted (SNDPGMMSG command).
6. Send a message to the user (QMHSNDM API).
7. Delete the user space (QUSDLTUS API).

No comments:

Post a Comment