I was asked was there an easy way to extract the name from the Job Name column in the Db2 for i table function ACTIVE_JOB_INFO.
The IBM i Job Name consists of three parts:
- Number
- User profile
- Name given to the job when it was started
For example:
741232/SIMONH/QPADEV0001 |
The issue when extracting the name from the Job Name is it does not always start in the same position. The number is always six long, but the user profile can be any length from one to ten. This means that the name could start anywhere from the tenth to the nineteenth position in the Job Name.