On V5R3 systems, the handler will log the unique job identifier of any orphaned application jobs in database file PROCUCT_LIB/PUI0001205. An application's job is orphaned when the user shuts down the browser without instructing the application to end normally. For example, this happens when the user clicks the browser's close button, rather than using the exit button or command key in the application. On V5R3, the handler cannot end this job itself because the system does not support ending a job through a command or API call from within the same job.
After logging the orphaned job id to PUI0001205, the handler will cause the job to suspend so that the application effectively halts. At this time, ENDJOB commands from a separate job can be used to end the orphaned application job.
Program PROCUCT_LIB/PUI0001205 can be used for this purpose. The program will read through the database and automatically end any jobs listed there. After ending a job, the database record will be removed. The program will use the copy of PUI0001205 that resides in the same library as the program. The library list is not used for this process. This allows separate control if there are multiple copies of Profound UI installed on the sever. This program can be used in two ways:
As a constant process
In this scenario, the program is called with no parameters. The program will continously poll PUI0001205 on a 1 second interval. This option can be used to keep the process active indefinitely.
As a scheduled process
In this scenario, the program is called with a single 1 character parameter with value '1'. The program will process PUI0001205 once and quit. This option can be used to run the process at scheduled times.
In either case, the process must run under a user profile that has *JOBCTL authority.