0 pts.
 Library List
How can I verify if a curtain library exists in the *LIBL?

Software/Hardware used:
ASKED: March 24, 2005  4:24 PM
UPDATED: March 29, 2005  7:12 AM

Answer Wiki:
What is a Curtain library? Do you mean Current Library?
Last Wiki Answer Submitted:  March 24, 2005  4:36 pm  by  SQLROOKIE   0 pts.
All Answer Wiki Contributors:  SQLROOKIE   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I’m pretty sure a current library always exists.
Type DSPLIBL and Enter from the command line. It will show you your library list. The entry with a type of “CUR” is your current library list. To change it, type CHGCURLIB from the command line, prompt it, and enter the library you want to be current. Hope this helps.
Shon

 0 pts.

 

How to see if a CERTAIN library is in you library list.

/* see if library MyLib is in the library list */

ADDLIBLE LIB(MyLib) POSITION(*LAST)
MONMSG MSGID(CPF2103) EXEC(DO)
RCVMSG
CHGVAR VAR(&INLIBL) VALUE(Y)
GOTO CMDLBL(ENDLIBLCHK)
ENDDO

RMVLIBLE LIB(MyLib)
CHGVAR VAR(&INLIBL) VALUE(N)
ENDLIBLCHK:

 0 pts.

 

You will not see a *CUR library on your library list if your profile has *CRTDFT as the default for current library. Any commands that access or create objects in *CURLIB in this case will default to QGPL.

 645 pts.

 

You can scan the system, current library and user library lists of a job using the RTVJOBA command from the appropriate parameters to look for a specific library or libraries using the QCLSCAN function. This also can be done in a HLL program using the appropriate API and a scan function. Check the Program and CL Command API manual for the specific examples.

 0 pts.

 

I assume you want to know if a “specific” lib is available. If that is what you want you can do if defined …

 0 pts.

 

In a CLLE pgm

RMVLIBLE LIB(libname)
MONMSG CPF0000
ADDLIBLE LIB(libname) POSITION(position)
MONMSG CPF0000

The libray name can also be code as a variable

 0 pts.