Some of the jobs got ended with the below message. "Profilexxxx has issued a controlled shutdown request for work". How to check if these jobs were ended manually by taking option '4'. The jobs ends and restarts everyday. When I check the previous day joblogs I could see the message CPC1125, and when the job ended abnormally it was cpc1126 and CPC1235.
There are several ways that a job can end. The normal ways are:
There are others, but they are less likely. In fact, the ENDSBS OPTION(*IMMED) is not terribly likely either, but easy to test.
One thing to notice right away is that jobs can be configured to only spool a job log when the job ends abnormally. In this case you should only get a job log for reason 6 above. Otherwise, the following will be found in job logs of the job that was ending:
CPF1164 Completion 00 03/26/19 09:06:14.261295 QWTMCEOJ QSYS 0162 *EXT *N
Message . . . . : Job 274217/MMURPHY/MMURPHY ended on 03/26/19 at 09:06:14; .005 seconds used; end code 0 .
CPC1126 Completion 50 03/26/19 08:42:37.604265 QWTCCCNJ QSYS 0C74 *EXT *N
Message . . . . : Job 274196/MMURPHY/MMURPHY was ended by user MMURPHY.
Cause . . . . . : User MMURPHY issued a controlled end job request for job 274196/MMURPHY/MMURPHY.
CPF1164 Completion 00 03/26/19 08:42:37.607135 QWTMCEOJ QSYS 0162 *EXT *N
Message . . . . : Job 274196/MMURPHY/MMURPHY ended on 03/26/19 at 08:42:37; 6.291 seconds used; end code 10 .
CPC1125 Completion 50 03/26/19 08:44:46.773821 QWTCCCNJ QSYS 0C74 *EXT *N
Message . . . . : Job 274200/MMURPHY/MMURPHY was ended by user MMURPHY.
Cause . . . . . : User MMURPHY issued an immediate end job request for job 274200/MMURPHY/MMURPHY.
CPF1164 Completion 00 03/26/19 08:44:46.774951 QWTMCEOJ QSYS 0162 *EXT *N
Message . . . . : Job 274200/MMURPHY/MMURPHY ended on 03/26/19 at 08:44:46; 5.661 seconds used; end code 50 .
CPC1206 Completion 50 03/26/19 08:52:59.936053 QWTMMTRS QSYS 0370 *EXT *N
From user . . . . . . . . . : QSYS
Message . . . . : Subsystem is ending controlled.
CPF1164 Completion 00 03/26/19 08:52:59.939458 QWTMCEOJ QSYS 0162 *EXT *N
Message . . . . : Job 274207/MMURPHY/MMURPHY ended on 03/26/19 at 08:52:59; 16.004 seconds used; end code 10 .
CPC1207 Completion 50 03/26/19 09:05:00.642584 QWTMMTRS QSYS 0370 *EXT *N
From user . . . . . . . . . : QSYS
Message . . . . : Subsystem ending immediately.
CPF1164 Completion 00 03/26/19 09:05:00.643785 QWTMCEOJ QSYS 0162 *EXT *N
Message . . . . : Job 274213/MMURPHY/MMURPHY ended on 03/26/19 at 09:05:00; 14.583 seconds used; end code 50 .
For the job that is calling ENDJOB or ENDSBS, these will be logged as well, but once again, it could be that the job is configured to suppress the job log in the event of a successful completion, so you might not see it. The ENDJOB message is CPC1231 and shows the job that was ended. This happens when the user takes a 4 against the job.
Message ID . . . . . . : CPC1231 Severity . . . . . . . : 00
Message type . . . . . : Completion
Date sent . . . . . . : 03/26/19 Time sent . . . . . . : 08:44:46
Message . . . . : ENDJOB started for job 274200/MMURPHY/MMURPHY.
Cause . . . . . : The End Job (ENDJOB) command is running for job
274200/MMURPHY/MMURPHY.
If the user ends the job by typing ENDJOB or ENDSBS on the command line you will see a request message like this:
From . . . . . . . . . : MMURPHY Severity . . . . . . . : 00
Message type . . . . . : Request
Date sent . . . . . . : 03/26/19 Time sent . . . . . . : 08:52:57
Message . . . . : ENDSBS SBS(MMURPHY)
Unfortunately in the case of the subsystem, there is no indication of which jobs were ended.