HP 3000 Manuals

Task 2 - Painting the Data Screen Image [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Self-Paced Training Guide

Task 2 - Painting the Data Screen Image 

To run the screen painter: 

   1.  Press the  Screen Painter  function key

       or press the  Previous Menu  function key.

   2.  Select the Painter option.

       When the screen painter starts, HP ALLBASE/4GL clears the screen
       and displays the following prompt at the base of the screen.

[]
Screen Painter Prompt Step 1 - Entering Text Items Check the name of the screen entered here. If you have just defined the product_scrn data screen in the screen header screen, the default name of product_scrn should appear. If not, then enter the name now. Here is the screen you are going to paint:
[]
Product Details Screen To enter system items: First create the following system items, in the same way that you did in the previous lesson. 1. Display the application title application_name at the top of the screen at line 1, column 2. 2. Enter the screen heading Product Details as a text literal at line 1, column 35. 3. At column 68 of the same line, display the communication area field *SCREEN. 4. At line 2, column 2 display the communication area field *TIME. 5. At column 72 of the same line, display the DATE system item to complete the system items required on this screen. This completes the definition of the header lines for this screen. Tips On Entering Text To save yourself time in creating the lines for this screen, read the following information on using column mode. Using Vertically Aligned Prompts This data screen has a number of vertically aligned prompts. Each of them has a data input field to the right of the prompt. During the creation of text items on the menu that you have already defined, the cursor remains at the end of a defined item when you press the Return key. When you are entering a number of vertically aligned text items, you can use the screen painter column mode. In column mode, the cursor returns to the beginning of the text item, one line down, when you press Return to terminate an entry. Then you can immediately enter the next prompt, vertically aligned with the previous. To use column mode: 1. To set the column mode on, press the Layout Keys function key and then press the Column Mode function key. An asterisk appears in the function key label indicating that column mode is now on. 2. To turn column mode off, simply press the Column Mode function key again. The asterisk is cleared from the label when you turn the column mode off. Step 2 - Entering the Screen Prompts To enter vertically aligned items: 1. Set the column mode on and position the cursor at line 6, column 18. 2. Press Return and type in Product Number. 3. Press the Return key to complete the entry. The cursor will be directly under the "P" in the word "Product". 4. Press cursor down until the cursor is on line 10. 5. Press Return and then enter Description. 6. Enter Supplier Number at line 12. 7. Enter Lead Time at line 14. 8. Turn column mode off and press the Main Keys function key. You can now define the data fields for this screen. Step 3 - Defining Data Fields To complete this screen you must define the input fields and display fields on the screen image. This is done with two function keys at the Main Keys function key level: the Input Field function key, and the Output Field function key.
[]
Input Field and Output Field Function Keys Two different methods are available for defining input and display fields. You can retrieve the details of a field specification from the dictionary by entering its name, or you can indicate the length of the field now and complete the other details later. Both are described here. To use the Dictionary Field Specification: 1. Move the cursor to line 6, column 35 and follow these steps to create an input field for the product number, using the dictionary field specification. Action Explanation ---------------------------------------------------------------------- Press Input Field The input field prompt appears at the bottom of the screen. Type product_no The painter creates an input field at the base of the screen as you type the name. This is the name of an existing dictionary field specification. If the field specification does not exist, the field creation is aborted. Press Return This terminates the entry of the field specification name. A field of the correct length is displayed at line 6, column 35. By using the dictionary field specification name, you have linked the dictionary definition of the field to this particular screen field. When you define further options for some of the field details, you will see that the painter has automatically retrieved the dictionary field specifications for this field. 2. Use the same procedure to create the description field. Move the cursor to line 10, column 35 and follow these steps. Action Explanation ---------------------------------------------------------------------- Press Input Field This displays the input field prompt at the bottom of the screen. Enter description This creates the description field on the screen. To specify the number of characters: You can also create an input field by specifying the number of characters for the field. 1. Move the cursor to line 12, column 35 and follow these steps to create the input field for the supplier number. Action Explanation ---------------------------------------------------------------------- Press Input Field This displays the input field prompt at the bottom of the screen. Type 6 This is the size of this field in characters. Press Return This displays a 6 character field. The field has been created with no reference to a dictionary defined field specification. You will enter the details later in the screen field details screen. 2. To create the lead time input field, move the cursor to line 14, column 35 and follow these steps. Action Explanation ---------------------------------------------------------------------- Press Input Field This displays the input field prompt at the bottom of the screen. Enter 2 This completes the creation of the field. As with the supplier number field above, no reference has been made to a dictionary field specification. You will do this later using the screen field details screen. To create display only fields: You can create display only fields using the painter in the same way you create input fields. The only difference is that you use the Output Field function key instead of the Input Field function key. You will define some display only fields in one of the later lessons. Step 4 - Saving the Screen The screen is now complete and you can save it. 1. Press the Exit function key, and the screen is saved automatically. Control then passes back to the level from which you called the painter. You can now proceed to define details for the fields on this data screen. This includes the details omitted because you didn't use the field specification name method to define some fields, as well as other details you will learn about in the next section. If you are at the screen development menu, select Details. If you are at the screen header screen, press the Field Details function key.


MPE/iX 5.0 Documentation