IBM SC41-5210-04 Server User Manual


 
Appendix B. Practice exercise for Query for iSeries query
To do an exercise using query, you must first have a file set up with some data. This exercise takes you
through the following steps before you actually create a query:
v Creating an IDDU definition
v Creating a database file
v Entering data
If you already have a file on the system with data that you can use, you may want to skip directly to the
section on creating a query. If you do not care what type of data you are working with, you can create a
query that uses data from the QGPL library. This exercise is described in the last section of this appendix,
Query for iSeries query exercise: Creating an advanced queryon page 215.
Query for iSeries query exercise: Creating an IDDU definition
In the following example, you are shown how to create the definitions for a name and address file. The
definitions are organized to be used with the work you can do in the data file utility task in the ADTS/400:
Data File Utility book.
1. You can type STRIDD (for the Start IDDU command) on any command line. Or you can go to the IDDU
main menu by choosing the IDDU option from either the Files menu or the Decision Support menu.
The Decision Support menu appears if you select option 2 (Office tasks) on the OS/400 Main Menu
and then option 3 (Decision support) on the Office Tasks menu.
2. Create a data dictionary by choosing option 2 (Work with data dictionaries) on the IDDU menu and
pressing the Enter key. (You do not need to do this if one exists in a library you can use. If a data
dictionary exists that you can use, go to step 6.)
3. Choose option 1 (Create) on the display, type the name of the library that will contain the dictionary,
and press the Enter key.
If you attempt to create a data dictionary and the named library does not exist, a message is
displayed that says Library not found. Press Enter to create. If you press the Enter key, you will
see the Create Library display. From this display you can create the library that will contain the data
dictionary. When you finish creating a library, you will continue to the Create Data Dictionary display.
4. On the Create Data Dictionary display, the name of the library appears as the name of the dictionary.
Later in this exercise, we will use a dictionary name of SYSDIC; you can replace SYSDIC with the name
of another dictionary.
5. You can accept the system-supplied values and press the Enter key. You also can type a brief
description in the Text prompt and choose to enter a long comment. If you type 1 (Select) in the Long
comment prompt, you are shown the Edit Long Comment display where you can type detailed
information about the dictionary. The dictionary is created when you end your work and press the
Enter key on that display.
The iSeries system can take some time to create the dictionary. It shows you a message when the
dictionary has been created. Then press F12 (Cancel) on the Work with Data Dictionary display to
return to the IDDU main menu.
6. Choose option 1 (Work with data definitions) on the IDDU main menu,
IDDU Interactive Data Definition Utility (IDDU)
Select one of the following:
1. Work with data definitions
and press the Enter key.
© Copyright IBM Corp. 2000, 2002 199