HP 3000 Manuals

Operation [ Micro Focus COBOL System Reference, Volume 1 ] MPE/iX 5.0 Documentation


Micro Focus COBOL System Reference, Volume 1

Operation 

The Forms-2 utility is an extension to the Micro Focus COBOL software
development system that enables you to interactively create and edit data
entryscreens for applications programs at a terminal.  It provides four
powerful facilities to aid you in the design and development of
interactive applications written in Micro Focus COBOL:

   *    

       Translation of user screen layouts into COBOL record descriptions
       for inclusion in Micro Focus COBOL applications programs.

   *    

       Verification of user screen layouts in a checkout program before
       their incorporation in an application program.

   *   Retention of exact screen imagesof the user screens in disk files
       for subsequent editing and printing.

   *   Generation of an entire Micro Focus COBOL program to allow data
       capture, update and interrogation by means of application screens
       and an indexed sequential file.

Forms-2 Basics 

This section explains some of the basic concepts you will need to know
before using Forms-2.  It covers the following areas:

   *   Invoking Forms-2.

   *   The two phases; initialization and work.

   *   The two modes; command and edit.

   *   The Forms-2 interface.

   *   Output formats.

Invoking Forms-2.   

You access Forms-2 by entering the following command line:

forms2

You should ensure that the full path-name of the COBDIR environment
variable is not longer than 34 characters before running Forms-2.
Results are undefined if the COBDIR path-name exceeds this limit.See the
appendix Micro Focus Environment Variables for more information on the
COBDIR environment variable.   

This displays the initialization screen I01, shown in Figure 14-1.

Phases.   

Forms-2 processing is divided into a number of logically distinct units,
but two main phases can be identified:  the initialization phase, and the
work phase.

The initialization phase is performed only once and establishes the
characteristics of a particular run of the program.  It is a series of
screens containing self-explanatory prompts to which you reply as
necessary.  See the section Initialization Phase for details of this
phase.

Once you have completed the initialization phase you enter a work phase.
At least two work phases are performed for each data entry screen that
you design.

You can think of the Forms-2 screen as a paper form, where the printed
fixed text is used as a guide to entering the variable data in the space
provided.  To the human eye it is obvious where the variable data entry
areas occur on the form, but a computer needs to have these areas defined
explicitly.  There are, therefore, two types of work phase:  one in which
you specify fixed text, and one in which you specify variable data
fields.  See the section Work Phase for details of this phase.

Modes.   

In a work phase there are two modes:  command and edit.  In command mode,
two underscore (_) characters in the top left corner of the screen
constrain the movement of the cursor, with the only allowed input being a
command.  See the section Command Mode for more information on this mode,
as well as descriptions of the commands available.

Edit mode is the mode in which you are free to move the cursor to any
part of the screen, enabling you to make entries for either fixed text or
variable data.  See the section Edit Mode for more information on this
mode.

The Forms-2 Interface.   

Forms-2 is written in COBOL and uses the extended ACCEPT and DISPLAY
verbs in Micro Focus COBOL. See your Language Reference for descriptions
of these two verbs.

Advantages of this terminal interface are:

   *   Corrections can be directly overtyped.

   *   Numeric fields accept only numeric characters.

   *   The full stop or period (.), when keyed in a numeric field,
       automatically zero-fills the field from the left.

Cursor Movement Facilities.   

In edit mode you can move the cursor quickly and easily about the screen.
The functions of the cursor control keys are summarized below:

Key          Function 

-------------------------------------------------------

->           Moves the cursor right one character.

<-           Moves the cursor left one character

v            Moves the cursor up one row.

^            Moves the cursor down one row.

Home         Moves the cursor to the start of the first
             line.

Tab          Moves the cursor to the start of the next
             line.

Backtab      Moves the cursor to the start of the line,
             or the start of the previous line if
             already at the start of a line.

You can correct text either by overtyping or by switching into command
mode and using the editing commands.

Output Formats.   

You can choose any valid combination of the facilities provided by
Forms-2, and depending on the options you select from the W01 screen,
Forms-2 automatically produces some or all of the following four types of
disk output file.  See the section Work Screen W01 for information on
selecting which output files are created.  The four file formats
available are:

   *   A source file of Micro Focus COBOL data description statements
       defining the screens (forms) that you have designed.  You can
       subsequently include these statements in a Micro Focus COBOL
       application program using the COPY verb.  The file is generated as
       file-name.DDS. 

   *   A checkout program incorporating the data description statements
       defining your screens.  After you have submitted the program to
       your Micro Focus COBOL system, you can verify the data entry form
       before building the actual application.  The file is generated as
       file-name.CHK. 

   *   A screen image file, containing an image of exact copies of the
       screens that you have designed.  The files are generated as
       file-name.Snn. 

   *   A file of the source code for an index program based on a screen
       that you have designed.  After you have submitted the program to
       your Micro Focus COBOL system, the generated program can be used
       for the storage, retrieval, updating and deletion of data entered
       via the screen.  The file is generated as file-name.GEN. 

Initialization Phase 

The initialization phase of the Forms-2 utility is the first step in the
execution of the program, and is only done once in any one run of
Forms-2.  In this phase you are asked to reply to questions asked on the
two initialization screens I01 and I02.  The following two sections show
these two screens and describe the options they offer.

Initialization Screen I01.   

The initialization screen I01 is displayed when Forms-2 is invoked.  This
screen is shown in Figure 14-1.

Initialization screen I01 prompts for four pieces of information.  If you
press Enter during this screen, all entries you have made are accepted,
and any information left unanswered takes the default value.  Do not
press Enter until you are ready to move on to initialization screen I02,
having made all the required entries for the following:

   1.  Data-name and the file-name base.

   2.  Lines available on terminal screen.

   3.  Currency sign.

   4.  Decimal point representation.

The purposes of these four pieces of information are described in the
following sections.

[]
Figure 14-1 Initialization Screen I01 Data-name and File-name Base. The file-name base that you key in at this point is used in the following ways by Forms-2: * It is taken as the first part of all the data-names and record-names produced in this Forms-2 run. Uniqueness is achieved by adding a two-digit sequence number for new records and adding the sequential number of the field within the form for data-names within records. Optionally, by means of the G work phase command, uniquenesscan be achieved by including the screen coordinates into the file-name. See the section Programming Commands for more information on the /G command. * It is taken as the main file-name for generated files. These can be: File Description ------------------------------------------------------- file-name.DDS Contains Micro Focus COBOL data description statements. See the section Data Descriptions for more information on .DDS files. file-name.CHK Contains a checkout program. See the section The Checkout Program for more information on checkout programs. Table 14-0. (cont.) File Description file-name.Snn Contains screen images, where nn = 00, 01,..., 99. See the section Screen Image File for information on this type of file. file-name.GEN Contains an index program. See the section Index Program for information on index programs. Only one .DDS fileis output per Forms-2 run, whereas a separate screen image file is output for each screen built. Lines Per Terminal Screen. You can use Forms-2 with screens of 22, 23 or 24 lines. The default for this entry is 24 lines. If your terminal has fewer than 24 lines, Forms-2 does not function correctly with this value. With some terminals you might have to specify one fewer than the number of lines actually present on the screen in order to avoid the problem where the screen is scrolled up when an entry is made on the last line. When selecting G from initialization screen I02 (see the section Initialization Screen I02), the number of lines per terminal should be 23. This takes into account the extra line at the bottom of the screen to be displayed as well as Adis messages in order to prevent scrolling. When selecting C from initialization screen I02 (see the section Initialization Screen I02), the number of lines per terminal should be 24 if the actual number of lines on the screen is 25. The extra line is not displayed with this selection. Currency Sign. This entry enables you to override the default currency sign, the dollar sign ($). Forms-2 generates an appropriate entry in the Special-Names paragraph in either the checkout or index program. You should use the specified currency sign when specifying numeric edited fields in the work phase, and Forms-2 uses it in the generated data description statements. The character that you specify here is validated. See your Language Reference for a list of valid characters. Decimal Point. This entry enables you to specify the character to use to represent a decimal point. The default is the period (.) but you can change it to be the comma (,). If you specify the comma, Forms-2 produces the following clause in the Special-Names paragraph of the checkout or index program: decimal-point is comma. You should use the specified decimal point character when specifying numeric edited fields in the work phase, and Forms-2 uses it in the generated data description statements produced when you submit your program to the Micro Focus COBOL system. Initialization Screen I02. The initialization screen I02 is displayed immediately after you terminate screen I01 entries by pressing the Enter key. This menu is shown in Figure 14-2.
[]
Figure 14-2 Initialization Screen I02 Initialization screen I02 asks you to specify two pieces of information. Pressing Enter on initialization screen I02 causes the information you have entered to be accepted and starts a work phase. Once you have finished the initialization phase you can no longer change information specified on initialization screens I01 and I02. The information you enter on initialization screen I02 is: 1. The types of files to be created. 2. The name of the directory into which files are to be written. These entries are described in the following sections. File Combinations. Forms-2 offers seven combinations of files, shown on initialization screen I02 (see Figure 14-2 The extensions used on the menu are as follows: Extension Description ------------------------------------------------------- DDS A .DDS file contains Micro Focus COBOL source data description statements(DDS) corresponding to the screens you have created. You can include the statements in any program using the standard COBOL COPY verb. .DDS files are used by the checkout and index programs. If you are unfamiliar with screen handling in Micro Focus COBOL, consult your Language Reference (especially the sections on ACCEPT, DISPLAY, FILLER and REDEFINES). Also see your Language Reference for information on the COPY verb. CHK A .CHK file is a checkout program consisting of the Procedure Division statements that correspond to the screens you have created. A checkout program file-name.CHK uses the COPY-files file-name.DDS, FORMS2.CH1 and FORMS2.CH2. The checkout program enables you to demonstrate on the screen exactly how the system operates. It successively displays the screens you have just created and allows you to enter data as you would under actual operating conditions. Snn An .Snn file contains the text of the screen you have just designed in the form of a screen image. You can use this file later in the same run or in subsequent Forms-2 runs, for further change if required. Another use of .Snn files is in producing a hard copy. You can print the screen images and use the hard copy as an effective means of communicating between different individuals (for example, the end user and the programmer). Table 14-0. (cont.) Extension Description GEN A .GEN file contains an index program, including all the code necessary to set up and maintain an indexed sequential file with records corresponding to the structure of your form. An index program file-name.GEN uses the COPY-files file-name.DDS, FORMS2.GN1 and FORMS2.GN2 Producing an index program places certain constraints on you during the Forms-2 run. The creation and operation of index programs is discussed in the section Index Program. If you select option G from initialization screen I02, at some stage before termination of the second work phase you must position the cursor at the first non-key variable data position and enter the work phase command *. Failure to do this results in Forms-2 continually returning you to edit mode until you the * command is carried out, or you enter the ! command to terminate the Forms-2 run and abandon the work in progress. When selecting G from initialization screen I02, the number of lines per terminal, set using initialization screen I01, should be 23. This takes into account the extra line at the bottom of the screen to be displayed as well as Adis messages in order to prevent scrolling. When selecting C from initialization screen I02, the number of lines per terminal, set using initialization screen I02, should be 24 if the actual number of lines on the screen is 25. The extra line is not displayed with this selection. If you enter the Q command (see the section Work Phase) at this point, Forms-2 quits back to screen I01, enabling you to amend the information given there. This can be useful if you inadvertently pressed Enter before completing screen I01. This command is not mentioned on the screen. Work Phase You define the screen layouts (forms) to be used in a Micro Focus COBOL application by entering text at the keyboard to produce model forms on the screen. You can define as many forms as you wish in a single Forms-2 run. To define one form requires at least two distinct work phases: one to define the fixed text of the form, and another to define the variable data entry fields. There are two work phase screens you encounter in the work phase. The following sections describe these screens and the options they offer. Work Phase Screen W01. Work phase W01 is displayed after the completion of each work phase and is also used to terminate a Forms-2 run. This screen is shown in Figure 14-3
[]
Figure 14-3 Work Phase Screen W01 Usually you use the first work phase to specify the fixed textform and the second work phase to specify the variable data fields within the form. However, this need not always be the case, and Forms-2 needs to know which type of text you are going to input in a particular phase. Work phase screen W01 presents the various options that are available. The following sections describe the options available from work phase screen W01. Screen Type Selection. Fixed text selections offered from this screen are as follows: Option Description ------------------------------------------------------- A The terminal screen is cleared to spaces in preparation for you to enter the fixed text for a new form. This is the default. B The previous screen is redisplayed to assist you in defining additional fixed text. Text from the previous screen is used only as a background in this case, and is not included in the record definition for the fixed text you are about to key in. You must therefore ensure that if any part of the previous screen is inadvertently overkeyed, the original characters must not be replaced but cleared to spaces. Variable data selections offered from this screen are as follows: Option Description ------------------------------------------------------- C The previous screen is redisplayed to assist you in the redefinition of the form to incorporate variable data field specifications. In the application the data is keyed into the fixed text form itself. D The previous screen is redisplayed to assist you in the definition of variable data area in the application program. This is sometimes useful, even though it results in larger application programs. You must use screen type D when using windowing commands if the start of the window is not going to be the first line on the screen. After you have selected the screen type, you are presented with the appropriate work screen for that text to be entered; for example, if you selected option A (fixed text on clear screen), a blank screen is displayed. For the other options, the previous screen is redisplayed to allow correct alignment of the current input. Terminating the Run. Entering the exclamation point (!) for the screen type causes the Forms-2 to terminate. On termination, Forms-2 closes the .DDS file and displays an identification message. If you requested the checkout facility during initialization, Forms-2 write the checkout program to disk, closes the .CHK file, and displays an identification message. Forms-2 terminates automatically after the second work phase if an index program is being produced (see the section Index Program). Work Phase Screen W02. Entering the F work screen manipulation command displays the work screen W02. See the section Work Screen Manipulation Commands for more information on the F command.This screen is shown in Figure 14-4. In order to process only the data entered in a particular work phase, Forms-2 must keep this data separate from previously entered data, which is displayed purely for alignment purposes. Forms-2 does this by constructing the displayed work screen from two separate data areas, termed background and foreground. The foreground holds the data entered during the currentwork phase; the background holds previously entered data that has been retained for alignment of the data entered in the current work phase. At the end of each work phase Forms-2 processes the foreground data only. Work phase screen W02 presents you with a number of options governing the use of foreground and background.
[]
Figure 14-4 Work Phase Screen W02 Foreground/Background Selection. Foreground/background selection options available from this screen are as follows: Option Description ------------------------------------------------------- A Returns to edit mode. Both foreground and background are cleared to spaces in preparation for you to enter a new form. B Clears the foreground of the form to spaces, leaving the background unchanged. C Clears the background of the form to spaces, leaving the foreground unchanged. D Overlays the background of the form onto the foreground. E Overlays the foreground of the form onto the background. F Overlays a screen image file onto the foreground. Enter the name of the screen image file at the file-name prompt. This option enables you to alter forms defined in previous Forms-2 runs. G Overlays a screen image file onto the background. Enter the name of the screen image file at the file-name prompt. This option enables you to alter forms defined in previous Forms-2 runs. H Displays the foreground of the form. This option displays only the foreground of the work screen for examination. The full work screen is restored on return to edit mode. Press to Enter remove the display. I Displays the background of the form. This option displays only the background of the work screen for examination. The full work screen is restored on return to edit mode. Press Enter to remove the display. J Displays a screen image file. Enter the name of the screen image file at the file-name prompt. This option displays the specified screen image file without corrupting the current foreground or background. You can override this automatic work screen preparation for the next phase by using the O work screen manipulation command. See the section Work Screen Manipulation Commands for more information. Generally, you enter text into the foreground from the keyboard, and it is moved into the background only from the foreground. While entering data into the work screen (that is, foreground), you can work in either of two modes: * Edit mode, which is the mode in which you enter data to create the model form. The initial mode is always edit mode. * Command mode, in which commands are available to assist you in creating and processing the edited work screen. These two modes are explained in the following sections. Edit Mode. Edit mode is the mode in which you are free to move the cursor to any part of the screen by use of the cursor control keys. You can also make entries into any part of the screen, in accordance with the screen type that you selected at the start of this work phase. * Fixed Text In the design of the fixed text of a form; that is, the fixed fields analogous to the pre-printed text on a paper form, you can enter any legible characters anywhere on the screen. This text is displayed as prompt text during a data entry run of the application. * Variable Data In the design of the variable data fields of a form; that is, the fields analogous to the entry spaces on a preprinted form, you can enter the characters X, Y and 8, 9. When keying in variable data, X denotes an alphanumeric character and 9 denotes a numeric character. If you need to have two alphanumeric fields contiguous with each other, place Ys in the character positions of the second field. Similarly, for contiguous numeric fields use 8s in the character positions of the second field. Example. Suppose in an application the operator must key in an invoice number. The fixed text in this example could be "INVOICE NO.....". An example value of an invoice number could be "CA3021". You must define the size and type of this variable data explicitly. Hence, if the invoice number always had two alphanumerics followed by four numerics, you would key in XX9999 at the point on the screen (the dots in this example) where you wish the operator to key the actual invoice number when the application itself is running. Note that Micro Focus COBOL provides automatic validation of numeric fields. Additionally, you can input special editing characters to specify numeric edited fields. These fields should be separated by spaces. Numeric edited fields are described in your Language Reference. Valid characters are: Z, *, +, -, CR, DB, .(period), ,(comma), B, /, 0(zero), $ The $ sign is the currency sign, which may be replaced by another sign as specified in the Special-Names paragraph of the Micro Focus COBOL program, either directly or as specified during the initialization phase of the Forms-2 run (see the section Initialization Phase). Picture characters S, V and P are not allowed. Forms-2 checks variable data fields for validity, but only when a .DDS file is being created. Consult your Language Reference for details of how screen handling works. Command Mode. To switch to command mode from edit mode, simply press Enter. Command mode is the mode in which two underscore (_) characters initially bound the cursor, and the cursor is constrained to stay within these two characters. See the section Commands for information about the commands available. Commands Before you invoke a command, make sure you are in command mode by checking that two underscore (_) characters are displayed. If they are, enter the relevant command and press Enter. The commands available to you during the work phase fall into three main groups: * General Work Screen Commands. General commands perform such functions as releasing the work screen for processing. * Work Screen Manipulation Commands. Work screen manipulation commands help you to prepare and edit the work screen. You are advised to become very familiar with these commands. * Programming Commands. Programming commands exist mainly for the convenience of the COBOL programmer, and some of them are not meaningful without an understanding of COBOL. They include commands to assist in producing efficient code, and to give you more control over the output files. These groups of commands are explained in detail in the following sections. General Work Screen Commands. The following work screen commands are available: Command Description ------------------------------------------------------- Enter Return to edit mode. ? Display help screens. The first help screenis displayed, which includes a summary of the general commands. This screen remains displayed until the next input command. Entering ? then pressing Enter at the displayed help screen displays the next help screen. If you repeat the sequence, each help screen is displayed in sequence until the end of the series, when the first screen is displayed again. The ? command is also available from work phase screen W01. Table 14-0. (cont.) Command Description ?n Display the nth help screen. Entering ? followed by a digit then pressing Enter causes the nth help screen in the series to bedisplayed. There are four help screens: - Help screen H01 gives help on general commands. - Help screen H02 gives help on manipulation commands. - Help screen H03 gives help on programming commands. - Help screen H04 gives help on window commands. If you enter a number that is greater than the number of help screens available (for example, if you enter ?6), Help Screen H01 is displayed. Space Terminate the work phase. Pressing Space terminates the current work phase and initiate processing of the data you have just entered in that work screen. _ Return to edit mode. Pressing the underscore (_) character exits from command mode back to edit mode. Q Quit. Pressing Q returns you to the work screen screen W01 to enable you to choose the text type. Whatever text type you then select, the current foreground/background components of the work screen are unchanged when you re-enter edit mode. The most likely use for this command is when you select the default option C (variable data fields) from work phase screen W01, then you use the work screen incorrectly to set up a fixed text form. Validation errors then occur, and you are automatically returned to edit mode. To return to work phase screen W01 and correct the selection without losing the text you have just entered, press Enter to enter command mode and enter the Q command. You can now correct the screen type, and the work screen has been preserved for reprocessing (as fixed text). ! Terminate the Forms-2 run. Pressing the exclamation point (!) character terminates the program. This command is available to you throughout the Forms-2 run but you would normally use it on automatic return to work phase screen W01 when you have completed a work phase. When used elsewhere, it abandons the run. Table 14-0. (cont.) Command Description X Reposition command area. The standard command area is in columns 1 and 2 of line 1, as indicated by the two underline characters displayed on entry to command mode. Forms-2 always attempts to restore any data in these positions upon return to edit mode. However, to enable these positions to be preserved intact at all times, the facility to reposition the command area is provided. To do this, place the cursor at the desired location before entering command mode. Enter the command X to cause the required change. The next time you enter command mode, the prompting underline characters appear at the new specified location. * Define key/data split for index program. This command is used only in connection with generation of the index program and is described in the section Index Program. If you select the index program option G at initialization screen I02, at some stage before termination of the second work phase you must position the cursor at the first non-key variable data position and enter the * command. Failure to do this results in Forms-2 continually returning you to edit mode until you either enter the * command, or enter the ! command to terminate the Forms-2 run and abandon the work in progress. All commands except Space, ! and Q return you to edit mode. The default command was introduced for convenience in case you enter command mode accidentally. Work Screen Manipulation Commands. The following work screen manipulation commands are available: Command Description ------------------------------------------------------- F Invoke the work phase screen W02. Work Screen W02 contains options to assist you in setting up the foreground component of the work screen. See the section Work Screen Phase W02 for information on the options available. Fx Specify a required foreground/background option, where x is a letter from A to J, corresponding to the possible options from the work phase screen W02. See the section Work Phase Screen W02 for information on the options available. The specified option is executed and control returned to edit mode without display of work phase screen W02. Table 14-0. (cont.) Command Description O1 Switch off automatic foreground/background preparation. This command prevents the current foreground being merged into the background or either area being cleared for the next phase. The O1 command remains effective until you enter the command O or O0. O or O0 Reset foreground/background preparation. The foreground/background preparation sequence is reset to automatic (starting at the beginning of the next work phase). Cn Insert n spaces. This command inserts n spaces before the character at the current cursor position, where n is a number from 1 to 9. Only the current line is affected. Dn Delete n characters. This command deletes n characters including the character at the current cursor position, where n is a number from 1 to 9. Only the current line is affected. In Insert n blank lines. Inserts n blank lines before the line containing the current cursor position, irrespective of the column, where n is a number from 1 to 9. You can only insert whole lines. Kn Delete n lines. Deletes n lines including the line containing the current cursor position, where n is a number from 1 to 9. You can only delete whole lines using this command. An Repeat current line n times. Repeats the line containing the current cursor position n times, where n is a number from 1 to 9. This does not act as an insert. Any foreground data in the next n lines is overwritten. Un Move cursor up n lines. Moves the cursor up n lines from the current cursor position, where n is a number from 1 to 9. Cursor position within the line is maintained. You can position the cursor vertically by using the ^ and v keys after you have moved the cursor to the first position of the current line. You can position the cursor horizontally by using the <- and -> keys. Table 14-0. (cont.) Command Description Vn Move cursor down n lines. Moves the cursor down n lines from the current cursor position, where n is a number from 1 to 9. Cursor position within the line is maintained. You can position the cursor vertically by using the ^ and v keys after you have moved the cursor to the first position of the current line. You can position the cursor horizontally by using the <- and -> keys. Programming Commands. The following programming commands are available: Command Description ------------------------------------------------------- G, G0 and G1 The data-name structuring command. The default record-name format generated by Forms-2 for inclusion in your Micro Focus COBOL source program for screen formatting is as follows: bbbbbb-rr (01 level) where: bbbbbb is the 1-6 character base that you specified at initialization screen I01. rr is the record number, starting at 00 in the first work phase and increasing by one for each subsequent work phase. If you use the window commands to define a window starting in a line other than line 1, the default record-name generated is: bbbbbb-rr-ll where: ll is the line number. The default elementary data-name structure generated by Forms-2 for inclusion in the Micro Focus COBOL source program for screen formatting is as follows: bbbbbb-rr-nnnn where: nnnn is the sequence of this field within the screen, starting at 0001. Table 14-0. (cont.) Command Description The G (or GO) command causes nnnn within the data name to be the screen coordinates of the start of the field. This can sometimes be of use as a reference guide when using Micro Focus COBOL facilities to set cursor position. The G1 command restores the default data-name generation to using sequential field numbers. Jn Reset multiple spaces. The Micro Focus COBOL interactive ACCEPT and DISPLAY verbs operate only on named fields; FILLER areas are left alone. The time taken to display a screen depends both on the size and also the number of constituent fields. When processing fixed text screens, Forms-2 by default generates FILLER items wherever multiple spaces appear. On some forms this can result in many small fields separated by small FILLER fields. The Jn command resets the number of contiguous spaces Forms-2 allows within the VALUE clause of a named field. This is initially set to 1 but can be from 1 to 9. Specifying J or J0 forces FILLER items to be generated even for single spaces. Mx Change default FILLER. An alternative method of forcing spaces within named fields is by use of the hash character (#), which is designed for this purpose. Use of the hash character in a field results in an actual space in the corresponding position in the generated VALUE clause. This command enables you to change the designated character from hash to something else (presumably because you need to generate VALUE "#"). If the space character ( ) itself is specified, this forces generation of named fields for the entire screen without any FILLER items. Table 14-0. (cont.) Command Description Sn File output control command. S (or S0) Cancels any other Sn commands in effect at the time. S1 Suppresses .DDS file (and .CHK file ) generation for this work screen. Generation of this text resumes for the next work screen unless the same command is repeated in the next phase. S2 Suppresses screen image (.Snn file) generation for this work screen. This is commonly used to suppress screen images of just variable data fields. Again, the effect only lasts for the current phase. S3 Overrides the default screen image file identifier for the current work screen. Normally, if a file already exists with the default identifier, you are given the option of overriding it. If you reject this option, you are prompted for an alternative file identifier. This command forces the alternative file identifier to be requested even when no file exists with the default identifier. S9 Causes Forms-2 to halt after display of each line of code during .DDS file generation. Forms-2 re-accepts the line before outputting it to the .DDS file. This provides you with a limited editing capability, which may prove useful under special circumstances. This option is not available if you select option B, C, E, F or G from initialization screen I02. P Cursor control command. Causes the coordinates of the current cursor position to be displayed at the command area position. This display lasts a few seconds, after which the work screen contents at the command area are restored and control is returned automatically to edit mode. Where sequential field numbers are used within data names, this command provides you with an easy alternative method of ascertaining the coordinates of any field. Table 14-0. (cont.) Command Description Wn Window commands. The window defines the area (full lines) to be processed by Forms-2 when generating .DDS files. By default, the window is the full screen. Where a window's start or end is other than the start or end of the screen, a delimiting line of hyphens can be displayed on the line just outside the window. For example, if a window starts in line 4, delimiters appear along the length of line 3. The principal use of the window is to enable you to create a form that begins below the top of the screen, but saves memory by avoiding the description of blank lines at the top of the screen. Where a window is used in this way, the generated record-name incorporates the start line number of the window, which can then act as a guide to the programmer, using the Micro Focus COBOL ACCEPT/DISPLAY AT coordinates facility. The detailed commands give you very comprehensive window formatting capability as follows: W (or W0) Positions the cursor at the current window start. This is the equivalent of the Home key when the window facility is in use. W1 Sets the start of the window to be the current line, with delimiters on the previous line. W2 Sets the end of the window to be the end of the current line, with delimiters on the following line. W3 Sets the start of the window to be the current line, without delimiters. W4 Sets the end of the window at the end of the current line, without delimiters. W5 Displays delimiters preceding the current window start. W6 Displays delimiters following the current window end. W7 Erases start delimiters and restores any work screen data to the display. W8 Erases end delimiters and restores any work screen data to the display. Table 14-0. (cont.) Command Description W9 Positions the cursor at the current window end. Delimiters do not corrupt foreground/background contents. The current screen image includes the full foreground part of the work screen without delimiters, regardless of whether a window has been defined. You could use this to include annotation on the screen image that does not affect .DDS file generation. One use of the window facility would be to display a form in two stages. For example, the first 10 lines, then the second 10 lines. You could create this as a single screen image including both sections of the form, and you could window in on the relevant portions as required when the .DDS file is generated.


MPE/iX 5.0 Documentation