HPlogo HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 5 Reformatting Specifications

Output Record Menu

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

An Output Record Menu, shown in Figure 5-15 “An Example of an Output Record Menu”, is issued for every input forms sequence. It specifies which fields in the input forms are to be written to an output record. The output record definition may generate one output record, many output records, or only a portion of an output record. The order in which fields are specified is the order in which they are written to the output record.

The Output Record Menu is not a true menu screen. Rather than selecting from predefined options, you enter the reformat fields in a freeform area on the screen. Once the output record definition is specified, you will have a complete list of the output record image for the forms specified in the corresponding input forms sequence. At a glance, you can see the order in which fields will appear and where each record begins. If only a portion of a field is to be written, this too is evident from the output record definition. As such, the output record definition can be thought of as the "screen image" of the reformat similar to the screen image generated for each form in the forms file.

Figure 5-15 An Example of an Output Record Menu

An Example of an Output Record Menu

When the Output Record Menu is displayed, the cursor is positioned to the first position in the first line in which you can enter an output record specification. Tabs are set so that when you press TAB, the cursor is moved to each subsequent position. Figure 5-16 “Sample Output Record Menu” illustrates an example of a completed Output Record Menu specification.

Figure 5-16 Sample Output Record Menu

Sample Output Record Menu

When the output record definition has been defined, press ENTER. A Field Menu is issued for each field name associated with an input field name in the output record definition.

Note that the only required entry is the field name; other specifications depend on the particular definition. You can specify a constant (literal string, system constant, or numeric equivalent of an USASCII character) instead of a field name. A constant may start anywhere on the line, but cannot extend past column 75.

NOTE: Since the output record specifications are entered on a freeform area of the screen, you can type anywhere on the screen. You should be careful not to delete or overwrite lines accidentally. The field specifications should be entered in the positions to which the tabs are set.

The specifications under the heading INPUT identify the fields (or portions of fields) to be accessed from the batch file. The specifications under OUTPUT determine how the field is to be written to the output record.

You may enter as many specification lines as there is room in your terminal memory. (Check the terminal memory capacity in the reference manual for your terminal.)

Fields

Field Name (Required)

Identifies the field in the batch file to be written to the output file. The field name must identify an existing field in one of the forms specified in the preceding input sequence.

The field name need not be unique to the output definition. But, if it is not unique, a different output field name must be entered for each identical input field name.

Substring Strt (Optional)

If you want to retrieve a portion of an input field that is not at the beginning of the field, specify the first character position that you want written to the output field as the Subst Strt value. Character positions in a field are numbered from 1. For example, suppose you want only the last five characters of a 20-character field written to the output file, enter 16 under Subst Strt. Used in combination with the Len parameter, you can specify any group of consecutive characters in an input field.

Default = First character in field (1).

Substring Len (Optional)

Allows you to retrieve only a portion of an input field. For example, if you want only the first five characters in a field, leave the Subst Strt field blank and enter 5 under Len. By combining the Len specification with the Subst Strt specification, you can select any consecutive group of characters in the input field. For example, to select characters 5 through 14 of the input field, set Subst Strt to 5 and Len to 10.

Default = length of input field - Subst Strt + 1

Form Name (Optional)

Identifies the form in which the input field appears. This parameter can be included when a field with the same name appears in more than one form in the forms file. If omitted, and the field name is not unique, the first form in the input forms sequence in which the field appears is assumed.

Default = First form in which field appears.

Field Name (Optional)

In case the input field name is not unique, you can give the field (or portion of the field) a unique identifier in this position. Any legal 15-character identifier can be specified. (Note that any lowercase letters are shifted to all uppercase by REFSPEC.)

Default = Input field name.

Strt Col (Optional)

If you want the field to start in a particular column in the output record rather than immediately after the preceding field, you can specify a starting column. Column numbers in this case correspond to character (byte) positions in the output record. Columns are numbered starting with 1.

When you specify a new starting column, REFSPEC checks to make sure the starting column does not overwrite a previous field in the output record. If the starting column is not correctly specified, REFSPEC issues an error message.

One reason for changing the starting column is to ensure that a field starts on a word boundary. For example, suppose the first field to be written is five characters long. You can either increase the length of this field in the "Len" position to an even number of characters, or you can specify a new starting column for the next field.

Default = Consecutive fields with no intervening spaces.

Len (Optional)

You can specify the number of characters for the output field in this position. If you specify a length shorter than the input field, character type data is truncated when it is written to the output field; numeric data may not be converted if the field is too short.

If you plan to add a check digit to the field, you must specify the output field length as at least one character longer than the input field length.

Default = Input field length (or substring length).

Strt Rec (Optional)

In order to separate the output into records, you must specify the beginning of each record. Any character entered in the Strt Rec position of the Output Record Menu marks the associated field or constant as the beginning of a new record. For consistency, you should select a standard character, such as an asterisk.

If a starting record is not marked in the output record definition, the fields in the current definition follow the fields in the previous definition as part of the same record.

Default = Field is not first field.

Constant (Optional)

You can specify a constant instead of a field name. The constant can be any of the following:

  • a character string (literal) enclosed within single or double quotes;

  • the numeric equivalent of a USASCII character preceded by a dollar sign ($);

  • one of the system-defined constants:

    • $CR carriage return

    • $LF line feed

    • $GS group separator

    • $US unit separator

    • $RS record separator

The following are acceptable constants:

"Part No." 'ABC' $65 $34"NAME"$34 $RS

Constants may not be specified on the same line as a field name. More than one constant can be specified on a line. When multiple constants are specified, they are concatenated into a single literal value. For example: "Part No."
$GS $65
.

Blanks are not significant except within quoted strings, where they must be included.

A constant or group of concatenated constants must not extend past column 75 of the screen. Apart from this restriction, they can appear anywhere on the line.

Default = No constant.

Feedback to webmaster