*JOBLOG - trace messages are sent to the job log. The job attribute is changed so that the job log spool file is sent to the output queue QEZJOBLOG when the job ends.
This trace method is the best way to view trace messages while the job is running.
- Use the WRKACTJOB command
- Type option 5 next to the job
- Type option 10 to see the job log.
- After the job ends, you can find the job log as a spooled file in the output queue QEZJOBLOG. The AS/400 command WRKOUTQ QEZJOBLOG will show the list of files in the queue.
- Go to the bottom of the list to see the most recent files.
- The spool file can be transferred to Windows, but first, it must be copied to a data file.
- Create the data file named MYDATA in the library QGPL (for example):
CRTPF FILE(QGPL/MYDATA) RCDLEN(133) MBR(*NONE) MAXMBRS(*NOMAX)
- Then copy the job log to the data file QGPL/MYDATA, member name XYZ:
CPYSPLF FILE(qpjoblog) TOFILE(QGPL/MYDATA) JOB(862732/CAWLAGENT/CAOPRDMN) SPLNBR(2) TOMBR(XYZ)
- The file name, job id, and spool number can be found in the WRKOUTQ display.