HP 3000 Manuals

The Header Specification Fields (Cont) [ HP RPG/iX Reference Manual ] MPE/iX 5.0 Documentation


HP RPG/iX Reference Manual

The Header Specification Fields (Cont) 

Table/Array Look-Up (Column 34) 

This field specifies how tables and arrays are searched.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 34       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           B           | Perform binary look-ups.  Binary look-ups are ideal for large    |
|                       | tables and arrays.                                               |
|                       |                                                                  |
|         blank         | Perform sequential look-ups.  Sequential look-ups are effective  |
|                       | for small tables and arrays (less than 16 entries) and for       |
|                       | tables and arrays whose initial entries are the most frequently  |
|                       | searched.                                                        |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

B (Binary) 

When you enter B, the tables and arrays must be in ascending sequence.

A sequential look-up is performed (regardless of this B entry) for
execution-time tables/arrays and for compile-time and preexecution-time
tables/arrays that are loaded "short" (that is, not all entries are
initialized).

EBCDIC Zone/Digit Tests (Column 39) 

This field specifies whether record identification codes that use the
zone (leftmost 4 bits) or digit (rightmost 4 bits) portions are converted
to EBCDIC before being compared.  See the Record Identification Codes
Field (columns 21-41) in Chapter 7 for a complete description of the Z
(zone) and D (digit) entries.

This field provides compatibility with EBCDIC-based computer systems.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 39       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           E           | Convert the record identification codes (defined as types Z and  |
|                       | D in the Record Identification Codes Field (columns 21/41) of    |
|                       | the Input Specification) to EBCDIC before comparing them.  Do    |
|                       | not enter E if the record identification codes contain packed    |
|                       | numeric data.                                                    |
|                       |                                                                  |
|         blank         | Use the original ASCII character representation for record       |
|                       | identification code testing.                                     |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

Sign Processing (Column 40) 

This field determines whether the signs in numeric fields are changed
when the fields are moved.  You can use this field, for example, to
change a +1 to the ASCII character 1; the number is written as 1 rather
than the character A.

The results produced by this field depend on the data format of the
fields that are moved (see the Data Format field (column 43) in Chapter
7).  This field affects only positive and unsigned fields.  It does not
apply to fields having L (left-sign) and R (right-sign) data formats.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 40       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|      B or blank       | Sign processing takes place only when writing unpacked numeric   |
|                       | fields.  Original signs are retained on all other field moves.   |
|                       |                                                                  |
|           I           | Sign processing does not take place for unpacked numeric input   |
|                       | fields.  Sign processing does take place for the Calculation     |
|                       | Specification operations MOVE, MOVEL, MLLZO, and MHLZO, when     |
|                       | alphanumeric fields are moved to numeric fields.  It also takes  |
|                       | place when unpacked numeric fields are written.                  |
|                       |                                                                  |
|           N           | No sign processing takes place.  Thus, original signs are        |
|                       | retained whenever fields are moved.                              |
|                       |                                                                  |
|           O           | Sign processing does not take place for unpacked numeric output  |
|                       | fields.  Sign processing does take place for the Calculation     |
|                       | Specification operations MOVE, MOVEL, MLLZO, and MHLZO, when     |
|                       | alphanumeric fields are moved to numeric fields.  It also takes  |
|                       | place when unpacked numeric fields are read.                     |
|                       |                                                                  |
|           S           | Standard sign processing takes place during Calculation          |
|                       | Specification move operations (MOVE, MOVEL, MLLZO, and MHLZO)    |
|                       | when alphanumeric fields are moved to numeric fields.  It also   |
|                       | takes place when unpacked numeric fields are read or written.    |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

Table 3-4  shows how this field affects signs in numeric fields.
Positive fields have sign bits = 1100.  Unsigned fields have sign bits =
1111.  The asterisk (*) refers to the MOVE, MOVEL, MLLZO, and MHLZO
Calculation Specification operations.  No sign processing occurs for
MOVEL when the Result Field length equals or exceeds the length of the
Factor 2 Field.

          Table 3-4.  Sign Processing Options 

--------------------------------------------------------------------------------------------------
|                  |                         |                         |                         |
|    Column 40     |          Input          |          Move*          |         Output          |
|                  |        unpacked         |     alphanumeric to     |        unpacked         |
|                  |       numeric fld       |       numeric fld       |       numeric fld       |
|                  |                         |                         |                         |
--------------------------------------------------------------------------------------------------
|                  |                         |                         |                         |
|    B or blank    |     Signs unchanged     |     Signs unchanged     |     Positive sign->     |
|                  |                         |                         |        Unsigned         |
|                  |                         |                         |                         |
--------------------------------------------------------------------------------------------------
|                  |                         |                         |                         |
|        I         |     Signs unchanged     |   Unsigned-> Positive   |     Positive sign->     |
|                  |                         |          sign           |        Unsigned         |
|                  |                         |                         |                         |
--------------------------------------------------------------------------------------------------
|                  |                         |                         |                         |
|        N         |     Signs unchanged     |     Signs unchanged     |     Signs unchanged     |
|                  |                         |                         |                         |
--------------------------------------------------------------------------------------------------
|                  |                         |                         |                         |
|        O         |     Positive sign->     |   Unsigned-> Positive   |     Signs unchanged     |
|                  |        Unsigned         |          sign           |                         |
|                  |                         |                         |                         |
--------------------------------------------------------------------------------------------------
|                  |                         |                         |                         |
|        S         |     Positive sign->     |   Unsigned-> Positive   |     Positive sign->     |
|                  |        Unsigned         |          sign           |        Unsigned         |
|                  |                         |                         |                         |
--------------------------------------------------------------------------------------------------

Form Positioning (Column 41) 

This field lets the operator align printer forms before processing begins
for printer files.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 41       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           1           | Perform printer forms alignment at the start of printer file     |
|                       | processing.  Allow forms alignment until the operator signals    |
|                       | that the forms are positioned properly.                          |
|                       |                                                                  |
|         blank         | Do not perform forms alignment.                                  |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

1 (Forms Alignment) 

Use this option when using preprinted forms such as paychecks.  Before
printer file processing begins, a forms-alignment record is printed and a
message is displayed to the operator.  A pause gives the operator time to
adjust the forms, if necessary.  When the forms are positioned correctly,
the operator resumes the program (the report page count is incremented
only when the program resumes).  The first line is printed according to
the carriage control method entered in the Carriage Control Type Field
(column 53).

Forms-positioning takes place for both spooled and nonspooled output
files.

Indicator Setting (Column 42) 

This field lets you specify how certain field and resulting indicators
are initialized at the beginning of the program and following Blank-After
operations (see the Blank After Field, column 39, of the Output
Specification).

The indicators affected by this field are:

   *   Those entered in the Zero or Blank Subfield (columns 69-70) of
       Input Specifications.

   *   Those entered in the Equal Subfield (columns 58-59) of any of
       these Calculation Specification operations:  ADD, Z-ADD, SUB,
       Z-SUB, MULT, DIV, MVR, or XFOOT.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 42       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           B           | Do not alter the indicator settings at program initialization or |
|                       | following Blank-After operations.                                |
|                       |                                                                  |
|           S           | Turn ON the indicators at program initialization and following   |
|                       | Blank-After operations.                                          |
|                       |                                                                  |
|           T           | Turn ON the indicators at program initialization, but not        |
|                       | following Blank-After operations.                                |
|                       |                                                                  |
|         blank         | Do not alter the indicators at program initialization; turn them |
|                       | ON following Blank-After operations.                             |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

If you leave this field blank or enter a B into it, the indicators are
OFF at program initialization, even though RPG sets their associated
fields to zeros or blanks.  If you want an indicator used in Input and
Calculation Specifications to reflect its associated field's actual
initialized state, enter S or T into this field.

If the indicator is associated with a Blank-After field (see the Blank
After Field (column 39) of the Output Specification), it is turned ON
after the field is cleared to zeros or blanks.  If you don't want the
indicator to turn ON (to simulate the Blank-After feature of other RPG
implementations such as IBM System/36), enter either B or T in this
field.

File Translation (Column 43) 

This field lets you translate one or more characters in an input file
before they are processed by the program.  You can also translate
characters before they are written to an output file.

The translation feature is useful for processing files containing
non-ASCII data.  It is also useful for encoding sensitive data on
reports.  Translation is performed twice (once on input and once on
output) for combined input-output and update files.

To translate characters, enter one or more file translation records which
specify (in hexadecimal or octal) the characters to translate and their
translated equivalents.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 43       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           F           | Translate characters according to a file translation record      |
|                       | specified in hexadecimal format.                                 |
|                       |                                                                  |
|           O           | Translate characters according to a file translation record      |
|                       | specified in octal format.                                       |
|                       |                                                                  |
|         blank         | Do not translate characters.                                     |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

F (Hexadecimal) 

Enter one or more file translation records that specifies (in
hexadecimal) the characters to be translated and the translated
equivalents.  (See Appendix D for ASCII and hexadecimal equivalents.)
You can enter file translation records in a job stream or in a separate
disk file.  Placing them in a separate file allows others to use them
also.

Table 3-5  shows the format for file translation records in
hexadecimal format.

          Table 3-5.  File Translation Records in Hexadecimal 

-----------------------------------------------------------------------------------------------
|              |                                        |                                     |
|   Columns    |                 Value                  |             Description             |
|              |                                        |                                     |
-----------------------------------------------------------------------------------------------
|              |                                        |                                     |
|     1-8      | *FILES                                 | Translate all files used in the     |
|              |                                        | program.                            |
|              |                                        |                                     |
|              | or                                     |                                     |
|              |                                        |                                     |
|              | A valid file name used in a File       | Translate the named file.           |
|              | Description Specification.  File names |                                     |
|              | can contain up to eight characters and |                                     |
|              | must begin with a letter A-Z. The      |                                     |
|              | remaining characters can be letters or |                                     |
|              | digits.  Do not embed blanks in the    |                                     |
|              | name.                                  |                                     |
|              |                                        |                                     |

|     9-12     | Two ASCII characters specified in      | The first character is an external  |
|              | hexadecimal.                           | ASCII character; the second         |
|              |                                        | character is the corresponding      |
|              |                                        | internal ASCII character.           |
|              |                                        |                                     |
|    13-80     | Sets of two ASCII characters, specified| Same as columns 9-12, repeated as   |
|              | in hexadecimal.                        | needed.                             |
|              |                                        |                                     |
-----------------------------------------------------------------------------------------------

Example 

A personnel report shows the salary curves of a company's employees.
Since most of the employees recognize salary curves C and D, these curves
are "camouflaged" by being translated into characters that only the
personnel department understands.  The character C (hexadecimal 43) is
translated to X (hexadecimal 58) and the character D (hexadecimal 44) is
translated to W (hexadecimal 57).

The file translation record looks like this:

FILEC   58435744

Figure 3-4  shows how to enter the specifications that use the file
translation record shown above.  Line 1 contains F in column 43 to
specify file translation in hexadecimal.  Line 2 contains an Array/Table
File Name Specification (A) that names the file (FILEC) containing the
file translation record.
___________________________________________________________________________________
|                                                                                 |
|                1         2         3         4         5         6         7    |
|            678901234567890123456789012345678901234567890123456789012345678901234|
|              _______________________________________________________            |
|                                                                                 |
|     1     H                                    F                                |
|             .                                                                   |
|             .                                                                   |
|             .                                                                   |
|                                                                                 |
|     2     AFILEC                                                                |
|                                                                                 |
|                                                                                 |
___________________________________________________________________________________

          Figure 3-4.  Specifying File Translation in Hexadecimal 

O (Octal) 

Enter one or more file translation records that specifies (in octal) the
characters to be translated and the translated equivalents.  (Refer to
Appendix D for ASCII and octal equivalents.)  You can enter file
translation records in a job stream or in a separate disk file.  Placing
them in a separate file allows others to use them also.

Table 3-6  shows the format for file translation records in octal
format.

          Table 3-6.  File Translation Records in Octal 

-----------------------------------------------------------------------------------------------
|                 |                                     |                                     |
|     Column      |                Value                |             Description             |
|                 |                                     |                                     |
-----------------------------------------------------------------------------------------------
|                 |                                     |                                     |
|       1-8       | *FILES                              | Translate all files used in the     |
|                 |                                     | program.                            |
|                 |                                     |                                     |
|                 | or                                  |                                     |
|                 |                                     |                                     |
|                 | A file name used in a File          | Translate the named file.           |
|                 | Description Specification.  (File   |                                     |
|                 | names can contain up to eight       |                                     |
|                 | characters, beginning with a letter |                                     |
|                 | A-Z. The remaining characters can   |                                     |
|                 | consist of letters and digits.  Do  |                                     |
|                 | not embed blanks in the file name.) |                                     |
|                 |                                     |                                     |
|      9-14       | Two ASCII characters, specified in  | The first character is an external  |
|                 | octal.                              | ASCII character; the second is the  |
|                 |                                     | corresponding internal ASCII        |
|                 |                                     | character.                          |
|                 |                                     |                                     |
|      15-80      | Sets of two ASCII characters,       | Same as columns 9-14, repeated as   |
|                 | specified in octal.                 | needed.                             |
|                 |                                     |                                     |
-----------------------------------------------------------------------------------------------

Example 

A personnel report shows the salary curves of a company's employees.
Since most of the employees recognize salary curves C and D, those curves
are "camouflaged" on the report by being translated into characters that
only the personnel department understands.  The character C (octal 103)
is translated to X (octal 130) and the character D (octal 104) is
translated to W (octal 127).

The file translation record looks like this:

FILED   130103127104

Figure 3-5  shows how to enter the specifications that use the file
translation record shown above.  Line 1 contains O in column 43 to
specify file translation in octal.  Line 2 contains an Array/Table File
Name Specification (A) that names the file (FILED) containing the file
translation record.
___________________________________________________________________________________
|                                                                                 |
|                1         2         3         4         5         6         7    |
|            678901234567890123456789012345678901234567890123456789012345678901234|
|              _______________________________________________________            |
|                                                                                 |
|     1     H                                    O                                |
|             .                                                                   |
|             .                                                                   |
|             .                                                                   |
|                                                                                 |
|     2     AFILED                                                                |
|                                                                                 |
|                                                                                 |
___________________________________________________________________________________

          Figure 3-5.  Specifying File Translation in Octal 

Non-Numeric Digits (Column 44) 
[REV DEL][REV BEG]

This field lets you move special characters, such as !  and %, to
unpacked numeric fields.  When you do this, the special characters are
converted to digits using their numeric bit values (this usually results
in the value zero).  You can also convert invalid packed decimal digits
to zero.[REV END]

This field provides compatibility with other implementations of RPG.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 44       |                       Description[REV BEG]                       |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           P           | Allow invalid digits in packed decimal fields to be converted to |
|                       | 0.  Also enable capability provided by N below.  Note that data  |
|                       | may be modified, and invalid decimal digits are not trapped.[REV |
|                       | END]                                                             |
|                       |                                                                  |
|           N           | Allow non-numeric data (special characters) to be moved to       |
|                       | numeric fields during input, data structure moves and during     |
|                       | MOVE and MOVEL operations.                                       |
|                       |                                                                  |
|         blank         | Do not allow non-numeric data (special characters) to be moved   |
|                       | to numeric fields and do not allow numeric fields to compare     |
|                       | equal to *BLANK or *BLANKS. If either of these conditions occur, |
|                       | generate run-time error 13 (INVALID NUMERICAL DATA...).          |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

Dollar Sign Substitute (Column 46) 

This field lets you substitute another character for the dollar sign ($)
during output editing (see the Edit Code Field, column 38, and the
Constant/Edit Word Field, columns 45-70, in the Output Specification).

---------------------------------------------------------------------------------------------
|                                |                                                          |
|           Column 46            |                       Description                        |
|                                |                                                          |
---------------------------------------------------------------------------------------------
|                                |                                                          |
| A special character (not a     | Use this character as a dollar sign during output        |
| letter or digit)               | editing.  (Be sure to this character in edit words       |
|                                | instead of $.)                                           |
|                                |                                                          |
| blank                          | Use $ for the dollar sign.                               |
|                                |                                                          |
---------------------------------------------------------------------------------------------

This field makes edit words and codes more flexible.  Edit words are
fields that format output fields character by character.  Edit codes are
single-character codes which provide a general method of editing output
data.  In edit words and codes, the dollar sign is an insertion
character.  You may want to substitute another character for the dollar
sign, for example, when you're producing a report that shows figures in
another currency.

Skip-Suppress (Column 47) 

For a printer file, this field lets you specify whether to skip to
head-of-form during program initialization.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 47       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           S           | Suppress skipping.  Printing begins at the current forms         |
|                       | position.  Use this field if you entered 1 in the Form           |
|                       | Positioning Field (column 41).  This minimizes the amount of     |
|                       | paper required for forms alignment.                              |
|                       |                                                                  |
|         blank         | Skip to a new page when the program begins.  (Often, the forms   |
|                       | are already positioned to top-of-form.  In this case, no action  |
|                       | is taken.)                                                       |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

DSPLY Options (Column 48) 

This field specifies how the Calculation Specification operations, DSPLY
and DSPLM, are performed.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 48       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           B           | Display the Factor 1 Field and the Result Field value; prompt    |
|                       | for a new Result Field value on the next line, below the         |
|                       | displayed value.                                                 |
|                       |                                                                  |
|           D           | Display "DSPLY" and the Factor 1 Field on the same line; display |
|                       | the Res Field and prompt for a new Result Field value on the     |
|                       | same line.                                                       |
|                       |                                                                  |
|           N           | Display the Factor 1 Field; display the Result Field and prompt  |
|                       | for a new Result Field value on the same line.                   |
|                       |                                                                  |
|         blank         | Display "DSPLY", the Factor 1 Field and the Result Field on the  |
|                       | same line; prompt for a new Result Field value on the next line, |
|                       | below the displayed value.                                       |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

Record Length Check (Column 49) 

This field specifies how record length errors are handled at run time.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 49       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           E           | When a record length error occurs, display this warning message: |
|                       |                                                                  |
|                       | ACTUAL<LOGICAL RECORD LENGTH FOR FILE xxxx                       |
|                       |                                                                  |
|                       | The programs halts with run-time error #2 (Unidentified Record). |
|                       | See the Error Response Field (columns 56-71) for information on  |
|                       | how to pre-respond to this run-time error.  If you pre-respond   |
|                       | with a 0 and the actual length is less than the length you       |
|                       | specify, excess numeric characters in the buffer are treated as  |
|                       | zeros and excess alphanumeric characters are treated as spaces.  |
|                       |                                                                  |
|           N           | When a record length error occurs, suppress the warning message  |
|                       | and run-time error.                                              |
|                       |                                                                  |
|         blank         | When a record length error occurs, display the warning message   |
|                       | below, suppress the run-time error, and continue processing:     |
|                       |                                                                  |
|                       | ACTUAL<LOGICAL RECORD LENGTH FOR FILE xxxx.                      |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

Page Overflow Test (Column 50) 

For printer files, this field determines when page overflow is detected.
Page overflow is detected before printing the next print line (the line
contained in the line counter after skip-after and space-after operations
for the current line).

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 50       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           P           | Page overflow occurs when the next print line is beyond the      |
|                       | defined overflow line.  This option provides compatibility with  |
|                       | other implementations of RPG.                                    |
|                       |                                                                  |
|         blank         | Page overflow occurs when the next print line is on or beyond    |
|                       | the defined overflow line.                                       |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

*PLACE Method (Column 51) 

This field determines how *PLACE (see the Field Name Field (columns
32-37) in the Output Specification) is processed in the program.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 51       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           1           | When you use more than one *PLACE, each one repeats only the     |
|                       | fields that have not been repeated by previous *PLACE entries.   |
|                       |                                                                  |
|                       | This option provides compatibility with other implementations of |
|                       | RPG.                                                             |
|                       |                                                                  |
|         blank         | When you use more than one *PLACE, each one repeats all fields   |
|                       | preceding it regardless of whetherthe fields were repeated by    |
|                       | other *PLACE entries.                                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

Cross-Reference Listing (Column 52) 

This field lets you request a Cross-Reference listing during compilation.
(You can also request a Cross-Reference listing using the MAP option of
the $CONTROL compiler subsystem command.)

The HP RPG Programmer's Guide shows an example of a Cross-Reference
listing.  The Cross-Reference listing shows:

   *   The line numbers of the source lines that define each file name,
       field name, and indicator.

   *   The line numbers of source lines that reference each file name,
       field name, and indicator.

   *   The memory location and length of each field name.

   *   The kind of data (alphanumeric or numeric) that each field
       contains.

   *   The type and designation of each file.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 52       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           X           | Print a Cross-Reference listing.                                 |
|                       |                                                                  |
|         blank         | Do not print a Cross-Reference listing.                          |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

Carriage Control Type (Column 53) 

This field selects the method by which printer forms are advanced in
response to a skip request (see the Skip Field (columns 19-22) of the
Output Specification).  RPG determines whether a file is a printer file
by the use of vertical spacing controls, such as space and skip, in the
Output Specifications.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|       Column 53       |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           1           | **LINE OPTION** (Simulates other implementations of RPG)         |
|                       |                                                                  |
|                       | Skip requests use actual line numbers.  The initial forms        |
|                       | position is line 1.  Top-of-form is reached using a series of    |
|                       | line-feeds.  You can enter Line Counter Specifications to        |
|                       | override the default form length and overflow line.              |
|                       |                                                                  |
|           L           | **LINE OPTION** (HP implementation - line 6 is the first line)   |
|                       |                                                                  |
|                       | Skip requests use actual line numbers.  The initial forms        |
|                       | position is line 6.  Top-of-form is reached by a series of       |
|                       | line-feeds (including top-of-form for the first page when the    |
|                       | first page line number is less than 6).  You can enter Line      |
|                       | Counter Specifications to override the default form length and   |
|                       | overflow line.                                                   |
|                       |                                                                  |
|         blank         | **CHANNEL OPTION** (Logical channels)                            |
|                       |                                                                  |
|                       | Skip requests use logical carriage control channel numbers,      |
|                       | whose associated line numbers are defined in Line Counter        |
|                       | Specifications.  The initial forms position is Channel 1 (line   |
|                       | 6).  Top-of-form is reached by a formfeed to Channel 1.          |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

Table 3-7  shows how this field and the Line Counter Specifications
work together to accomplish forms control.

          Table 3-7.  Carriage Control Values 

-----------------------------------------------------------------------------------------------------
|                   |                   |                   |                   |                   |
|      Column       |    Top-of-form    |   Channels 2-12   |   Overflow Line   |   Forms Length    |
|        53         |  (Line Counter),  |                   |                   |                   |
|                   |                   |                   |                   |                   |
-----------------------------------------------------------------------------------------------------
|                   |                   |                   |                   |                   |
|         1         | Line 1            | Not used          | OL as defined in  | FL as defined in  |
|                   |                   |                   | Line Counter      | Line Counter      |
|                   |                   |                   | Specification     | Specification     |
|                   |                   |                   | (default is 60)   | (default is 66)   |
|                   |                   |                   |                   |                   |
|         L         | Line 6            | Not used          | OL as defined in  | FL as defined in  |
|                   |                   |                   | Line Counter      | Line Counter      |
|                   |                   |                   | Specification     | Specification     |
|                   |                   |                   | (default is 60)   | (default is 66)   |
|                   |                   |                   |                   |                   |
|       blank       | CHAN1 value as    | Channel values as | CHAN12 or OL as   | Not used          |
|                   | defined in the    | defined in the    | defined in the    |                   |
|                   | Line Counter      | Line Counter      | Line Counter      |                   |
|                   | Specification     | Specification     | Specification     |                   |
|                   | (default is 6)    | (default is       | (default is 60    |                   |
|                   |                   | channel number    |                   |                   |
|                   |                   | times 5)          |                   |                   |
|                   |                   |                   |                   |                   |
-----------------------------------------------------------------------------------------------------

Textfile Sequence Check (Column 54) 

This field is used for compatibility with RPG V. It lets you compile a
program, without errors, that contains an S or N in this field (S and N
are sequence-checking options).

Ensure that this field contains one of these RPG V values:

---------------------------------------------------------------------------------------------
|                   |                                                                       |
|     Column 54     |                              Description                              |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
|         S         | Sequence-check records in the text file using the sequence numbers in |
|                   | columns 1-5.  Print a message if a sequence error occurs.             |
|                   |                                                                       |
|    N or blank     | Do not sequence-check the text file.                                  |
|                   |                                                                       |
---------------------------------------------------------------------------------------------

Error Log (Column 55) 

This field lets you specify how RPG run-time errors are handled.  (RPG
run-time errors are listed in Appendix B.)

---------------------------------------------------------------------------------------------
|                   |                                                                       |
|     Column 55     |                              Description                              |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
|         N         | When an RPG run-time error occurs and a preselected response is       |
|                   | entered for it in the Error Response Field (columns 56-71), suppress  |
|                   | (do not write) the error message.                                     |
|                   |                                                                       |
|         S         | When an RPG run-time error occurs, write an error message to the      |
|                   | operator's console (job mode) or to the user's terminal (session      |
|                   | mode) and print an Error Dump (the HP RPG Programmer's Guide explains |
|                   | how to interpret Error Dumps).  Ignore the Error Response Field and   |
|                   | terminate the program.                                                |
|                   |                                                                       |
|       blank       | When an RPG run-time error occurs and a response is not entered for   |
|                   | it in the Error Response Field, display the error message on the      |
|                   | operator's console or on the user's terminal and let the operator or  |
|                   | user select a response.                                               |
|                   |                                                                       |
|                   | When an RPG run-time error occurs and a response is entered for it in |
|                   | the Error Response Field, redirect the error message to the standard  |
|                   | list device (the list device is normally a printer for job streams    |
|                   | and the user's terminal for sessions) and perform the chosen          |
|                   | response.                                                             |
|                   |                                                                       |
---------------------------------------------------------------------------------------------

Blank 

If an RPG run-time error occurs and you leave its corresponding position
blank in the Error Response Field (columns 56-71) the error message is
written to the operator's console or user's terminal.  The operator or
user must select one of the following actions:

   *   Continue processing.

   *   Skip the record or program statement causing the error and
       continue processing.

   *   Terminate the program.

To eliminate operator intervention when RPG run-time errors occur, enter
either N or S into this field, or if you leave it blank, enter a
pre-response for the error in the Error Response Field (columns 56-71).

Error Response (Columns 56-71) 

This field lets you enter responses to one or more RPG run-time errors.
The responses are executed automatically when the errors occur.  The
responses provide an alternative to operator intervention for the errors.
When you use this field, you must leave the Error Log Field (column 55)
blank or enter an N into it.

There are 17 possible RPG run-time errors.  They are listed in Appendix
B. To enter a pre-response to a specific RPG run-time error, choose a
response character listed below and place it in the column that
corresponds to the number of the RPG error.

--------------------------------------------------------------------------------------------
|                       |                                                                  |
|     Columns 56-71     |                           Description                            |
|                       |                                                                  |
--------------------------------------------------------------------------------------------
|                       |                                                                  |
|           0           | Redirect or suppress the error message (see the Error Log Field, |
|                       | column 55) and continue program execution.                       |
|                       |                                                                  |
|           1           | Redirect or suppress the error message, skip (bypass) the error  |
|                       | and continue execution.                                          |
|                       |                                                                  |
|           2           | Redirect or suppress the error message and terminate the program |
|                       | normall All control-level indicators (L1-L9 and LR) are turned   |
|                       | on, totals are calculated, tables are written, and all files are |
|                       | closed.                                                          |
|                       |                                                                  |
|           3           | Redirect or suppress the error message, close all files and      |
|                       | terminate the program immediately.  Do not turn on control-level |
|                       | indicators or calculate and write totals and table output.       |
|                       |                                                                  |
|           4           | Redirect or suppress the error message, print an Error Dump and  |
|                       | terminate the program.  Turn on all control-level indicators,    |
|                       | calculate and write totals and tables and close all files.       |
|                       |                                                                  |
|           5           | Redirect or suppress the error message, print an Error Dump and  |
|                       | terminate the program immediately.  Do not turn on control-level |
|                       | indicators or calculate and write totals and tables.             |
|                       |                                                                  |
|         blank         | Display the error message to the operator and let the operator   |
|                       | choose the error response.  (The Error Log Field, column 55,     |
|                       | must also be blank.)                                             |
|                       |                                                                  |
--------------------------------------------------------------------------------------------

Example 

The following Header Specification directs RPG to log the "divide by
zero" run-time error message to the standard list device, print an Error
Dump and terminate the program immediately.
___________________________________________________________________________________
|                                                                                 |
|                1         2         3         4         5         6         7    |
|            678901234567890123456789012345678901234567890123456789012345678901234|
|              _______________________________________________________            |
|                                                                                 |
|            H                                                           5        |
|                                                                                 |
|                                                                                 |
___________________________________________________________________________________

          Figure 3-6.  Entering an RPG Run-time Pre-Response 

Program Name (Columns 75-80) 

This field contains the program name.  The format of this field is
discussed in Chapter 2.



MPE/iX 5.0 Documentation