Step 2. Use the Command Assistant
VED030 - Auto Complete and Command Assistant
In this step you will learn how to use the to create SELECT database command to retrieve all fields from the PSLMST file. The finished command will appear as follows:
Note: Experienced developers could quickly type this command into the editor, and the assistant would complete code and variables as they are typed (see later). The is intended to help new developers build this command.
1. Insert a blank line after the BEGIN_LOOP command by positioning the cursor at the end of the line and pressing .
2. Press F4 to re-display the as a floating window. Note that it has the size and position which you gave it earlier.
3. Select the tab.
a. Locate the SELECT command. (You can simply set focus on an item in the list of commands and type the letter S to position to commands starting with S.)
b. Press to select the SELECT command in the list of commands.
c. The SELECT command is displayed in the .
4. Use the to move to the FROM_FILE parameter.
a. Select the tab.
b. Use the key to move to the field. Type PS in the File name field to display files starting with PS.
c. Select the PSLMST file and press Enter.
d. The parameter in the SELECT command will be updated.
5. Click in the FIELDS parameter in the
Click on the tab and expand the file PSLMST to display all fields in the PSLMST file.
You can now choose the fields that you want to include in the SELECT statement. For this example, simply select the EMPNO, ADDRESS1, ADDRESS2, ADDRESS3 and DEPTMENT fields. Use the Ctrl+left mouse button to select the fields required.
6. Press . The parameter in the SELECT command will now be updated:
7. Close the Command Assistant. Your code now looks like the following: