home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / dclgen.zip / DCLGEN.HLP (.txt) < prev    next >
OS/2 Help File  |  1998-04-20  |  10KB  |  317 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Select A Database ΓòÉΓòÉΓòÉ
  3.  
  4.  Select a database by clicking on a database name in the database list box. 
  5.  
  6.  
  7. ΓòÉΓòÉΓòÉ 2. Select A Database ΓòÉΓòÉΓòÉ
  8.  
  9.  This listbox contains all available databases. You can select a database by 
  10. moving your mouse pointer to the database name and click. The one you selected 
  11. is displayed in the entry field above the listbox. 
  12.  
  13.  
  14. ΓòÉΓòÉΓòÉ 3. OK ΓòÉΓòÉΓòÉ
  15.  
  16.  Click on the OK button to proceed. 
  17.  
  18.  
  19. ΓòÉΓòÉΓòÉ 4. Exit ΓòÉΓòÉΓòÉ
  20.  
  21.  Click on the Exit button to exit DCLGEN for PL/I. 
  22.  
  23.  
  24. ΓòÉΓòÉΓòÉ 5. DCLGEN for PL/I In General ΓòÉΓòÉΓòÉ
  25.  
  26. DCLGEN for PL/I generates a table declaration and puts it into a file that you 
  27. can include in your program. 
  28.  
  29.  DCLGEN for PL/I gets information about the definition of the table and each 
  30. column within the table from the database catalog. With the information, DCLGEN 
  31. for PL/I produces an SQL DECLARE TABLE statement for the table (or view) and a 
  32. matching PL/I structure declaration. 
  33.  
  34.  To use the declarations in your program, use the SQL INCLUDE statement. 
  35.  
  36.  This dialog box gives you a list of available databases. To select a database, 
  37. move your mouse pointer to the database entry and click your left mouse button 
  38. once. 
  39.  
  40.  The entryfield above the database list displays the selected database. 
  41.  
  42.  Note 1. If your workstation is a database client, you can use the User Profile 
  43. Management Services to create a user ID on your workstation using the same ID 
  44. and password as the ones you use to logon to the remote database. 
  45.  
  46.  Use UPM to logoff any current local logon sessions. When DCLGEN asks you to 
  47. perform a local logon,  logon using the newly created user ID. 
  48.  
  49.  Note 2. There are two bind files that come with DCLGEN for PL/I.  They are, 
  50.  
  51.        ibmsdbtl.bnd 
  52.  
  53.        ibmsgpli.bnd 
  54.  
  55.   DCLGEN for PL/I must bind these bind files to the database you select. 
  56.  Therefore, your logon ID must have proper privileges in order for the binding 
  57.  to perform successfully. 
  58.  
  59.   Your logon ID must have BIND, CONTROL, and EXECUTE privileges on the 
  60.  following packages. 
  61.  
  62.        ibmsdbtl 
  63.  
  64.        ibmsgpli 
  65.  
  66.   Your logon ID also needs a BINDADD privilege for the entire database and a 
  67.  SELECT privilege on any tables you want to generate declare statements for. 
  68.  
  69.  
  70. ΓòÉΓòÉΓòÉ 6. Table Qualifier and Editor Infor ΓòÉΓòÉΓòÉ
  71.  
  72. This dialog box requests information about table qualifier and editor. 
  73.  
  74.  
  75. ΓòÉΓòÉΓòÉ 7. Qualifier ΓòÉΓòÉΓòÉ
  76.  
  77. Enter a table qualifier here. The default is your local logon id. 
  78.  
  79.  
  80. ΓòÉΓòÉΓòÉ 8. Editor ΓòÉΓòÉΓòÉ
  81.  
  82. Enter the editor of your choice here.  The editor name must include any 
  83. extensions. 
  84.  
  85.  
  86. ΓòÉΓòÉΓòÉ 9. Cancel ΓòÉΓòÉΓòÉ
  87.  
  88. Click on the Cancel button to return to the previous dialog. 
  89.  
  90.  
  91. ΓòÉΓòÉΓòÉ 10. OK ΓòÉΓòÉΓòÉ
  92.  
  93. Click on the OK button to proceed with DCLGEN for PL/I. 
  94.  
  95.  
  96. ΓòÉΓòÉΓòÉ 11. Exit ΓòÉΓòÉΓòÉ
  97.  
  98. Click on the Exit button to exit DCLGEN for PL/I 
  99.  
  100.  
  101. ΓòÉΓòÉΓòÉ 12. Qualifier and Editor Requests ΓòÉΓòÉΓòÉ
  102.  
  103. This dialog box is for you to enter a table name qualifier and an editor of 
  104. your choice. 
  105.  
  106.  Click on Cancel to return to the previous dialog box. 
  107.  
  108.  Click on OK to proceed. 
  109.  
  110.  Click on Exit to quit DCLGEN for PL/I. 
  111.  
  112.  
  113. ΓòÉΓòÉΓòÉ 13. Generating Declarations ΓòÉΓòÉΓòÉ
  114.  
  115.  
  116. ΓòÉΓòÉΓòÉ 14. Select A Table ΓòÉΓòÉΓòÉ
  117.  
  118.  This list box lists all of the tables created in the database by the table 
  119. qualifier. 
  120.  
  121.  To generate the declarations for a table, select that table and click on 
  122. Generate. 
  123.  
  124.  
  125. ΓòÉΓòÉΓòÉ 15. Structure Name ΓòÉΓòÉΓòÉ
  126.  
  127.  The Structure Name entryfield allows you to specify a level 1 name for the 
  128. structure declaration generated by DCLGEN for PL/I for the selected table. 
  129.  
  130.  If you do not specify a structure name, DCLGEN for PL/I generates a structure 
  131. using the table name prefixed with DCL as the level 1 name. 
  132.  
  133.  
  134. ΓòÉΓòÉΓòÉ 16. Field Name Prefix ΓòÉΓòÉΓòÉ
  135.  
  136.  The Field Name Prefix entryfield allows you to specify a field name prefix to 
  137. be used in each level 2 name in the structure declaration. 
  138.  
  139.  For example, if you specify MYSTRUCT as the field name prefix, DCLGEN for PL/I 
  140. generates MYSTRUCT001, MYSTRUCT002, and so on, as the logical level 2 names of 
  141. the structure. 
  142.  
  143.  Because the PL/I for OS/2 SQL preprocessor does not accept host identifiers 
  144. greater than 30 characters due to DB2/2 and DB2/6000 limitation, you should not 
  145. specify an identifier for the field name prefix greater than 27 characters. 
  146.  
  147.  
  148. ΓòÉΓòÉΓòÉ 17. Generate ΓòÉΓòÉΓòÉ
  149.  
  150.  Click on the Generate button to generate the declarations for the table you 
  151. have selected.  DCLGEN for PL/I generates the declare statements and saves them 
  152. in a file in your current directory using the table name as the file name and 
  153. the .CPY extension. 
  154.  
  155.  If you want to save the generated declare statements somewhere other than the 
  156. current directory, click on Save As before clicking on Generate. 
  157.  
  158.  If the first character of the table name is an alphabetic character and the 
  159. rest of the table name contains 
  160.  
  161.      alphabets, 
  162.  
  163.      digits, or 
  164.  
  165.      the underscore character '_' 
  166.  
  167.   DCLGEN for PL/I takes the first eight characters and the '.CPY' extension as 
  168.  the default file name for the generated declare statements. 
  169.  
  170.   If the table name contains any special characters not acceptable as part of a 
  171.  PL/I include file name, you should specify a new file name via the Save As 
  172.  button. 
  173.  
  174.   If you receive a message box indicating an error executing ibmsgpli, you also 
  175.  see a return code from the message box. The return code represents an SQL 
  176.  message which you can find in the "DATABASE 2 OS/2 Messages and Problem 
  177.  Determination Guide". 
  178.  
  179.   One of the reasons might be you have an invalid ibmsgpli.bnd file existing in 
  180.  your DPATH. Remove all outdated ibmsgpli.bnd from your DPATH and keep the one 
  181.  that you have installed most recently. 
  182.  
  183.   Another reason might be you do not have proper priviledges for accessing the 
  184.  table you have selected. 
  185.  
  186.  
  187. ΓòÉΓòÉΓòÉ 18. View ΓòÉΓòÉΓòÉ
  188.  
  189.  Click on the View button to browse the generated declaration statements. 
  190.  
  191.  
  192. ΓòÉΓòÉΓòÉ 19. Edit ΓòÉΓòÉΓòÉ
  193.  
  194.  Click on the Edit button to edit the generated declaration statements using 
  195. the editor you have selected. 
  196.  
  197.  
  198. ΓòÉΓòÉΓòÉ 20. Cancel ΓòÉΓòÉΓòÉ
  199.  
  200.  Click on Cancel to return to previous dialog box. 
  201.  
  202.  
  203. ΓòÉΓòÉΓòÉ 21. Save As ΓòÉΓòÉΓòÉ
  204.  
  205.  Click on the Save As button to specify a file name and a directory path for 
  206. DCLGEN for PL/I to save the declaration statements for a table. 
  207.  
  208.  Once you have changed the directory path, future generated declarations in the 
  209. same DCLGEN for PL/I session are saved in the new path until you change it. 
  210.  
  211.  
  212. ΓòÉΓòÉΓòÉ 22. Exit ΓòÉΓòÉΓòÉ
  213.  
  214.  Click on Exit to quit DCLGEN for PL/I. 
  215.  
  216.  
  217. ΓòÉΓòÉΓòÉ 23. Generating Declarations ΓòÉΓòÉΓòÉ
  218.  
  219.  This dialog box lists all of the tables created in the database by the table 
  220. qualifier. 
  221.  
  222.  Select a table from the table list and click on Generate to generate the 
  223. declaration statements. 
  224.  
  225.  Click on View to browse the generated declaration statements. 
  226.  
  227.  Click on Edit to edit the generated declaration statements. 
  228.  
  229.  Click on Cancel to return to the previous dialog box. 
  230.  
  231.  Click on Save As to alternate the file name and the directory path for the 
  232. generated declaration statements. 
  233.  
  234.  Click on Exit to quit DCLGEN for PL/I 
  235.  
  236.  The Structure Name and Field Name Prefix entryfields are optional.  You can 
  237. enter a structure name and a field name prefix of your choice. 
  238.  
  239.  Note 
  240.  
  241.  There are two bind files that come with DCLGEN for PL/I. They are, 
  242.  
  243.        ibmsdbtl.bnd 
  244.  
  245.        ibmsgpli.bnd 
  246.  
  247.   DCLGEN for PL/I attempts to bind these bind files to the database you select. 
  248.  Therefore, your logon ID must have proper privileges in order for the binding 
  249.  to perform successfully. 
  250.  
  251.   Your logon ID must have BIND, CONTROL, and EXECUTE privileges on the 
  252.  following packages. 
  253.  
  254.        ibmsdbtl 
  255.  
  256.        ibmsgpli 
  257.  
  258.   Your logon ID also needs a BINDADD privilege for the entire database and a 
  259.  SELECT privilege on any tables you select. 
  260.  
  261.  
  262. ΓòÉΓòÉΓòÉ 24. Help for DCLGEN ΓòÉΓòÉΓòÉ
  263.  
  264.  
  265. ΓòÉΓòÉΓòÉ 25. Local Logon ΓòÉΓòÉΓòÉ
  266.  
  267. If you have not performed a local logon, this Logon  dialog box pops up and 
  268. requests that you logon. 
  269.  
  270.  When the Logon dialog box pops up, click on the Logon button to start a logon 
  271. session. 
  272.  
  273.  After you have logged on successfully, click on OK. 
  274.  
  275.  
  276. ΓòÉΓòÉΓòÉ 26. Help on DCLGEN for PL/I ΓòÉΓòÉΓòÉ
  277.  
  278. Click on the Logon button to start a logon session. 
  279.  
  280.  
  281. ΓòÉΓòÉΓòÉ 27. Help on DCLGEN for PL/I ΓòÉΓòÉΓòÉ
  282.  
  283. Click on OK after you have logged on successfully. 
  284.  
  285.  
  286. ΓòÉΓòÉΓòÉ 28. Help on DCLGEN for PL/I ΓòÉΓòÉΓòÉ
  287.  
  288. Click on the Exit button to quit DCLGEN for PL/I. 
  289.  
  290.  
  291. ΓòÉΓòÉΓòÉ 29. Help on DCLGEN for PL/I ΓòÉΓòÉΓòÉ
  292.  
  293. If you have not performed a local logon, this Logon dialog box pops up and 
  294. requests that you logon. 
  295.  
  296.  When the Logon box pops up, click on the Logon button to start a logon 
  297. session. 
  298.  
  299.  After you have logged on successfully, click on OK. 
  300.  
  301.  To exit DCLGEN for PL/I, click on Exit. 
  302.  
  303.  If your workstation is an SDK/2 client or a DB2/2 client and your have already 
  304. performed a logon to the node where the remote database is located, DCLGEN for 
  305. PL/I still requires you to logon locally. 
  306.  
  307.  If your logon ID and password are the same on both the database client and 
  308. database server and you are logged on to the database client (local logon), you 
  309. are automatically logged on (node logon) when connecting to a remote database 
  310. server. 
  311.  
  312.  If you do not have a local logon ID which is the same as the one on the remote 
  313. node, you can use the User Profile Management Services to add a new local logon 
  314. ID that has the same logon id and password as the ones you use to logon to the 
  315. remote database server. 
  316.  
  317.  Logon with this local logon ID before you proceed with DCLGEN for PL/I.