Prompting CL in Run SQL Scripts December 9, 2009 Skip Marchesani System i Navigator’s Run SQL Scripts lets you create scripts, from simple to complex, that can be comprised of one to many SQL statements and/or batch CL commands (no interactive or display commands allowed). SQL statements are entered without any prefix, and batch CL commands must be prefaced with CL. The syntax for SQL statements and batch CL commands can get quite complex, and keying or creating each without some sort of help or assistance can be a challenge. RUN SQL Scripts does a good job of helping you create either. There is SQL Assist for SQL statements and CL Prompt for batch CL commands. Both are accessed the same way, and since the focus of this article is prompting CL commands, the CRTLIB command will be used as our example as shown in Figure 1. Place the cursor on or within the batch CL command you wish to prompt. Next click Edit on the left side of the toolbar, and then SQL Assist/Prompt CL as shown in Figure 2, or just press F4 while the cursor is on or within the CRTLIB command. After clicking on SQL Assist/CL Prompt or pressing F4, you will see the Create Library panel shown in Figure 3. A quick examination and comparison will show that this Create Library panel is the graphical equivalent of the basic green screen prompt for the CRTLIB command. If you click on View on the left side of the toolbar for the Create Library panel as shown in Figure 4, you will also find that the same command key functions exist for this graphical CL prompting as for the Green Screen prompting seen in Figure 5. ![]() The function key titles may differ–Advanced vs. Additional Parameters for F10, and Reset vs. Tamil new mp3 song download. Refresh for F5–but the function remains the same. Figures 6 and 7 illustrate the results of pressing F10 to see advanced or additional parameters. Figures 8 and 9 show the result of pressing F11 to see keywords. To complete prompting of the command, key in the required and optional (if any) parameters and then click the OK button at the bottom of the Create Library panel as shown in Figure 10. The completed command string will then be returned in the Run SQL Scripts panel as shown in Figure 11. Take note that there is no support for menu based prompting to see a group of related commands, such as is available with the GO CMD xxx (GO CMDCRT) command. As previously stated, only batch commands are allowed in scripts. Interactive commands such as DSP xxx (DSPLIB, for example) are not allowed. To prompt a batch CL command, the cursor must be on or within the textual context of the command. If the cursor is not, Run SQL Scripts assumes you want to create an SQL statement and brings up SQL Assist. Skip Marchesani retired from IBM after 30 years and is now a consultant with Custom Systems Corporation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |