Q
Problem solve Get help with specific problems with your technologies, process and projects.

Storing library objects

Storing library objects
I want to store all objects available in the library with object name and object type in my own database, but I didn't get any CL command or API to retrieve that information from library. Is there any CL command available for this purpose?

Here is one way to do what you want to do.

The DSPOBJD command allows you to store its output into a DB file...

        DSPOBJD OBJ(QGPL/*ALL) OBJTYPE(*ALL) OUTPUT(*OUTFILE)
OUTFILE(mylib/myfile)

This command creates a list of all the objects in library QGPL and places that list into file MYFILE in library MYLIB.

Excerpt from the DSPOBJD HELP test:

Note: If a new file is created, the text describing that file is "Output file for DSPOBJD" and the public authority is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the libraries create authority. The database format (QLIDOBJD) of the output file is the same as that used in the IBM-supplied file database QADSPOBJ.

Use the following command to see the format of the *OUTFILE:

 DSPFFD FILE(mylib/myfile)

==================================
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.

Ask the Experts yourself: Our OS/400 gurus are waiting to answer your questions.

Check out this Search400.com Featured Topic: Top 10 expert tips for OS/400


Dig Deeper on Past Releases

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close