I want to create a program in which I can monitor a particular user's job which is delay(DLYW) status. This job will run on different boxes, and if the job is found in DLYW status it will send the message back to a paritcular address. Example, I want to monitor job's for use SAM if I found a job in DLYW status, send the network a message to address brxxxx. Can we do this? I have tried everything except the API's.
To find out what jobs are in a certain status, you can use the APIs. There is another solution. You can do a WRKACTJOB to spool file. You then copy the spool file to a database file and read the results with an RPG. This would enable you to check whether SAM job is in delay wait. However, as with all uses of spool file you need to be aware that the format can change depending on the OS/400 version you run and the machine language.