home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: InfoMgt
/
InfoMgt.zip
/
dclgen.zip
/
DCLGEN.HLP
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1998-04-20
|
10KB
|
317 lines
ΓòÉΓòÉΓòÉ 1. Select A Database ΓòÉΓòÉΓòÉ
Select a database by clicking on a database name in the database list box.
ΓòÉΓòÉΓòÉ 2. Select A Database ΓòÉΓòÉΓòÉ
This listbox contains all available databases. You can select a database by
moving your mouse pointer to the database name and click. The one you selected
is displayed in the entry field above the listbox.
ΓòÉΓòÉΓòÉ 3. OK ΓòÉΓòÉΓòÉ
Click on the OK button to proceed.
ΓòÉΓòÉΓòÉ 4. Exit ΓòÉΓòÉΓòÉ
Click on the Exit button to exit DCLGEN for PL/I.
ΓòÉΓòÉΓòÉ 5. DCLGEN for PL/I In General ΓòÉΓòÉΓòÉ
DCLGEN for PL/I generates a table declaration and puts it into a file that you
can include in your program.
DCLGEN for PL/I gets information about the definition of the table and each
column within the table from the database catalog. With the information, DCLGEN
for PL/I produces an SQL DECLARE TABLE statement for the table (or view) and a
matching PL/I structure declaration.
To use the declarations in your program, use the SQL INCLUDE statement.
This dialog box gives you a list of available databases. To select a database,
move your mouse pointer to the database entry and click your left mouse button
once.
The entryfield above the database list displays the selected database.
Note 1. If your workstation is a database client, you can use the User Profile
Management Services to create a user ID on your workstation using the same ID
and password as the ones you use to logon to the remote database.
Use UPM to logoff any current local logon sessions. When DCLGEN asks you to
perform a local logon, logon using the newly created user ID.
Note 2. There are two bind files that come with DCLGEN for PL/I. They are,
ibmsdbtl.bnd
ibmsgpli.bnd
DCLGEN for PL/I must bind these bind files to the database you select.
Therefore, your logon ID must have proper privileges in order for the binding
to perform successfully.
Your logon ID must have BIND, CONTROL, and EXECUTE privileges on the
following packages.
ibmsdbtl
ibmsgpli
Your logon ID also needs a BINDADD privilege for the entire database and a
SELECT privilege on any tables you want to generate declare statements for.
ΓòÉΓòÉΓòÉ 6. Table Qualifier and Editor Infor ΓòÉΓòÉΓòÉ
This dialog box requests information about table qualifier and editor.
ΓòÉΓòÉΓòÉ 7. Qualifier ΓòÉΓòÉΓòÉ
Enter a table qualifier here. The default is your local logon id.
ΓòÉΓòÉΓòÉ 8. Editor ΓòÉΓòÉΓòÉ
Enter the editor of your choice here. The editor name must include any
extensions.
ΓòÉΓòÉΓòÉ 9. Cancel ΓòÉΓòÉΓòÉ
Click on the Cancel button to return to the previous dialog.
ΓòÉΓòÉΓòÉ 10. OK ΓòÉΓòÉΓòÉ
Click on the OK button to proceed with DCLGEN for PL/I.
ΓòÉΓòÉΓòÉ 11. Exit ΓòÉΓòÉΓòÉ
Click on the Exit button to exit DCLGEN for PL/I
ΓòÉΓòÉΓòÉ 12. Qualifier and Editor Requests ΓòÉΓòÉΓòÉ
This dialog box is for you to enter a table name qualifier and an editor of
your choice.
Click on Cancel to return to the previous dialog box.
Click on OK to proceed.
Click on Exit to quit DCLGEN for PL/I.
ΓòÉΓòÉΓòÉ 13. Generating Declarations ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 14. Select A Table ΓòÉΓòÉΓòÉ
This list box lists all of the tables created in the database by the table
qualifier.
To generate the declarations for a table, select that table and click on
Generate.
ΓòÉΓòÉΓòÉ 15. Structure Name ΓòÉΓòÉΓòÉ
The Structure Name entryfield allows you to specify a level 1 name for the
structure declaration generated by DCLGEN for PL/I for the selected table.
If you do not specify a structure name, DCLGEN for PL/I generates a structure
using the table name prefixed with DCL as the level 1 name.
ΓòÉΓòÉΓòÉ 16. Field Name Prefix ΓòÉΓòÉΓòÉ
The Field Name Prefix entryfield allows you to specify a field name prefix to
be used in each level 2 name in the structure declaration.
For example, if you specify MYSTRUCT as the field name prefix, DCLGEN for PL/I
generates MYSTRUCT001, MYSTRUCT002, and so on, as the logical level 2 names of
the structure.
Because the PL/I for OS/2 SQL preprocessor does not accept host identifiers
greater than 30 characters due to DB2/2 and DB2/6000 limitation, you should not
specify an identifier for the field name prefix greater than 27 characters.
ΓòÉΓòÉΓòÉ 17. Generate ΓòÉΓòÉΓòÉ
Click on the Generate button to generate the declarations for the table you
have selected. DCLGEN for PL/I generates the declare statements and saves them
in a file in your current directory using the table name as the file name and
the .CPY extension.
If you want to save the generated declare statements somewhere other than the
current directory, click on Save As before clicking on Generate.
If the first character of the table name is an alphabetic character and the
rest of the table name contains
alphabets,
digits, or
the underscore character '_'
DCLGEN for PL/I takes the first eight characters and the '.CPY' extension as
the default file name for the generated declare statements.
If the table name contains any special characters not acceptable as part of a
PL/I include file name, you should specify a new file name via the Save As
button.
If you receive a message box indicating an error executing ibmsgpli, you also
see a return code from the message box. The return code represents an SQL
message which you can find in the "DATABASE 2 OS/2 Messages and Problem
Determination Guide".
One of the reasons might be you have an invalid ibmsgpli.bnd file existing in
your DPATH. Remove all outdated ibmsgpli.bnd from your DPATH and keep the one
that you have installed most recently.
Another reason might be you do not have proper priviledges for accessing the
table you have selected.
ΓòÉΓòÉΓòÉ 18. View ΓòÉΓòÉΓòÉ
Click on the View button to browse the generated declaration statements.
ΓòÉΓòÉΓòÉ 19. Edit ΓòÉΓòÉΓòÉ
Click on the Edit button to edit the generated declaration statements using
the editor you have selected.
ΓòÉΓòÉΓòÉ 20. Cancel ΓòÉΓòÉΓòÉ
Click on Cancel to return to previous dialog box.
ΓòÉΓòÉΓòÉ 21. Save As ΓòÉΓòÉΓòÉ
Click on the Save As button to specify a file name and a directory path for
DCLGEN for PL/I to save the declaration statements for a table.
Once you have changed the directory path, future generated declarations in the
same DCLGEN for PL/I session are saved in the new path until you change it.
ΓòÉΓòÉΓòÉ 22. Exit ΓòÉΓòÉΓòÉ
Click on Exit to quit DCLGEN for PL/I.
ΓòÉΓòÉΓòÉ 23. Generating Declarations ΓòÉΓòÉΓòÉ
This dialog box lists all of the tables created in the database by the table
qualifier.
Select a table from the table list and click on Generate to generate the
declaration statements.
Click on View to browse the generated declaration statements.
Click on Edit to edit the generated declaration statements.
Click on Cancel to return to the previous dialog box.
Click on Save As to alternate the file name and the directory path for the
generated declaration statements.
Click on Exit to quit DCLGEN for PL/I
The Structure Name and Field Name Prefix entryfields are optional. You can
enter a structure name and a field name prefix of your choice.
Note
There are two bind files that come with DCLGEN for PL/I. They are,
ibmsdbtl.bnd
ibmsgpli.bnd
DCLGEN for PL/I attempts to bind these bind files to the database you select.
Therefore, your logon ID must have proper privileges in order for the binding
to perform successfully.
Your logon ID must have BIND, CONTROL, and EXECUTE privileges on the
following packages.
ibmsdbtl
ibmsgpli
Your logon ID also needs a BINDADD privilege for the entire database and a
SELECT privilege on any tables you select.
ΓòÉΓòÉΓòÉ 24. Help for DCLGEN ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 25. Local Logon ΓòÉΓòÉΓòÉ
If you have not performed a local logon, this Logon dialog box pops up and
requests that you logon.
When the Logon dialog box pops up, click on the Logon button to start a logon
session.
After you have logged on successfully, click on OK.
ΓòÉΓòÉΓòÉ 26. Help on DCLGEN for PL/I ΓòÉΓòÉΓòÉ
Click on the Logon button to start a logon session.
ΓòÉΓòÉΓòÉ 27. Help on DCLGEN for PL/I ΓòÉΓòÉΓòÉ
Click on OK after you have logged on successfully.
ΓòÉΓòÉΓòÉ 28. Help on DCLGEN for PL/I ΓòÉΓòÉΓòÉ
Click on the Exit button to quit DCLGEN for PL/I.
ΓòÉΓòÉΓòÉ 29. Help on DCLGEN for PL/I ΓòÉΓòÉΓòÉ
If you have not performed a local logon, this Logon dialog box pops up and
requests that you logon.
When the Logon box pops up, click on the Logon button to start a logon
session.
After you have logged on successfully, click on OK.
To exit DCLGEN for PL/I, click on Exit.
If your workstation is an SDK/2 client or a DB2/2 client and your have already
performed a logon to the node where the remote database is located, DCLGEN for
PL/I still requires you to logon locally.
If your logon ID and password are the same on both the database client and
database server and you are logged on to the database client (local logon), you
are automatically logged on (node logon) when connecting to a remote database
server.
If you do not have a local logon ID which is the same as the one on the remote
node, you can use the User Profile Management Services to add a new local logon
ID that has the same logon id and password as the ones you use to logon to the
remote database server.
Logon with this local logon ID before you proceed with DCLGEN for PL/I.