A quick and easy way to end a job Simon Hutchinson

​I have written programs that capture information over time, using a “never ending” Do-loop in a RPG program. When I wanted the job to end I would use the ENDJOB command. There must be an easier way to use ENDJOB without having to search for the job, copy it’s name, and then manually enter the information into the command. This post will give you an example of how to do this.
What is becoming one of my favorite SQL View, ACTIVE_JOB_INFO, has exactly what I need to accomplish this. The column JOB_NAME_SHORT was added to this View in 2021 as part of IBM i 7.4 TR4 and 7.3 TR10. This column contains the job name’s name, in this case SIMON_JOB. I can use this column to return the full job name and then end the job with that.
Read more » Read More 

Verified by MonsterInsights