I want to add certain local libraries permanently to certain users but not the same ones to all users and not any to some users. How can I add these libraries permanently to a specific user's libl?
If there is only ONE library change the "current library" parameter on their user profile:
CHGUSRPRF USRPRF(User_Name) CURLIB(Lib1)
However, you indicate that you need to add more than one library.
The initial library list associated with a job, is defined in a *JOBD (Job Description).
By default, an interactive job uses the QDFTJOBD *JOBD.
Create a new job description based on the default *JOBD, using the CRTDUPOBJ command:
CRTDUPOBJ OBJ(QDFTJOBD) FROMLIB(QGPL) OBJTYPE(*JOBD) NEWOBJ(New_Jobd)
You could create a unique *JOBD for each user or they could share one.
Modify the library list on the *JOBD to include the libraries you want:
CHGJOBD JOBD(User_Name) INLLIBL(LIB1 LIB2 LIB3 LIB4 LIB5)
You may want to take a look at the system value QUSRLIBL (DSPSYSVAL QUSRLIBL) and include these libraries too. If you don't, some process may not run correctly.
Change user profiles to use the new *JOBD instead of the default:
CHGUSRPRF USRPRF(User_Name) JOBD(QGPL/NEW_JOBD)
That's all there is to it for interactive jobs. If your users submit jobs to batch, by default their current job's library list is used when the submitted job starts.
You could override the initial library list on the SBMJOB command or specify a different *JOBD and indicate on the SBMJOB command to get the library list from that *JOBD.
If you set up a new *JOBD for a batch job though, duplicate *JOBD QGPL/QBATCH instead of QGPL/QDFTJOBD so other *JOBD parameters are set correctly for a batch job. Several values are different between "interactive" and "batch" job descriptions.
The key to all of this is to remember that a job's library list is defined in a job description or on the SBMJOB command.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your OS/400 questions--or help out your peers by answering them--in our live OS/400 discussion forums.
Search400's targeted search engine: Get relevant information on V5R1.
Dig Deeper on Past Releases
Related Q&A from Ken Graap
Find out if log files can be omitted during a save without causing problems in a full restore. Continue Reading
The BRMS Network feature allows a BRMS system to connect to other BRMS systems via a network, and enables a user to consolidate media such as backup ... Continue Reading
The only option to correct damage preventing file journaling is to use the RCLSTG command. Continue Reading