Solved

How to permantely add library to iSeries

Posted on 2011-09-23
11
967 Views
Last Modified: 2012-05-12
Does anyone know the command to permanently add a library to the iSeries?  If I do ADDLIBLE it only adds the library for this session.  Once I sign off and sign back on- it isn't there.
0
Comment
Question by:Anthony6890
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
11 Comments
 
LVL 18

Expert Comment

by:Dave Ford
ID: 36587687

You'll need to add the library to the job-description that's associated with your user-profile.

Find the job-description with the DspUsrPrf command. Then, check the library list in the job description with DspJobd command.

HTH,
DaveSlash
0
 
LVL 1

Author Comment

by:Anthony6890
ID: 36587710
Ok, so how do I add the library to the job description because the library isn't there
0
 
LVL 18

Expert Comment

by:Dave Ford
ID: 36587750

CHGJOBD JOBD(SomeLib/MyJobD)
        INLLIBL(MyLib1 MyLib2 MyLib3 MyLib4)

Open in new window

0
[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

 
LVL 1

Author Comment

by:Anthony6890
ID: 36587807
I appreciate the code, but I'm getting "myjobd not found in library Anthony.  Anthony is the name of the library I'm trying to add.  
0
 
LVL 18

Expert Comment

by:Dave Ford
ID: 36587837

What library is your job-description stored in and what is its name? (You can see that from the DspUsrPrf command.)
0
 
LVL 1

Author Comment

by:Anthony6890
ID: 36587853
job description is:  QDFTJOBD  and the Library is QGPL
0
 
LVL 18

Expert Comment

by:Dave Ford
ID: 36587885

So, the command for you would look something like this.


CHGJOBD JOBD(QGPL/QDFTJOBD)
        INLLIBL(MyLib1 MyLib2 MyLib3 MyLib4) 

Of course, you'll need to substiture your list of libraries for "MyLib1 MyLib2 MyLib3 MyLib4".

Open in new window

0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 36588024
A word of warning:

QDFTJOBD is the system default job description, and adding a library to this jobd will add it to the library list of every job in the system that uses this jobd.  In most systems, that is a LOT of jobs.  LLooks like you are adding a personal library to the libl, and usually modifying the QDFTJOBD isn't the way to go about that particular task.

That can definitely have unintended consequences if you aren't careful.

Job descriptions are often shared between multiple users and jobs, so you have to be very careful when making a change to one to make sure that you understand the impact that you will have on other jobs in the system.

Alternatives:

1) Initial Program:  If you are trying to add a library to an interactive job's library list, it is pretty common to do this in the startup program associated with the profile (DSPUSRPRF USRPRF(myprofile) INLPGM parameter), where "myprofile" represent the user profile in question.  If there is an existing initial program, you may be able to modify it to include the ADDLIBLE or CHGLIBL command.  Bear in mind that initial programs are often shared, too, so it may be a better idea to make a COPY of the current initial program, modify the copy, and then change your user profile to point to the new initial program.

2) Custom JOBD:  Another alternative, and one that works equally well for interactive and batch jobs, is to create a custom job description, specifying the INLLIBL that is desired.  An easy way to to do this is to copy the QDFTJOBD, and just alter the copy (CRTDUPOBJ and then CHGJOBD).

3) CURLIB:  If you have a personal library that you only want to appear in -your- jobs' libl, just set the CURLIB attribute of your user profile.  For example:

CHGPRF CURLIB(ANTHONY)

Once you log in and log back in, ANTHONY will automatically appear as the "Current library" in the library list for that one user profile only, permanently.

- Gary Patterson
0
 
LVL 35

Accepted Solution

by:
Gary Patterson earned 500 total points
ID: 36588032
I often use option 3, above, when all I want to do is add a personal library to my library list.

- Gary
0
 
LVL 1

Author Comment

by:Anthony6890
ID: 36588057
Gary you are the man.  

Option 3 worked like a charm.  I really appreciate all your help!

-Anthony
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 36588097
Anthony:  Happy to help.

- Gary
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question