Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual Abstract This manual describes the SCREEN COBOL programming language, which Compaq NonStop™ Pathway/iTS application programmers use to write programs that communicate with operator terminals or intelligent devices and send data to users. Product Version Pathway/iTS 1.
Document History Part Number Product Version Published 127341 Pathway/TS D42 August 1996 136664 Pathway/TS D42+ October 1997 139453 Pathway/TS D42+ January 1998 426750-001 Pathway/iTS 1.0 October 2000 Ordering Information For manual ordering information: domestic U.S. customers, call 1-800-243-6886; international customers, contact your local sales representative. Document Disclaimer Information contained in a manual is subject to change without notice.
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual Index Examples Figures What’s New in This Manual ix Manual Information ix New and Changed Information ix About This Manual xi Who Should Read This Manual Related Documentation xi xi Your Comments Invited xii Notation Conventions xiii 1.
2. SCREEN COBOL Source Program (continued) Contents 2.
3. Identification Division Contents 3. Identification Division PROGRAM-ID Paragraph 3-1 DATE-COMPILED Paragraph 3-2 4. Environment Division Configuration Section 4-1 SOURCE-COMPUTER Paragraph OBJECT-COMPUTER Paragraph SPECIAL-NAMES Paragraph 4-2 4-2 4-6 Input-Output Section 4-10 5.
5. Data Division (continued) Contents 5. Data Division (continued) Message Description Entry (continued) Message Description Entry Usage 5-63 Clauses in Message Description Entry Special Registers 5-64 5-93 6. Procedure Division Division Structure 6-1 Declarative Procedures 6-2 Sections 6-2 Paragraphs 6-3 6-3 Sentences and Statements Procedures 6-4 Procedure Division Statements 6-4 7.
A. Advisory Messages Contents A. Advisory Messages Messages and Descriptions A-1 Modifying or Replacing the Advisory Message Routine A-4 B. Diagnostic Screens C. SCREEN COBOL Compiler Diagnostic Messages D. Errors for Message Section Statements E. SCREEN COBOL Reserved Words F. Data Type Correspondence and Return Value Sizes Index Examples Example A-1. ADVISORY^MESSAGE Source Listing A-6 Example B-1. DIAG^FORMAT Parameter for Diagnostic Message Generation Example B-2.
Tables Contents Tables Table 2-1. SCREEN COBOL Character Set 2-4 Table 2-2. Editing Characters 2-5 Table 2-3. Punctuation Characters 2-5 Table 2-4. Separators 2-6 Table 2-5. Figurative Constants 2-9 Table 2-6. Binary Arithmetic Operators 2-14 Table 2-7. Unary Arithmetic Operators Table 2-8. Digits Held for Intermediate Results Table 2-9. Logical Operators Table 2-10. Storage Occupied by COMPUTATIONAL Data Items Table 4-1. System Names for Function Keys Table 4-2.
Tables (continued) Contents Tables (continued) Table 6-6. TERMINATION-SUBSTATUS Values for SEND MESSAGE Statement 6-88 Table 6-7. Screen Field Selection Criteria in TURN Operation 6-104 Table 7-1. Compiler Option Commands 7-6 Table 7-2. Compiler Cross-Reference Commands Table 7-3. Compiler Toggle Commands 7-7 Table F-1. Integer Types, Part 1 F-1 Table F-2. Integer Types, Part 2 F-2 Table F-3. Floating, Fixed, and Complex Types Table F-4. Character Types Table F-5.
Contents Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001 viii
What’s New in This Manual Manual Information Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual Abstract This manual describes the SCREEN COBOL programming language, which Compaq NonStop™ Pathway/iTS application programmers use to write programs that communicate with operator terminals or intelligent devices and send data to users. Product Version Pathway/iTS 1.
What’s New in This Manual • Corrections and Enhancements to the Manual Filtering of 3161 timeout error messages when the ON ERROR clause is used with a SEND MESSAGE statement, as described under TIMEOUT timeout-value on page 6-82 in the description of the SEND MESSAGE statement.
About This Manual This manual describes the SCREEN COBOL programming language. This language is used for writing programs that define and control terminal displays or intelligent devices for online transaction processing applications running in a PATHMON environment. Who Should Read This Manual This manual is for programmers who are responsible for developing SCREEN COBOL programs to define and control terminal displays or intelligent devices in a PATHMON environment.
About This Manual Your Comments Invited Your Comments Invited After using this manual, please take a moment to send us your comments. You can do this by returning a Reader Comment Card or by sending an Internet mail message. A Reader Comment Card is located at the back of printed manuals and as a separate file on the Compaq CD Read disc. You can either FAX or mail the card to us. The FAX number and mailing address are provided on the card.
About This Manual Notation Conventions Notation Conventions General Syntax Notation The following list summarizes the notation conventions for syntax presentation in this manual. UPPERCASE LETTERS. Uppercase letters indicate keywords and reserved words; enter these items exactly as shown. Items not enclosed in brackets are required. For example: MAXATTACH lowercase italic letters. Lowercase italic letters indicate variable items that you supply. Items not enclosed in brackets are required.
About This Manual Notation for Messages An ellipsis immediately following a single syntax item indicates that you can repeat that syntax item any number of times. For example: "s-char..." Punctuation. Parentheses, commas, semicolons, and other symbols not previously described must be entered as shown. For example: error := NEXTFILENAME ( file-name ) ; LISTOPENS SU $process-name.
1 Introduction to SCREEN COBOL SCREEN COBOL is a component of the Compaq NonStop™ Pathway/iTS transaction processing software. Together, Pathway/iTS and the underlying NonStop™ Transaction Services/MP (TS/MP) product supply the programs and operating environment required for developing online transaction processing applications.
Pathway Environment Overview Introduction to SCREEN COBOL Figure 1-1. Operations Performed by SCREEN COBOL Programs DISPLAY forms ACCEPT data SEND message to server Receive reply DISPLAY data CDT 001.CDD Pathway Environment Overview To give you an overview of the Pathway transaction processing environment, the various components of this environment are described below, including how each component affects SCREEN COBOL programs.
Introduction to SCREEN COBOL Pathway System Components Pathway Monitor (PATHMON) Process The PATHMON process is the central control process for a Pathway environment. The PATHMON process maintains information about the objects (terminals, TCPs, servers) in a PATHMON environment and controls the objects.
Introduction to SCREEN COBOL Pathway System Components Message Section defines the messages sent to, and replies received from, an intelligent device (or the process that controls it). SCREEN COBOL verbs allow you to display and accept terminal screen data and to communicate with intelligent devices. SCREEN COBOL source code is not compiled into machine-language instructions. The source code is compiled into object code called pseudocode.
Pathway System Components Introduction to SCREEN COBOL Figure 1-2. Multiple Terminal Control Through the TCP TCP SCREEN COBOL Library CDT 002.CDD In a Pathway environment, the TCP executing SCREEN COBOL code at a terminal constitutes a requester process. However, in this manual, discussions of requester-server functions refer to a SCREEN COBOL program unit as a requester program. Requesters Requesters usually provide presentation services for terminal devices and communicate with server processes.
Pathway System Components Introduction to SCREEN COBOL A server is configured to be a member of a particular server class. The server class itself has specific characteristics that are defined within the PATHMON configuration. Individual servers within a server class use copies of the same server program code and separate data areas; the PATHMON process creates new servers from a single server program according to the configuration instructions.
Introduction to SCREEN COBOL Communication Between Processes Inspect Inspect is an interactive symbolic program-debugging tool that you can use to examine and modify SCREEN COBOL programs. Inspect runs as a separate process that communicates through the TCP with the SCREEN COBOL program running on a Pathway/iTS terminal. By issuing commands to Inspect, you can control and modify an executing program. Before you can use Inspect, the PATHMON environment must be configured for communication with Inspect.
Developing Programs With System Tools Introduction to SCREEN COBOL Figure 1-4. Communication Between Processes in a PATHMON Environment Pathway Processes PATHCOM PATHMON SCREEN TCP COBOL Library Server Class Server Database CDT 004.CDD Developing Programs With System Tools Compaq provides tools to develop source code and to generate and manage the object files. Object code is generated with the SCREEN COBOL compiler.
Generating Object Files With the Compiler Introduction to SCREEN COBOL To execute a SCREEN COBOL program, the directory and code files must be available to the TCP. The symbol-table file is required when INSPECT is used for program debugging. In addition to generating object code, the compiler builds a SCREEN COBOL library. Each time the compiler successfully compiles a source program, the compiler adds the new version of the object file to the previously compiled versions.
Managing Object Files With SCUP Introduction to SCREEN COBOL Managing Object Files With SCUP The SCUP utility provides functions for managing SCREEN COBOL object files, as shown in Figure 1-6.
Designing Program Logic Introduction to SCREEN COBOL For further information about SCUP and how to use it, refer to the Compaq NonStop™ Pathway/iTS SCUP Reference Manual. Designing Program Logic Designing a transaction processing application involves designing SCREEN COBOL requester programs and servers and partitioning the workload between them. Typical design practices are discussed in the following paragraphs.
Introduction to SCREEN COBOL General Rules for Program Design The chain organization consists of a series of programs. In the chain, the terminal operator's selections can call PROG-B from PROG-A and PROG-C from PROG-B. General Rules for Program Design The list that follows presents some general guidelines that are helpful when designing standard (screen-oriented) SCREEN COBOL requester programs.
2 SCREEN COBOL Source Program SCREEN COBOL programs handle processing operations which control display terminals, communicate with external processes that control intelligent devices, and communicate with other devices or processes in a Pathway environment.
SCREEN COBOL Source Program Block Mode Program Block Mode Program To execute in block mode, a SCREEN COBOL program must be communicating with a block mode terminal. The screen definitions for any SCREEN COBOL program are restricted by the characteristics of the specific type of terminal on which your program runs.
SCREEN COBOL Source Program Program Organization In intelligent mode, a SCREEN COBOL program can: • • • • Send data directly from Working-Storage to the intelligent device Receive a reply from the intelligent device and move it directly to Working-Storage Map data from Working-Storage into a message entry in the Message Section Request the intelligent device to return a reply as a message entry in the Message Section Program Organization A SCREEN COBOL program is organized into four divisions that must
SCREEN COBOL Character Set SCREEN COBOL Source Program SCREEN COBOL Character Set The SCREEN COBOL character set is a subset of the ASCII character set and consists of 52 characters. Table 2-1 lists these characters. Table 2-1. SCREEN COBOL Character Set 0-9 Digits , Comma A-Z Letters ; Semicolon Space (blank) .
Editing Characters SCREEN COBOL Source Program • Alphanumeric characters include any character in this set. Note. Double-byte character sets are supported only on certain devices. See your service provider for a list of devices that support double-byte character sets. Editing Characters Editing characters are symbols that can be used in PICTURE clauses to format screen data. Table 2-2 lists the editing characters. Table 2-2.
SCREEN COBOL Source Program Separators Separators Separators are strings of one or more punctuation characters; they can have leading or trailing blanks. Table 2-4 lists and defines the separators. Table 2-4. Separators , ; . A comma, semicolon, or period immediately followed by a space is a separator. A period can appear as a separator only when it terminates headers, entries, and sentences as defined by the syntax. A comma or semicolon that is a separator is treated as a space.
SCREEN COBOL Source Program Literals User-Defined Words A user-defined word can consist of any of the following characters: • • • The letters A through Z The digits 0 through 9 Hyphen (-) A user-defined word must begin with a letter of the alphabet, must not begin or end with a hyphen, and must not contain embedded spaces. User-defined words are used for the following types of items: • • • • • • • Procedure name Data name Mnemonic name Condition-name Program name Library name Text name Note.
SCREEN COBOL Source Program • Literals A numeric literal can have one decimal point, which can appear anywhere within the literal except as the last character. The absence of a decimal point indicates that the literal is an integer. The following examples illustrate numeric literals: • Integer numeric literals: +601 -234116 0 15 • Noninteger numeric literals: +601.1 89.6 0.0051 -.1 Nonnumeric Literals A nonnumeric literal is any ASCII character string enclosed in quotation marks.
SCREEN COBOL Source Program Literals Figurative Constants A figurative constant is a constant that has been prenamed and predefined for the SCREEN COBOL compiler so that it can be written in the source program without having to be defined in the Data Division. Figurative constants do not require quotation marks. Table 2-5 lists and defines the figurative constants. The singular and plural forms of the various figurative constants are equivalent in meaning. Table 2-5.
SCREEN COBOL Source Program Mixed Data Items Mixed Data Items Both 1-byte and 2-byte (double-byte) characters can coexist in data items declared as PIC X(n), where n is an integer from 1 through 32,000. Such data items are called mixed data items. You must be aware when manipulating a mixed data item that double-byte characters require two bytes of storage. Note.
Tandem Standard Reference Format SCREEN COBOL Source Program Tandem Standard Reference Format Lines in Tandem standard reference format are not fixed length; they can have up to 132 characters. Lines longer than 132 characters are truncated; trailing blanks are ignored. For each line, Margin R is set to follow the last nonblank character in the line, regardless of the Margin R location in any previous line. Trailing blanks from a previous line and initial blanks on a continuation line are ignored.
Comment Lines SCREEN COBOL Source Program The positions following Margin R (73 through 80) represent the identification field. Their contents, which can include any ASCII character, are treated as a comment, and have no effect on the meaning of the program. Figure 2-2 shows the ANSI standard reference format. Figure 2-2. ANSI Standard Reference Format Margin R 1 2 3 4 Sequence Number Area 5 6 7 Indicator Field 8 9 10 11 12 Area A 13 Area B ... 72 73 ...
SCREEN COBOL Source Program Continuation Lines Continuation Lines Any word or literal in a SCREEN COBOL program can be continued. Continuation lines are indicated by the hyphen character in the indicator field. If the previous line has a nonnumeric literal without a closing quotation mark, the first nonblank character in Area B of the continuation line must be a quotation mark. The continuation begins with the character immediately following that quotation mark.
SCREEN COBOL Source Program Arithmetic Operators Data items and literals appearing in an arithmetic expression must be either numeric elementary items or numeric literals on which arithmetic operations can be performed. Any arithmetic expression can be preceded by a plus or minus sign. Arithmetic Operators Five binary arithmetic operators and two unary arithmetic operators are used in arithmetic expressions.
SCREEN COBOL Source Program Evaluation of Expressions Evaluation of Expressions Parentheses can be used to specify the order in which the operations of an arithmetic expression are performed. Expressions within parentheses are evaluated first. Evaluation of expressions within nested parentheses proceeds from the innermost set to the outermost set. When parentheses are not used, or expressions in parentheses are at the same level, the order of execution is as follows: 1. Unary plus and minus 2.
SCREEN COBOL Source Program Evaluation of Expressions is equivalent to: ADD ADD ADD ADD a, b, c temp TO temp TO temp TO GIVING temp c d(c) e where temp is the temporary storage location. Intermediate Results Intermediate results are maintained by SCREEN COBOL during the evaluation of arithmetic expressions. The maximum number of digits held for an intermediate result is 18. If this limit is exceeded, arithmetic overflow occurs.
SCREEN COBOL Source Program Evaluation of Expressions The three examples that follow illustrate the division operation. Example 1 A normal divide computation proceeds as follows: 03 A1 PIC S9(9)V9(9) VALUE 2. 03 A2 PIC S9(9)V9(8) VALUE 3. 03 AR PIC SV9(9). : DIVIDE A1 BY A2 GIVING AR. where: ____________ 3.00000000 | 2.000000000 is computed as: 000000000.666666666 000000003.00000000 | 2.00000000000000000 then moved to AR as: .666666666 Example 2 Here is a second example: 03 A1 PIC S9(2)V9(9) VALUE 2.
SCREEN COBOL Source Program Conditional Expressions Example 3 In the following example, with either of the following: COMPUTE AX = A1/A2 + A3 * A4. IF A1/A2 + A3 * A4 LESS THAN AX GO TO ... the division is performed before further evaluation of either of the above statements. The intermediate result is then adjusted to fit the conceptual PICTURE derived by examining the other operands in the expression.
SCREEN COBOL Source Program Simple Conditions Class Condition The class condition determines whether a DISPLAY item value is numeric or alphabetic. Class condition syntax is: data-name [ IS ] [ NOT ] { NUMERIC } { ALPHABETIC } When NOT is included, the test condition is reversed. NOT NUMERIC tests for a field being nonnumeric; NOT ALPHABETIC tests for a field being nonalphabetic. The NUMERIC test cannot be used with an item described as alphabetic.
Simple Conditions SCREEN COBOL Source Program Relation Condition A relation condition causes a comparison of two values. Each value can be a data item, a literal, or a value resulting from an arithmetic computation; both values cannot be literals. A relation condition has a truth value of true if the relation exists between the values.
SCREEN COBOL Source Program Complex Conditions data item of the same size as the numeric data item; the content of this alphanumeric data item is then compared to the nonnumeric operand. • If the nonnumeric operand is a group item, the numeric operand is treated as though it were moved to a group item of the same size as the numeric data item; the content of this group item is then compared to the nonnumeric operand.
SCREEN COBOL Source Program Complex Conditions Table 2-9. Logical Operators AND Logical conjunction—The truth value is true if both conditions are true, and false if one or both are false. OR Logical inclusive OR—The truth value is true if one or both of the conditions is true, and false if both conditions are false. NOT Logical negation or reversal of truth value—The value is true if the condition is false and false if the condition is true.
Condition Evaluation Rules SCREEN COBOL Source Program to the next relation. The following examples illustrate abbreviated combined relation conditions and their expanded equivalents.
SCREEN COBOL Source Program Tables Tables Tables of data are common in data processing problems. For example, a data structure might have 20 total fields, described as twenty identical data items named total-one, total-two, ..., total-twenty. This would mean twenty different names, which could obscure the interrelated nature of the totals and make references awkward. A table structure simplifies this situation. Tables are defined with an OCCURS clause in their data description.
SCREEN COBOL Source Program Data Reference individual names, a reference to an occurrence must give its position number along with the data name of the table. The method of giving the position number, called subscripting, is described later in this section. Data Reference All items must be named so they can be referenced. Items given unique names can be referenced with no difficulty, but many programs contain items that do not have unique names. All elements of a table, for example, share a single name.
Subscripting SCREEN COBOL Source Program The qualification rules are as follows: • • • • • • • Each qualifier must be at a higher level than the previous one and must stay within the same structure of the name it qualifies. The same name cannot appear at different levels in a structure; otherwise, the name could qualify itself.
SCREEN COBOL Source Program Subscripting The subscript, or set of subscripts, is enclosed in parentheses and is appended to the element name of the table. When more than one subscript is required, they are written in the order of most significant value to least significant value. Subscript syntax is: { data-name } ( sub-1 [ , sub-2 [ , sub-3 ] ] ) { condition-name } Note that a multiple-subscripted data item must have a space character preceding all subscripts except the first.
Using Identifiers SCREEN COBOL Source Program Using Identifiers An identifier is a data name made unique by qualifiers, subscripts, or qualifiers and subscripts. A data name being used as a subscript or qualifier cannot itself be subscripted. Identifier syntax is: data-name-1 [ { OF } data-name-2 ] ...
Data Representation SCREEN COBOL Source Program Data Representation In the Working-Storage Section and Linkage Section, data items are stored in a certain number of bytes; each byte is an 8-bit unit of storage. Bytes are grouped in pairs to form words. Data items whose usage (as defined by a USAGE clause) is DISPLAY occupy one byte per character. Table 2-10 indicates the storage occupied by data items whose usage is COMPUTATIONAL. Table 2-10.
SCREEN COBOL Source Program Optional Alignment Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001 2- 30
3 Identification Division The Identification Division identifies the SCREEN COBOL program. The division has one required paragraph and five optional paragraphs. If other paragraphs are present, they are treated as comments. The format of the Identification Division is: IDENTIFICATION DIVISION. PROGRAM-ID. program-unit-name. [ AUTHOR. [ comment-entry ] ] [ INSTALLATION. [ comment-entry ] ] [ DATE-WRITTEN. [ comment-entry ] ] [ DATE-COMPILED. [ comment-entry ] ] [ SECURITY.
Identification Division DATE-COMPILED Paragraph DATE-COMPILED Paragraph The optional DATE-COMPILED paragraph causes the compiler to generate the current date and time and insert it in the corresponding line of the source listing. The syntax of the DATE-COMPILED paragraph is: DATE-COMPILED. [ comment-entry ] comment-entry is any combination of characters from the SCREEN COBOL character set.
4 Environment Division The Environment Division declares the operating environment of the program unit and provides optional error reporting for screen input operations. The division has two sections: • • A required Configuration Section An optional Input-Output Section The syntax of the Environment Division is: ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. comment-entry OBJECT-COMPUTER. object-computer-entry [ SPECIAL-NAMES. special-names-entry ] [ INPUT-OUTPUT SECTION.
SOURCE-COMPUTER Paragraph Environment Division SOURCE-COMPUTER Paragraph The required SOURCE-COMPUTER paragraph names the computer system by which the program unit is compiled. The SCREEN COBOL compiler assumes the system is a Compaq NonStop™ Himalaya system and treats any name given as a comment. The SOURCE-COMPUTER paragraph syntax is: SOURCE-COMPUTER. comment-entry. comment-entry is one or more words and cannot consist of blank or null characters.
Environment Division OBJECT-COMPUTER Paragraph communicates with an intelligent device. If the TERMINAL IS clause is omitted, the program is assumed to be a screen-oriented requester program operating in block mode; the requester program can run on any of the block mode terminal types listed for a screen-oriented requester program. However, features unique to a particular terminal cannot be used if the TERMINAL IS clause is omitted.
Environment Division OBJECT-COMPUTER Paragraph INTELLIGENT-2 specifies block mode. WRITEREAD I/O protocol: write to a device and wait for a reply in block mode. INTELLIGENT specifies that the PATHCOM SET TERM TYPE parameter determines conversational or block mode. If INTELLIGENT is specified but no PATHCOM SET TERM TYPE parameter is specified, the default is conversational mode.
OBJECT-COMPUTER Paragraph Environment Division executed. After the first DISPLAY BASE, the character set specified in the terminal's configuration menu is used. KANJI-KATAKANA indicates that the program unit source file might contain double-byte characters in data fields or literals and instructs the compiler to allow the PIC N picture clause.
Environment Division • • SPECIAL-NAMES Paragraph Field-characteristic clause MUST BE—Range tests are not supported for national use characters. Tests that involve collating sequence matters—Any comparison tests, such as lessthan or greater-than relations, are not supported for national-use characters. SPECIAL-NAMES Paragraph The optional SPECIAL-NAMES paragraph allows you to select names and to have those names assigned to certain system names.
SPECIAL-NAMES Paragraph Environment Division Table 4-1.
SPECIAL-NAMES Paragraph Environment Division Table 4-2.
SPECIAL-NAMES Paragraph Environment Division Table 4-2. System Names for Display Attributes (page 2 of 2) System Name 6510 6520 6530/6540 3270 NOLEFTLINE x [D] RIGHTLINE x NORIGHTLINE BOTTOMLINE x [D] (5) x NOBOTTOMLINE x [D] BOXFIELD x 1. 2. 3. 4. 5. CONVERSATIONAL (4) x in the cells above indicates that the system name is valid for the particular terminal type. [D] refers to the default display attribute value for the particular terminal type.
Environment Division Input-Output Section NUMERIC-SHIFT PROTECTED • • You can combine one of the following highlight display attributes with one or more of the other highlight display attributes (that is, BRIGHT, HIDDEN, MDTON, NUMERIC-SHIFT, or PROTECTED). If a 3270 terminal supports the following outline display attributes, you can combine them with one another and with any highlight display attribute (that is, with BRIGHT, HIDDEN, MDTON, NUMERIC-SHIFT, PROTECTED, BLINK, REVERSE, or UNDERLINE.
Environment Division Input-Output Section IBM 3270 terminal. If this clause is omitted for terminals in conversational mode, no error enhancement occurs. For error enhancement, BELL must be specified. IN FIRST enhances the first field that is found to be in error. For terminals operating in conversational mode, IN FIRST is the only recognized enhancement option. IN ALL enhances all fields that are found to be in error. If IN ALL is not specified, only the first field containing an error is enhanced.
Environment Division Input-Output Section Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001 4- 12
5 Data Division The Data Division describes the data the program creates, accepts as input, manipulates, or produces as output. The Data Division has four sections: • • • • A Working-Storage Section A Linkage Section A Screen Section A Message Section Each section is optional and is included only when the type of data the section defines is used in the program.
Data Division Data Division Sections Data Division Sections The four sections of the Data Division each describe a different type of data. The sections are defined as follows: • • • • The Working-Storage Section describes the structure of local data developed within the program. Data entries in this section are initialized each time the program unit is called; therefore, values are not retained between calls.
Linkage Section Data Division An 01 level data item can have a maximum size of 32,000 bytes and can comprise elementary and/or group items. For example: WORKING-STORAGE SECTION. 01 BIG-01-ITEM 01 BIG-GROUP-ITEM-1. 03 BIG-GROUP. 01 BIG-GROUP-ITEM-2. 03 BIG-GROUP. 05 BIG-ITEM-2-A. 05 BIG-ITEM-2-B. 01 BIG-ELEMENTARY-ITEM-01. 03 BIG-ELEMENTARY-GROUP. 05 BIG-ELEMENTARY-ITEM PIC X(32000) VALUE SPACES. PIC X(16000) VALUE SPACES. PIC X(16000) VALUE SPACES. PIC X(16000) VALUE SPACES. PIC X(32000) VALUE SPACES.
Screen Section Data Division An 01 level data item can have a maximum size of 32,000 bytes and can comprise elementary and/or group items. For example: LINKAGE SECTION. 01 BIG-01-ITEM 01 BIG-GROUP-ITEM-1. 03 BIG-GROUP. 01 BIG-GROUP-ITEM-2. 03 BIG-GROUP. 05 BIG-ITEM-2-A. 05 BIG-ITEM-2-B. 01 BIG-ELEMENTARY-ITEM-01. 03 BIG-ELEMENTARY-GROUP. 05 BIG-ELEMENTARY-ITEM PIC X(32000). PIC X(16000). PIC X(16000). PIC X(16000). PIC X(32000). Note.
Level Numbers 01-49 Data Division Sets of elementary items can be referred to by combining them into groups. Groups, in turn, can be combined into groups; an elementary item, therefore, can belong to more than one group. Level Numbers 01-49 Level numbers 01 through 49 describe the hierarchy of data items. The structure itself is assigned level number 01. The system of level numbers shows the relationship of elementary items to group items.
Data Division • Data Description Entry Level 88 defines a condition name, including a value or range of values that define the condition to be tested. Data Description Entry A data description entry defines the characteristics of a data item. The entry can be used in the Working-Storage Section or Linkage Section of the SCREEN COBOL program. When the program unit is compiled, numeric elementary data items in the WorkingStorage Section that do not include an OCCURS clause are initialized to zero.
Data Description Entry Data Division • Format 1 describes data of levels 01 through 49 and level 77. The data-name-1 entry is the name of the storage area defined by the subordinate items. In the following example, store-address refers to everything from street through zip-code. 01 sample-record. 05 store-id. 10 store-number 10 store-region 05 store-manager 05 store-address. 10 street 10 city 10 state 10 zip-code 05 FILLER PIC 999. PIC X. PIC X(35). PIC PIC PIC PIC PIC X(25). X(15). X(2). 9(5). X(14).
JUSTIFIED Clause Data Division JUSTIFIED Clause The JUSTIFIED clause causes nonstandard positioning of data within a receiving item. The clause can only appear in the data description of an elementary item; the clause cannot be used for a data item that is described as numeric. { JUST } RIGHT { JUSTIFIED } When the JUSTIFIED clause is omitted, standard alignment rules dictate that alignment is left justified and truncation or padding, when necessary, occurs on the right.
OCCURS Clause Data Division Format 1 (for Fixed Length Tables) is: OCCURS max [ TIMES ] max is an integer that represents the number of elements in the table. Format 2 (for Variable Length Tables) is: OCCURS min TO max [ TIMES ] DEPENDING [ ON ] depend min is an integer that represents the smallest number of elements in the table at any time. The integer must be zero or greater and less than or equal to max.
Data Division PICTURE Clause Data items subordinate to an entry described with an OCCURS clause can themselves contain an OCCURS clause. Tables can consist of such multiple occurrences of subordinate tables for a maximum of three levels.
PICTURE Clause Data Division Table 5-1. Data Description Entry PICTURE Character-String Symbols Symbol Meaning A Represents a character position for a letter of the alphabet or a space character. The symbol is counted in the size of the data item. N Represents a double-byte character and is valid only in program units that specify the KANJI-KATAKANA keyword in the CHARACTER-SET IS clause of the OBJECT-COMPUTER paragraph in the Environment Division. The symbol is counted in the size of the data item.
PICTURE Clause Data Division In the discussion that follows, 9 and A symbols within the PICTURE string are described as representing character positions that have only numbers or letters and spaces. For reasons of efficiency, the SCREEN COBOL compiler does not always require this restriction. Characters other than those permitted can be moved into these positions if they appear in the corresponding group positions of a sending data item. SCREEN COBOL considers every group item to be alphanumeric.
REDEFINES Clause Data Division If a VALUE clause is declared for a PIC N Working-Storage Section field, the value can consist only of characters from the Shift-JIS character set (X 0208) enclosed in quotation marks (""). You can use the THRU/THROUGH clause with level 88 data items associated with double-byte character set literals. Byte-by-byte comparisons of all items in the THRU/THROUGH clause are performed. Double-byte character set data used in the THRU/THROUGH clause is treated as a byte string.
RENAMES Clause Data Division • You can use a REDEFINES clause to redefine a PIC N field, which allows only double-byte data, as an alphanumeric PIC X field. Doing so makes it possible to move double-byte data items to alphanumeric data items. For example: WORKING-STORAGE SECTION. : 01 WS-KANJI-ONLY-FIELD 01 WS-KANJI-TO-PIC-X-REDEF PIC N(10) REDEFINES WS-KANJI-ONLY FIELD PIC X(20) The REDEFINES clause redefines a storage area, not the data items occupying the area.
RENAMES Clause Data Division The RENAMES clause merely renames a group of existing data items and does not redescribe any of their characteristics; therefore, no other clauses can be used. One or more RENAMES entries can be written for a structure; these entries can occur in any order, but must immediately follow the last data description entry of the structure. When the THROUGH option is not specified, new-name merely renames old-name. new-name is a group item only if old-name is a group item.
SIGN Clause Data Division SIGN Clause The SIGN clause specifies the position and mode of an operational sign for a numeric data item. The clause can only be used for items that are described as DISPLAY in a USAGE clause and have an S symbol in the PICTURE string. SIGN [ IS ] { LEADING } [ SEPARATE [ CHARACTER ] ] { TRAILING } LEADING indicates the sign is at the beginning of the item. TRAILING indicates the sign is at the end of the item.
Data Division • • • • • SYNCHRONIZED Clause DISPLAY items are composed of one or more character positions and are stored as an equal number of 8-bit bytes. The byte boundary is their natural storage boundary; therefore, the SYNCHRONIZED clause has no effect on DISPLAY item alignment. COMPUTATIONAL items are stored as an even multiple of bytes. Their most natural storage unit is some multiple of the 16-bit computer word; each of these words contains two bytes.
SYNCHRONIZED Clause Data Division ° When the aligned item (or table of aligned items) belongs to a higher-level table, further adjustment might be necessary. If the elementary item is word-aligned and the containing group occurrence consists of an odd number of character positions, the compiler inserts one byte of FILLER data after each group occurrence.
USAGE Clause Data Division USAGE Clause The USAGE clause defines how a data item is stored within the Compaq NonStop™ Himalaya system and, normally, affects the number of character positions used. The USAGE clause does not restrict how the item is used; however, some statements in the Procedure Division require certain usages for their operands. [ USAGE [ IS ] ] { COMP } { COMPUTATIONAL } { DISPLAY } COMP or COMPUTATIONAL indicates a numeric data item that is suitable for computations.
VALUE Clause Data Division VALUE Clause A VALUE clause specifies the initial value of a Working-Storage item or the value of a level 88 condition name. Format 1 (Data Initialization) is: VALUE [ IS ] literal literal is the initial value to be assigned to a data item. The value can be a figurative constant. Format 2 (Condition Name Entries) is: 88 condition-name , { VALUE [ IS ] } { VALUES [ ARE ] } { value-1 [ { THROUGH } value-2 ] } , ...
VALUE Clause Data Division • The VALUE clause is not permitted in a data description entry that meets the following criteria: ° The entry contains an OCCURS or REDEFINES clause. ° The entry is subordinate to an entry containing an OCCURS or REDEFINES clause. • ° The entry has a variable size due to an OCCURS clause in a subordinate entry. If the VALUE clause is used for initialization at the group level, the literal must be a figurative constant or a nonnumeric literal.
Screen Description Entry Data Division The following example illustrates single values for condition-names: 05 return-code PIC 99. 88 end-of-file 88 error-on-read 88 permanent-error 88 error-on-write VALUE VALUE VALUE VALUE 01. 02. 03. 04. } } } } where return-code is is the condition variable and end-of-file, error-on-read, permanent-error, and error-on-write are condition-names. A statement using one of these condition-names might look like this: IF end-of-file, PERFORM end-up-routine.
Screen Description Entry Data Division The syntax for screen description entries is: SCREEN SECTION. 01 base-screen-name [ BASE ] [ SIZE clause ] [ input-control-character clauses ] [ field-characteristic clauses ] ... . { screen group } ... { screen field } [ screen overlay area ] [ 01 overlay-screen-name OVERLAY SIZE clause [ [ [ field-characteristic clauses ] ... . [ [ { screen group } ... [ { screen field } ] ] ] ] ] ] Level 01 introduces a screen description entry.
Base Screen Data Division Base Screen A base screen is a screen that is initially displayed on the terminal and is used to establish the current screen for each program unit. In contrast to an overlay screen that is displayed in the overlay area of a base screen, the base screen can be displayed independently. 01 screen-name [ BASE ] [ SIZE lines , cols ] [ field-characteristic-clause ] ... screen-name is the name given to the base screen. SIZE lines, cols indicates the size of the screen.
Overlay Screen Data Division AREA AT line, col specifies the position of the upper left-hand corner of the area relative to the boundaries of the screen. SIZE lines, cols determines the number of lines and columns included in the area. The entire area must lie within the boundaries of the base screen, and no fields can overlap the area. For T16-6510 terminals, the cols value must be the same as the number of columns declared for the base screen.
Data Division Screen Group Screen Group A screen group is a combination of fields that are grouped together to provide collective references to the subordinate fields and to define the common characteristics of the fields. A screen group can contain subordinate groups. level-num { group-name } [ [ AT ] line, column ] { FILLER } [ field-characteristic clause ] ... { screen-field } ... { screen-group } level-num is a numeric literal that indicates the hierarchy.
Data Division Screen Field Screen Field A screen field is a single elementary item. level-num { field-name } { FILLER } [ field-characteristic-clause ] ... . level-num is a numeric literal within the range of 2 through 49 that indicates the hierarchy. field-name is the name given to the field. FILLER is a keyword that takes the place of field-name. FILLER must be used for a literal field. field-characteristic-clause is one or more clauses that define a characteristic of the field.
Screen Field Data Division Table 5-3.
Input-Control Character Clauses Data Division Input-Control Character Clauses Input-Control character clauses are for terminals operating in conversational mode.
Input-Control Character Clauses Data Division END-OF-INPUT RESTART-INPUT (1) Documents the default field-separator character. (2) Defines the keyboard abort-input characters as AI. (3) Defines the keyboard end-of-input characters as @@ (ASCII code 64 represents @). (4) Defines the keyboard restart-input character as 2. 64, 64 "2" . (3) (4) The input-control character clauses are described in alphabetic order in the following paragraphs.
Data Division Input-Control Character Clauses END-OF-INPUT Clause The END-OF-INPUT clause defines the characters used to indicate the end of the last input field for the current ACCEPT statement. The END-OF-INPUT clause is recognized only by terminals operating in conversational mode. END-OF-INPUT [ IS ] { "nonnumeric-literal" } { numeric-literal [, numeric-literal ] } { OFF } "nonnumeric-literal" is one or two alphanumeric characters enclosed in quotation marks. numeric-literal is one or two integers.
Input-Control Character Clauses Data Division If a process is responding in place of a terminal, SCREEN COBOL interprets the 8-bit pattern as a nonkeyboard character. OFF specifies that FIELD-SEPARATOR is not available for the current screen. If this clause is omitted, the field-separator character is a comma (,). If used, the FIELD-SEPARATOR clause must be specified at the 01 screen level. The character defined for FIELD-SEPARATOR cannot be specified for another inputcontrol character.
Data Division Field-Characteristic Clauses RESTART-INPUT Clause The RESTART-INPUT clause defines the characters used to restart input processing during the current ACCEPT statement. The RESTART-INPUT clause is recognized only by terminals operating in conversational mode. RESTART-INPUT [ IS ] { "nonnumeric-literal" } { numeric-literal [,numeric-literal] } { OFF } "nonnumeric-literal" is one or two alphanumeric characters enclosed in quotation marks. numeric-literal is one or two integers.
Field-Characteristic Clauses Data Division level-num { field-name } { [ AT ] line-spec, column-spec } { FILLER } { REDEFINES field-name-2 } [ ADVISORY ] [ CONTROLLED [ BY ] data-name-1 ] [ CONVERT BLANKS ] [ FILL nonnumeric-literal ] [ LENGTH [ MUST BE ] ] [ ] [ { literal-1 [ { THROUGH } literal-2 ] } ... ] [ { [ { THRU } ] } ] [ mnemonic-name ] ... [ MUST [BE] { literal-1 [ { THROUGH } literal-2 ] } ...
Data Division Field-Characteristic Clauses [ WHEN { ABSENT } { CLEAR } ] [ { BLANK } { SKIP } ] [ [ WHEN ] FULL { TAB } ] [ { LOCK } ] ADVISORY Clause The ADVISORY clause identifies a single output or input-output field as the field to be used for informational and error messages generated by the TCP. ADVISORY Every base screen should have an advisory field. The field should be alphanumeric with a size of at least 35 characters. Error messages that appear in this field are described in Appendix A.
Field-Characteristic Clauses Data Division @ [ { + | - } numeric-literal ] This form represents a location relative to the home position of the group containing the field declaration. The home position is the first data character of the field and is specified for the group with the AT clause. Either the AT clause or the REDEFINES clause must be included in every screen field declaration. If both clauses appear in the screen field declaration, they must refer to exactly the same position.
Field-Characteristic Clauses Data Division A Data Item Controlling... Must Have an attrib-ID of... Field Attributes 1 through 14, as follows: 1 = Bright 2 = Hidden 3 = Mdton 4 = Numeric-shift 5 = Protected 6 = Blink 7 = Reverse 8 = Underline 9 = Bell 10 = Topline 11 = Leftline 12 = Rightline 13 = Bottomline 14 = Boxfield Color Attributes (COLOR-ID) 15 = Color Field Attribute 16 = SOSI-DISABLED With These Values...
Field-Characteristic Clauses Data Division Table 5-4. Effect of CONTROLLED Clause on Screen Field Display Attribute TURN, DISPLAY BASE, and DISPLAY OVERLAY Operations Change Screen Field Display Attributes at...
Field-Characteristic Clauses Data Division 77 77 77 77 77 77 77 77 77 77 BLINK-ID REVERSE-ID UNDERLINE-ID BELL-ID TOPLINE-ID LEFTLINE-ID RIGHTLINE-ID BOTTOMLINE-ID BOXFIELD-ID COLOR-ID VALUE VALUE VALUE VALUE VALUE VALUE VALUE VALUE VALUE VALUE 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 77 MAX-TOKEN-PAIRS PIC S99, VALUE 15. 77 77 77 77 77 77 77 77 77 77 77 PIC PIC PIC PIC PIC PIC PIC PIC PIC PIC PIC -1. 0. 1. 0. 1. 2. 3. 4. 5. 6. 7.
Field-Characteristic Clauses Data Division CONVERT BLANKS Clause The CONVERT BLANKS clause allows the USER CONVERSION clause to be invoked when the terminal operator enters blanks or fill characters. CONVERT BLANKS Note. When a user presses the Tab key to bypass a field, the MDT (modified data tag) does not get set (in other words, it is off). In such situations, use the CONVERT BLANKS clause in conjunction with the WHEN ABSENT CLEAR clause to force blanks in a field.
Data Division Field-Characteristic Clauses clause is used with a PIC X or a PIC A field, the fill character must be a valid single-byte (ASCII) character. If this clause is omitted, the default fill character is a space, except on 3270 terminals, where the default fill character is a null. Also on 3270 terminals, if the data is shorter than the length of the field, the remainder of the field is filled with nulls.
Field-Characteristic Clauses Data Division would have to enter ten alphabetic characters for the first ten bytes—and half of a double-byte character for the eleventh byte. The following example specifies that FLD1 is optional (length can be 0), but must be five characters long if it is entered; FLD2 is required, but 1 through 5 characters can be entered. 04 04 FLD1 FLD2 AT 1, 1 AT 2, 1 TO X TO Y PIC A9999 PIC ZZZZ9 LENGTH LENGTH 0, 5. 1 THRU 5.
Field-Characteristic Clauses Data Division 9 is less than 10 if the screen PICTURE clause is numeric. An input string "9" is greater than "10" if the screen PICTURE clause is nonnumeric. When the MUST BE clause is processed, a numeric literal is scaled to match the PICTURE clause defined for the associated data item. For example, if you have a PICTURE clause of PIC 999.99 in the Screen Section data item and a MUST BE clause of MUST BE 100, the MUST BE clause is scaled to MUST BE 100.00.
Field-Characteristic Clauses Data Division literal-1 is a numeric literal that specifies the number of field occurrences on a line. literal-k is a numeric literal that specifies the horizontal spacing of the field columns. When OFFSET is specified, literal-k is the number of spaces between the first column of a field occurrence (literal-1) and the first column of the next field occurrence (literal-1 +1) on the same line.
Field-Characteristic Clauses Data Division • A screen field described with an OCCURS clause and associated with a data item by a TO, FROM, or USING clause, must define the same maximum number of occurrences in the OCCURS clause as is specified in the associated data item OCCURS clause. The following example is a Working-Storage data item associated with the screen field. WORKING-STORAGE SECTION. 01 GAME-SCHE-REC. : 05 TABLE-A PIC X(8) OCCURS 4 TIMES. : SCREEN SECTION.
Field-Characteristic Clauses Data Division data-name-1 to the occurrence number of the last occurrence that was entered. If the field is also a required field, all preceding occurrences of the field must also be entered. Failure to do this causes a PREVIOUS FIELD MISSING error message to be displayed for the terminal operator. • • • Several tables on the same screen might have the same data-name-1 in their DEPENDING phrase.
Field-Characteristic Clauses Data Division ° If the current size exceeds the maximum size and the screen table is referenced with a subscript, the TCP suspends the terminal and displays an error message. ° If the current size exceeds the maximum size and the screen table is referenced without a subscript, the TCP executes the statement as if the current size is zero. The TCP does not, however, flag this as an error and the operation is performed on zero items in the screen table.
Field-Characteristic Clauses Data Division Z, comma, multiple plus and minus signs, CR, DB, and multiple currency signs. If a mismatch occurs with an input character of this type, and if a space would be acceptable at that point in the input string, the data is not considered in error; the picture symbol is replaced by a space, and the TCP attempts to match the input character with the next picture symbol. Table 5-5 gives the description of these character-string symbols. Table 5-5.
Field-Characteristic Clauses Data Division Table 5-5. Screen Description Entry PICTURE Character-String Symbols (page 2 of 2) Symbol Meaning . Represents a character position where a period must appear and indicates decimal point alignment. The period is deleted during conversion into the associated data item. + Represents a position where either a plus or a minus sign must appear.
Data Division Field-Characteristic Clauses screen-field are used as a prompt for the screen field described with the PROMPT clause. For terminals operating in conversational mode, screen-field is used as a signal for input. In the Screen Section, a screen field description must precede the associated PROMPT clause in the same screen description. During execution of the ACCEPT statement, the value specified in the prompt screen field is displayed before the terminal is able to receive input.
Field-Characteristic Clauses Data Division RECEIVE Clause The RECEIVE clause specifies whether screen-field data can be accepted from a terminal, another kind of device, or both. This option is supported only for applications running on 6530 terminals with version C00 (or later) microcode and 6AI (revision A00) firmware. If this clause is omitted, data can be accepted only from the terminal keyboard.
Field-Characteristic Clauses Data Division REDEFINES Clause The REDEFINES clause specifies that the screen field being defined is an alternate interpretation of a previously defined field. REDEFINES field-name-2 field-name-2 is the previously defined field. The two fields must be identical in size and display attributes. The REDEFINES clause allows an ACCEPT statement to be issued for a given physical field for two cases using different rules. An example would be postal codes in the U.S. and in the U.
Field-Characteristic Clauses Data Division the screen field. The SHADOWED clause associates the shadow Working-Storage item with the screen field. Screen Section Working-Storage Section 05 SCREEN-ITEMA ... PIC X(10) USING WS-ITEMA SHADOWED BY WS-A-SHADOW : : 01 WS-ITEMA 01 WS-A-SHADOW PIC X(10). PIC 9 COMP.
Data Division Field-Characteristic Clauses Table 5-6. RETURN and ENTER Bit Values on Execution of an ACCEPT Statement Information Received From Screen Field RETURN * ENTER Tabbed across (field contains nothing) 0 0 Contains fill characters or spaces 1 0 Contains normal data 1 1 Attribute MDTON when ACCEPT executes: — Contains fill characters or spaces — Normal data 1 1 0 1 * For a 6510 terminal, 1 is always stored in the RETURN bit.
Data Division Field-Characteristic Clauses Using a SHADOWED Clause Using a shadow item usually involves the following operations: • • The program tests the shadow item to determine the value of ENTER and RETURN bits; these are set automatically by the ACCEPT statement depending on the data entered. The user programmatically sets the SELECT bit as desired by moving a value to the shadow item. Table 5-8 shows the possible values for a shadow item and the corresponding bit patterns.
Data Division Field-Characteristic Clauses PROCEDURE DIVISION. MOVE 0 TO WS-STATE-SHAD. (3) ACCEPT LOCATION-REC-SCREEN (4) IF WS-STATE-SHAD EQUAL 4 MOVE 5 TO WS-STATE-SHAD (5) (6) DISPLAY LOCATION-REC-SCREEN SHADOWED.
Data Division Field-Characteristic Clauses The following rules apply: • • • • A TO, FROM, or USING clause can be specified only with an elementary screen field. The TO and FROM clauses can both be specified for a screen field. If both clauses are specified, the data names can differ. If a data association clause is specified for any field, a PICTURE clause must also be specified for that field.
Data Division Field-Characteristic Clauses When a user presses the Tab key twice to bypass a field, the MDT (modified data tag) does not get set. In such situations, use the WHEN ABSENT CLEAR clause to force blanks in a field. The WHEN ABSENT CLEAR clause, in conjunction with the CONVERT BLANKS clause, allows the USER CONVERSION clause to be invoked. Refer to the Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide for details regarding user conversion procedures.
Data Division Field-Characteristic Clauses If this clause is omitted, the default clauses are WHEN ABSENT SKIP (absent fields are skipped) and WHEN BLANK CLEAR (blank fields are cleared). WHEN { ABSENT } { CLEAR } { BLANK } { SKIP } ABSENT indicates that the clause acts on a screen field that the terminal operator skips over without entering any data.
Data Division Message Description Entry Message Description Entry A message description entry declares the characteristics of a message format. The message description entry is specified in the Message Section of a SCREEN COBOL program. A number of message formats can be defined in the Message Section. Level 01 identifies the beginning of a message format. Subordinate group and elementary data items can be defined.
Data Division FILLER Restrictions field-clause defines the characteristics of the field item. Allowable clauses are: FIELD STATUS OCCURS OCCURS DEPENDING ON PICTURE PRESENT IF RESULTING COUNT TO/FROM/USING USER CONVERSION FILLER Restrictions The use of FILLER is permitted at any level. However, you must observe the following restrictions: • • When FILLER appears at the 01 level, that message cannot be the object of Procedure Division statements capable of Message Section access.
Data Division PICTURE and TO/FROM/USING Restrictions In the following example either of the paired Message Section and Working-Storage Section data structures is acceptable. WORKING-STORAGE SECTION. 01 WS-MSG 05 WS-A PIC X 05 WS-B PIC X 05 WS-C PIC X 05 WS-D PIC X MESSAGE SECTION. 01 MS-MSG 05 MS-A PIC X 05 MS-B PIC X 05 FILLER PIC X 05 MS-C PIC X 05 MS-D PIC X FROM WS-A FROM WS-B FROM WS-C FROM WS-D WORKING-STORAGE SECTION.
Data Division • USER CONVERSION and PRESENT IF Restrictions Each field level item, with the exception of the FILLER item, must have a PICTURE clause and a TO, FROM, or USING clause. The following example shows the use of the PICTURE clause and the FROM clause in a multiple-field message. WORKING-STORAGE SECTION. 01 WS-MSG. 05 WS-GROUP. 10 WS-FLD1 PIC X(10). 10 WS-FLD2 PIC X(10). MESSAGE SECTION. 01 MS-MSG. 05 MS-GROUP. 10 MS-FLD1 10 MS-FLD2 PIC X(10) PIC X(10) FROM WS-FLD1. FROM WS-FLD2.
Data Division MESSAGE SECTION. 01 MSG 05 MSG-FLD1 05 MSG-FLD2 05 MSG-FLD3 05 MSG-FLD4 Clauses in Message Description Entry MESSAGE FORMAT IS PIC X(10) FROM PIC X(5) FROM PIC X(10) FROM PIC 99,999 FROM FIXED. WS-MSG-FLD2. WS-MSG-FLD3. WS-MSG-FLD1. WS-MSG-FLD4. For detailed information on how to define the message description entry to reorder, format, and convert the data, refer to the Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide.
Data Division • • Clauses in Message Description Entry If you omit the FIELD-DELIMITER clause and the message format is FIXEDDELIMITED or DELIMITED, field delimiter processing is enabled and the default field delimiter is a comma (,). When processing a message on a field-by-field basis, you can use the FIELDDELIMITER clause with the RESULTING COUNT clause. Refer to the RESULTING COUNT Clause for details.
Data Division Clauses in Message Description Entry Shadow Data Item When you use the FIELD STATUS clause with the PRESENT IF clause, you can test the shadow portion of the FIELD STATUS Working-Storage group item to determine if a conditionally present field is present. You interpret the shadow data item based on the values it can assume. Those values depend on two factors: the state of the conditionally present field and whether the data is being input or output.
Data Division Clauses in Message Description Entry Table 5-9. FIELD STATUS Clause Shadow Values Shadow Values With Selected State of 0 Shadow Values With Selected State of 1 State Input Output Input Output Entered 2 N.A. 3 N.A. Generated and Stored 4 N.A. 5 N.A. Entered and Stored 6 N.A. 7 N.A. Selected N.A. 0 N.A. 1 The TCP generates pad data if a field has not been entered, but needs to be physically stored (shadow field = 4 or 5).
Data Division Clauses in Message Description Entry Table 5-10.
Data Division Clauses in Message Description Entry The following SEND MESSAGE shows the YIELDS associated with the input messages when the ON ERROR clause is executed due to an edit error. SEND MESSAGE MSG-3-OUT-M-1 REPLY CODE FIELD IS WS-MSG-4-IN-FROM-MSG-4-IN-CODE CODE 1 YIELDS MSG-3-IN, CODE 2 YIELDS MSG-4-IN, CODE 3 YIELDS MSG-3-IN, CODE 4 YIELDS MSG-4-IN, ON ERROR PERFORM IDS-SERVER-SEND-ERROR.
Data Division Clauses in Message Description Entry Table 5-11. Relevant SEND MESSAGE Edit Advisory Error Numbers (page 2 of 2) Applies to Edit Advisory Error Number Meaning Input Output 10 Numeric source does not match picture Yes Yes 11 Numeric value overflow during conversion Yes Yes 16 Field is absent Yes No MESSAGE-DELIMITER Clause The MESSAGE-DELIMITER clause defines the character(s) used to delimit the message’s end.
Data Division Clauses in Message Description Entry MESSAGE FORMAT Clause The MESSAGE FORMAT clause specifies the format of the data in the message. The MESSAGE FORMAT clause can appear only at the 01 level and determines the format of the entire record. MESSAGE FORMAT [ IS ] { { { { { FIXED DELIMITED FIXED-DELIMITED VARYING1 VARYING2 } } } } } FIXED indicates that the message is fixed length. This is the default format.
Data Division Clauses in Message Description Entry There cannot be a PICTURE clause in the 01 level data item in a multiple-field message. • For FIXED and FIXED-DELIMITED formats, the message fields are fixed to the declared size; therefore, the message size is a fixed length. ° FIXED format message lengths are the sum of their individual field lengths.
Data Division Clauses in Message Description Entry Example 1 Message MSG1 has a fixed length of two characters. 01 MSG1 PIC X(2) MESSAGE FORMAT IS FIXED ... This message could also have been described as: 01 MSG1 PIC X(2) ... When the MESSAGE FORMAT clause is omitted, the message length is fixed by default. Example 2 Message MSG2 can contain up to five characters of data.
Data Division Clauses in Message Description Entry Message MSG4 consists of two fields and can contain up to 32 characters of data. The actual length of each field, in bytes, is placed into a separate Working-Storage location, WS-LENGTH-1 and WS-LENGTH-2 respectively. The field delimiter is not stored in the target Working-Storage location, WS-RECORD-1 or WS-RECORD-2. The field delimiter is not reflected in the RESULTING COUNT value.
Data Division Clauses in Message Description Entry num-lit-1 indicates the number of elements in a field. num-lit-1 is a positive numeric literal that is greater than or equal to one. num-lit-2 indicates the minimum number of elements in a field. num-lit-2 is a positive numeric literal that is greater than or equal to zero. num-lit-3 indicates the maximum number of elements in a field. num-lit-3 is a positive numeric literal where num-lit-3 is greater than num-lit-2.
Data Division Clauses in Message Description Entry OCCURS 1 TO 1024 TIMES DEPENDING ON WS-Message-Length. Note. Another way of sending variable length messages uses the RESULTING COUNT clause and results in faster processing. The following example accomplishes the same thing as the previous one, but runs three times faster. WORKING-STORAGE SECTION. 01 WS-Message-Length 01 WS-Message-Out 05 WS-Message-Data PIC 9(4) COMP. PIC X OCCURS 1 TO 1024 TIMES DEPENDING ON WS-Message-Length. MESSAGE SECTION.
Data Division Clauses in Message Description Entry MESSAGE SECTION. 01 Msg4-Out. 05 MS-Record-1 05 MS-Record-2 PIC X FROM WS-Record-1 OCCURS 1 TO 10 TIMES DEPENDING ON WS-Length-1. PIC X FROM WS-Record-2 OCCURS 1 TO 10 TIMES DEPENDING ON WS-Length-2. PICTURE Clause The PICTURE clause specifies the length, data type, and editing format of a message field.
Data Division Clauses in Message Description Entry Table 5-12. Message Description Entry PICTURE Character-String Symbols (page 1 of 2) Symbol Meaning A Represents a character position for a letter of the alphabet or a space character. If the character is not a letter or a space or a data bit from a PIC 1 field, it is flagged as an error. B Represents a character position where a space must occur in the input. The space is deleted during conversion into its associated data item.
Data Division Clauses in Message Description Entry Table 5-12. Message Description Entry PICTURE Character-String Symbols (page 2 of 2) Symbol Meaning - Represents a position where either a space or a minus sign must appear. Multiple minus signs represent positions that must contain some number of digits preceded by an optional minus sign, preceded by spaces. The symbol is replaced by a space during editing only when it is one of a set of multiple minus signs.
Data Division Clauses in Message Description Entry PRESENT IF MS-Bit-1-Savings FIELD STATUS IS WS-Field-Status-Savings. Also, it is possible to have a field other than a byte-sized one preceding a byte-sized field. For example: MESSAGE SECTION. 01 MS-Message. 05 Field-1 05 Field-2 PIC 1. PIC X. The logical length of the above message is 9 bits rather than 16 because there is no padding between the single bit field and the following byte field.
Data Division Clauses in Message Description Entry Format Conversion Rules for PIC 1 Format (Bit Fields) The following rules apply when data involving bit fields is passed through the Message Section. When a single field within the Message Section is defined as a PIC 1(n), the processing performed is dependent on the associated Working-Storage data item type. Input Operations • • • • • • The source is a Message Section item. The destination is a Working-Storage Section item.
Data Division Clauses in Message Description Entry Output Operations • • • • • The source is a Working-Storage Section item. The destination is a Message Section item. Data is retrieved from the least significant or most significant portion of the source field, depending on whether the source field is numeric or nonnumeric. For a Working-Storage PIC 9 field, data bits from the least significant portion of the field are used to supply the data for the Message Section field item.
Data Division Clauses in Message Description Entry On output, in the above example, the data is fetched from where the x variables appear. This example illustrates the rule of left to right processing from PIC X(n) fields and right to left processing from PIC 9(n) fields. PRESENT IF Clause The PRESENT IF clause defines a field within a message to be optionally present based on the value of a control field. • • The control field and the optionally present field must be in the same 01 message structure.
Data Division Clauses in Message Description Entry fields can still specify their own PRESENT IF condition. The group level PRESENT IF condition is overridden by the field level PRESENT IF condition. • • • • • • PRESENT IF clause processing is the same for input and output operations. PRESENT IF clauses can be logically nested to any depth.
Data Division Clauses in Message Description Entry The following input record would result in the value F2 being stored in field WS-F2: 0 1 F2 CDT 011.CDD • • • 0 is stored in WS-PIF-1 1 is stored in WS-PIF-2 F2 is stored in WS-F2 However, suppose that the 0 and 1 were unintentionally reversed in the input record. 1 0 F2 CDT 012.
Data Division Clauses in Message Description Entry Bit Map 0 1 1 1 1 0 1 | 1st data | byte | 1 | 10110110 | 2nd data | byte | | 01101111 | 3rd data | byte | | ... (1) (2) (3) (1) Checking Account Number (2) Savings Account Number (3) Credit Card Number As the customer presses the appropriate buttons on the ATM to conduct the transaction, certain pieces of data will be transferred and others will not.
Data Division 01 01 01 01 01 Clauses in Message Description Entry WS-ATM-Record. 05 WS-Bit-Map. 10 WS-Bit-1 10 WS-Bit-2 10 WS-Bit-3 WS-Savings-Acct. 05 WS-Savings-Length 05 WS-Savings-Data WS-Checking-Acct. 05 WS-Checking-Length 05 WS-Checking-Data WS-Credit-Card. 05 WS-Creditc-Length 05 WS-Creditc-Data WS-Field-Status-Items. 05 WS-Field-Status-Savings. 10 FS-Shadow-Savings 10 FS-Error-Savings 05 05 PIC 9(1) COMP. PIC 9(1) COMP. PIC 9(1) COMP. PIC 9(2) COMP.
Data Division Clauses in Message Description Entry 10 MS-Bit3-Credit-Card PIC 1(1) USING WS-Bit-3. PIC 1(5). 10 FILLER 05 MS-Savings. 10 Savings-Data PIC X(15) PRESENT IF MS-Bit1-Savings FIELD STATUS IS WS-Field-Status-Savings USING WS-Savings-Data RESULTING COUNT IS WS-Savings-Length. 05 MS-Checking. 10 Checking-Data PIC X(15) PRESENT IF MS-Bit2-Checking FIELD STATUS IS WS-Field-Status-Checking USING WS-Checking-Data RESULTING COUNT IS WS-Checking-Length. 05 MS-Credit-Card.
Data Division Clauses in Message Description Entry On output, the RESULTING COUNT clause combined with the field delimiter permits the length of each field to be equal to or less than the declared field length. A field of RESULTING COUNT length terminated by a field delimiter is created, unless field delimiting has been disabled.
Data Division Clauses in Message Description Entry MESSAGE SECTION. 01 MSG-Name-Record FORMAT IS DELIMITED FIELD-DELIMITER IS ";". 05 MS-Name PIC X(100) USING WS-Name RESULTING COUNT IS WS-Name-Length. If the incoming name field contains: SMITH John X.; Start of Field⁄ The resulting location in Working-StorageWorking-Storage, WS-Name, would contain: SMITH John X. Start of Field⁄ The value in WS-Name-Length would be equal to 13.
Data Division Clauses in Message Description Entry A field can be described with both a TO and a FROM clause. If you specify both clauses, each can have a different data name. The particular clause determines the general type of the field (input, output, or input-output) as indicated in Table 5-13. Table 5-13.
Data Division Clauses in Message Description Entry 2. The variable-length field MSG2 contains an output message that originated in W-FLD2. The first byte of MSG2 contains the number of data characters in the message: W-FLD2 A MSG2 , B 2 A count B value CDT 014.CDD 3. The VARYING2 field MSG3 receives a message and passes it to W-FLD3. The first two bytes of MSG3 specify that the message has two characters of data: MSG3 W-FLD3 0 2 3 count 249 , 0 0 0 0 0 0 3 249 value CDT 015.
Data Division Special Registers USER CONVERSION Clause The USER CONVERSION clause assigns a user-defined number to be passed with the field to a conversion procedure. USER [ CONVERSION ] numeric-literal numeric-literal specifies the user conversion routine number. This clause is used only if the application makes use of a user conversion procedure. Refer to the Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide for details regarding user conversion procedures.
Data Division LOGICAL-TERMINAL-NAME Special Register LOGICAL-TERMINAL-NAME Special Register The LOGICAL-TERMINAL-NAME special register contains the name of the terminal executing the program unit. The name of the terminal is defined through PATHCOM in the ADD TERM command. A single copy of this register is global to the program units. The register is initialized when the terminal is first started. The register has the following implicit declaration: 01 LOGICAL-TERMINAL-NAME PIC X(16).
Data Division • PW-QUEUE-FKEY-UMP Special Register The message specifies that field delimiters are enabled and optionally that message delimiters are enabled.
Data Division PW-QUEUE-FKEY-TIMEOUT Special Register unsolicited message logic. The keyboard is unlocked at the next ACCEPT statement. This action prevents 6530 terminals from internally queuing a function key that the operator presses between the start of execution of the unsolicited message logic and the next ACCEPT statement. PW-QUEUE-FKEY-TIMEOUT Special Register The PW-QUEUE-FKEY-TIMEOUT special register controls the behavior of the ACCEPT...ESCAPE ON TIMEOUT statement.
Data Division PW-TERMINAL- ERROR-OCCURRED Special Register The PW-TCP-PROCESS-NAME and PW-TCP-SYSTEM-NAME special registers have the following implicit declarations; note that the VALUE clauses are not necessary and are for illustration only. 01 01 PW-TCP-SYSTEM-NAME PW-TCP-PROCESS-NAME PIC X(8) VALUE "\STLOUIS". PIC X(6) VALUE "$SWTCP".
Data Division PW-USE-NEW-CURSOR Special Register PW-USE-NEW-CURSOR Special Register The PW-USE-NEW-CURSOR special register preserves the current cursor position following unsolicited message processing. When a block-mode ACCEPT operation is interrupted by the arrival of an unsolicited message, the user might typically be typing data on the current screen. The SCREEN COBOL program then processes the unsolicited message. The SCREEN COBOL program reissues the interrupted ACCEPT operation.
Data Division • REDISPLAY Special Register The screen field items referred to in the DISPLAY statement must be defined in the base screen and not in an overlay area. When the REDISPLAY register is set to NO (the default setting), a DISPLAY statement results in the TCP moving the contents of the screen fields to terminal memory. The following events occur: • • The TCP obtains screen field values from associated Working-Storage items and moves the values to terminal memory.
Data Division RESTART-COUNTER Special Register RESTART-COUNTER Special Register The RESTART-COUNTER special register contains the number of times a transaction has been restarted during transaction mode. The first time the BEGIN-TRANSACTION statement executes, the register is set to zero. This number is incremented immediately following each execution of the BEGIN-TRANSACTION statement. The register has the following implicit declaration: 01 RESTART-COUNTER PIC 9999 COMP.
Data Division TERMINAL-FILENAME Special Register TERMINAL-FILENAME Special Register The TERMINAL-FILENAME special register contains the internal form of the file name for the terminal executing the program unit. The name of the terminal is defined through PATHCOM in the SET TERM FILE parameter. A single copy of this register is global to the program units. The register is initialized when the terminal is first started. The register has the following implicit declaration: 01 TERMINAL-FILENAME PIC X(24).
Data Division TERMINATION-SUBSTATUS Special Register TERMINATION-SUBSTATUS Special Register The TERMINATION-SUBSTATUS special register communicates an error number further describing the error communicated in TERMINATION-STATUS when the ON ERROR branch of one of the following statements is taken: CALL, RECEIVE UNSOLICITED MESSAGE, REPLY TO UNSOLICITED MESSAGE, SEND, SEND MESSAGE, or TRANSFORM. A copy of this register is local to each program unit.
6 Procedure Division The Procedure Division includes all of the processing steps for the program. The steps are organized into SCREEN COBOL statements and sentences, and grouped into paragraphs, procedures, and sections. The format of the Procedure Division is: PROCEDURE DIVISION [ USING data-name [, data-name ]...] . [ DECLARATIVES. { [ section-name SECTION . ] [ paragraph-name . [ sentence ] ... ] ... } ... { paragraph-name . [ sentence ] ... } ... END DECLARATIVES. ] { [ section-name SECTION .
Procedure Division Declarative Procedures immediately preceding sentence, unless the immediately preceding sentence is a GO TO statement. When control reaches the end of a paragraph, control passes to the first section of the following paragraph. The only exception is when control reaches the end of a paragraph and that paragraph is the last in the range of a currently active PERFORM operation. An example of Procedure Division structure is: PROCEDURE DIVISION. initialization SECTION. get-started.
Procedure Division Paragraphs The format of the header is: section-name SECTION. A section ends at the next section header, at keywords END DECLARATIVES, or at the physical end of the Procedure Division. Paragraphs A paragraph is used to group related sentences and statements. A paragraph usually has at least one sentence, but sentences are not required. For example: get-all-input. get-the-first-record. ACCEPT my-screen...
Procedure Division Procedures The following examples illustrate imperative sentences: ADD a1 TO b1 GIVING c1, d1, e1. ADD 25 TO x2, GO TO next-image. A conditional sentence tests a conditional item or some relationship between values to determine an action to take. The following example illustrates a conditional sentence: IF last-tax IS LESS THAN current-tax PERFORM higher-tax ELSE PERFORM lower-tax.
Procedure Division Procedure Division Statements Table 6-1. Categories of Statements Arithmetic ADD COMPUTE DIVIDE MULTIPLY SUBTRACT Conditional BEGIN-TRANSACTION ... ON ERROR CALL ... ON ERROR IF SEND...
Procedure Division ABORT-TRANSACTION Statement ABORT-TRANSACTION Statement The ABORT-TRANSACTION statement aborts the transaction of a terminal operating in transaction mode. Transaction mode is an operating mode in which Pathway servers that are configured to run under the Compaq Transaction Management Facility (TMF) can lock and update audited files.
Procedure Division • • • ACCEPT Statement Receives input from the terminal and stores the data into the associated WorkingStorage items of the program data area. Input can be accepted from the terminal one screen field at a time, one field per line. However, the capability referred to as typeahead enables data entry for more than one field on the same line. Returns only valid data to the program, determining the validity of the data from the definitions in the Screen Section of the Data Division.
Procedure Division ACCEPT Statement terminal operator can use. At least one of these two clauses must be present with a completion condition. If both clauses are present, any one completion condition can appear in only one of the two clauses. comp-condition-1 specifies the completion conditions under which the statement is to terminate with input of data. comp-condition-2 specifies the completion conditions under which the statement is to terminate without input of data.
Procedure Division ACCEPT Statement Use of the PW-QUEUE-FKEY-TIMEOUT special register allows locking the keyboard before processing the TIMEOUT logic. For further information see Special Registers on page 5-93.. Note. Do not use enclosing parentheses for a function key range following a TIMEOUT clause if a Working-Storage item is used for the TIMEOUT value and the item is not indexed; if you include the parentheses, a SCREEN COBOL compiler error occurs.
Procedure Division ACCEPT Statement If a prompt is used and the field named in the PROMPT clause is an output field, the ACCEPT statement causes the current value for the output field to be displayed before reading the data input from the terminal. An output field named in the PROMPT clause must be defined as FILLER or defined with a FROM or USING clause. The data entered from the terminal is checked against the requirements given for the field by its definition in the Screen Section of the Data Division.
Procedure Division ACCEPT Statement following the group receives the code value that is one greater than that assigned to the conditions in the group. In the following example, the value of TERMINATION-STATUS is 1 if the Enter key is pressed, 2 for the CLEAR key, 2 for the PA1 key, and 3 for the PF1 key.
Procedure Division ACCEPT Statement 2. Within the same row, the screen field with a lower column number is processed before a screen field with a higher column number. The input data is checked against the requirements given for a field by the field definition in the Screen Section. Only those fields referred to by the screen-identifier list are checked.
Procedure Division ACCEPT Statement during an ACCEPT operation, the key has the same effect as entering the abort inputcontrol characters. The following example illustrates an ACCEPT statement for conversational mode. The value of TERMINATION-STATUS is 1 if valid input is entered, 2 for ABORT, and 2 for TIMEOUT. ACCEPT EMPLOYEE-SCREEN UNTIL INPUT ESCAPE ON (ABORT, TIMEOUT 180). PERFORM ONE OF 300-CHECK-NULL-NAME 200-EXIT-ROUTINE DEPENDING ON TERMINATION-STATUS.
Procedure Division ACCEPT DATE/DAY/TIME Statement The CLEAR INPUT statement resets the MDT bits and displays null values in all unprotected fields of the screens currently displayed. RESET ATTR or TURN MDTOFF can be used instead if blanking out the input fields is not desired. You must consider another MDT convention: the TCP turns a field’s MDT bit on in the following operations: • • When a TURN TEMP statement selects an input field for changing display attributes, the MDT bit is always set.
Procedure Division ACCEPT DATE/DAY/TIME Statement DATE is the current date expressed as a 6-digit number yymmdd where yy is the year, mm is the month, and dd is the day. For example, November 25, 1997, would be returned as 971125. DAY YYYYDDD is the current Julian date expressed as a 7-digit number yyyyddd where yyyy is the year and ddd is the day of the year. For example, February 25, 2001, would be returned as 2001056.
Procedure Division ADD Statements ADD Statements The ADD statements sum numeric values and store the results in one or more data items. When defining a field to hold a total, the size of the field should be considered. The receiving field must be large enough to hold the result and thus avoid truncation of nonzero digits. The forms of the ADD statements are: ADD TO ADD GIVING ADD CORRESPONDING Each form is described in the following paragraphs.
Procedure Division ADD Statements qualifiers up to but not including the group item name specified in the ADD CORRESPONDING statement. ADD { CORR } group-1 TO group-2 { CORRESPONDING } group-1 and group-2 are the identifiers of group items in which some or all of the elementary items are numeric. The totals are placed in the group-2 items.
Procedure Division BEGIN-TRANSACTION Statement 01 stockroom-supplies. 05 writing-tools. 10 pencils PIC 99. 10 erasers PIC 99. 10 pens PIC 99. 05 paper-clips PIC 99. 05 paper PIC 99. : PROCEDURE DIVISION. : ADD CORRESPONDING cabinet-supplies TO stockroom-supplies. In the following example, only one item (6-12-years) corresponds between the groups: 01 test-group-1. 05 children. 10 1-5-years 10 6-12-years 05 teen-agers. 10 13-15-years 10 16-19-years 05 adults 10 women 10 men 01 test-group-2.
Procedure Division BEGIN-TRANSACTION Statement imperative-statement is the statement to be executed if an error occurs or the transaction is being restarted. If the ON ERROR phrase is omitted and the number of restarts equals the transaction restart limit, the terminal is suspended, but can be restarted. If the transaction fails for any reason while the terminal is in transaction mode, TMF backs out any updates performed on the data base for the current transaction.
Procedure Division CALL Statement CALL Statement The CALL statement transfers control from one SCREEN COBOL program to another SCREEN COBOL program. CALL { data-name } [ USING { identifier } ,... ] { program-unit-name } [ ON ERROR imperative-statement ] data-name is a nonnumeric data item in the Working-Storage Section or Linkage Section; the value of the data item gives the PROGRAM-ID of another SCREEN COBOL program, as specified in the Identification Division of that program.
Procedure Division CALL Statement ON ERROR provides a point of control if an error is encountered in a descendant program unit. If a suspend class error is encountered, control is returned to the next higher level program unit having a CALL statement containing an ON ERROR clause. (A suspend class error condition is one that, without the use of the CALL...ON ERROR feature, causes the terminal to become suspended.
Procedure Division CALL Statement Table 6-3.
Procedure Division CALL Statement Table 6-3.
Procedure Division CALL Statement Table 6-3.
Procedure Division CALL Statement Table 6-3.
Procedure Division CALL Statement Table 6-3.
Procedure Division CALL Statement The TERMINATION-STATUS error numbers related to CALL ... ON ERROR correspond directly to the Pathway error messages generated by the TCP in the 3000 through 3999 range. For example, TERMINATION-STATUS error 114 corresponds to Pathway error message 3114. For descriptions of the messages, see the TCP messages in the Compaq NonStop™ Pathway/iTS System Management Manual. Note that TERMINATION-STATUS becomes undefined when TERMINATIONSTATUS is set for reasons other than CALL .
Procedure Division CHECKPOINT Statement CHECKPOINT Statement The CHECKPOINT statement causes the current context for the terminal, such as Working-Storage items, to be checkpointed. CHECKPOINT This statement causes an additional checkpoint. Automatic checkpointing occurs as follows: • • • • At execution of a BEGIN-TRANSACTION statement, the TCP performs a full context checkpoint. At execution of an END-TRANSACTION statement, the TCP performs a full context checkpoint.
Procedure Division • COMPUTE Statement CLEAR requires only a short data sequence; RESET requires a data sequence from the TCP for each field referred to in the statement. COMPUTE Statement The COMPUTE statement evaluates an arithmetic expression and then stores the result in one or more data items. COMPUTE { result } ,... = expression result is the identifier of a numeric elementary item.
Procedure Division COPY Statement library-name is the file containing the text to be copied. The name is expanded to a full file name using the default subvolume in effect for the compilation. If you specify the library name with a subvolume and a file name, you must enclose the entry in quotation marks. For example: "subvol.afile". If library-name is omitted and copy-text exists, the default library name COPYLIB is used for the compilation.
Procedure Division COPY Statement ?SECTION copy-text-1 text-1 When a library file begins like this, this text could be comments about the library contents. In the following example, notice that employee-detail of the COPY statement is not qualified because the copy library, named COPYLIB, resides on the default volume and subvolume for the compilation. The contents of the copy library COPYLIB are as follows: ?SECTION employee-detail 01 emp-data-in. 05 emp-no PIC X(05). 05 emp-name PIC X(20).
Procedure Division DELAY Statement DELAY Statement The DELAY statement delays program execution for a specified period of time. DELAY { numeric-literal } { identifier } numeric-literal is a numeric value representing one-second units; the maximum value is 21474836. The value must be a positive integer. identifier is the identifier of an integer data item representing one-second units; the maximum value is 2,147,483,647 seconds (31 bits). This value must be a positive integer. Note.
Procedure Division DEVICEINFO Statement DEVICEINFO Statement The DEVICEINFO statement obtains information about the intelligent device to which the SCREEN COBOL program is currently sending messages. This statement performs the same function as the DEVICEINFO procedure. DEVICEINFO USING deviceinfo-rec deviceinfo-rec is an 01 group defined as follows: 01 deviceinfo-rec. 02 file-name 02 device-type 02 device-subtype 02 physical-record-length PIC PIC PIC PIC X(16). 9(4) comp. 9(4) comp. 9(4) comp.
Procedure Division DISPLAY BASE Statement second DISPLAY BASE can execute at any time to establish a new screen, or to reestablish the same screen. DISPLAY BASE [DYNAMIC] base-screen-name DYNAMIC specifies that nonliteral screen fields can acquire their initial contents from their FROM or USING Working-Storage data item. A subsequent DISPLAY statement is not needed to display the initial Working-Storage values.
Procedure Division DISPLAY OVERLAY Statement Using DISPLAY BASE A running SCREEN COBOL program has at most one current base screen; the current base screen is defined by the most recently executed DISPLAY BASE statement. The program can have at most one current overlay screen associated with each of the overlay areas of the current base screen; the current overlay screen is defined by the most recently executed DISPLAY OVERLAY statement for each of the areas.
Procedure Division DISPLAY RECOVERY Statement For terminals in both block and conversational mode, DISPLAY OVERLAY establishes the current overlay screen and must execute before other screen operations using the overlay screen. DISPLAY OVERLAY { [DYNAMIC]overlay-screen-name } AT overlay{ SPACES } area DYNAMIC specifies that nonliteral screen fields can acquire their initial contents from their FROM or USING Working-Storage data item.
Procedure Division DISPLAY Statement When DISPLAY RECOVERY executes, the standard error recovery procedure is executed. The recovery process performs the equivalent of a DISPLAY BASE statement for the current base screen followed by a DISPLAY OVERLAY operation for all currently active overlay screens. The screen recovery process then executes any screen recovery declarative procedures that have been provided in the SCREEN COBOL program.
Procedure Division DISPLAY Statement DEPENDING ON identifier selects either zero or one screen-identifier from the list of screen fields. The statement whose position in the screen-identifier list is the same as the value in identifier is selected. If the value in identifier is less than 1 or greater than the number of screen identifiers, no screen-identifier is selected. SHADOWED selects from the screen-identifier list only those fields that have SHADOWED items in which the SELECT bit is set.
Procedure Division DISPLAY Statement falls through (execution continues with the next statement) and no screen field is displayed. The execution of DISPLAY in block mode does not cause a physical write to the screen but causes data to be written to the terminal buffer.
Procedure Division DIVIDE Statements enabled and is pressed during a DISPLAY operation, the DISPLAY terminates and no terminal error condition results. The value of the TERMINATION-SUBSTATUS special register on the DISPLAY operation is: • • 1 if the BREAK key is pressed 0 if the BREAK key is not pressed DIVIDE Statements The DIVIDE statements divide one data item into another and store the results in one or more data items.
Procedure Division END-TRANSACTION Statement quotient is the identifier of an elementary numeric data item where the quotient is stored. DIVIDE BY GIVING Statement The DIVIDE BY GIVING statement is the same as DIVIDE GIVING, except the dividend is specified first. DIVIDE dividend BY divisor GIVING { quotient } ,... dividend is either a numeric literal or the identifier of an elementary numeric data item. divisor is either a numeric literal or the identifier of an elementary numeric data item.
Procedure Division EXIT Statements If the terminal is not in transaction mode when the END-TRANSACTION statement is executed, the terminal is suspended for a pending abort. EXIT Statements The EXIT statements mark the end of a procedure or the exiting point of a subprogram. The forms of the EXIT statements are: EXIT EXIT PROGRAM Each form is described in the following paragraphs. EXIT Statement The EXIT statement marks the end of a procedure. The statement performs no operation.
Procedure Division GO TO Statements GO TO Statements The GO TO statements pass control from one part of the Procedure Division to another. The forms of the GO TO statements are: GO TO GO TO DEPENDING Each form is described in the following paragraphs. GO TO Statement The GO TO statement unconditionally passes control from one part of the Procedure Division to another. GO [ TO ] procedure-name procedure-name is the name of the procedure to which control is transferred.
Procedure Division • IF Statement If branch-flag is less than 1 or greater than 3, control passes to the statement immediately following the GO TO DEPENDING statement. IF Statement The IF statement evaluates a condition and then transfers control depending on whether the value of the condition is true or false. IF condition { statement-1 } [ ELSE { statement-2 } ] { NEXT SENTENCE } [ { NEXT SENTENCE } ] condition is any conditional expression.
Procedure Division IF ... DOUBLEBYTE Statement The following example illustrates a simple IF statement: IF julian-days IS GREATER THAN 59, ADD leap-year TO julian-days. The following example illustrates a simple IF ELSE statement: IF tally GREATER THAN 0 MOVE 0 TO tally MOVE 3 TO msg-index PERFORM print-error-routine ELSE MOVE 1 TO flag.
Procedure Division MOVE Statements data-item specifies the OLD-CURSOR or NEW-CURSOR special register or specifies a Working-Storage data item defined as follows: 01 WS-USER-SAVE-CURSOR. 02 WS-USER-SAVE-ROW 02 WS-USER-SAVE-COL PIC 9(4) COMP. PIC 9(4) COMP. screen-item specifies an elementary screen item defined in the Screen Section, or specifies an elementary screen item within a defined screen overlay item. The screen-item cannot include an OCCURS clause.
Procedure Division MOVE Statements data-name-1 is the sending item. The item can be an identifier or a literal. Any subscripting or indexing for data-name-1 is evaluated only once, immediately before data is moved to the first receiving item. data-name-2 is the receiving item. The item is an identifier. The following example: MOVE item-1(b) TO item-2, item-3(b) is equivalent to: MOVE item-1(b) TO temp MOVE temp TO item-2 MOVE temp TO item-3(b).
Procedure Division MOVE Statements MOVE CORRESPONDING Statement The MOVE CORRESPONDING statement moves selected data items of one group to corresponding data items of another group. MOVE { CORR } group-1 TO group-2 { CORRESPONDING } group-1 is the group name of sending data items. group-2 is the group name of receiving data items. group-1 and group-2 must be defined in the Working-Storage Section or the Linkage Section, not in the Screen Section.
Procedure Division MOVE Statements The following examples show corresponding items. Example 1 All items in the following two groups correspond: 01 detail-in. 05 social-security 05 employee-name 05 address 10 street 10 city 10 state 10 zip-code 01 report-line.
Procedure Division MOVE Statements MOVE Restrictions Move operations between the following types of data items will cause a compilation error and should therefore not be attempted: • • • • • • An alphabetic data item or the figurative constant SPACE to a numeric data item A numeric literal, a numeric data item, or the figurative constant ZERO to an alphabetic data item A noninteger numeric literal or a noninteger numeric data item to an alphanumeric data item A numeric data item to a numeric data item t
Procedure Division MULTIPLY Statements Group moves are treated as alphanumeric to alphanumeric moves, with no data conversion. The receiving area is filled without regard to individual or subgroup items in either the sending or receiving items. Table 6-4 summarizes MOVE conventions. Table 6-4.
Procedure Division PERFORM Statements multiplier is the identifier of an elementary numeric data item. The result of the multiply operation is stored as the new value of multiplier. The sum of the number of digits in value and multiplier must not exceed 18. MULTIPLY GIVING Statement The MULTIPLY GIVING statement multiplies two numeric data items and stores the product in one or more other data items. MULTIPLY value BY multiplier GIVING { result } ,...
Procedure Division PERFORM Statements The range of a PERFORM statement is logically all those statements that are executed as a result of the PERFORM statement, through the transfer of control to the statement following the PERFORM statement. The range includes all statements executed as a result of a GO TO, PERFORM, or CALL statement in the range of the original PERFORM statement, as well as all statements in the Declaratives Section that might be executed.
Procedure Division PERFORM Statements PERFORM TIMES Statement The PERFORM TIMES statement executes a procedure, or group of procedures as established by the THROUGH phrase, a specified number of times. When the specified number of executions complete, control passes to the statement following the PERFORM TIMES statement. PERFORM proc-1 [ { THROUGH } proc-2 ] count TIMES [ { THRU } ] proc-1 and proc-2 are the procedure paragraphs or sections to be executed.
Procedure Division PERFORM Statements add-routine. MOVE 0 to flag. : : Once the add routine is successful, a 1 is moved : to flag; otherwise, flag remains 0. As long as : flag is 0, the procedure is reexecuted. : delete-routine. PERFORM VARYING Statement The PERFORM VARYING statement executes a procedure, or group of procedures as established by the THROUGH phrase, while varying a data item until specified conditions are true. When AFTER phrases are specified, the range is within a nested loop.
Procedure Division PERFORM Statements 01 command-table REDEFINES command-data. 05 command-entry PIC X(36) OCCURS 10 TIMES. 77 77 no-of-commands command-index PIC 99 PIC 99 VALUE 9. VALUE 1 COMP. PROCEDURE DIVISION. : PERFORM list-commands VARYING command-index FROM 1 BY 1 UNTIL command-index GREATER THAN no-of-commands. list-commands.
Procedure Division PRINT SCREEN Statement PRINT SCREEN Statement The PRINT SCREEN statement causes the current screen image to be printed on an attached or nonattached printer. PRINT SCREEN cannot be used by programs communicating with intelligent devices. PRINT SCREEN [ ON ERROR imperative-statement ] ON ERROR provides a point of control if an error occurs while attempting the print operation.
Procedure Division • • PRINT SCREEN Statement Direct displays, such as DISPLAY "XYZ" IN SCREEN-FIELD, are not printed because these displays have no effect on Working-Storage. If a screen field has an associated FROM field and a different associated TO field, an anomaly exists.
Procedure Division RECEIVE UNSOLICITED MESSAGE Statement I/O Performed by the PRINT SCREEN Statement The PRINT SCREEN I/O sequence begins with a top-of-form operation. Each screen line is written in a separate record; trailing blanks and trailing null values are suppressed. Printing starts with the line at the top of the screen and proceeds through the line at the bottom of the screen.
Procedure Division RECEIVE UNSOLICITED MESSAGE Statement YIELDS rcv-message identifies an 01 level message name in either the Working-Storage Section or the Message Section. CODE FIELD [ IS ] code-field defines the location, length, and data type of the rcv-code field in the unsolicited message.
Procedure Division RECEIVE UNSOLICITED MESSAGE Statement The following rules apply: • • The RECEIVE UNSOLICITED MESSAGE statement completes immediately if the unsolicited message queue for the SCREEN COBOL program contains a message; otherwise, the RECEIVE UNSOLICITED MESSAGE statement will wait for the arrival of an unsolicited message or a timeout, if a timeout was specified. The execution of the RECEIVE UNSOLICITED MESSAGE is the beginning step in processing any unsolicited message.
Procedure Division RECONNECT MODEM Statement 2. When the unsolicited message arrives, the RECEIVE UNSOLICITED MESSAGE statement moves the message to R-MSG-1 or R-MSG-2 depending on the receive code value. The statement also moves a number 1 or 2 into the TERMINATIONSTATUS register depending on the position of the receive code in the statement.
Procedure Division REPLY TO UNSOLICITED MESSAGE Statement The RECONNECT MODEM statement causes a full context checkpoint. If Pathway/iTS is running under TMF and a terminal or intelligent device is in transaction mode, this statement backs out the current transaction and suspends the terminal or device so that it cannot be resumed. If an ABORT-TRANSACTION statement precedes the RECONNECT MODEM statement, Pathway/iTS attempts to resume communication with the terminal or device after a modem error.
Procedure Division RESET Statement ON ERROR imperative-stmt specifies action to be taken should an error occur in sending the message. If an error occurs, imperative-stmt is executed. The TERMINATION-STATUS special register contains a value indicating the cause. Consider the following SCREEN COBOL example that uses the REPLY TO UNSOLICITED MESSAGE statement: PROCEDURE DIVISION. MESSAGE-RESPONSE. REPLY TO UNSOLICITED MESSAGE WITH MY-REPLY ON ERROR PERFORM ERROR-HANDLER. ERROR-HANDLER.
Procedure Division RESET Statement Note. During execution of a SCREEN COBOL program, the TCP controls the MDTs (modified data tag) in the same way it controls display attributes; with two important exceptions: • • When a TURN TEMP statement selects an input field for changing display attributes, the MDT bit is always set. When a RESET TEMP statement selects an input field for resetting of attributes, the MDT bit is set, regardless of the initial MDT attribute of the field.
Procedure Division RESET Statement SHADOWED selects from the screen-identifier list only those fields that have SHADOWED items in which the SELECT bit is set; fields that do not have SHADOWED items are not selected. Note. If neither the DEPENDING ON modifier nor the SHADOWED modifier is specified, all fields in the screen-identifier list are selected. When the RESET statement is executed, the attributes and data of the selected fields are reset to their initial values.
Procedure Division RESTART-TRANSACTION Statement BODY-PARAGRAPH. : DISPLAY BASE MENU1. TURN REVERSE IN MENU1. DISPLAY MENU1. : RESET SCREEN-TABLE(1), SCREEN-TABLE(2), SCREEN-TABLE(3), SCREEN-TABLE(4), DEPENDING ON WS-SCREEN-STATUS. If WS-SCREEN-STATUS equals 1, the displayed value and video attribute for SCREEN-TABLE(1) are reset to the states declared in the screen definition.
Procedure Division SCROLL Statement SCROLL Statement The SCROLL statement moves the contents of an overlay area up or down. This statement can be used only with the 6510 terminal; it cannot be used for communicating with other terminals or with intelligent devices. SCROLL { UP } overlay-area-name { DOWN } UP moves the data displayed in the overlay area of the screen up one line toward the top of the screen.
Procedure Division SEND Statement identifier-1 is a data item to be sent to the server. The data item represented by this identifier cannot exceed 32000 bytes. If identifier-1 is a variable-length data item, the SEND statement sends only the currently defined occurrence (a variable-length data item is an item defined with an OCCURS DEPENDING ON clause). If this parameter is omitted, zero bytes are sent to the server. A reply will still be returned from the server.
Procedure Division SEND Statement TERMINATION-STATUS can be used to identify the actual reply code received as described later in this section. VARYING can be used to control error logging when variable-length replies are expected. When the ON ERROR clause is present, the keyword VARYING suppresses the logging of error 3115 (TRANSACTION REPLY SIZE INVALID) when the reply is shorter than the YIELDS buffer. Error 3115 is still logged whenever the reply length exceeds the length of the YIELDS buffer.
Procedure Division SEND Statement Use of Reply Codes and Termination Status A message containing a variable-length data item cannot be easily decomposed by a server written in COBOL; the only exception is when the variable-length data item is the last item of the message. If a server is to process more than one type of message, a data item of the message should contain a field that identifies the type of transaction unless the content of the data itself determines the transaction type.
Procedure Division SEND Statement Consider the following example of the SEND statement: 77 YEARLY-REVIEW PIC 999 VALUE 3. : MOVE YEARLY-REVIEW TO TRANSCODE OF HEADER. SEND HEADER, LASTNAME OF PERSONAL-REC TO "SALARY-UPDATE" REPLY CODE 1 YIELDS R-CODE, NEW-SALARY-CODE CODE 2 YIELDS R-CODE, NEW-SALARY, STOCK-OPTION CODE 0 YIELDS R-CODE, TERMINATION-NOTICE ON ERROR PERFORM SERVER-DUMB. The example is executed as follows: 1.
Procedure Division SEND Statement For a SEND the TCP allocates a WRITEREAD buffer of length 1 + max(,). The value of TERMINATION-SUBSTATUS depends on the length of the actual reply, the length of the YIELDS buffer, and the length of the WRITEREAD buffer as follows: • • • • • Case 1: server reply shorter than YIELDS buffer. In this case TERMINATIONSUBSTATUS = server reply length. Case 2: server reply length = YIELDS buffer length. In this case TERMINATIONSUBSTATUS is undefined.
Procedure Division SEND Statement This example is executed as follows: 1. Regardless of the actual reply code, if the reply length equals the length of the Working-Storage item rply-a, the reply is stored in rply-a, and the program branches back to the paragraph that performed SAMPLE-PARAGRAPH-2. 2.
Procedure Division SEND Statement ERR-PARAGRAPH. IF TERMINATION-STATUS = 11 MOVE length-mismatch TO err-flag ELSE MOVE genuine-err TO err-flag. ADJUST-RP-LEN. IF rp-cd = 15 PERFORM set-rp-1-len ELSE IF rp-cd = 37 PERFORM set-rp-2-len. SET-RP-1-LEN. IF rp-len > max-rp-1-len MOVE max-rp-1-len TO rp-len. SET-RP-2-LEN. IF rp-len > max-rp-2-len MOVE max-rp-2-len TO rp-len. GOOD-REPLY-PARAGRAPH. IF rp-cd = 15 PERFORM rp-1-paragraph ELSE IF rp-cd = 37 PERFORM rp-2-paragraph ELSE PERFORM logic-err-paragraph.
Procedure Division SEND Statement Sending to an External PATHMON Process The following program example illustrates the two ways you can use the SEND statement to access a server class controlled by an external PATHMON process (a PATHMON process in a different PATHMON environment than that of the requesting TCP). DATA DIVISION. WORKING-STORAGE SECTION. : 01 WS-DEFAULT-NAMES. 05 WS-DEFAULT-SERVER 05 WS-DEFAULT-PATHMON 05 WS-DEFAULT-SYSTEM : 01 WS-SCRN1-FIELDS.
Procedure Division SEND Statement The following list of messages contains an explanation of the error numbers in the TERMINATION-STATUS special register. TERMINATION-STATUS 1 SERVER CLASS FROZEN Cause. The server class to which the message is directed is frozen. Action Without ON ERROR Clause. The system waits until the server class is thawed by execution of a PATHCOM THAW SERVER command, then continues with the processing of the SEND statement. TERMINATION-STATUS 2 RESOURCE UNAVAILABLE Cause.
Procedure Division SEND Statement Action Without ON ERROR Clause. The system periodically rerequests a link. When the server class is added to the configuration, the system continues with the processing of the SEND statement. TERMINATION-STATUS 6 ILLEGAL SERVER CLASS NAME Cause. The value given for the name of the server class does not have the format of a valid server class name. Action Without ON ERROR Clause. The system suspends the terminal with a fatal error.
Procedure Division SEND Statement TERMINATION-STATUS 11 REPLY LENGTH INVALID Cause. The length of the reply received from the server is not equal to the length specified by the selected YIELDS list. Note. The TERMINATION-SUBSTATUS special register contains the following additional information: reply length received (in bytes). TERMINATION-STATUS 12 I/O ERROR Cause. A file system error occurred during the WRITEREAD to the server, or a timeout on the server occurred. Note.
Procedure Division SEND Statement TERMINATION-STATUS 16 ILLEGAL SYSTEM NAME Cause. The value given for the system name does not have the correct format. (For example, the first character is not a \.) TERMINATION-STATUS 17 ILLEGAL PATHMON NAME Cause. The value given for the name of PATHMON process does not have the correct format. (For example, the first character is not a $.) TERMINATION-STATUS 18 PATHMON I/O ERROR Cause.
Procedure Division SEND MESSAGE Statement SEND MESSAGE Statement The SEND MESSAGE statement sends a message to an intelligent device, receives a reply from that device, or both sends a message and receives a reply. The message data structure can be identified by either a message template in the Message Section or a level 01 data item in the Working-Storage Section.
Procedure Division SEND MESSAGE Statement The offset of the specified field from the beginning of its record dictates the offset of the reply-code field from the beginning of the reply-message. The length of the specified field dictates the length of the reply-code field. The data type of the specified field dictates the data type of the reply-code field. The reply-code in all reply-messages must be the same length and have the same offset; reply codes need not have the same name.
Procedure Division SEND MESSAGE Statement MESSAGE statement, only the first 3161 timeout encountered by each TCP configured under a PATHMON process is logged. An additional 3161 timeout is logged when the primary TCP fails and the backup TCP takes over and encounters the timeout. The TCPs filter out all other 3161 timeout errors. If the ON ERROR clause is not used and a 3161 timeout occurs, the corresponding terminal is suspended after the timeout is logged.
Procedure Division SEND MESSAGE Statement the message, is converted and edited according to the message definition, and is then sent to the intelligent device. ° If send-message identifies an 01 level data item in Working-Storage, the data is neither validated nor converted but is sent as is to the device, unless the USER CONVERSION clause is included.
Procedure Division • SEND MESSAGE Statement Execution considerations: ° Pathway/iTS does not buffer multiple messages. Each message is transmitted to the intelligent device when SEND MESSAGE is executed. ° SCREEN COBOL programs handle synchronization of messages between the program and the intelligent device. This means that the program must detect duplicate messages from the intelligent device. ° Pathway/iTS does no checkpointing when SEND MESSAGE is executed.
Procedure Division SEND MESSAGE Statement 3. If the SEND MESSAGE statement detects an error, it sets TERMINATIONSTATUS to a value indicating the type of error and performs the procedure DEVICE-DUMB. The reply code values could also be numeric. Consider the following example: SEND MESSAGE INQUIRY REPLY CODE FIELD IS REPLY-CODE-FIELD OF MESSAGE-REPLY-OK CODE 1, 21, 31 YIELDS MESSAGE-REPLY-OK CODE 2, 42, 62 YIELDS MESSAGE-REPLY-NOGOOD ON ERROR PERFORM DEVICE-DUMB.
Procedure Division SEND MESSAGE Statement MOVE OP-BAD-SESSION TO OP-OUTCOME ELSE IF TERMINATION-SUBSTATUS = 189 MOVE OP-WONT-QUIESCENT TO OP-OUTCOME. To detect the arrival of an unsolicited message, the program must process the condition code value in the TERMINATION-STATUS special register.
Procedure Division SET Statement Table 6-6. TERMINATION-SUBSTATUS Values for SEND MESSAGE Statement TERMINATIONSUBSTATUS Meaning With UNSOLICITED MESSAGE Clause 187 No data Front-end process in quiescent state. The SCREEN COBOL program unit processes the message, can resume the session, or take other action depending on the message. Front-end process in quiescent state. The SCREEN COBOL program unit performs TIMEOUT processing and resumes the session. 188 Data lost Data or context lost.
Procedure Division SET Statement an elementary input item of any base or overlay screen that is currently displayed. If screen-identifier is a group, all subordinate elementary items that have a TO, FROM, or USING phrase in their definitions are included in the reference. screenidentifier cannot be a subscripted item. The default cursor position is the first screen field defined with a TO or USING clause for the current ACCEPT statement.
Procedure Division SET MINIMUM-ATTR Statement The DEPENDING ON clause for the SET statement is analogous to the DEPENDING ON clause for the PERFORM ONE statement. The following example illustrates this. WORKING-STORAGE SECTION. : 77 ws-screen-status PIC 01 ws-fld1 PIC 01 ws-fld2 PIC 01 ws-fld3 PIC 9(4) x(10). x(10). x(10). COMP VALUE 1. SCREEN SECTION. : 01 MENU1 SIZE 24, 80. 05 screen-fld1 at 4, 20 PIC X(10) from fld1. 05 screen-fld2 at 5, 40 PIC X(10) from fld2.
Procedure Division SET MINIMUM-ATTR Statement The Working-Storage group item template for highlight and outline display attributes must be defined in Working-Storage as follows: 01 WS-MINIMUM-ATTRIBUTE. 02 FILLER 02 IBM-BASE-ATTR 02 IBM-FIELD-REVERSE 02 IBM-FIELD-BLINK 02 IBM-FIELD-UNDERLINE 02 IBM-FIELD-OUTLINE • • • PIC PIC PIC PIC PIC PIC 9(04) 9(04) 9(04) 9(04) 9(04) 9(04) COMP. COMP. COMP. COMP. COMP. COMP.
Procedure Division SET MINIMUM-COLOR Statement SET MINIMUM-COLOR Statement The SET MINIMUM-COLOR statement establishes the minimum level of support for color display attributes. SET MINIMUM-COLOR USING data-name. data-name specifies the Working-Storage group item template for color display attributes, which must be defined as follows: 01 WS-MINIMUM-COLOR. 02 FILLER 02 IBM-PARTIAL-COLOR 02 IBM-FULL-COLOR • • PIC 9(04) COMP. PIC 9(04) COMP. PIC 9(04) COMP.
Procedure Division SUBTRACT Statements SUBTRACT Statements The SUBTRACT statements subtract elementary numeric data items and set the results in specific data items. The forms of the SUBTRACT statements are: SUBTRACT SUBTRACT GIVING SUBTRACT CORRESPONDING Each form is described in the following paragraphs. SUBTRACT Statement The SUBTRACT statement totals all data items before keyword FROM and then subtracts that sum from the current value of each data item after keyword FROM. SUBTRACT { sub-1 } ,...
Procedure Division SUBTRACT Statements SUBTRACT CORRESPONDING Statement The SUBTRACT CORRESPONDING statement subtracts elementary items in one group from any corresponding items in another group. Items correspond when they have the same names and qualifiers up to but not including the group item name specified in the SUBTRACT CORRESPONDING statement.
Procedure Division TERMINALINFO Statement TERMINALINFO Statement The TERMINALINFO statement returns information about terminals. From this information you can determine what action is to be taken if a terminal does not support the required extended field attributes. TERMINALINFO USING data-name. data-name specifies the Working-Storage group item template for color, highlight, and outline display attributes supported by a terminal.
Procedure Division • • • TERMINALINFO Statement IBM-PARTIAL-COLOR indicates whether the terminal supports three colors. ° 1 indicates that the terminal supports three colors. ° 0 indicates that the terminal does not support three colors. IBM-FULL-COLOR indicates whether the terminal supports six colors. ° 1 indicates that the terminal supports six colors. ° 0 indicates that the terminal does not support six colors.
Procedure Division TRANSFORM Statement TRANSFORM Statement The TRANSFORM statement replaces a set of Working-Storage Section data items with another set of Working-Storage Section data items. TRANSFORM trans-rec-out [ SELECT CODE FIELD [ IS ] code-field ] {YIELDS trans-rec-in } { } {{CODE select-code [,select-code]...YIELDS trans-rec-in}...
Procedure Division • • • TRANSFORM Statement Offset—0 bytes offset from beginning of the record Length—2 bytes Data type—COMPUTATIONAL numeric data item You need to specify this clause when the location, length, and data type of the select-code field is other than the default. The code-field parameter in this clause specifies a field name in the WorkingStorage Section.
Procedure Division TRANSFORM Statement On either the output or input phase, if the data is mapped through the Message Section, the Message Section entry specifies which Working-Storage Section items to process. In addition, the Message Section entry defines the characteristics of the data, including order, format, and length. If the data transformation capabilities of ordering, editing, and conversion are not used, TRANSFORM acts as a move statement.
Procedure Division 05 05 TRANSFORM Statement WS-DEST-2-FLD2 WS-DEST-2-FLD3 PIC X(30). PIC X(40). MESSAGE SECTION. 01 MS-SOURCE PIC X(102) FROM WS-SOURCE. 01 DESTINATION-TEMP-1. 05 FILLER 05 MS-DEST-1-FLD1 05 MS-DEST-1-FLD2 PIC 9(4) COMP. PIC X(50) TO WS-DEST-1-FLD1. PIC X(50) TO WS-DEST-1-FLD2. DESTINATION-TEMP-2. 05 FILLER 05 MS-DEST-2-FLD1 05 MS-DEST-2-FLD2 05 MS-DEST-2-FLD3 PIC PIC PIC PIC 01 9(4) COMP. X(30) TO WS-DEST-2-FLD1. X(30) TO WS-DEST-2-FLD2. X(40) TO WS-DEST-2-FLD3.
Procedure Division TRANSFORM Statement DESTINATION-TEMP-1. If the select code is 64 or 74, TRANSFORM sends the data through DESTINATION-TEMP-2. TRANSFORM moves a number from 1 to 4 into the TERMINATION-STATUS register depending on the position of the select code relative to the other possible select codes.
Procedure Division 05 05 01 TURN Statement MS-DEST-1-FLD2 MS-DEST-1-FLD3 DESTINATION-TEMP-2. 05 MS-DEST-2-FLD1 05 FILLER 05 MS-DEST-2-FLD2 05 MS-DEST-2-FLD3 PIC X(20) TO WS-DEST-1-FLD2. PIC X(50) TO WS-DEST-1-FLD3. PIC PIC PIC PIC X(30) TO WS-DEST-2-FLD1. 9(4) COMP. X(30) TO WS-DEST-2-FLD2. X(40) TO WS-DEST-2-FLD3. PROCEDURE DIVISON.
Procedure Division TURN Statement mnemonic-name specifies the display attributes to be used. The mnemonic-name must be associated with one or more display attributes through an IS phrase in the SPECIAL-NAMES paragraph in the Environment Division of the program. DYNAMIC indicates that the specified screen field can have its screen attributes constructed from a combination of the screen field’s attributes as defined at compile time and the attribute settings as defined in the control structure.
Procedure Division TURN Statement Table 6-7 shows the criteria for determining the selection of a screen field in a TURN operation. Table 6-7.
Procedure Division Attribute Handling for IBM 3270 Terminals PROCEDURE DIVISION. : BODY-PARAGRAPH. : DISPLAY BASE MENU1. DISPLAY MENU1. TURN REVERSE IN SCREEN-FLD1, SCREEN-FLD2, SCREEN-FLD3, DEPENDING ON WS-SCREEN-STATUS. If WS-SCREEN-STATUS equals 1, SCREEN-FLD1 is displayed in REVERSE. If WSSCREEN-STATUS equals 2, SCREEN-FLD2 is displayed in REVERSE, and so on. It is not considered erroneous if WS-SCREEN-STATUS < 1 or WS-SCREEN-STATUS>3.
Procedure Division Attribute Handling for 6500-Series Terminals Attribute Handling for 6500-Series Terminals The following table shows how SCREEN COBOL handles multiple attributes for 6500series terminals. PROTECHIDDEN TED BLINK HIDDEN MDTON DIM Hidden Hidden & Hidden & Hidden Area is Protected Blink and Mdton Dim. Text is Hidden. PROTEC- Protected Protected TED & Hidden UNDERREVERSE LINE Area is Reverse. Text is Hidden.
Procedure Division USE FOR TERMINAL-ERRORS Statement The USE FOR TERMINAL-ERRORS clause is invoked when there is an irrecoverable error due to a terminal error or communications device error. The Declaratives procedure does not apply to errors detected by logic in the SCREEN COBOL program. Note that the DISPLAY RECOVERY statement cannot be used in a USE FOR SCREEN RECOVERY statement. The USE FOR SCREEN RECOVERY statement cannot be used by programs that communicate with intelligent devices.
Procedure Division USE FOR TERMINAL-ERRORS Statement irrecoverable. It differs in this respect from the USE FOR SCREEN RECOVERY statement that executes its declaratives procedure only after the terminal is suspended and resumed. If an irrecoverable terminal I/O error occurs and the program does not contain a USE FOR TERMINAL-ERRORS statement, the program suspends.
Procedure Division USE FOR TERMINAL-ERRORS Statement file-system error code just as in steps 1 and 2, but resumes execution at the next statement in the procedure itself. The USE FOR TERMINAL-ERRORS declarative is both simple and powerful. It allows you maximum control when a terminal I/O error occurs, but it can lead to unexpected results. You should be careful both in how you use this procedure and for what purpose.
Procedure Division 01 06 ACCT-SN 06 ACCT-SUFF 04 ACT-BAL 02 LAST-REC. 04 NAME 04 ACCT-NUM. 06 ACCT-PRE 06 ACCT-SN 06 ACCT-SUFF 04 ACT-BAL REPLY-STRUCT. 02 OUTCOME 02 EXTENSION . . . USE FOR TERMINAL-ERRORS Statement PIC 99999. PIC X(4). PIC 999999V99. PIC A(33). PIC PIC PIC PIC AA. 99999. X(4). 999999V99. PIC 999. PIC AAA. PROCEDURE DIVISION. DECLARATIVES. TERM-ERROR SECTION. USE FOR TERMINAL-ERRORS. TERM-ERROR-PROC. SEND CONTEXT-INFO TO TROUBLE-SERVER REPLY OUTCOME OF REPLY-STRUCT. TERM-ERROR-END.
7 Compilation The SCOBOLX run command invokes the SCREEN COBOL compiler. If you choose to use all default parameters, you would enter the command as follows: SCOBOLX Running the SCREEN COBOL Compiler The SCREEN COBOL compiler is usually run from the command interpreter. The syntax of the command is: SCOBOLX [ / [ IN source-file ] [ , OUT [ list-file ] ] [ , run-option ] ... / ] [ tclprog-file ] [ , copy-library ] [ ; compiler-command ] ... Note.
Compilation Running the SCREEN COBOL Compiler PRI priority specifies the execution priority. MEM num-pages specifies the maximum number of data pages. NOWAIT specifies the command interpreter does not suspend while the program runs. SWAP $disk-volume specifies the disk volume where the SCOBOLX and SCOBOLX2 process swap files are created.
Compilation Using Compiler-Generated Files copy-library is the name of an EDIT disk file. This file is used as the default library for source code when expanding a COPY statement that does not include a specific library name. copy-library has the form of a disk file name. If this parameter is omitted, COPYLIB is used.
Compilation Using PARAM SWAPVOL The SCREEN COBOL compiler recognizes the SAMECPU parameter passed in the command interpreter PARAM command. The format of the command is: PARAM SAMECPU number number is any nonzero number. A 0 disables SAMECPU. number does not designate which CPU the processes run in; that is controlled by the CPU run option. The command sequence to run processes in the same CPU is: TACL 1> PARAM SAMECPU 1 TACL 2> SCOBOLX/IN ... , OUT ...
Compilation Using Compiler Commands Using Compiler Commands Compiler commands provide information to the compiler and select compilation features. For example, compiler commands select the source format, the file to which the compiler writes object code, and listing options. Compiler commands also control selective compilation of portions of the source file.
Compilation Compiler Command Summary overrides all others. Commands specified in the source text override commands specified in the SCOBOLX run command. Compiler Command Summary Compiler commands are divided into categories by function. The categories and descriptions are: • • • • Option commands—Specify the source text input format, the source listing options, the title field of the page header, and compilation options. For more information about option commands see the OPTION Command on page 7-13.
Compilation Compiler Command Descriptions Table 7-1. Compiler Option Commands (page 2 of 2) Command Default SYMBOLS NOSYMBOLS SYNTAX COMPILE TANDEM WARN Table 7-2. Compiler Cross-Reference Commands Command Default CROSSREF NOCROSSREF NOCROSSREF Table 7-3. Compiler Toggle Commands Command Default ENDIF IF IFNOT RESETTOG SETTOG Compiler Command Descriptions The commands are described in alphabetic order in the following paragraphs.
Compilation COMPILE Command If this command is omitted, TANDEM is the source text format. Note. For programs that need to be executed using the Compaq Inspect debugging tool, the SYMBOLS compiler command is required so that the compiler will pass the necessary information to SYMSERV which stores the data in a symbol table file. If the ANSI compiler command is also used, then the information for each line is identified by a set of line numbers generated by the compiler.
Compilation CROSSREF Command CONDITIONS Items tested in the program that have condition names DATANAMES VARIABLES Data items defined in the Working-Storage Section LABELS PROCNAMES Paragraph names and section names LITERALS Numeric and nonnumeric literals MNEMONICS Mnemonic names associated with display attributes PROGRAMS Program unit names for called programs SCREEN Screen groups or fields described in the Screen Section UNREFS Items defined in the program, but never referred to Specifying CROSS
Compilation ENDIF Command ENDIF Command The ENDIF command terminates the effect of a preceding IF or IFNOT command. ENDIF toggle-number toggle-number is the toggle-number specified in the IF or IFNOT command. ERRORS Command The ERRORS command sets the maximum number of errors allowed during compilation. ERRORS nnnnn nnnnn is an integer from 0 through 32,767. If this command is omitted, the default limit is 100 errors. If the limit set by the ERROR command is exceeded, the compilation terminates.
Compilation IF Command IF Command The IF command causes the compiler to ignore subsequent source text unless the specified toggle is turned on with a SETTOG command. IF toggle-number toggle-number is an integer from 1 through 15. COPY statements are not affected by this command; these statements are still processed and expanded. The following example illustrates the IF command: ?RESETTOG 1, 2 . . . ?IF 2 . . . text . . . ?ENDIF 2 The source text bounded by the IF 2 and ENDIF 2 commands is ignored.
Compilation LINES Command . . . text . . . ?ENDIF 1 The source text bounded by the IFNOT 1 and ENDIF 1 commands will be compiled. LINES Command The LINES command sets the number of lines listed on each page. Whenever the next line to be listed would overflow the line count, a page is ejected and the standard page heading and two blank lines are listed at the top of the next page, followed by the pending line. LINES nnnnn nnnnn is an integer from 10 through 32,767.
Compilation OPTION Command OPTION Command The OPTION command controls the source text input format, the source listing options, the title field of the page header, and compilation options. [ OPTION ] command-option [ , command-option ] ...
Compilation RESETTOG Command RESETTOG Command The RESETTOG command turns off all specified toggles. RESETTOG [ toggle-number [ , toggle-number ] ... ] toggle-number is an integer from 1 through 15. If the toggle-number option is omitted, all toggles are turned off. SECTION Command The SECTION command is used to identify individual texts in a SCREEN COBOL source library accessed by a COPY statement. The command is ignored if it appears in the text of the compilation source file.
Compilation SHOWCOPY Command If the toggle-number option is omitted, all toggles are turned on. SHOWCOPY Command The SHOWCOPY command specifies listing the COPY statement as a comment line in the list file before the copied statements. The NOSHOWCOPY disables SHOWCOPY. { SHOWCOPY } { NOSHOWCOPY } If this command is omitted, SHOWCOPY is assumed. SMAP Command The SMAP command creates a descriptor map following the listing of the program or subprogram source text.
Compilation SYNTAX Command SYNTAX Command The SYNTAX command requests a syntax check of the source text only. No object file is produced. SYNTAX If this command and the COMPILE command are omitted, COMPILE is assumed. If this command is specified with the CROSSREF command, no cross-reference listing is produced. If the SYNTAX option is specified, the MAP and SMAP commands do not produce statement offset lists.
Compilation Compilation Statistics Compilation Statistics Statistics are printed at the end of every compilation. For example: OBJECT FILE NAME IS $MART.BEN.POBJ PROGRAM NAME IS EXAMPLE PROGRAM VERSION IS 1 NO. ERRORS=0; NO. WARNINGS=0 CODE SIZE=245 RUN UNIT SIZE=748 DATA SIZE=328 NUMBER OF SOURCE LINES READ=147 MAXIMUM SYMBOL TABLE SIZE=4920 WORDS ELAPSED TIME 0:00:32 OBJECT FILE NAME IS the short form of the object file name.
Compilation Stopping the Compiler NUMBER OF SOURCE LINES READ the total number of source lines read by the SCREEN COBOL compiler, including any COPY lines. MAXIMUM SYMBOL TABLE SIZE = the number of words that the compiler needed for its symbol table (this is a snapshot view and should be considered only a rough estimate). ELAPSED TIME - wall-clock elapsed time for the compilation. Stopping the Compiler A compilation is performed by three compiler processes.
Compilation SCREEN COBOL Limits SCREEN COBOL Limits The Compaq NonStop™ Himalaya system architecture and the method of implementing the SCREEN COBOL compiler impose certain limits on programs, such as: • • • • • A nonnumeric literal cannot exceed 120 characters. A numeric literal cannot exceed 18 digits. The value of numeric data cannot exceed 18 digits. The maximum total size of a SCREEN COBOL program unit is 65,408 bytes. Of that, the pseudocode is restricted to a maximum of 32,767 bytes.
Compilation SCREEN COBOL Limits Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001 7- 20
8 Pathway Application Example This section provides a sample Pathway application, including the commands that create the PATHMON and PATHCOM processes, sample commands that configure Pathway and define the components to be used, two SCREEN COBOL programs to illustrate general programming concepts for terminals operating in block mode and for terminals operating in conversational mode, and an associated server program written in COBOL.
Pathway Application Example • PATHMON and PATHCOM Process Creation If a configured terminal has a command interpreter, the terminal operator must type PAUSE to activate the SCREEN COBOL application on the terminal. The sample SCREEN COBOL requester program for terminals operating in block mode describes a base screen only that appears as shown in the following example. The program accepts operator input that consists of a name and address until an appropriate function key is pressed.
Pathway Application Example SET PATHWAY SET PATHWAY SET PATHWAY SET PATHWAY SET PATHWAY SET PATHWAY START PATHWAY MAXSERVERPROCESSES 5 MAXSTARTUPS 5 MAXASSIGNS 5 MAXPARAMS 5 MAXPATHCOMS 3 MAXPROGRAMS 1 COLD ! RESET TCP SET TCP SET TCP SET TCP SET TCP SET TCP SET TCP ADD TCP CPUS 1:2 PROGRAM $SYSTEM.SYSTEM.
Pathway Application Example SCREEN COBOL Program for Block Mode F7-KEY IS F7, F16-KEY IS F16 ATTENTION IS BLINK, HIDDEN IS HIDDEN. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS. 02 ERROR-MSG 02 PASSWORD 02 DEPT-HEADER PIC X(77). PIC X(3). PIC X(3). 01 EXIT-FLAG 88 EXIT-PROGRAM PIC S9 VALUE 1. 01 ENTRY-MSG. 02 PW-HEADER. 04 REPLY-CODE 04 APPLICATION-CODE 04 FUNCTION-CODE 04 TRANS-CODE 04 TERM-ID 04 LOG-REQUEST 02 ENTRY-GROUP. 04 NAME-IN 04 ADDR-IN 04 DATE-GRP.
Pathway Application Example SCREEN COBOL Program for Block Mode 03 DATA-IN. 05 FILLER 05 NAME-IN AT 5, 1 AT 5, 8 05 FILLER 05 ADDR-IN AT 6, 1 AT 6, 8 VALUE "NAME :". PIC A(30) LENGTH 1 THRU 30 TO NAME-IN OF ENTRY-MSG, FILL "_". VALUE "ADDR :". PIC X(20) LENGTH 1 THRU 20 TO ADDR-IN OF ENTRY-MSG, FILL "_". (6) (6) 05 DATE-GRP AT 8, 1. (7) 07 FILLER AT @, 1 VALUE "MONTH :".
Pathway Application Example SCREEN COBOL Program for Block Mode PROCEDURE DIVISION. A-MAIN. DISPLAY BASE EXAMPLE-SCREEN MOVE "MKT" TO DEPT-HEADER OF WS. DISPLAY DEPT-HEADER OF EXAMPLE-SCREEN ACCEPT PASSWORD OF EXAMPLE-SCREEN UNTIL F1-KEY PERFORM CASE-MANAGER UNTIL EXIT-PROGRAM. A-EXIT. EXIT PROGRAM. (1) (2) (3) CASE-MANAGER.
Pathway Application Example SCREEN COBOL Program for Conversational Mode (5) The key that was pressed to terminate the ACCEPT statement has a positional value associated with it from the ACCEPT statement; the key is put into TERMINATION-STATUS. (6) All unprotected fields are cleared. (7) This line resets the fields to the initial values and FILL characters declared. (8) This line causes SERVER-RECORD to blink by setting the BLINK attribute.
Pathway Application Example 88 88 SCREEN COBOL Program for Conversational Mode WS-SHOW-REQUEST WS-EXIT-REQUEST VALUE "SHOW". VALUE "EXIT". 01 EXIT-FLAG 88 EXIT-PROGRAM 88 INVALID-RESPONSE PIC 9(01) COMP VALUE ZERO. VALUE 1. VALUE 2. 01 MESSAGE-ID PIC 9(04) COMP VALUE ZERO. 01 R-CODE 88 SEND-ERROR PIC 9(04) COMP VALUE ZERO. VALUE 999. (1) These lines give the program name that you use in the SET TERM INITIAL command.
Pathway Application Example SCREEN COBOL Program for Conversational Mode 01 EMPLOYEE-REC-PROMPT OVERLAY SIZE 1, 80. 05 FUNC-PROMPT AT 1, 1 VALUE "(FUNCTION) SEARCH, ADD, "DELETE, SHOW, EXIT: ". 05 FUNC-INPUT AT 1, 45 PIC X(06) TO WS-FUNC UPSHIFT INPUT LENGTH MUST BE 3 THRU 6 PROMPT FUNC-PROMPT. (1) These lines are instructive comments about the input control characters. They are not required by SCREEN COBOL.
Pathway Application Example SCREEN COBOL Program for Conversational Mode ELSE IF WS-SHOW-REQUEST PERFORM SHOW-IT ELSE IF WS-EXIT-REQUEST PERFORM EXIT-IT ELSE PERFORM INVALID-FUNCTION. SEARCH-IT. MOVE 1 TO MESSAGE-ID. SEND MESSAGE-ID, EMPLOYEE-REC TO "USER-SERVER" REPLY CODE 1 YIELDS R-CODE, EMPLOYEE-REC CODE 2 YIELDS R-CODE ON ERROR MOVE 999 TO R-CODE. IF NOT SEND-ERROR PERFORM ONE OF DISPLAY-EMPLOYEE-REC, EMPLOYEE-NOT-FOUND DEPENDING ON R-CODE ELSE PERFORM SEND-ERROR-NOTICE. ADD-IT. MOVE 2 TO MESSAGE-ID.
Pathway Application Example Server Program in COBOL EMPLOYEE-ALREADY-EXISTS. MOVE "EMPLOYEE ALREADY EXISTS" TO WS-ADVISORY. DISPLAY ADVISORY-FLD. EMPLOYEE-DELETED. MOVE "EMPLOYEE DELETED" TO WS-ADVISORY. DISPLAY ADVISORY-FLD. INIT-EMPLOYEE-REC. MOVE SPACES TO EMPLOYEE-REC. MOVE ZEROES TO EMP-ZIP. INVALID-FUNCTION. MOVE 2 TO EXIT-FLAG. MOVE "INVALID FUNCTION REQUESTED" TO WS-ADVISORY. DISPLAY ADVISORY-FLD. SEND-ERROR-NOTICE. MOVE "ERROR ACCESSING PERSONNEL SYSTEM" TO WS-ADVISORY. DISPLAY ADVISORY-FLD.
Pathway Application Example Server Program in COBOL 01 ERROR-REPLY. 02 REPLY-CODE PIC S9(4) COMP. 02 FILLER PIC X(22). 02 ERROR-CODE PIC S999 COMP. WORKING-STORAGE SECTION. 01 RECEIVE-FILE-STATUS. 02 STAT-1 PIC 9. 88 CLOSE-FROM-REQUESTOR VALUE 1. 02 STAT-2 PIC 9. PROCEDURE DIVISION. BEGIN-COBOL-SERVER. OPEN INPUT MESSAGE-IN. OPEN OUTPUT MESSAGE-OUT SYNCDEPTH 1. PERFORM B-TRANS UNTIL CLOSE-FROM-REQUESTOR. STOP RUN. B-TRANS. MOVE SPACES TO ENTRY-REPLY, ENTRY-MSG. READ MESSAGE-IN, AT END STOP RUN.
A Advisory Messages The Pathway terminal control process (TCP) displays messages in the advisory field. The advisory field is an alphanumeric output field defined in the ADVISORY fieldcharacteristic clause of the Screen Section. Messages in this field primarily describe errors detected during input checking. The text of each standard message is a brief indication of the condition that invoked the message.
Advisory Messages Messages and Descriptions 5 FIELD NOT CORRECT LENGTH Cause. The input does not have an allowed length. 6 FIELD TOO LONG Cause. The input is too long. Generally, this occurs only when the terminal’s formatting has been corrupted. 7 WRONG FORMAT Cause. Input to an alphanumeric item does not obey the PICTURE clause. 8 WRONG FORMAT: DIGIT EXPECTED Cause. Input to an alphanumeric item does not have a digit where a 9 symbol appeared in the PICTURE clause.
Advisory Messages Messages and Descriptions 12 VALUE INCORRECT Cause. The input value is not allowed by the MUST BE constraints. 13 MESSAGE: Cause. This text is used to prefix a tell message. 14 DEP OCCUR FLD ERR-INPUT RESTARTED Cause.
Advisory Messages Modifying or Replacing the Advisory Message Routine 18 WRONG FORMAT: KATAKANA NOT ALLOWED Cause. Katakana data was entered on a device that has not been configured for Katakana support. 19 WRONG FORMAT: INVALID ASIAN CHARACTERS Cause. Translation routines were unable to process the input character stream. Modifying or Replacing the Advisory Message Routine You can modify the Pathway advisory message routine or replace it with a routine of your own.
Advisory Messages Modifying or Replacing the Advisory Message Routine error-message numbers are to be used (through the use of user conversion procedures), the numbers should be larger than 100 to avoid conflict with future Pathway error numbers. The BUF parameter is a string buffer where the text associated with MSGNUM should be placed. The text cannot be longer than 255 characters. The MESSLEN parameter should be set to the length of the text returned.
Advisory Messages Modifying or Replacing the Advisory Message Routine Example A-1. ADVISORY^MESSAGE Source Listing (page 1 of 2) PROC ADVISORY^MESSAGE( ERRNUM, BUF, MESSLEN ); INT ERRNUM; ! THE ERROR NUMBER STRING .BUF; ! PLACE MESSAGE HERE INT .MESSLEN; ! RETURN MESSAGE LENGTH HERE (MAX 255) BEGIN ! RETURN THE MESSAGE (AND ITS LENGTH) FOR THE GIVEN ERROR NUMBER. ! THE MESSAGES SHOULD PROBABLY BE LIMITED TO 38 CHARACTERS TO ALLOW ! THE FULL MESSAGE TO FIT ON MOST SCREENS.
Advisory Messages Modifying or Replacing the Advisory Message Routine Example A-1.
Advisory Messages Modifying or Replacing the Advisory Message Routine Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001 A- 8
B Diagnostic Screens Diagnostic screens are displayed to inform the terminal operator if an error condition or termination occurs. Diagnostic screens are displayed unless the PATHCOM SET TERM command DIAGNOSTIC parameter is set off. When the parameter is set on (the default setting), the special register DIAGNOSTIC-ALLOWED is initialized to YES. Screen recovery is invoked following display of a diagnostic screen.
Diagnostic Screens TERMINAL STOPPED BY SYSTEM OPERATOR Cause. The terminal was stopped or aborted by command from the system operator. TERMINAL SUSPENDED BY SYSTEM OPERATOR Cause. The terminal was suspended by command from the system operator. TERMINAL SUSPENDED FOR SYSTEM ERROR Cause. The terminal was suspended because an error occurred during program execution. TERMINAL STOPPED FOR SYSTEM ERROR Cause.
Diagnostic Screens Example B-1. DIAG^FORMAT Parameter for Diagnostic Message Generation STRUCT DIAG^FORMAT^DEF( * ); BEGIN STRING CLASS; STRING SUBCLASS; INT ROW; INT ERRTYPE; STRING STRING INT INT STRING INT INT STRING INT END; LOG^TERM^NAME[ 0:14 ]; TERM^PRINTER[ 0:35 ]; ERRNUM; ERRINFO; PUNAME[ 0:30 ]; PUVERSION; INSTR^ADDR; INSTR^CODE[ 0:19 ]; CONTEXT; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! - ALL STRING ARRAYS ARE BLANK PADDED. CLASS 0 = IBM3270, 1 = T16-6510, 2 = T16-6520.
Diagnostic Screens Example B-2. DIAGNOSTIC^MESSAGE Source Listing (page 1 of 3) PROC DIAGNOSTIC^MESSAGE( DIAG^FORMAT, MESSAGE, MSGLEN, CONTEXT ); INT .EXT DIAG^FORMAT ( DIAG^FORMAT^DEF ); ! DIAGNOSTIC ! STRING .MESSAGE; ! RETURNED - MESSAGE TO BE DISPLAYED (IN LOWER 32K). INT .MSGLEN; ! RETURNED - LENGTH IN BYTES OF MESSAGE. INT .EXT CONTEXT; ! ONE WORD OF "OWN" STORAGE. SET TO ZERO ON FIRST ! CALL OF DIAGNOSTIC DISPLAY SEQUENCE.
Diagnostic Screens Example B-2. DIAGNOSTIC^MESSAGE Source Listing (page 2 of 3) MSGLEN:= 0; IF DIAG^FORMAT.ROW = DIAG^ROW^HEADER THEN BEGIN MESSAGE ':=' "PATHWAY ERROR REPORT: " -> @S; CALL TIMESTAMP( TS ); @S:= @S[ ASCII^TIMESTAMP( TS, S ) ]; MSGLEN:= @S '-' @MESSAGE; END ELSE IF DIAG^FORMAT.ROW = DIAG^ROW^TERMNAME THEN BEGIN MESSAGE ':=' "TERMINAL: " -> @S; S ':=' DIAG^FORMAT.LOG^TERM^NAME FOR 15 -> S32; ! Compiler required INT(32) to hold address here.
Diagnostic Screens Example B-2. DIAGNOSTIC^MESSAGE Source Listing (page 3 of 3) ELSE IF DIAG^FORMAT.ROW = DIAG^ROW^DEVNAME AND ( DIAG^FORMAT.ERRTYPE = DIAG^ERRTYPE^NOT^READY OR DIAG^FORMAT.ERRTYPE = DIAG^ERRTYPE^BUSY ) THEN BEGIN IF DIAG^FORMAT.TERM^PRINTER <> " " THEN BEGIN MESSAGE ':=' " PRINTER: " -> @S; S ':=' DIAG^FORMAT.TERM^PRINTER FOR 36 -> S32; ! Compiler required INT(32) to hold address here.
C SCREEN COBOL Compiler Diagnostic Messages The SCREEN COBOL compiler produces three types of diagnostic messages to report the severity of problems in the source text or compilation process: • • • Warnings—A warning message reports a questionable condition but does not inhibit code generation. Some warnings merely report a minor deviation from the conventions of the SCREEN COBOL language.
SCREEN COBOL Compiler Diagnostic Messages All messages carry a number, are preceded by the word FAILURE, WARNING, or ERROR, and are surrounded by asterisks. For example: ** FAILURE nnn ** ** WARNING nnn ** ** ERROR nnn ** 0 TOO MANY ERRORS Type. Failure Cause. The number of error diagnostics exceeds the limit specified. The default limit is 100. 1 UNABLE TO INVOKE COMPILER PROCESS Type. Failure Cause. The compiler is unable to invoke one of its processes.
SCREEN COBOL Compiler Diagnostic Messages 4 UNABLE TO OPEN (SOURCE/LIST) FILE Type. Failure Cause. The compiler is unable to open the specified file. The error code returned by the operating system is appended to the message. 5 UNABLE TO USE (SOURCE/LIST) FILE Type. Failure Cause. The message applies to one of the following conditions: • • • The source file does not have read capability, or the list file does not have write capability. Access to the source file (an EDIT file) failed.
SCREEN COBOL Compiler Diagnostic Messages 8 UNABLE TO OPEN COPY FILE Type. Failure Cause. The compiler is unable to open a COPY library file. The error code returned by the operating system is appended to the message. 9 UNABLE TO USE COPY FILE Type. Failure Cause. The message applies to one of the following conditions: • • The default COPY library file name is not a legal file name. The COPY library file is not an EDIT file or has been modified since the start of this compilation.
SCREEN COBOL Compiler Diagnostic Messages 12 SOURCE FILE EDITREAD FAILURE Type. Failure Cause. A read issued to the source file failed. The error code returned from the attempt to access the file is appended to the message. 13 COPY FILE EDITREAD FAILURE Type. Failure Cause. A read issued to the COPY library file failed. The error code returned from the attempt to access the file is appended to the message. 14 UNABLE TO CREATE RUN UNIT FILE Type. Failure Cause.
SCREEN COBOL Compiler Diagnostic Messages 17 COMPILER LOGIC ERROR Type. Failure Cause. Internal consistency checking has discovered an error in the compiler logic. Report this failure to your service provider. 18 DICTIONARY OVERFLOW Type. Failure Cause. Compiler dictionary space is insufficient for the number of items defined in the current program unit. The deficiency might be corrected by invoking the SCREEN COBOL compiler with a larger value for the MEM parameter.
SCREEN COBOL Compiler Diagnostic Messages 22 PROGRAM CODE SPACE OVERFLOW Type. Failure Cause. Either the code requirements for a single program unit or the cumulative requirements for the entire object file exceed the maximum code space available to SCREEN COBOL. 23 FILE ERROR ON RUN UNIT FILE Type. Failure Cause. An operation on the object file failed. The error code returned by the operating system is appended to the message. 25 INTERPROCESS MESSAGE OVERFLOW Type. Failure Cause.
SCREEN COBOL Compiler Diagnostic Messages 28 LITERAL EXCEEDS 120 CHARACTERS Type. Error Cause. A nonnumeric literal contains more than 120 characters. 29 LITERAL EXCEEDS 18 DIGITS Type. Error Cause. A numeric literal contains more than 18 digits. 30 WORD EXCEEDS 30 CHARACTERS Type. Error Cause. A SCREEN COBOL word contains more than 30 characters. 31 NOT SUPPORTED Type. Warning Cause. SCREEN COBOL does not support some of the optional elements of the ANSI COBOL language.
SCREEN COBOL Compiler Diagnostic Messages 32 ILLEGAL CONTEXT FOR RESERVED WORD Type. Warning Cause. A SCREEN COBOL reserved word is used as the text name or library name in a COPY statement. 32 ILLEGAL CONTEXT FOR RESERVED WORD Type. Error Cause. The indicated SCREEN COBOL reserved word cannot appear in this context. The cause for this message might be an attempt to define one of the reserved words as a user-defined name. 33 ILLEGAL CHARACTER Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 36 ILLEGAL INDICATOR CHARACTER Type. Warning Cause. The message applies to one of the following conditions: • The character in the indicator field of a source line is not - * / ? (hyphen, asterisk, slash, or question mark) or a blank space. • A continuation line appears as part of a comment entry in a paragraph of the Identification Division. 37 MISSING SEPARATOR Type. Warning Cause.
SCREEN COBOL Compiler Diagnostic Messages 40 INCORRECT NUMBER OF PARAMETERS Type. Error Cause. The number of operands in the USING clause of a CALL statement differs from the number of names in the USING Division header for the SCREEN COBOL subprogram it invokes. 41 NAME CONFLICT Type. Error Cause. The message applies to one of the following conditions: • The definition of a user-defined name in one class conflicts with its previous definition in another class.
SCREEN COBOL Compiler Diagnostic Messages 43 NON-STANDARD ALPHABET NOT SUPPORTED Type. Error Cause. The message applies to one of the following conditions: • • The program’s collating sequence is not standard. An integer value is out of the range of valid values; the range depends on the specific context. 44 SYNTAX ERROR DETECTED AT TOKEN: xxxxx Type. Error Cause. A syntax error occurred at the token pointed to by the indicator line. The compiler attempted to correct token xxxxx but could not.
SCREEN COBOL Compiler Diagnostic Messages 47 SYNTAX ERROR - DELETING UNEXPECTED TOKEN: xxxxx Type. Error Cause. A syntax error occurred at the token pointed to by the indicator line. The compiler attempted to correct the error by deleting token xxxxx. Verify the compiler's correction for accuracy in your program. 48 PARSING RESUMED AT TOKEN: xxxxx Type. Warning Cause. This message follows errors 44, 45, 46, and 47.
SCREEN COBOL Compiler Diagnostic Messages 51 EXPECTED UNSIGNED INTEGER Type. Error Cause. The message applies to one of the following conditions: • • A numeric literal in this context must be an unsigned integer. Only an unsigned integer numeric literal is permitted in this context. 52 0 NOT PERMITTED IN THIS CONTEXT Type. Error Cause. The indicated integer numeric literal cannot be zero in this context. 53 INTEGER NOT IN EXPECTED RANGE Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 55 OUT OF ORDER Type. Warning Cause. The position of a phrase, clause, or paragraph does not conform to SCREEN COBOL language requirements. 55 OUT OF ORDER Type. Error Cause. The message applies to one of the following conditions: • • The REDEFINES clause must be the first clause in a data description entry. A section of the Data Division occurs out of order. 56 DUPLICATE PHRASE Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 59 DUPLICATE SECTION Type. Error Cause. The indicated section header duplicates the function of a preceding one. 61 EXPECTED COMMAND WORD Type. Error Cause. A compiler command line must begin with the keyword of a command or with one of the command options defined for the OPTION command. 62 EXPECTED QUOTED STRING Type. Error Cause. The heading value in a HEADING command option must be a quoted string (that is, a nonnumeric literal). 63 EXPECTED COMMA Type.
SCREEN COBOL Compiler Diagnostic Messages 65 COMMAND NOT PERMITTED AFTER OPTION Type. Error Cause. A command keyword follows one or more command options. Only a single command is permitted on each command line. 66 TEXT NOT PERMITTED AFTER COMMAND Type. Error Cause. Additional text follows a complete command. Only a single command is permitted on each command line. 68 COMMAND NOT COMPATIBLE WITH PREVIOUS COMMANDS Type. Warning Cause. The SYNTAX and SYMBOLS commands are both used.
SCREEN COBOL Compiler Diagnostic Messages 72 MISSING SOURCE COMPUTER PARAGRAPH Type. Warning Cause. The Configuration Section should contain the SOURCE-COMPUTER paragraph. The default is SOURCE-COMPUTER. TANDEM/16. 73 MISSING OBJECT COMPUTER PARAGRAPH Type. Warning Cause. The Configuration Section should contain the OBJECT-COMPUTER paragraph. 75 ILLEGAL EXTERNAL FILE NAME FORM Type. Error Cause. An attempt to convert an external file name to an internal file name has failed.
SCREEN COBOL Compiler Diagnostic Messages 94 ALPHABET NAME NOT FOUND Type. Error Cause. The indicated name is either not defined or not an alphabet name. 111 CLAUSE NOT PERMITTED FOR THIS ENTRY Type. Error Cause. The indicated clause appears in an entry whose level number prohibits it. 112 NOT PERMITTED IN THIS SECTION Type. Error Cause. A VALUE clause defining an initial value appears in the Linkage Section or the Data Division. 113 ILLEGAL LEVEL NUMBER Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 115 MISSING 01 LEVEL ENTRY Type. Error Cause. A level number in the range 02 through 49 is not subordinate to a data description entry with level number 01; that is, it is not within a data structure. 116 PRECEDED BY VARIABLE OCCURRENCE TABLE Type. Error Cause. Within a data structure, the data description entry for a variable occurrence table (one containing an OCCURS clause with a range) cannot be followed by a data description entry with a lower level number.
SCREEN COBOL Compiler Diagnostic Messages 120 DO NOT QUOTE PICTURE STRING Type. Warning Cause. A PICTURE character string should not be written as a nonnumeric literal. The SCREEN COBOL compiler accepts the contents of the nonnumeric literal as the PICTURE character string. 121 PICTURE STRING EXCEEDS 30 CHARACTERS Type. Error Cause. The SCREEN COBOL language limits the representation of a PICTURE character string to 30 characters.
SCREEN COBOL Compiler Diagnostic Messages 125 LAST SYMBOL IS ',' OR '.' Type. Warning Cause. After removing the terminating comma, semicolon, period, or blank, the last character in the PICTURE character in the PICTURE character string is a comma or decimal point. The compiler accepts the picture and interprets the character in conformance with the presence or absence of the DECIMAL-POINT IS COMMA clause in the SPECIAL-NAMES paragraph. 126 PICTURE NOT PERMITTED FOR INDEX ITEM Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 130 SUBORDINATE SIGN CONFLICTS WITH GROUP SIGN Type. Error Cause. The data description for a containing group item has a SIGN clause. The description of the subordinate data item cannot specify different sign characteristics. 131 SIGN CLAUSE REQUIRES DISPLAY USAGE Type. Error Cause. The message applies to one of the following conditions: • • The data description entry for a containing group item has a SIGN clause.
SCREEN COBOL Compiler Diagnostic Messages 135 JUSTIFIED NOT PERMITTED IN GROUP WITH VALUE OR CONDITION NAME Type. Error Cause. The data description entry of a containing group item has a VALUE clause specifying an initial value or is followed by entries defining condition names for the group item. The subordinate data item cannot be described with the JUSTIFIED clause. 136 SYNCHRONIZED NOT PERMITTED FOR INDEX ITEM Type. Warning Cause. An indexed item may not have a SYNCHRONIZED clause.
SCREEN COBOL Compiler Diagnostic Messages 140 BLANK WHEN ZERO NOT COMPATIBLE WITH '*' Type. Error Cause. A data item cannot be described with both the BLANK WHEN ZERO clause and a picture containing the asterisk (*). BLANK WHEN ZERO syntax is enforced when used, but data items using this syntax cannot be accessed by SCREEN COBOL programs. 141 TOO MANY NESTED TABLES Type. Error Cause. The SCREEN COBOL language supports access to a data item with at most three subscripts.
SCREEN COBOL Compiler Diagnostic Messages 145 TOO MANY KEYS Type. Error Cause. There are more than 30 keys. 146 SUBORDINATE VALUE NOT PERMITTED WITH GROUP VALUE Type. Error Cause. The data description entry of a containing group item specifies an initial value for the group item. The subordinate data item cannot also specify an initial value. 147 ONLY ONE INITIAL VALUE PERMITTED Type. Error Cause. A data item cannot be initialized with more than one value.
SCREEN COBOL Compiler Diagnostic Messages 151 INITIAL VALUE NOT PERMITTED FOR REDEFINITION Type. Error Cause. A data item described in a redefinition cannot be initialized. 152 SIGNIFICANCE RANGE OF LITERALS EXCEEDS 18 DIGITS Type. Error Cause. The number of significant digits of a numeric literal exceeds 18. 153 NUMERIC LITERAL NOT COMPATIBLE WITH NONNUMERIC FIGURATIVE OR LITERAL Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 156 RENAME OBJECT NOT SUBORDINATE TO PRECEDING RECORD Type. Error Cause. A data item referenced in the RENAMES clause must be defined within the preceding data description. 157 RENAME OBJECT IN TABLE OR HAS VARIABLE SIZE Type. Error Cause. The RENAMES clause cannot reference a table item; in addition, it cannot reference a group data item which contains a table whose occurence is variable. 158 ILLEGAL RENAMES OBJECT RANGE Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 161 REDEFINITION OBJECT IS REDEFINITION Type. Error Cause. A data item described with a REDEFINES clause cannot itself be redefined. This restriction does not apply to a subordinate of a redefinition item unless its data description entry also contains a REDEFINES clause. 162 REDEFINITION OBJECT AND REDEFINITION NOT SUBORDINATE TO SAME LEVELS Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 166 MISSING RENAMES CLAUSE Type. Error Cause. The required RENAMES clause is missing from a data description entry with level number 66. 167 GROUP ITEM HAS ELEMENTARY ITEM CLAUSE Type. Error Cause. The data description entry of a group item has a BLANK WHEN ZERO, JUSTIFIED, SYNCHRONIZED, or PICTURE clause. These clauses can only describe an elementary data item.
SCREEN COBOL Compiler Diagnostic Messages 175 REDEFINITION HAS INCORRECT SIZE Type. Error Cause. The number of character positions occupied by a redefinition must equal the number of character positions occupied by the redefined data item(s), unless the redefinition begins at the 01 level. 176 NONNUMERIC FIGURATIVE OR LITERAL NOT PERMITTED FOR NUMERIC ITEM Type. Error Cause. The initial value for a numeric data item must be a numeric literal or one of the figurative constants ZERO, ZEROS, or ZEROES.
SCREEN COBOL Compiler Diagnostic Messages 180 NUMERIC LITERAL NOT PERMITTED FOR NONNUMERIC OR GROUP ITEM Type. Error Cause. A numeric literal can only be used as the initial value for an elementary numeric data item. 181 NONNUMERIC LITERAL EXCEEDS ITEM SIZE Type. Error Cause. Assignment of the initial value to the indicated data item would require truncation of one or more characters. 182 01 OR 77 LEVEL ITEM TOO LARGE Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 191 DEPENDING ITEM NOT SIMPLE UNSIGNED INTEGER DATA ITEM Type. Error Cause. Either the indicated name (referenced in the DEPENDING phrase of an OCCURS clause) does not identify an elementary unsigned integer data item, or access to the item requires subscripting. 192 DEPENDING ITEM IN TABLE Type. Error Cause. The indicated data item is allocated within the table it controls. The allocation is a result of an explicit or implicit redefinition.
SCREEN COBOL Compiler Diagnostic Messages 207 USING OPERAND IS REDEFINITION OR NOT LEVEL 01 OR LEVEL 77 DATA ITEM Type. Error Cause. SCREEN COBOL requires that a data item in the USING phrase be a level 01 or level 77 item. SCREEN COBOL does not permit a redefinition, including one of a level 01 or level 77 item, to appear in the USING phrase. 208 DATA ITEM PERMITTED ONLY ONCE AS USING OPERAND Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 212 TOO MANY ELEMENTARY ITEMS Type. Error Cause. The program defines more level 77 data items than the SCREEN COBOL compiler can address. 213 FEATURE NOT SUPPORTED BY SCREEN COBOL Type. Error Cause. There are many features not supported by SCREEN COBOL, of which this is one. 214 MULTIPLE UNIT COMPILES NOT SUPPORTED BY SCREEN COBOL Type. Error Cause. Multiple IDENTIFICATION divisions encountered during compilation.
SCREEN COBOL Compiler Diagnostic Messages 223 THIS SCREEN ITEM MUST HAVE BASE SPECIFICATION Type. Error Cause. The screen item must have a BASE clause specified. 224 THIS SCREEN ITEM MUST HAVE 'OVERLAY' SPECIFICATION Type. Error Cause. The screen item must have an OVERLAY clause specified. 225 THIS SCREEN ITEM MUST HAVE SIZE SPECIFIED Type. Error Cause. Overlay areas must have a SIZE clause. 226 THIS SCREEN ITEM MUST HAVE 'AREA' SPECIFICATION Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 229 THIS SCREEN ITEM MUST HAVE FROM (OR USING) DATA ITEM Type. Error Cause. The screen item must have a FROM or USING clause specified with an associated data item. 230 THIS SCREEN ITEM MUST HAVE TO (OR USING) DATA ITEM Type. Error Cause. The screen item must have a TO or USING clause specified with an associated data item. 231 THIS SCREEN ITEM MUST HAVE SHADOW DATA ITEM SPECIFIED Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 234 THIS SCREEN ITEM MUST HAVE FILL CHARACTER SPECIFIED Type. Error Cause. The screen item must have a FILL clause specified with a fill character. 235 THIS SCREEN ITEM MUST HAVE OCCURS SPECIFICATION Type. Error Cause. The screen item must have an OCCURS clause specified. 236 THIS SCREEN ITEM MUST HAVE ACCEPTABLE VALUE(S) ('MUST') SPECIFIED Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 239 THIS SCREEN ITEM MUST HAVE FULL ACTION ('WHEN FULL') SPECIFIED Type. Error Cause. The screen item must have a WHEN FULL clause specified. 240 THIS SCREEN ITEM MUST HAVE USER CONVERSION NUMBER SPECIFIED Type. Error Cause. The screen item must have a USER CONVERSION clause specified. 243 THIS SCREEN ITEM MUST HAVE PROMPT FIELD SPECIFIED Type. Error Cause. The screen item must have a PROMPT clause specified in the Screen Section.
SCREEN COBOL Compiler Diagnostic Messages 257 THIS SCREEN ITEM MUST NOT HAVE SIZE SPECIFIED Type. Error Cause. The SIZE clause is allowed only at the 01 level or for overlay area items. 258 THIS SCREEN ITEM MUST NOT HAVE 'AREA' SPECIFICATION Type. Error Cause. AREA can be specified only for overlay areas. This item either has conflicting clauses or subordinate items (is a group). 259 THIS SCREEN ITEM MUST NOT HAVE LOCATION ('AT') SPECIFIED Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 262 THIS SCREEN ITEM MUST NOT HAVE TO (OR USING) DATA ITEM Type. Error Cause. Only input fields and input-output fields can have TO or USING clauses. 263 THIS SCREEN ITEM MUST NOT HAVE SHADOW DATA ITEM SPECIFIED Type. Error Cause. SHADOWED clauses are allowed only for input, output, or input-output fields. 264 THIS SCREEN ITEM MUST NOT HAVE PICTURE SPECIFICATION Type. Error Cause. PICTURE clauses are allowed only for input, output, or input-output fields.
SCREEN COBOL Compiler Diagnostic Messages 268 THIS SCREEN ITEM MUST NOT HAVE ACCEPTABLE VALUE(S) ('MUST') SPECIFIED Type. Error Cause. MUST clauses are allowed only for input or input-output fields. 269 THIS SCREEN ITEM MUST NOT HAVE ACCEPTABLE LENGTH(S) SPECIFIED Type. Error Cause. LENGTH clauses are allowed only for input or input-output fields. 270 THIS SCREEN ITEM MUST NOT HAVE UPSHIFT SPECIFICATION Type. Error Cause. UPSHIFT clauses are allowed only for input, output, or input-output fields.
SCREEN COBOL Compiler Diagnostic Messages 275 THIS SCREEN ITEM MUST NOT HAVE PROMPT FIELD SPECIFIED Type. Error Cause. The screen item must not have a PROMPT clause specified. 276 THIS SCREEN ITEM MUST NOT HAVE FIELD-SEPARATOR CHARACTER SPECIFIED Type. Error Cause. The screen item must not have a FIELD-SEPARATOR clause specified. This clause can be specified only for an 01 screen level item. 277 THIS SCREEN ITEM MUST NOT HAVE GROUP-SEPARATOR CHARACTER SPECIFIED Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 280 THIS SCREEN ITEM MUST NOT HAVE RESTART-INPUT CHARACTERS SPECIFIED Type. Error Cause. The screen item must not have a RESTART-INPUT clause specified. This clause can be specified only for an 01 screen level item. 281 THIS SCREEN ITEM MUST NOT HAVE FIXED-LENGTH SPECIFICATION Type. Error Cause. A fixed-length specification is not allowed for this item. 282 THIS SCREEN ITEM MUST NOT HAVE TRANSPARENT SPECIFICATION Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 288 THIS SCREEN ITEM HAS DUPLICATE 'OVERLAY' SPECIFICATION Type. Error Cause. Duplicate clauses are not allowed. 289 THIS SCREEN ITEM HAS DUPLICATE SIZE SPECIFIED Type. Error Cause. Duplicate clauses are not allowed. 290 THIS SCREEN ITEM HAS DUPLICATE 'AREA' SPECIFICATION Type. Error Cause. Duplicate clauses are not allowed. 291 THIS SCREEN ITEM HAS DUPLICATE LOCATION ('AT') SPECIFIED Type. Error Cause. Duplicate clauses are not allowed.
SCREEN COBOL Compiler Diagnostic Messages 294 THIS SCREEN ITEM HAS DUPLICATE TO (OR USING) DATA ITEM Type. Error Cause. Duplicate clauses are not allowed. 295 THIS SCREEN ITEM HAS DUPLICATE SHADOW DATA ITEM SPECIFIED Type. Error Cause. Duplicate clauses are not allowed. 296 THIS SCREEN ITEM HAS DUPLICATE PICTURE SPECIFICATION Type. Error Cause. Duplicate clauses are not allowed. 297 THIS SCREEN ITEM HAS DUPLICATE INITIAL VALUE Type. Error Cause. Duplicate clauses are not allowed.
SCREEN COBOL Compiler Diagnostic Messages 300 THIS SCREEN ITEM HAS DUPLICATE ACCEPTABLE VALUE(S) ('MUST') SPECIFIED Type. Error Cause. Duplicate clauses are not allowed. 301 THIS SCREEN ITEM HAS DUPLICATE ACCEPTABLE LENGTH(S) SPECIFIED Type. Error Cause. Duplicate clauses are not allowed. 302 THIS SCREEN ITEM HAS DUPLICATE UPSHIFT SPECIFICATION Type. Error Cause. Duplicate clauses are not allowed. 303 THIS SCREEN ITEM HAS DUPLICATE FULL ACTION ('WHEN FULL') SPECIFIED Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 307 THIS SCREEN ITEM HAS DUPLICATE PROMPT FIELD SPECIFIED Type. Error Cause. Duplicate clauses are not allowed. 308 THIS SCREEN ITEM HAS DUPLICATE FIELD-SEPARATOR CHARACTER SPECIFIED Type. Error Cause. Duplicate characters are not allowed in multiple input character clauses. 309 THIS SCREEN ITEM HAS DUPLICATE GROUP-SEPARATOR CHARACTERS SPECIFIED Type. Error Cause. Duplicate characters are not allowed in multiple input character clauses.
SCREEN COBOL Compiler Diagnostic Messages 312 THIS SCREEN ITEM HAS DUPLICATE RESTART-INPUT CHARACTERS SPECIFIED Type. Error Cause. Duplicate characters are not allowed in multiple input character clauses. 313 THIS SCREEN ITEM HAS DUPLICATE FIXED-LENGTH SPECIFICATION Type. Error Cause. Duplicate fixed-length specification is not allowed. 314 THIS SCREEN ITEM HAS DUPLICATE TRANSPARENT SPECIFICATION Type. Error Cause. Duplicate transparent specification is not allowed.
SCREEN COBOL Compiler Diagnostic Messages 320 REDEFINED SCREEN ITEM HAS DIFFERENT LENGTH Type. Error Cause. A redefined field must have the same length as the field it redefines. 321 REDEFINED SCREEN ITEM HAS DIFFERENT DISPLAY ATTRIBUTE Type. Error Cause. A redefined field must have the same display attribute as the field it redefines. 322 REDEFINED SCREEN ITEM HAS DIFFERENT FULL ACTION Type. Error Cause. A redefined field must have the same full action (WHEN FULL) as the field it redefines.
SCREEN COBOL Compiler Diagnostic Messages 325 INITIAL VALUE MUST BE QUOTED STRING Type. Error Cause. Only string literals are allowed for initial values of screen items. 326 TOO MANY SEPARATORS OR OFFSETS IN COLUMN SPACING LIST Type. Error Cause. The column spacing list must contain fewer entries than there are column occurrences. 327 UNKNOWN TERMINAL TYPE Type. Error Cause. Terminal type must be IBM-3270, T16-6510, T16-6520, T16-6530, or T166540. 328 NO TERMINAL TYPE SPECIFIED Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 331 FROM (USING) DATA ITEM HAS DIFFERENT TYPE (NUMBER VS STRING) Type. Error Cause. Numeric screen items must be associated with numeric data items; nonnumeric screen items must be associated with nonnumeric data items. 332 FROM (USING) DATA ITEM HAS INSUFFICIENT NUMBER OF OCCURRENCES Type. Error Cause. The screen item has more occurrences than the data item. 333 FROM (USING) DATA ITEM HAS INCOMPATIBLE SCALE Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 336 TO (USING) DATA ITEM HAS INCOMPATIBLE SCALE Type. Error Cause. The scale specified for the FROM or USING data item is not compatible with that specified by the screen item PICTURE. The scale should be adjusted for compatible editing of data. 337 VALUE STRING LONGER THAN PICTURE Type. Error Cause. The value string must not be longer than the screen item. 338 OVERLAY AREA TOO LARGE Type. Error Cause. The overlay area is larger than the base screen.
SCREEN COBOL Compiler Diagnostic Messages 341 SCREEN TOO LARGE FOR TERMINAL TYPE Type. Error Cause. Screen size exceeds the largest supported size for this terminal type. 342 ERROR ENHANCEMENT MAY NOT SPECIFY PROTECTION ATTRIBUTE Type. Error Cause. An ERROR-ENHANCEMENT clause must not specify PROTECTED attribute. If a field in error is protected, correction of the error would not be possible. 343 SHADOWED DATA ITEM HAS INSUFFICIENT NUMBER OF OCCURRENCES Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 346 CHARACTER SET NOT VALID FOR THIS TERMINAL TYPE Type. Warning Cause. The character set specified is not valid for the terminal. The character set specification is ignored. 347 PROMPT SCREEN ITEM MUST BE A FIELD IN SAME SCREEN Type. Error Cause. The message applies to one of the following conditions: • • • The screen item named in the PROMPT clause and the definition of the screen field must be in the same screen. The screen item must be a field.
SCREEN COBOL Compiler Diagnostic Messages 350 DUPLICATE INPUT EDIT CONTROL CHARACTERS DEFINED Type. Error Cause. The same character cannot be defined for more than one input-control character within each screen. 351 OPERAND MUST BE A SCREEN ITEM Type. Error Cause. The operand must be an item defined in the Screen Section. 352 OPERAND MUST BE A DATA ITEM Type. Error Cause. The operand must be an item defined in the Working-Storage Section. 353 OPERAND MUST BE A MNEMONIC-NAME Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 355 TOO MANY COLUMN OCCURRENCES SPECIFIED FOR SCREEN FIELD Type. Error Cause. An OCCURS clause includes a column number greater than the number of columns in the size of the screen. For example, if a screen is defined as SIZE 20, 80, an OCCURS IN 82 COLUMNS generates this message. 356 TOO MANY LINE OCCURRENCES SPECIFIED FOR SCREEN FIELD Type. Error Cause. An OCCURS clause includes a line number greater than the number of lines in the size of the screen.
SCREEN COBOL Compiler Diagnostic Messages 360 MESSAGE ITEM TOO LONG Type. Error Cause. A message field in the Message Section is defined with a size greater than 32,000 bytes. 361 THIS MESSAGE ITEM HAS DUPLICATE FROM (OR USING) DATA ITEM Type. Error Cause. Duplicate clauses are not allowed. 362 THIS MESSAGE HAS DUPLICATE TO (OR USING) DATA ITEM Type. Error Cause. Duplicate clauses are not allowed. 363 THIS MESSAGE ITEM HAS DUPLICATE PICTURE SPECIFICATION Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 366 THIS MESSAGE ITEM HAS DUPLICATE NAMING Type. Error Cause. A field within the Message Section has more than one name clause specified; only one name clause is allowed. 367 MESSAGE ITEM HAS DUPLICATE OCCURS SPECIFICATION Type. Error Cause. Duplicate OCCURS specifications are not allowed. 368 THIS MESSAGE ITEM HAS DUPLICATE FIELD STATUS Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 371 OPERAND MUST BE AN ELEMENTARY MESSAGE ITEM Type. Error Cause. The operand must be a Message Section item and cannot be an 01 level item, a group item, or an OCCURS clause item. 372 RESULTING COUNT ALLOWED ON 01 LEVEL OR ELEMENTARY ITEMS ONLY Type. Error Cause. The RESULTING COUNT clause is not allowed as part of a group item specification. 373 PRESENT IF MUST REFERENCE ELEMENTARY ITEM IN CURRENT MESSAGE Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 376 ALLOWED ON 01 LEVEL ITEM ONLY Type. Error Cause. The MESSAGE FORMAT clause is allowed only on the 01 level item. 377 PRESENT IF NOT ALLOWED FOR THIS MESSAGE FORMAT Type. Error Cause. The PRESENT IF clause is allowed only on messages of DELIMITED format. 378 RESULTING COUNT MUST REFERENCE NUMERIC DATA ITEM Type. Error Cause. The Working-Storage field referred to by a RESULTING COUNT clause must be a numeric data item.
SCREEN COBOL Compiler Diagnostic Messages 381 PIC N NOT SUPPORTED IN MESSAGE Type. Error Cause. An attempt was made to define a data item with a PIC N in the Message Section. 382 PIC N NOT ALLOWED UNLESS 'CHARACTER-SET IS KANJI-KATAKANA' Type. Error Cause. An attempt was made to define a PIC N data item without specifying the clause CHARACTER-SET IS KANJI-KATAKANA in the Environment Division. 383 DATA/SCREEN ITEM VALUE (PIC N) IS NOT A VALID DBCS Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 386 SCREEN ITEM DECLARED WITH ILLEGAL FIELD ATTRIBUTE FOR PIC N FIELD Type. Error Cause. An attempt was made to use a screen field attribute that is not supported for double-byte data items. 387 SCREEN ITEM 'FILL' CHARACTER CAN NOT BE DBCS (PIC N ONLY) Type. Error Cause. A double-byte character is being used for an item which is not PIC N. 388 SCREEN ITEMS (PIC N) MUST DECLARE PIC BEFORE OTHER ATTRIBUTES Type. Error Cause. PIC must come before attributes.
SCREEN COBOL Compiler Diagnostic Messages 391 PREVIOUS FOREGROUND OR BACKGROUND COLOR SETTING WILL BE RESET Type. Warning Cause. A foreground or background color will be reset. 392 FOREGROUND AND BACKGROUND ARE THE SAME COLOR Type. Warning Cause. The foreground and background colors are the same. 393 MNEMONIC NAME USED IN SCREEN SECTION MUST BE TYPE VIDEO ATTRIBUTE Type. Error Cause. Mnemonic names must define supported extended field attributes.
SCREEN COBOL Compiler Diagnostic Messages 396 PIC 1 NOT ALLOWED WITH VARYING1/2 MESSAGE FORMAT Type. Error Cause. VARYING1 and VARYING2 may not be used with PIC 1. 397 OVERLAY SCREEN MUST HAVE SUBORDINATE ENTRIES (CAN'T BE EMPTY) Type. Error Cause. An overlay screen is not a group item. 398 SCREEN 'AREA' MUST NOT HAVE SUBORDINATE ENTRIES Type. Error Cause. "AREA" may not be a group item. 399 SCREEN SECTION MUST HAVE 01 LEVEL ENTRY Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 403 UNABLE TO OPEN COMMUNICATION FILE Type. Failure Cause. Unable to open SEND file. 404 UNABLE TO OPEN LIST FILE Type. Failure Cause. Call to OPEN for LIST file failed. 405 UNABLE TO USE LIST FILE Type. Failure Cause. The record length for the LIST file is less than 40 bytes. 406 UNABLE TO CREATE WORK FILE Type. Failure Cause. Attempt to create WORK file failed. 407 UNABLE TO OPEN WORK FILE Type. Failure Cause. Attempt to open WORK file failed.
SCREEN COBOL Compiler Diagnostic Messages 411 LIST FILE WRITE FAILURE Type. Failure Cause. Attempt to write to line failed. 414 UNABLE TO CREATE RUN UNIT FILE Type. Failure Cause. Attempt to create run unit file failed. 415 UNABLE TO OPEN RUN UNIT FILE Type. Failure Cause. Attempt to open run unit file failed. 416 FAILURE IN USING OR ALLOCATING EXTENDED SEGMENT Type. Failure Cause. Either a call to ALLOCATESEGMENT or a call to USESEGMENT has failed. 417 COMPILER LOGIC ERROR Type. Failure Cause.
SCREEN COBOL Compiler Diagnostic Messages 423 FILE ERROR ON RUN UNIT FILE Type. Failure Cause. File operations on the run unit file repeated until a fatal file error occurred. 425 CODE FILE HAS EXCEEDED MAXIMUM POBJ CODE FILE SIZE Type. Failure Cause. The maximum size for a POBJ file has been exceeded. 431 NOT SUPPORTED Type. Failure Cause. Unsupported feature. 435 BLANK CONTINUATION LINE Type. Warning Cause. A continuation line is all blank. 436 ILLEGAL INDICATOR CHARACTER Type. Warning Cause.
SCREEN COBOL Compiler Diagnostic Messages 441 NAME CONFLICT Type. Error Cause. Two identifiers have the same name. 442 AMBIGUOUS REFERENCE Type. Error Cause. A reference is being made using a name which is satisfied by two or more objects. 444 SYNTAX ERROR DETECTED AT TOKEN Type. Error Cause. Syntax error with no extra action. 445 SYNTAX ERROR - REPLACING UNEXPECTED TOKEN BY Type. Error Cause. Syntax error repaired by replacing current token.
SCREEN COBOL Compiler Diagnostic Messages 448 PARSING RESUMED AT TOKEN Type. Error Cause. Syntax error repaired by discarding tokens in buffer up to current token. 449 END-OF-FILE ENCOUNTERED DURING ERROR RECOVERY Type. Error Cause. Syntax error; end of file encountered trying to recover. 453 ILLEGAL SENDING OR RECEIVING ITEM IN MOVE STATEMENT Type. Error Cause. The message applies to one of the following conditions: • • • • A numeric data item cannot be moved into an alphabetic data item.
SCREEN COBOL Compiler Diagnostic Messages 456 UNABLE TO LIST LOAD MAP Type. Error Cause. The object file cannot be opened to list the internal procedure load map. 457 UNDEFINED DATA NAME Type. Error Cause. The data item referred to is not described in the Environment Division or Data Division. 458 ONLY A FILE NAME IS ALLOWED IN THIS CONTEXT Type. Error Cause. A valid Guardian operating environment file name is expected here. 459 ONLY A MNEMONIC NAME IS ALLOWED IN THIS CONTEXT Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 461 UNDEFINED OR AMBIGUOUS PROCEDURE ACCESS Type. Error Cause. Either a procedure name referred to in a PERFORM or GO TO statement was not encountered in the source text, or the name was not sufficiently qualified to avoid ambiguity. 462 ILLEGAL ALTER CANDIDATE Type. Error Cause. A procedure marked as altered is not a valid alter candidate. 463 INDEPENDENT SEGMENTS NOT SUPPORTED Type. Error Cause. SCREEN COBOL does not support independent segments.
SCREEN COBOL Compiler Diagnostic Messages 467 ONLY AN ALPHABET NAME IS ALLOWED IN THIS CONTEXT Type. Error Cause. The name specified must refer to an alphabetic name in this context. 468 EMPTY GO TO NOT LABELED Type. Error Cause. A GO TO statement of this form can only appear in a single statement paragraph, which by definition is labeled. 470 EXPECT ELEMENTARY NUMERIC DATA ITEM IN THIS CONTEXT Type. Error Cause. A numeric data item is required in this context.
SCREEN COBOL Compiler Diagnostic Messages 473 TOO MANY OR TOO FEW PARAMETERS Type. Error Cause. The number of parameters specified in the USING phrase of a CALL statement does not agree with the number specified in the USING phrase of the Procedure Division header. 474 EXPECT A DATA WORD OR IDENTIFIER IN THIS CONTEXT Type. Error Cause. Only a data item can be used in a class condition. 475 CATEGORY MUST BE ALPHANUMERIC OR ALPHABETIC Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 485 EXPECT A TABLE SPECIFIER Type. Error Cause. The description of the data item must contain an OCCURS clause. 486 INCORRECT NUMBER OF SUBSCRIPTS OR INDICES Type. Error Cause. An incorrect number of subscripts, possibly zero, are used to access the data item. (Indices are not allowed.) 487 REFERENCE DATA ITEM TOO LARGE Type. Error Cause. A data item has a PICTURE clause greater than 32,000 characters. 488 ONLY AN INDEX NAME IS ALLOWED IN THIS CONTEXT Type.
SCREEN COBOL Compiler Diagnostic Messages 491 ILLEGAL USE OF INDEX NAME OR INDEX DATA ITEM Type. Error Cause. An index name or index data item is not allowed. 495 INVALID VARYING ITEM Type. Error Cause. The VARYING identifier in the PERFORM statement must be described as a numeric elementary data item without any positions to the right of the assumed decimal point. 498 ILLEGAL COMPARISON BETWEEN DISPLAY AND COMPUTATIONAL DATA Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 501 EXPECT DISPLAY USAGE Type. Error Cause. The data item must have explicit or implied DISPLAY usage. 503 EXPECT LEVEL 01 OR 77 DATA ITEM Type. Error Cause. Only level 01 and level 77 data items can be specified in the USING phrase of a CALL statement. 504 INVALID DISPLAY ITEM Type. Error Cause. An item is not defined in the Data Division. 507 INCONSISTENT OBJECT LIBRARY REFERENCES Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 515 INVALID OPERATOR OR OPERAND IN ARITHMETIC EXPRESSION Type. Error Cause. The expression contains operators other than + - / * (plus, minus, slash, or asterisk) or contains one or more nonnumeric operands. 516 INVALID OPERATOR OR OPERAND IN CONDITIONAL EXPRESSION Type. Error Cause. The expression contains an illegal operator or illegal identifier form. 518 ILLEGAL TABLE OCCURRENCE NUMBER (BOUNDS VIOLATION) Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 526 ONLY A SORT MERGE FILE IS ALLOWED Type. Error Cause. A sort merge file is expected here. 527 ONLY AN ELEMENTARY ALPHANUMERIC DATA ITEM IS ALLOWED Type. Error Cause. The data item referred to must be an elementary alphanumeric data item in this context. 528 ILLEGAL USING FILE IN SORT OR MERGE Type. Error Cause. The using file is invalid in this context. 529 ILLEGAL DATA ITEM IN ARITHMETIC STATEMENT Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 531 ONLY A NUMERIC LITERAL IS ALLOWED Type. Error Cause. Only numeric literals and data items can be used in the composition of an arithmetic expression. 540 VARIABLE LENGTH OR CONTAINS OCCURS CLAUSE Type. Error Cause. An OCCURS item cannot be used here. 544 INPUT AND OUTPUT PROCEDURES MUST BE SECTIONS Type. Error Cause. Input and output procedures must be sections. 545 ILLEGAL PERFORM INVOCATION Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 546 ILLEGAL GO TO INVOCATION Type. Error Cause. A statement generates an illegal implied or explicit transfer of control between mutually exclusive sections. The statement is compiled as if the requested action were legal. The message applies to one of the following conditions: • • A GO TO transfers between a declarative section and a nondeclarative section. A GO TO transfers between a debug section and a nondebug section. 546 ILLEGAL GO TO INVOCATION Type.
SCREEN COBOL Compiler Diagnostic Messages 554 THIS ITEM CAN NOT BE DEBUGGED Type. Error Cause. This item is invalid for debugging. 558 ALPHABETIC ITEM NOT ALLOWED Type. Error Cause. Destination in an ACCEPT statement cannot be alphabetic. 559 TOO MANY VARYING PHRASES Type. Error Cause. The nesting level of a VARYING phrase is nested too deeply. 560 RECEIVING ITEM INCONSISTENT WITH SENDING ITEM Type. Error Cause. The source and destination data items are incompatible in a MOVE statement.
SCREEN COBOL Compiler Diagnostic Messages 563 INTEGER NOT IN EXPECTED RANGE Type. Error Cause. This is a generic error for integer values exceeding different limits depending on the context. 564 EXPECT NUMERIC OR NUMERIC-EDITED DATA ITEM Type. Error Cause. A numeric item is expected here. 565 ACCESS TO DEBUG SPECIAL REGISTERS ALLOWED ONLY IN DEBUGGING SECTIONS Type. Error Cause. Accessing debug special registers is not allowed while outside of debugging section.
SCREEN COBOL Compiler Diagnostic Messages 569 SOURCE ITEM MAY NOT EXCEED 18 DIGITS Type. Error Cause. A MOVE statement attempts to store an alphanumeric literal exceeding 18 characters in a numeric item. Numeric data is limited to 18 digits. 573 PROTECTION ATTRIBUTE MAY NOT BE CHANGED Type. Error Cause. The PROTECTED attribute must not be changed for the T16-6510. 574 OVERLAY SCREEN LARGER THAN OVERLAY AREA Type. Error Cause. The overlay screen is larger than the overlay area.
SCREEN COBOL Compiler Diagnostic Messages 578 MUST BE SCREEN NAME Type. Error Cause. Groups, overlay areas, and fields are not allowed in this context. 579 MUST BE BASE SCREEN NAME Type. Error Cause. Overlay screens must not be used in this context. 580 MUST BE OVERLAY SCREEN NAME Type. Error Cause. Base screens must not be used in this context. 581 MUST BE SCREEN ITEM Type. Error Cause. Data items are not allowed in this context. 582 SCREEN ITEM TOO CLOSE TO START OF SCREEN Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages 584 SCREEN ITEM SPANS NOT-FULLWIDTH OVERLAY AREA LINE Type. Error Cause. A screen item cannot span an overlay screen line when that overlay screen is narrower than the base screen. 585 SCREEN ITEM OVERLAPS OR IS TOO CLOSE TO NEXT ITEM Type. Error Cause. Required separation between screen elements is not present. 586 SCREEN ITEM OVERLAPS OR IS TOO CLOSE TO PREVIOUS ITE Type. Error Cause. Required separation between screen elements is not present.
SCREEN COBOL Compiler Diagnostic Messages 590 SCREEN ITEM SUBSCRIPT MUST BE INTEGER Type. Error Cause. All subscripts must be integers. 591 MUST BE OVERLAY AREA SCREEN NAME Type. Error Cause. The overlay area following the AT clause in a DISPLAY OVERLAY statement is not defined as an overlay area. 592 'LENGTH MUST BE' VALUE MUST BE LESS THAN 256 Type. Error Cause. The maximum value that can be specified in a LENGTH MUST BE clause is 255.
SCREEN COBOL Compiler Diagnostic Messages 595 MUST BE VALUE TOO LARGE FOR ASSOCIATED DATA ITEM Type. Error Cause. A numeric literal named in the MUST BE clause exceeds the size of the data item PICTURE clause. 596 TYPE OF MUST BE VALUE IS INCOMPATIBLE WITH ASSOCIATED DATA ITEM Type. Error Cause. The type of literal named in the MUST BE clause does not match the associated data item.
SCREEN COBOL Compiler Diagnostic Messages 600 EXPECT DATA ITEM OR MESSAGE NAME Type. Error Cause. Compiler expects specified name to identify an existing 01-level data item or message entry. 601 THIS VERB IS NOT LEGAL WHEN 'TERMINAL IS INTELLIGENT' Type. Error Cause. You cannot use this verb in a SCREEN COBOL program that runs in a Pathway environment where terminal type was specified as INTELLIGENT in a SET TERM, SET PROGRAM, or RUN PROGRAM command.
SCREEN COBOL Compiler Diagnostic Messages 605 ITEMS IN TRANSFORM LIST MUST BE ALL OF THE SAME TYPE Type. Error Cause. All items specified in either the input or output list of a TRANSFORM statement must be the same type, all Working-Storage or all Message Section items. 606 'MUST BE' AGGREGATE LENGTHS GREATER THAN 768 BYTE MAXIMUM Type. Error Cause. The total length, in bytes, of the literals specified in a Screen Section MUST BE clause plus 1 byte for each literal specified cannot exceed 768 bytes.
SCREEN COBOL Compiler Diagnostic Messages 610 ILLEGAL DATA ITEM OR LITERAL IN DOUBLEBYTE TEST Type. Error Cause. An attempt was made to use the IF ... DOUBLEBYTE statement on data items that are not PIC X, PIC A, or PIC N. 611 SCREEN ITEM REQUIRES 'AT ' QUALIFIER Type. Error Cause. Screen item needs AT in this context. 612 MUST BE ELEMENTARY SCREEN ITEM Type. Error Cause. Only an elementary screen item is valid in this context.
SCREEN COBOL Compiler Diagnostic Messages 616 'CODE OTHER' MUST BE LAST STMT IN REPLY CODE LIST OF SEND Type. Error Cause. In a set of yield groups belonging to any one SEND statement the yield group containing OTHER must be last. 617 THERE CAN ONLY BE ONE 'CODE OTHER' IN A SEND CLAUSE Type. Error Cause. There is more than one OTHER in a SEND statement. 618 THERE IS AN ERROR IN THIS ACCEPT STATEMENT Type. Error Cause. This ACCEPT statement is missing a clause such as FROM, TO, and so on.
D Errors for Message Section Statements This appendix contains the information necessary to process errors that occur during the execution of the Message Section statements used to implement Intelligent Device Support (IDS). If the ON ERROR clause is included in the statement and an error occurs, the TERMINATION-STATUS special register is set to the specified error number. These error numbers are described in the following pages.
Errors for Message Section Statements • If the error is for a RECEIVE UNSOLICITED MESSAGE statement, the message is rejected. An error 10 (COULD NOT DELIVER) is returned by the TCP to the sender of the message. If no ON ERROR clause is specified, the system suspends the program unit with a fatal error. The TCP error is logged to the PATHMON log file. TERMINATION-STATUS 3 Pathway Error 3163 RECEIVED MESSAGE LARGER THAN EXPECTED Cause. The message applies to one of the following conditions.
Errors for Message Section Statements If no ON ERROR clause is specified, the system suspends the program unit with a fatal error. The TCP error is logged to the PATHMON log file. TERMINATION-STATUS 5 Pathway Error 3165 EDIT ERROR OCCURRED ON MESSAGE INPUT Cause. The message applies to one of the following conditions. • • If the error is for a SEND MESSAGE statement or a TRANSFORM statement, an edit error occurred on input.
Errors for Message Section Statements TERMINATION-STATUS 8 Pathway Error 3168 DEVICE SUBCLASS INVALID Cause. In the PATHCOM SET TERM command, the TYPE parameter is specified by terminal-type : terminal-subtype. For terminal-type INTELLIGENT, terminal-subtype was a value other than 0 or 1. This error applies to the SEND MESSAGE statement. Effect. If no ON ERROR clause is specified, the system suspends the program unit with a fatal error. The TCP error is logged to the PATHMON log file.
Errors for Message Section Statements TERMINATION-STATUS 11 Pathway Error 3171 FIELD LENGTH EXCEEDS MAXIMUM ALLOWABLE Cause. The data in a particular message field was too large to be mapped through the corresponding field in the Message Section template. This error applies to the following statements: • • • SEND MESSAGE statement TRANSFORM statement REPLY TO UNSOLICITED MESSAGE statement Effect. If no ON ERROR clause is specified, the system suspends the program unit with a fatal error.
Errors for Message Section Statements TERMINATION-STATUS 14 Pathway Error 3174 CONTROL-26 OPERATION DID NOT COMPLETE IN TIME Cause. An attempted termination of an outstanding READ operation, or its associated I/O, did not complete within 5 minutes. This error applies to the SEND MESSAGE statement. Effect. If no ON ERROR clause is specified, the system suspends the program unit with a fatal error. The TCP error is logged to the PATHMON log file.
Errors for Message Section Statements TERMINATION-STATUS 17 Pathway Error 3177 NO UNSOLICITED MESSAGE TO REPLY TO Cause. An attempt was made to execute the REPLY TO UNSOLICITED MESSAGE statement but no RECEIVE UNSOLICITED MESSAGE statement had been previously issued. This error applies to the REPLY TO UNSOLICITED MESSAGE statement. Effect. If no ON ERROR clause is specified, the system suspends the program unit with a fatal error. The TCP error is logged to the PATHMON log file.
Errors for Message Section Statements TERMINATION-STATUS 21 Pathway Error 3181 VARIABLE FIELD SIZE WOULD EXCEED DECLARED FIELD SIZE Cause. There is an illegal RESULTING COUNT value in relation to the Message Section field’s declared size. This error applies to the following statements: • • • • SEND MESSAGE statement TRANSFORM statement RECEIVE UNSOLICITED MESSAGE statement REPLY TO UNSOLICITED MESSAGE statement Effect.
Errors for Message Section Statements TERMINATION-STATUS 24 Pathway Error 3184 CONFLICT OF DATA TYPES DURING 'PRESENT IF' PROCESSING Cause. The PRESENT IF clause defines a field within a message to be optionally present based on the value of a control field. The data in this control field is not of the declared data type. (For example, a numeric data item contains nonnumeric data.
Errors for Message Section Statements TERMINATION-STATUS 25 Pathway Error 3188 STATISTICS GATHERING STOPPED, OUTPUT FILE Cause. The TCP statistics gathering process has stopped; a result of issuing a CONTROL MEASURE OFF command while in operation. Effect. None.
E SCREEN COBOL Reserved Words ABORT ABORT-INPUT ABORT-TRANSACTION ABSENT ACCEPT ACCESS ADD ADVANCING ADVISORY AFTER ALARM ALL ALPHABETIC ALSO ALTER ALTERNATE AND APPROXIMATE ARE AREA AREAS ASCENDING ASSIGN AT ATTR AUDIBLE AUTHOR BASE BE BEFORE BEGIN-TRANSACTION BLANK BLOCK BOTTOM BY CALL CANCEL CD CF CH CHARACTER CHARACTERS CHARACTER-SET CHECKPOINT CLEAR CLOCK-UNITS CLOSE COBOL CODE CODE-SET COLLATING COLUMN COLUMNS COMMA COMMUNICATION COMP COMPUTATIONAL COMPUTE CONFIGURATION CONTAINS CONTROL CONTROLLED CO
SCREEN COBOL Reserved Words GENERATE GENERIC GIVING GO GREATER GROUP GROUP-SEPARATOR HEADING HIGH-VALUE HIGH-VALUES I-O I-O-CONTROL I-O-ERROR IDENTIFICATION IF IN INDEX INDEXED INDICATE INITIAL INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO INVALID IS JUST JUSTIFIED KANJI-KATAKANA KEY LABEL LAST LEADING LEFT LENGTH LESS LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER LINE LINE-COUNTER LINES LINKAGE LOCK LOCKFILE LOGICAL-TERMINALNAME LOW-VALUE LOW-VALUES LP-ATTENTION-KEY LP-ENTER-KEY LP-SELECTABLE MEMORY ME
SCREEN COBOL Reserved Words REMAINDER REMOVAL RENAMES REPLACING REPLY REPORT REPORTING REPORTS RERUN RESERVE RESET RESTART-COUNTER RESTART-INPUT RESTART-TRANSACTION RETURN REVERSED REWIND REWRITE RF RH RIGHT ROUNDED RUN SOURCE-COMPUTER SPACE SPACES SPECIAL-NAMES STANDARD STANDARD-1 START STARTBACKUP STATUS STOP STOP-MODE STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCDEPTH SYNCHRONIZED SYSTEM SAME SCREEN SCREEN-CONTROL SCROLL SD SEARCH SECTION SECURITY SEGMENT SEGMENT-
SCREEN COBOL Reserved Words Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001 E- 4
F Data Type Correspondence and Return Value Sizes The following tables contain the return value size generated for each data type by Compaq language compilers for Compaq NonStop™ Himalaya systems. Use this information when you need to specify values with the Accelerator ReturnValSize option. These tables are also useful if your programs use data from files created by programs in another language, or your programs pass parameters to programs written in callable languages.
Data Type Correspondence and Return Value Sizes Table F-1.
Data Type Correspondence and Return Value Sizes Table F-2. Integer Types, Part 2 (page 2 of 2) 64-Bit Integer Bit Integer of 1 to 31 Bits Decimal Integer SQL NUMERIC(10)… NUMERIC(18) PIC 9(10) COMP… PIC 9(18) COMP INTEGER — DECIMAL (n,s) PIC 9(n) DISPLAY TAL FIXED(0) UNSIGNED(n) , 1 ð n ð 31 — Return Value Size (Words) 4 1, 1 or 2 in TAL 1 or 2, depends on declared pointer size [1] COBOL85 only. Table F-3.
Data Type Correspondence and Return Value Sizes Table F-4. Character Types Varying Length Character String Character Character String C signed char unsigned char pointer to char struct { int len; char val [n] }; COBOL Alphabetic Numeric DISPLAY Alphanumeric-Edited Alphanumeric Numeric-Edited Alphabetic Numeric DISPLAY Alphanumeric-Edited Alphanumeric Numeric-Edited 01 name. 03 len USAGE IS NATIVE-2 [1] 03 val PIC X(n).
Data Type Correspondence and Return Value Sizes Table F-5. Structured, Logical, Set, and File Type (page 2 of 2) ByteAddressed Structure WordAddressed Structure TAL Byteaddressed standard STRUCT pointer Return Value Size (Words) 1 or 2, depends on declared pointer size Logical (true or false) Boolean Set File Wordaddressed standard STRUCT pointer — — — — 1 or 2, depends on declared pointer size 1 or 2, depends on compiler directive 1 1 1 [1] LOGICAL is normally defined as 2 bytes.
Data Type Correspondence and Return Value Sizes Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001 F-6
Index Numbers 0 (character string symbol) 5-48 0 (editing character) 2-5 0 (editing string symbol) 5-78 1 (character string symbol) 5-78 6510 terminals 4-8, 5-53 6520 terminals 4-8 6530 terminals 4-8 6540 terminals 4-8 9 (character string symbol) 5-11, 5-48, 5-78 A A (character string symbol) 5-11, 5-48, 5-78 A (editing character) 2-5 ABORT-INPUT clause 5-30 ABORT-TRANSACTION statement 6-6 ACCEPT 6-7 ACCEPT DATE/DAY/TIME statement 6-14 ACCEPT statement 6-6/6-9, 6-14 ABORT-INPUT clause 5-30 completion condi
Index B Association clause, message-field types 5-91 Asterisk (*) comment character 2-12 Asterisk(*) 2-14 AT clause 5-35 Attributes changing attributes of screen fields 6-102 defining screen field attributes 5-42 restoring display attributes 6-64 Automatic alignment of data 5-18 B B (character string symbol) 5-48, 5-78 B (editing character) 2-5 Base screen 5-22, 5-24 BEGIN-TRANSACTION statement 6-18/6-20 Binary arithmetic operators 2-14 Blank fields 5-59 BLINK 4-8 Block mode ACCEPT operations 6-9 coding
Index C Clauses (continued) RESTART-INPUT 5-33 RESULTING COUNT 5-88 SHADOWED 5-52 SIGN 5-16 SYNCHRONIZED 5-16 TO/FROM/USING 5-56, 5-90 UPSHIFT 5-57 USAGE 5-19 USER CONVERSION 5-57, 5-93 VALUE 5-20, 5-58 WHEN ABSENT/BLANK 5-59 WHEN FULL 5-59 CLEAR statement 6-28, 6-29 CLEAR system name 4-8 COBOL 1-5 COD file-name suffix 7-2 Color display attributes 6-92 Combined and negated condition 2-22 Combined relation conditions 2-22 Combining extended field attributes 4-9 Comma (editing character) 2-5 Command lines,
Index D CONTROL 26 process interface 6-83, 6-87 CONTROLLED clause 5-36 Controlling statement execution 6-32 Conventions IF statement 6-44 MOVE CORRESPONDING statement 6-48 Conversational mode ACCEPT operations 6-11 coding example 8-7 DISPLAY BASE 6-33 input-control character clauses ABORT-INPUT 5-30 END-OF-INPUT 5-31 FIELD-SEPARATOR 5-31 GROUP-SEPARATOR 5-32 RESTART-INPUT 5-33 input-control characters 5-23 programs written for 2-2 PROMPT clause 5-49 Conversational terminal 4-2 CONVERT BLANKS clause 5-40 C
Index E Data description entry (continued) SYNCHRONIZED clause 5-16 USAGE clause 5-19 VALUE clause 5-20 Data Division 5-1/5-102 defined 2-3 format 5-1 Linkage Section 5-2, 5-3 Message Section 5-2, 5-4 Screen Section 5-2, 5-4 Working-Storage Section 5-2 Database access 1-1 DATE-COMPILED paragraph 3-2 DB (character string symbol) 5-48, 5-78 DB (editing character) 2-5 Debugging SCREEN COBOL programs 1-7 Decimal point (editing character) 2-5 Decimal position (editing character) 2-5 DECIMAL-POINT IS COMMA 4-6
Index F ENTER bit 5-53/5-55, 6-12 ENTER system name 4-8 Environment Division Configuration Section 4-1 defined 2-3 Input-Output Section 4-10 OBJECT-COMPUTER paragraph 4-2 overview 4-1 SOURCE-COMPUTER paragraph 4-2 SPECIAL-NAMES paragraph 4-6 Equal sign (punctuation character) 2-5 Equal-sized operands 2-21 Error detection, ACCEPT statement 6-12 Error messages from SCREEN COBOL compiler C-1/C-92 on diagnostic screens B-1/B-6 Errors edit advisory, for SEND MESSAGE statement 5-69 for BEGIN-TRANSACTION stateme
Index G Field-characteristic clauses (continued) screen field 5-28 SHADOWED clause 5-52 summary format 5-33 summary table 5-28 TO/FROM/USING clauses 5-56 UPSHIFT clause 5-57 USER CONVERSION clause 5-57 VALUE clause 5-58 WHEN ABSENT/BLANK clause 5-59 WHEN FULL clause 5-59 FIELD-DELIMITER clause 5-64 FIELD-SEPARATOR clause 5-31 FIELD-STATUS clause field editing errors 5-68 shadow data item 5-66 Figurative constants 2-9 FILL clause 5-40 FILLER data description entry 5-7 implicit bytes 5-17 message descriptio
Index J Input-control character clauses ABORT-INPUT 5-30 END-OF-INPUT 5-31 FIELD-SEPARATOR 5-31 GROUP-SEPARATOR 5-32 RESTART-INPUT 5-33 characters 5-23 Input-Output screen fields 5-28 Input-Output Section 4-10 Inspect symbolic debugger 1-7 Intelligent device support 4-3, 6-5 Intelligent devices described 1-3 Message Section 2-2 Intelligent mode programs 2-2 Intermediate results, arithmetic operations 2-16 Interprocess communication 1-7 Interprocess message correspondence 1-5 sample SEND 6-73 Interprogram
Index N Menu program organization 1-11 Message description entry 5-60 FIELD-DELIMITER clause 5-64 MESSAGE FORMAT clause 5-71 MESSAGE-DELIMITER clause 5-70 OCCURS clause 5-74 OCCURS DEPENDING ON clause 5-74 PICTURE clause 5-77 PRESENT IF clause 5-83 RESULTING COUNT clause 5-88 TO/FROM/USING clauses 5-90 usage 5-63 USER CONVERSION clause 5-93 Message descriptions 1-6 MESSAGE FORMAT clause 5-71 Message Section 5-2, 5-4 field editing errors 5-68 intelligent devices 2-2 Messages See also Error messages delimit
Index O Numeric characters 2-4 data, input editing rules 5-80 digits 2-5 literals 2-7 operands, comparison 2-20 NUMERIC test 2-19 NUMERIC-SHIFT 4-8, 4-9 O Object code 1-8/1-10 OBJECT-COMPUTER paragraph 4-2/4-6 Occurrences of message fields 5-74 Occurrences of screen fields 5-43 OCCURS clause and SUBTRACT CORRESPONDING statement 6-94 and SYNCHRONIZED clause 5-17 field-characteristic clause 5-43/5-47 in data description entry 5-8/5-10 in message description entry 5-74 OCCURS DEPENDING ON clause field-chara
Index P PERFORM ONE statement 6-56 PERFORM statement 6-53 PERFORM statements, overview 6-52 PERFORM TIMES statement 6-54 PERFORM UNTIL statement 6-54 PERFORM VARYING statement 6-55 Period (editing character) 2-5 PIC 1 format 5-78/5-81 PIC 9 format 5-11, 5-12, 5-78 PIC 9P format 5-11, 5-12, 5-78 PIC 9V format 5-11, 5-12, 5-78 PIC N format 4-5, 5-11, 5-12 PIC X format 5-11, 5-12, 5-78 PICTURE clause alphanumeric input 5-47 editing characters 2-5 field-characteristic clause 5-47/5-49 in data description entr
Index Q Q Qualifying data references 2-25 Question mark (?) 2-13 QUOTE/QUOTES (figurative constants) 2-9 R RECEIVE field-characteristic clause 5-51 RECEIVE FROM clause, in TURN statement 6-103 RECEIVE UNSOLICITED MESSAGE statement described 6-59 error messages D-1 RECONNECT MODEM statement 6-62 Records, defining 5-2 RED 4-8 REDEFINES clause automatic alignment of data with 5-18 field-characteristic clause 5-52 in data description entry 5-13 REDISPLAY special register 5-98 Reference formats 2-11 Reference
Index S SCREEN COBOL (continued) operating modes 2-1 program compiling 1-8, 7-1/7-6 Data Division 5-1/5-102 debugging 1-7 divisions 1-3 Environment Division 4-1/4-11 Identification Division 3-1/3-2 pseudocode 1-4 reserved words E-1/E-3 SCOBOLX process 1-8 SCOBOLX2 process 1-8 source code 1-4 source program 2-10 SYMSERV process 1-8 tasks performed by 1-1 terminals used with 2-1 Utility Program (SCUP) 1-10 words 2-6 Screen description entry base screen 5-24 character-string symbols 5-48 described 5-22 field
Index S SIGN clause 5-16 Sign condition 2-21 Size of data items 5-11 Slash (/) comment character 2-12 Slash (/) (editing character) 2-5 SMAP compiler command 7-15 SOURCE-COMPUTER paragraph 4-2 Space insertion (editing character) 2-5 Space (punctuation character) 2-5 SPACE/SPACES (figurative constants) 2-9 Special characters 2-4 Special registers described 5-93 DIAGNOSTIC-ALLOWED 5-93 LOGICAL-TERMINAL-NAME 5-94 NEW-CURSOR 5-94 OLD-CURSOR 5-94 PW-INPUT-FIELDS-MISSING 5-94 PW-QUEUE-FKEY-TIMEOUT 5-96 PW-QUEUE
Index T Statements (continued) PRINT SCREEN 6-57 RECEIVE UNSOLICITED MESSAGE 6-59 RECONNECT MODEM 6-62 REPLY TO UNSOLICITED MESSAGE 6-63 RESET 6-64 RESTART-TRANSACTION 6-67 SCROLL 6-68 SEND 6-68 SEND MESSAGE 6-81 SET 6-88 SET MINIMUM-ATTR 6-90 SET MINIMUM-COLOR 6-92 STOP RUN 6-92 SUBTRACT 6-93 SUBTRACT CORRESPONDING 6-94 SUBTRACT GIVING 6-93 TERMINALINFO 6-95 TRANSFORM 6-97 TURN 6-102 USE FOR SCREEN RECOVERY 6-107 USE FOR TERMINALERRORS 6-107 STOP RUN statement 6-92 Stopping an executing program 6-92 STOP
Index U Terminal, control of by SCREEN COBOL program 6-62 TERMINAL-FILENAME special register 5-101 TERMINAL-PRINTER special register and PRINT SCREEN statement 6-57 described 5-101 Termination status, use of 6-71 TERMINATION-STATUS special register BEGIN-TRANSACTION statement 6-19 described 5-101 EXIT PROGRAM statement 6-42 RECEIVE UNSOLICITED MESSAGE 6-62 REPLY TO UNSOLICITED MESSAGE 6-64 SEND MESSAGE statement 6-85 TRANSFORM statement 6-99 TERMINATION-STATUS values BEGIN-TRANSACTION statement 6-20 CALL
Index V Unsolicited message 6-59, 6-63 CONTROL 26 process interface 6-87 processing statements 6-5 SEND MESSAGE statement 6-87 Unspecified reply code 6-73 UPSHIFT clause 5-57 USAGE clause 5-19 USE FOR SCREEN RECOVERY statement 6-107 USE FOR TERMINAL-ERRORS 6-107 USER CONVERSION clause 5-57, 5-93 Message Section restrictions 5-63 User conversion procedure messages A-1 User-defined numbers 5-57 words 2-7 USING clause in CALL statement 5-3 V V (character string symbol) 5-11, 5-48, 5-78 V (editing character)
Index Special Characters & 5-55 ( (punctuation character) 2-5 (blank) 2-4 ) (punctuation character) 2-5 * (character string symbol) 5-48 * (comment character) 2-12 * (editing character) 2-5 * (operator) 2-14 ** (operator) 2-14 + (character string symbol) 5-48, 5-78 + (editing character) 2-5 + (operator) 2-14 , (character string symbol) 5-48, 5-78 , (editing character) 2-5 , (punctuation character) 2-5 - (character string symbol) 5-48, 5-78 - (editing character) 2-5 - (operator) 2-14 .