I am a new programmer to the as400, and I need to create a CL program that will check a printer queue for any spool files and then for any spool file, get the creation date of that spool file to see if its older than 30 minutes. I can't seem to find any documentation for what I am trying to do. I have seen the API QUSRSPLA, but im not sure if this is what im looking for, nor can I seem to find any good usage documentation about how to call the api and then fill a variable with a creation date to use for comparing. If anyone has a program that does what im trying to do or a suggestion, it would be greatly appreciated.
**EDIT**
For a more clear understanding of what I need to do I wanted to explain in more detail what I need.
I need a CL program, that will grab all of the spool files from a specific printer. Once it has them all it will loop through each one, grabbing the creation date and time of the spool file, and filling a variable with it. Then a comparison will be done to check if the creation date and time is older than 30 minutes from current date and time. If it is older, then a message will need to be sent out. The message part I'm not sure about, since I'll need a way to monitor for the message, but ill worry about that part later on.
Thank you to everyone who has looked at this and is trying to help out.
**EDIT**
For a more clear understanding of what I need to do I wanted to explain in more detail what I need.
I need a CL program, that will grab all of the spool files from a specific printer. Once it has them all it will loop through each one, grabbing the creation date and time of the spool file, and filling a variable with it. Then a comparison will be done to check if the creation date and time is older than 30 minutes from current date and time. If it is older, then a message will need to be sent out. The message part I'm not sure about, since I'll need a way to monitor for the message, but ill worry about that part later on.
Thank you to everyone who has looked at this and is trying to help out.
Comment