Introduction

In this section:

Describing the CRT Screen describes the facilities of FIDEL that are common to both MODIFY and Dialogue Manager. This introduction explains how MODIFY facilities and FIDEL interact, and describes the FIDEL facilities that are specific to MODIFY. Using FIDEL in Dialogue Manager describes the interaction between Dialogue Manager and FIDEL.

From the FOCUS TED editor, you can also use the FOCUS Screen Painter with both MODIFY and Dialogue Manager to interactively build and view screens online. With the Screen Painter, you design the layout of the form and the Screen Painter automatically generates the FIDEL code to build it. The FOCUS Screen Painter is described in Using the FOCUS Screen Painter.

The two simple examples on the following pages demonstrate how to generate a screen form by using the CRTFORM and -CRTFORM syntax. Note how closely FIDEL syntax resembles TABLE syntax for creating headings.

Note: FIDEL only supports fixed format records with LRECL=80.

Using FIDEL With MODIFY

The following example of a simple MODIFY CRTFORM illustrates the use of FIDEL with the resulting screen (the numbers refer to the explanation and are not part of the code):

    MODIFY FILE EMPLOYEE 
1.  CRTFORM 
2.     "EMPLOYEE UPDATE" 
3.     "EMPLOYEE ID #: <EMP_ID   LAST NAME:  <LAST_NAME" 
4.     "DEPARTMENT: <DEPARTMENT  SALARY:     <CURR_SAL"
 
5.  MATCH EMP_ID
       ON NOMATCH REJECT
       ON MATCH UPDATE LAST_NAME DEPARTMENT CURR_SAL 
6.  DATA
    END

This request sets up a form to update the last name, department and current salary. Processing is as follows:

  1. CRTFORM generates the visual form and invokes FIDEL. The form begins on line one of the screen unless specified otherwise with the LINE option (see Using Multiple CRTFORMs: LINE).
  2. Each line on the screen begins and ends with double quotation marks. This is a line of text that serves as a title. Note the close correspondence to the syntax used to create headings in a TABLE request.
  3. The second screen line specifies two data fields: EMP_ID and LAST_NAME. A data entry field is indicated by a left caret, followed by the field name or alias from the Master File. The text, EMPLOYEE ID #: and LAST NAME: identifies each field on the screen. This informs the operator where to enter the data.
  4. This is the last line within double quotation marks. It signals the end of the CRTFORM. In this case it identifies and defines two more data fields: DEPARTMENT and CURR_SAL. When you run the MODIFY request, the form instantly appears on the screen:
    EMPLOYEE UPDATE
    EMPLOYEE ID #:  LAST NAME:
    DEPARTMENT:  SALARY:

    The number of characters allotted for each data entry field on the screen defaults to the display format for that particular field in the Master File. You can optionally specify a format for screen display that is shorter than the default.

    The operator can now fill in the data entry areas with the appropriate information.

  5. The request continues with MODIFY MATCH logic.
  6. This line tells FOCUS that the incoming data is from the terminal. In conjunction with CRTFORM, it implies full-screen data input. You can also use DATA VIA FIDEL.

When you use FIDEL with MODIFY, you are setting up full-screen forms for the maintenance of data source fields. Most MODIFY features, such as conditional and non-conditional fields, automatic application generation, Case Logic, multiple record processing, error handling, validation tests, logging transactions, and typing messages to the terminal, work with FIDEL.

With MODIFY you also have access to additional screen control options such as clearing the screen, specifying and changing the size of the screen, and designating the particular line on which the form starts.

Using FIDEL With Dialogue Manager

The following example of a simple -CRTFORM illustrates the use of FIDEL in Dialogue Manager and the resulting screen (the numbers refer to the explanation and are not part of the code):

 
1. -CRTFORM 
2. -"MONTHLY SALES REPORT FOR <&CITY/10" 
3. -"BEGINNING PRODUCT CODE IS: <&CODE1/3"
   -"ENDING PRODUCT CODE IS: <&CODE2/3" 
4. -"REGIONAL SUPERVISOR IS: <&REGIONMGR/5"
   TABLE FILE SALES
   HEADING CENTER
   "MONTHLY REPORT FOR &CITY"
   "PRODUCT CODES FROM &CODE1 TO &CODE2"
   " "
   SUM UNIT_SOLD AND RETURNS AND COMPUTE
   RATIO/D5.2 = 100 * RETURNS/UNIT_SOLD;
   BY PROD_CODE
   IF PROD_CODE IS-FROM &CODE1 TO &CODE2
   FOOTING CENTER
   "REGIONAL SUPERVISOR: &REGIONMGR"
   END

The procedure sets up a form for gathering run-time variables for a TABLE request: &CITY, the city for the report; &CODE1 and &CODE2, a range of product codes; and &REGIONMGR, the regional supervisor. Processing is as follows:

  1. -CRTFORM generates the visual form, invokes FIDEL, and clears the screen.
  2. Each line on the screen begins with a dash and double quotation marks (-"), and ends with double quotation marks. Note this first line of the screen form contains text and a variable field, &CITY, which has a length of 10. This specifies ten spaces on the screen for entering the value. The data entry field is indicated by the left caret.
  3. The next few lines of the screen form contain both text and variable fields with formats.
  4. The last line within double quotation marks signals the end of the -CRTFORM. When the FOCEXEC executes, the screen displays the following form:
    MONTHLY SALES REPORT FOR
    BEGINNING PRODUCT CODE IS:
    ENDING PRODUCT CODE IS:
    REGIONAL SUPERVISOR IS:

    The operator can now fill in values for the run-time variables. After the operator transmits the screen by pressing Enter, the values entered on the screen are sent to the variables. The regular FOCUS commands are stacked and executed when the end of the procedure is reached.

When you use FIDEL with Dialogue Manager, you can define input fields as amper variables that receive values at run time to adjust to specific processing requirements. Because they are not data fields and are not part of the Master File, they do not automatically have a format. You must allocate space for them on the screen. You can do this directly on the -CRTFORM as in the previous example, or through a -SET statement.

Dialogue Manager supports two additional control statements: -CRTFORM BEGIN and -CRTFORM END. The statement -CRTFORM BEGIN signals the beginning of the screen form. You can then enter screen lines as well as other Dialogue Manager control statements. You then signal the end of the screen form with the statement -CRTFORM END. This allows you to use Dialogue Manager statements between screen lines while building the form.

Screen Management Concepts and Facilities

The following briefly outlines the FIDEL capabilities that are common to both MODIFY and Dialogue Manager and defines the common terminology:

Note: This chapter is written specifically for the IBM 3270 terminal, which supports PF key and cursor control, scrolling and screen attributes.

Using FIDEL Screens: Operating Conventions

The following procedures apply for filling in all FIDEL screens:

The following operating procedures are specific to MODIFY:

Note: The PF key settings referred to here are the default settings. Any PF key can be redefined using the SET statement.


Information Builders