Locate databases on an AS400

pts.
Tags:
Database
IBM DB2
Oracle
Greetings. I recently "inherited" an AS400 model 720 after another staff member left. I'm a "newbie" with this system, but have been tasked to find the active DB2 databases still in use on the system. I can check my BRMS logs and see which libraries have changed from day to day, but I am unsure about how to actually locate the databases. We are running V4R5 as the OS. Any help would be appreciated. Thanks....

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can list out the files in each of your libraries by using the wrkf (work with files) command. Key the command on the command line and press F4 to prompt it. Then press F1 (Help) and F2 (Expended help). This shows the documentation for the command and how to use it. You can do this for any command. You can also just press F4 on a blank command line to access the online help for all commands (very useful). Since you said you were a “newbie” i suggest you learn the AS/400’s command language. It’s very powerful and intuitive once you get the hang of the grammar. You can also write programs with it.

Here’s some examples for your question…

If you know the library name you can type:

wrkf <library>/*all pf

This will display all physical files (these contain your data) in the library.

Or you might want to see all the user files on the system. In that case you could run it this way:

wrkf *allusr/*all pf

Once you know where your data is, you might want to start looking at your logical files which are can be composed of keys, filters, field subsets, joins, etc. and are based on one or more physical files. They don’t contain any data. You’d use the same command as above substituting “lf” for “pf”.

There are plenty of other tools you can use, but hopefully this will get you going. You may also want to look for files with these names: QTXTSRC (text), QCLSRC (CL source), QDDSSRC (Data Description Specs source), QRPGLESRC (ILE RPG source) and QRPGSRC (OPM RPG source)… assuming there is source to the programs and files. It sounds like you don’t have any documentation. You should see if you can get some because it can be mighty hard to piece everything together without it… but it can be done.

Hope this helps!

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following