IBM i Field Notes
Advanced Job Scheduler and iASPs: Why a Library Exists but the Job Cannot Find It
A practical IBM i field note about Advanced Job Scheduler, independent ASPs, Initial ASP Group, and library-not-found errors from GO JS.
Sometimes a library-not-found error is not really about the library missing. It may be about the job not being connected to the right independent ASP.
I recently ran into a practical IBM i issue that is worth documenting.
A scheduled job was failing from Advanced Job Scheduler.
The job was submitted through the green-screen scheduler menu:
GO JS
The failure looked simple at first.
The job was saying that a library could not be found.
But the library did exist.
The library was being set through the job description on the user profile, so at first glance everything looked correct.
Then the important detail clicked:
The library was in an independent ASP.
That changed the problem completely.
The symptom
The scheduled job failed during submit.
The error pointed toward a missing library.
But when checking the system manually, the library was there.
That kind of problem can be misleading because the first instinct is usually to check:
- library spelling
- library list
- job description
- user profile
- authority
- current library
- job queue setup
All of those are valid things to check.
But in this case, the issue was not that the library did not exist.
The issue was that the job did not have the correct Initial ASP Group set.
The missing context: independent ASP
On IBM i, a library in an independent ASP is not visible to every job automatically.
The job has to be running with the correct ASP group context.
So if Advanced Job Scheduler submits a job without the right Initial ASP Group, the job may behave as if the library is missing.
That is why the error can be confusing.
The library exists.
The job just cannot see it.
Why GO JS can be misleading
IBM documents this exact area for Advanced Job Scheduler and independent ASPs.
According to IBM, jobs created or changed from the green-screen GO JS menu path using Add or Change in Work with jobs can fail with IJS6021 followed by CPF1153 when they reference libraries stored in an independent ASP, because the Initial ASP group option is not listed in that green-screen flow. IBM says to use ADDJOBJS or CHGJOBJS and specify the Initial ASP group, or use Navigator for i where that option is available in the scheduled job properties.
That last part is the key.
The option may not be obvious from the green-screen UI.
But it exists in other places.
Job-level fix
For one scheduled job, you can set the Initial ASP Group directly on that job.
IBM documents two main ways to do this.
You can use the Advanced Job Scheduler commands:
ADDJOBJS
or:
CHGJOBJS
and specify the Initial ASP group field.
Or you can use Navigator for i.
In Navigator, IBM describes the path as:
Work Management
Advanced Job Scheduler
Scheduled jobs
Properties
Batch Information
Advanced Batch Information
That is where the Initial ASP Group option can be found.
Scheduler-level setup
There is also a broader setup if Advanced Job Scheduler needs to work with iASPs more generally.
IBM documents these steps for setting the monitor job so it has the ASP group when submitting jobs.
First, set the iASP on the Advanced Job Scheduler job description:
CHGJOBD JOBD(QIJS/QIJSSCD) INLASPGRP(IASPNAME)
Then set the iASP name in the QIJSPM data area in the AJS data library:
CHGDTAARA DTAARA(datalib/QIJSPM (405 10)) VALUE('iaspname ')
IBM notes that the iASP name value must be 10 characters, including trailing spaces.
After that, end and restart the scheduler:
ENDJS
STRJS
That allows the monitor job to restart with the ASP group set.
What I learned from this
The biggest lesson is simple:
When a scheduled job cannot find a library, do not only ask whether the library exists. Ask whether the job can see the ASP where the library exists.
That is especially important when the environment uses independent ASPs.
A job description may look correct.
A user profile may look correct.
The library list may look correct.
But if the ASP group is not set, the submitted job may still fail.
Troubleshooting checklist
When an Advanced Job Scheduler job fails with a library-not-found type issue, I would check this order:
1. Does the library actually exist?
2. Is the library in *SYSBAS or an independent ASP?
3. Is the job running with the correct Initial ASP Group?
4. Was the job created or changed through GO JS?
5. Can the Initial ASP Group be set using CHGJOBJS or Navigator for i?
6. Does the AJS monitor job need the ASP group set globally?
7. Has Advanced Job Scheduler been ended and restarted after the change?
8. Are the required Navigator / AJS PTFs current?
This checklist helps avoid wasting time on the wrong problem.
Why this matters
This is one of those IBM i issues where everything can look right locally, but still fail during scheduling.
The submitted job is its own runtime context.
It does not automatically inherit every assumption you have when checking things interactively.
That is why scheduled jobs, job descriptions, library lists, ASP groups, and user profiles all need to be reviewed together.
Final takeaway
If an Advanced Job Scheduler job says a library is not found, and the library is in an independent ASP, check the Initial ASP Group.
The library may not be missing.
The job may simply not be attached to the ASP group where the library lives.
That small distinction can save a lot of troubleshooting time.
Reference
IBM Support: Advanced Job Scheduler and Independent ASPs (iASPs)
Comments
Share your thoughts, questions, or real-world IBM i experiences related to this article.