HP NonStop Pathway/iTS SCREEN COBOL Reference Manual Abstract This manual describes the SCREEN COBOL programming language, which HP 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.1 Supported Release Version Updates (RVUs) This publication supports J06.03 and all subsequent J-series RVUs and H06.
Document History Part Number Product Version Published 136664 Pathway/TS D42+ October 1997 139453 Pathway/TS D42+ January 1998 426750-001 Pathway/iTS 1.0 October 2000 426750-002 Pathway/iTS 1.1 May 2007 426750-003 Pathway/iTS 1.
Legal Notices © Copyright 2008 Hewlett-Packard Development Company L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual Index Examples Figures Tables Legal Notices What’s New in This Manual xi Manual Information xi New and Changed Information About This Manual xiii Who Should Read This Manual Related Documentation xiii Notation Conventions xiv xi xiii 1.
2. SCREEN COBOL Source Program (continued) Contents 2.
5. Data Division Contents 5.
5. Data Division (continued) Contents 5.
6. Procedure Division (continued) Contents 6. Procedure Division (continued) DIALOG-ABORT 6-34 DIALOG-BEGIN 6-36 DIALOG-END 6-49 DIALOG-SEND 6-50 DISPLAY BASE Statement 6-59 DISPLAY OVERLAY Statement 6-61 DISPLAY RECOVERY Statement 6-62 DISPLAY Statement 6-62 DIVIDE Statements 6-65 END-TRANSACTION Statement 6-67 EXIT Statements 6-67 GO TO Statements 6-68 IF Statement 6-69 IF ... DOUBLEBYTE Statement 6-71 IF ...
6. Procedure Division (continued) Contents 6. Procedure Division (continued) USE FOR TERMINAL-ERRORS Statement 6-140 7.
8. Pathway Application Example Contents 8. Pathway Application Example PATHMON and PATHCOM Process Creation 8-2 SCREEN COBOL Program for Block Mode 8-3 SCREEN COBOL Program for Conversational Mode Server Program in COBOL 8-11 8-7 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.
Tables (continued) Contents Tables (continued) Table 2-4. Table 2-5. Table 2-6. Table 2-7. Table 2-8. Table 2-9. Table 2-10. Table 4-1. Table 4-2. Table 5-1. Table 5-2. Table 5-3. Table 5-4. Table 5-5. Table 5-6. Table 5-7. Table 5-8. Table 5-9. Table 5-10. Table 5-11. Table 5-12. Table 5-13. Table 6-1. Table 6-2. Table 6-3. Table 6-4. Table 6-5. Table 6-6. Table 6-7. Table 7-1. Table 7-2. Table 7-3.
Contents Table F-2. Table F-3. Table F-4. Table F-5. Table F-6.
Contents HP NonStop Pathway/iTS SCREEN COBOL Reference Manual— 426750-003 x
What’s New in This Manual Manual Information HP NonStop Pathway/iTS SCREEN COBOL Reference Manual Abstract This manual describes the SCREEN COBOL programming language, which HP 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.1 Supported Release Version Updates (RVUs) This publication supports J06.03 and all subsequent J-series RVUs and H06.
What’s New in This Manual • ° ° ° ° Product and Manual Changes in G06.27: Pathway/iTS 1.0 DIALOG-ABORT on page 6-34 DIALOG-BEGIN on page 6-36 DIALOG-END on page 6-50 DIALOG-SEND on page 6-51 Added the Termination Status Error Messages of PATHTCP4 on pages 6-35, 6-43, 6-51, 6-56, and 6-108. Product and Manual Changes in G06.27: Pathway/iTS 1.0 The HP NonStop Pathway/iTS product was formerly called Pathway/TS. For the Pathway/iTS 1.
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 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.
Notation for Messages About This Manual … Ellipsis. An ellipsis immediately following a pair of brackets or braces indicates that you can repeat the enclosed sequence of syntax items any number of times. For example: M address-1 [ , new-value ]... [ - ] {0|1|2|3|4|5|6|7|8|9}... 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.
About This Manual Notation for Messages Nonitalic text. Nonitalic letters, numbers, and punctuation indicate text that is displayed or returned exactly as shown. For example: Backup Up. lowercase italic letters. Lowercase italic letters indicate variable items whose values are displayed or returned. For example: p-register process-name [ ] Brackets. Brackets enclose items that are sometimes, but not always, displayed.
About This Manual Change Bar Notation Change Bar Notation Change bars are used to indicate substantive differences between this manual and its preceding version. Change bars are vertical rules placed in the right margin of changed portions of text, figures, tables, examples, and so on. Change bars highlight new or revised information. For example: The message types specified in the REPORT clause are different in the COBOL85 environment and the Common Run-Time Environment (CRE).
About This Manual Change Bar Notation HP NonStop Pathway/iTS SCREEN COBOL Reference Manual— 426750-003 xviii
1 Introduction to SCREEN COBOL SCREEN COBOL is a component of the 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 Section. The Screen Section defines the data fields and other characteristics of a terminal screen; the 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.
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 requesterserver 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 statements in the SCREEN COBOL program and sent by a TCP. Servers receive the requests, perform database I/O functions, and return appropriate replies to the TCP. 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.
Introduction to SCREEN COBOL Communication Between Processes An executing SCREEN COBOL program is called a terminal-program unit in Pathway/iTS. To communicate with TMF, the terminal-program unit must be configured for TMF by issuing commands to PATHCOM. Inspect Inspect is an interactive symbolic program-debugging tool that you can use to examine and modify SCREEN COBOL programs.
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 HP provides tools to develop source code and to generate and manage the object files. Object code is generated with the SCREEN COBOL compiler. The resulting object files are managed with the SCREEN COBOL Utility Program (SCUP).
Generating Object Files With the Compiler Introduction to SCREEN COBOL and SCOBOLX2 processes produce two object files—a directory file and a code file. The optional third process (SYMSERV) produces a symbol table for the program. Note. The SYMSERV process is not one of the Pathway/iTS object files. Therefore, SYMSERV must reside on the same volume as SCOBOLX and SCOBOLX2 when used to compile a SCREEN COBOL program. To run a SCREEN COBOL program, the directory and code files must be available to the TCP.
Introduction to SCREEN COBOL Managing Object Files With SCUP Note. In earlier releases, the version of the TCP under which a SCREEN COBOL program was run had to be the same or later than that of the SCREEN COBOL compiler under which the program was compiled.
Designing Program Logic Introduction to SCREEN COBOL Figure 1-6. Managing SCREEN COBOL Object Files With SCUP Commands: INFO ALTER DELETE COMPRESS COPY ... SCUP SCREEN COBOL Object Code Directory Symbol Table Command: CONVERT SCUP Java Source Code HTML Pages with JavaScript CDT 006.CDD For further information about SCUP and how to use it, see the Pathway/iTS SCUP Reference Manual.
General Rules for Program Design Introduction to SCREEN COBOL depending on how the Pathway application is designed to process the transactions. Figure 1-7 illustrates two typical organizations: the menu and chain. Figure 1-7. Program Organizations Menu Organization Chain Organization MENU PROG-A PROG-B PROG-A PROG-C PROG-B PROG-C CDT 007.CDD Both organizations are hierarchical with entry to the group through a single program.
Introduction to SCREEN COBOL • • • • • Pathway/iTS 1.1 Design screens to display initial values and thus reduce keying of data. If no initial value is declared for a screen field, a default value can be established by moving a value into the data name associated with the field; this default value is changed only if the operator enters data into the field or the program moves another value into the field. Protect crucial screen fields; for example, protect primary key fields against update.
Introduction to SCREEN COBOL HP NonStop Pathway/iTS SCREEN COBOL Reference Manual— 426750-003 1-14 Pathway/iTS 1.
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 run 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 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. Editing Characters A Alphabetic or space – Minus B Space insertion CR Credit N Double-byte character + Plus P Decimal position (scaled) DB Debit V Decimal position (fixed) * Check protect X ASCII character $ Currency symbol Z Zero suppress , Comma (decimal point) 0 Zero .
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.
SCREEN COBOL Source Program Comment Lines The sequence number area (1 through 6) assigns a number to each line of code or labels a line with any combination of ASCII characters. 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.
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 An arithmetic expression enclosed in parentheses 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 Note. If (I1+D2+DR) is greater than 18, the low-order digits of the quotient are lost; in other words,any part of the quotient less than the following number is lost: 10 ** (I1+D2+DR-18) 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.
SCREEN COBOL Source Program Conditional Expressions 2. The adjustment of that result for use in further computations 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.
SCREEN COBOL Source Program Simple Conditions 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 If the nonnumeric operand is an elementary data item or a nonnumeric literal, the numeric operand is treated as though it were moved to an elementary alphanumeric 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.
SCREEN COBOL Source Program Complex Conditions interaction of all the logical operators on the individual truth values of simple conditions, or on the intermediate truth values of conditions connected or negated. Table 2-9 lists and defines the logical operators. 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.
SCREEN COBOL Source Program Condition Evaluation Rules If NOT appears within the abbreviated condition and is not followed by an operator, the keyword negates that portion of the condition, but does not automatically carry forward 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 The term FILLER is a keyword that takes the place of a data name when it is unimportant to name an item. Because occurrences of a table element do not have 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.
SCREEN COBOL Source Program Qualification Qualification syntax is: { data-name } [ { OF } qualification-name ] ... { condition-name } [ { IN } ] paragraph-name [ { OF } section-name ] [ { IN } ] copy-text [ { OF } library-name ] [ { IN } ] 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.
SCREEN COBOL Source Program Subscripting Subscripting Subscripts are used to reference elements in a table. They are needed because all table elements have the same name. The subscript can be an integer numeric literal or a data item that represents a numeric integer. When the subscript is a data item, the data item name can be qualified but not subscripted itself. The subscript can be signed and, if signed, it must be positive. The lowest possible subscript value is 1.
SCREEN COBOL Source Program Subscripting The receiving data in the example is undefined because the left or right byte of a double-byte character has no meaning. Note. Arrays defined using a PIC N clause are referenced in units of two bytes.
SCREEN COBOL Source Program Using Identifiers 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 ] ...
SCREEN COBOL Source Program Data Representation 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.
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.
Environment Division SOURCE-COMPUTER Paragraph 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 HP NonStop 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 TERMINAL IS specifies whether the program is a screen-oriented requester program that communicates with a terminal or a message-oriented requester program that 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.
Environment Division OBJECT-COMPUTER Paragraph INTELLIGENT-1 specifies block mode. WRITE and READ I/O protocol: write to a device and then read from the device in block mode. 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.
Environment Division OBJECT-COMPUTER Paragraph TERMINAL IS clause. The only language that can be declared for IBM 3270 terminals is KANJI-KATAKANA. If this clause is omitted for a program running on an IBM 3270 or a 6540 terminal, USASCII is used. If this clause is omitted for a program compiled for and running on a 6530 terminal, USASCII is used until the first DISPLAY BASE statement is run. After the first DISPLAY BASE, the character set specified in the terminal's configuration menu is used.
Environment Division • • SPECIAL-NAMES Paragraph Class condition—The condition ALPHABETIC checks for characters in the national-use characters. Symbol A in PICTURE clauses—A check is made for characters in the nationaluse character set. Programmatic support of national-use characters does not affect the following areas: • • Field-characteristic clause MUST BE—Range tests are not supported for national use characters.
Environment Division SPECIAL-NAMES Paragraph Table 4-1.
Environment Division SPECIAL-NAMES Paragraph Table 4-2.
Environment Division SPECIAL-NAMES Paragraph Table 4-2. System Names for Display Attributes (page 2 of 2) System Name 6510 6520 6530/6540 3270 RIGHTLINE x NORIGHTLINE x [D] BOTTOMLINE (5) x NOBOTTOMLINE x [D] BOXFIELD x CONVERSATIONAL (4) 1. x in the cells above indicates that the system name is valid for the particular terminal type. 2. [D] refers to the default display attribute value for the particular terminal type. 3.
Environment Division • • Input-Output Section 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 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. WITH [ NO ] AUDIBLE ALARM enables or disables the audible indicator when an error is detected.
Environment Division Input-Output Section HP NonStop Pathway/iTS SCREEN COBOL Reference Manual— 426750-003 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.
Data Division Linkage Section 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.
Data Division Screen Section 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.
Data Division Level Numbers 01-49 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 Division • Data Description Entry 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).
Data Division JUSTIFIED Clause 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.
Data Division OCCURS Clause OCCURS Clause The OCCURS clause defines tables and other sets of repeating items, thus eliminating the need for separate item entries. These tables can be a fixed number of elements or can vary within given limits. An OCCURS clause cannot be used in an 01 level entry. Format 1 (for Fixed Length Tables) is: OCCURS max [ TIMES ] max is an integer that represents the number of elements in the table.
Data Division PICTURE Clause A data description entry with an OCCURS DEPENDING ON clause can be followed, within its data description, only by descriptions of subordinate items. In other words, only one table with a variable number of occurrences can appear in a single data description, and the data items contained by the table must be the last data items in the data description. Data items subordinate to an entry described with an OCCURS clause can themselves contain an OCCURS clause.
Data Division PICTURE Clause 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.
Data Division PICTURE Clause 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.
Data Division REDEFINES Clause Double-Byte Data A double-byte data item that allows only double-byte data contains only N symbols in the PICTURE string. 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.
Data Division • RENAMES Clause When the level number is not 01, the redefinition should be the same as the number of character positions (bytes) in the data item you are redefining.. • The redefined item can be subordinate to an item with an OCCURS clause or a REDEFINES clause. • The REDEFINES entry can be followed by subordinate data entries.
Data Division RENAMES Clause new-name is the new name for a group item or elementary item. old-name is a group item, an elementary item, or the first of several items to be given a new name. end-name is the last group item or elementary item to be included in the new name. 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.
Data Division SIGN Clause The following example illustrates the RENAMES clause: 05 05 05 66 card-codes. 10 store-code PIC 9. 10 state-code PIC 9(4). account-number PIC 9(6). check-digit PIC 9. card-number RENAMES card-codes THRU check-digit. 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.
Data Division SYNCHRONIZED Clause A VALUE clause must not appear for any group item that has a subordinate item described with the SYNCHRONIZED clause. In most cases, the alignment supplied automatically by the compiler is the most natural; however, the SYNCHRONIZED clause affects alignment in a few special cases. Alignment considerations are as follows: • • • • • • Alignment requirements can cause SCREEN COBOL to generate implicit FILLER data.
Data Division • SYNCHRONIZED Clause Special considerations apply when aligning an elementary data item that is described with an OCCURS clause, is subordinate to a group item described with an OCCURS clause, or both. In these cases, all occurrences of the data item must be aligned uniformly.
Data Division USAGE Clause Automatic alignment or requested alignment of data items described by redefinition of character positions (through use of the REDEFINES clause) follows the rules described in the preceding paragraphs. However, when the first data item allocated by a redefinition requires word alignment or doubleword alignment, the data item being redefined must begin on the appropriate boundary.
Data Division VALUE Clause Declaration of a group item as COMPUTATIONAL implies that all subordinate items in the group are COMPUTATIONAL. The group item itself cannot be used in computations. A DISPLAY item has a value that is stored in the standard data format as a sequence of ASCII characters. The characteristics of the item are given in the PICTURE string. If the PICTURE string of a numeric item contains an S symbol, the item has an operational sign.
Data Division VALUE Clause VALUE Clause for Data Initialization Format 1 of the VALUE clause is used to assign an initial value to a Working-Storage item at the time the program is entered. The VALUE clause must not conflict with other clauses in the data description of an item or in the data descriptions of other items within the hierarchy.
Data Division Screen Description Entry under which the 88 appears is the condition variable. A value or a range of values can be defined within this variable for testing. Each entry under a condition variable includes a condition-name with a VALUE clause specifying a value or a range of values for that condition-name. All condition-name entries for a particular condition variable must immediately follow the entry describing that variable.
Data Division • • Screen Description Entry A base screen can be displayed independently. This type of screen can contain areas upon which overlay screens can be displayed. An overlay screen is displayed in an overlay area of a base screen. This allows a base screen (with, for example, a constant header section) to be used with various overlay screens. The structure of the screen description entry is similar to a data description entry.
Data Division 01 Base Screen OVER1-SCREEN OVERLAY SIZE 10,80. 05 LINE1-OVERLAY AT 2, 10 VALUE "1 DISPLAY PREVIOUS ORDER". The input-control character clauses are available for terminals in conversational mode to define the specific input-control characters to be used during execution of an ACCEPT statement. These clauses are described later in this section. The field-characteristic clauses are available to define the characteristics of screen fields.
Data Division Screen Overlay Area Screen Overlay Area A screen overlay area defines an area of a base screen within which an overlay screen can be displayed. When overlay screens are used in a program, a screen overlay area must be defined in the base screen description entry. level-num area-name AREA AT line, col SIZE lines, cols level-num is a numeric literal that indicates the hierarchy. The value must be within the range of 2 through 49. Subordinate entries are not allowed.
Data Division Screen Group field-characteristic-clause is a clause that defines default characteristics for all fields subordinate to the screen unless explicitly overridden for a particular group or field.
Data Division Screen Field field-characteristic clause is one or more clauses that define default characteristics for all fields subordinate to the group unless these characteristics are explicitly overridden for a particular field. The clauses that can appear here are: FILL mnemonic-name UPSHIFT USER CONVERSION WHEN ABSENT WHEN BLANK WHEN FULL Screen Field A screen field is a single elementary item. level-num { field-name } { FILLER } [ field-characteristic-clause ] ... .
Data Division Screen Field Table 5-3.
Data Division Input-Control Character Clauses Input-Control Character Clauses Input-Control character clauses are for terminals operating in conversational mode.
Data Division Input-Control Character Clauses 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.
Data Division Input-Control Character Clauses numeric-literal is one integer that must be within the range of 0 through 255. numeric-literal is the decimal value of an 8-bit binary number. 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 (,).
Data Division Field-Characteristic Clauses OFF specifies that GROUP-SEPARATOR is not available for the current screen. If this clause is omitted, the group-separator character is a semicolon (;). If used, the GROUP-SEPARATOR clause must be specified at the 01 screen level. The character defined for GROUP-SEPARATOR cannot be specified for another inputcontrol character.
Data Division Field-Characteristic Clauses 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.
Data Division Field-Characteristic Clauses @ [ { + | - } 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.
Data Division Field-Characteristic Clauses A Data Item Controlling... Field Attributes Must Have an attrib-ID of... 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...
Data Division Field-Characteristic Clauses shows the effect of the CONTROLLED clause on the formation of screen field attributes during these operations. 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...
Data Division 77 77 77 77 77 77 77 77 77 77 77 77 77 Field-Characteristic Clauses MDTON-ID NUMERIC-SHIFT-ID PROTECTED-ID 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 VALUE VALUE VALUE 3. 4. 5. 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.
Data Division Field-Characteristic Clauses 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.
Data Division Field-Characteristic Clauses MUST BE 6 clause means that an operator must enter six alphabetic characters. A LENGTH MUST BE 11 clause is not possible here because the operator 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.
Data Division Field-Characteristic Clauses The literals used in this clause must match for the screen field and the associated data item, or an error is generated. For example, if a screen field receives alphanumeric character data, that data must go into a data item that is defined with a nonnumeric PICTURE clause. Numeric items are compared numerically; alphanumeric items are compared left to right according to the ASCII character set.
Data Division Field-Characteristic Clauses columns-phrase is: IN literal-1 COLUMNS { OFFSET { SKIPPING } } { literal-k } ,... lines-phrase is: ON literal-2 LINES [ SKIPPING literal-3 ] IN...COLUMNS, ON...LINES determines the number of field occurrences, the location of each field occurrence, and the ordering of the field occurrences. literal-1 is a numeric literal that specifies the number of field occurrences on a line.
Data Division Field-Characteristic Clauses are both used with a field, on output the FILL clause applies to all occurrences of the field, regardless of the setting of data-name-1 in a DEPENDING ON clause. The following conventions apply to the OCCURS clause: • • • When the IN...COLUMNS phrase is omitted, a single occurrence on each line is indicated. The order of the phrases determines the order in which the occurrence numbers are assigned to the occurrences. ° If the ON...
Data Division Field-Characteristic Clauses 07 • • • • • JOB-STATE SKIPPING 1. AT 6,22 PIC X(5) FROM JOB-STATE OF SCREEN-TEMP OCCURS ON 10 LINES SKIPPING 1. A reference to a screen field that is described with an OCCURS clause should appear without a subscript when the field is used as one of the screen identifiers in an ACCEPT statement. In other statements where screen identifiers can be used, a reference to a screen field described with an OCCURS clause can appear with or without a subscript.
Data Division • Field-Characteristic Clauses The DEPENDING phrase specifies the maximum size of a screen table that your program can refer to during execution. The maximum size of a screen table is the lower of the following values: ° The literal specified in the OCCURS clause of the associated Working-Storage table ° The literal specified in the IN ... COLUMNS or ON ...
Data Division Field-Characteristic Clauses character-string can take the same form as that described in the data description entry with the following exceptions: • • The symbol S cannot appear in the picture. Numeric edited forms and alphanumeric edited forms are allowed. The maximum size allowed by the compiler is 255 bytes. Generally, screen field input is edited in a manner that is inverse to normal editing functions implied by the PICTURE clause.
Data Division Field-Characteristic Clauses Table 5-5. Screen Description Entry PICTURE Character-String Symbols (page 2 of 3) Symbol Meaning P Indicates an implicit decimal position (with value zero) to be used in aligning the decimal point in the numeric result. See the description of the V symbol for cautions. V Indicates the decimal point location in a numeric item in which the terminal operator will not enter an explicit decimal point.
Data Division Field-Characteristic Clauses Table 5-5. Screen Description Entry PICTURE Character-String Symbols (page 3 of 3) Symbol Meaning DB Represents two positions that must contain the characters DB or spaces. These symbols are replaced by spaces during editing if the value is not negative. * Represents a position that must be a digit or an asterisk. If the position is a digit, the digit must be to the left of all asterisks. $ Represents a position where a currency symbol must appear.
Data Division Field-Characteristic Clauses appears on the screen followed by a set of parentheses (delimiting the field size) and the cursor. SCREEN SECTION . 01 ADDCUST-SCREEN BASE SIZE 24, 80 . 05 NAME1-PROMPT AT 3,2 VALUE "LAST NAME: " . 05 LAST-NAME-FIELD AT 3,13 PIC X(10) USING CUST-LAST-NAME LENGTH MUST BE 1 THRU 10 PROMPT NAME1-PROMPT . The next example illustrates a PROMPT clause with screen-field described in the Working-Storage Section and output with a FROM clause. WORKING-STORAGE SECTION.
Data Division Field-Characteristic Clauses 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.
Data Division Field-Characteristic Clauses ALTERNATE OR TERMINAL TO WS-PROD-COUNT. 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.
Data Division Field-Characteristic Clauses A shadowed screen field is associated with at least two Working-Storage items, the primary item and the secondary (shadow) item. For example, below a USING clause (which could be either TO or USING) associates a primary Working-Storage item with the screen field. The SHADOWED clause associates the shadow Working-Storage item with the screen field. Screen Section Working-Storage Section 05 SCREEN-ITEMA ...
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 runs: — 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. For details on user conversion procedures, see the Pathway/iTS TCP and Terminal Programming Guide.
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 Clauses in Message Description Entry MESSAGE SECTION. 01 MSG 05 MSG-FLD1 05 MSG-FLD2 05 MSG-FLD3 05 MSG-FLD4 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, see the Pathway/iTS TCP and Terminal Programming Guide.
Data Division • • • Clauses in Message Description Entry To use field delimiters, you must specify FIXED-DELIMITED or DELIMITED in the MESSAGE FORMAT clause. 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. For details, see the RESULTING COUNT Clause.
Data Division Clauses in Message Description Entry of a conditionally present field, you can also use the field status information to detect editing errors on the field. 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.
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 run 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 For a multiple-field message there is a PICTURE clause in each field. The maximum length of the message is the sum of the individual field lengths. 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.
Data Division • Clauses in Message Description Entry In the DELIMITED and FIXED-DELIMITED message formats, the PIC 1 data type is allowed only if FIELD-DELIMITERS is OFF. SCREEN COBOL will not report this violation as an error. 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.
Data Division Clauses in Message Description Entry FIELD-DELIMITER IS ":". MS-RECORD-1 PIC X(16) RESULTING MS-RECORD-2 PIC X(16) RESULTING 05 05 USING COUNT USING COUNT WS-RECORD-1 IS WS-LENGTH-1. WS-RECORD-2 IS WS-LENGTH-2. 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.
Data Division Clauses in Message Description Entry There is no limitation to how many times the OCCURS or OCCURS DEPENDING ON clauses can be repeated within a message. OCCURS { num-lit-1 TIMES { { num-lit-2 TO num-lit-3 TIMES { DEPENDING [ON] num-name-1 } } } } 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.
Data Division Clauses in Message Description Entry 05 WS-Message-Data PIC X OCCURS 1 TO 1024 TIMES DEPENDING ON WS-Message-Length. MESSAGE SECTION. 01 Message-Out PIC X FROM WS-Message-Data 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.
Data Division Clauses in Message Description Entry OCCURS 1 TO 10 TIMES DEPENDING ON WS-Length-1. 01 WS-Msg4-Record-2. 05 WS-Length-2 05 WS-Record-2 MESSAGE SECTION. 01 Msg4-Out. 05 MS-Record-1 05 MS-Record-2 PIC 9(4) COMP. PIC X OCCURS 1 TO 10 TIMES DEPENDING ON WS-Length-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.
Data Division • • Clauses in Message Description Entry Although only 30 characters can make up a character-string, you can use the repetition technique to define items longer than 30 characters. The character-string symbols that are defined in Table 5-12 are used to describe a message field. 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.
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 plus or a minus sign must appear. Multiple plus signs represent positions that must contain some number of digits preceded by a single plus sign or a single minus sign, preceded by spaces. The symbol is replaced by a space during editing only when it is one of a set of multiple plus signs.
Data Division Clauses in Message Description Entry 10 MS-Bit-2-Checking PIC 1(1) USING WS-Bit-2. 10 MS-Bit-3-Credit-Card PIC 1(1) USING WS-Bit-3. 10 FILLER PIC 1(5). 05 MS-Savings. 10 Savings-Data PIC X(15) TO WS-Savings-Data 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.
Data Division Clauses in Message Description Entry picture with a character in the input data, proceeding from right to left. If no match is made, the data is considered to be in error. Some picture symbols are special in that the positions they represent might be omitted from the input data string. Symbols that can be included in this category are Z, comma, multiple plus and minus signs, CR, DB, and multiple currency signs.
Data Division • Clauses in Message Description Entry Filling rules for input operations ° ° Filling occurs when destination is longer than source. ° Destination Working-Storage PIC 9 fields are filled in the most significant (leading) portion of the field with nulls (binary zeros). Destination Working-Storage PIC X fields are padded in the least significant (trailing) portion of the field with nulls (binary zeros). Output Operations • • • • • • The source is a Working-Storage Section item.
Data Division Clauses in Message Description Entry Example On input, if a PIC 1(9) Message Section item is placed into a PIC X(2) or PIC 9(2) Working-Storage item, the resulting values are: PIC X(2) bit positions: resulting X(2) data: 0 1 2 3 4 5 6 7 x x x x x x x x 0 1 2 3 4 5 6 7 x 0 0 0 0 0 0 0 PIC 9(2) bit positions: resulting 9(2) data: 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 x 0 1 2 3 4 5 6 7 x x x x x x x x The x represents a data bit from the Message Section item and the 0 is a binary zero fill bit.
Data Division Clauses in Message Description Entry NOT causes the initial Boolean value for control-field to be complemented. The following rules apply: • • • • • • • • The PRESENT IF clause can be used only with DELIMITED messages. Specification of PRESENT IF with other message formats will result in a syntax error. The DELIMITED message format allows you to process variable-length fields for the data, thus, conserving on data transmission.
Data Division Clauses in Message Description Entry 02 02 PIF-2 F1 02 F2 PIC 1(1) TO WS-PIF-2. PIC X(8) PRESENT IF PIF-1 TO WS-F1. PIC X(8) PRESENT IF PIF-2 TO WS-F2.
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) (2) (3) 1 0 1 | 1st data | byte | 1 | 10110110 (1) Checking Account Number (2) Savings Account Number (3) Credit Card Number | 2nd data | byte | | 01101111 | 3rd data | byte | | ... 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. For the pieces of data that are transferred, there will be a 1 in the corresponding bit map.
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 USING WS-Bit-2. 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 delimiter is not stored in the field's associated Working-Storage data item. The field delimiter is not counted in the RESULTING COUNT length. 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 05 WS-Name PIC X(1) OCCURS 1 TO 100 TIMES DEPENDING ON WS-Name-Length. 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 USING specifies that data is to be moved either from the message field to the data-name-1 data area or from the data-name-1 data area to the message field, or both. 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 Since W-FLD4 is an alphanumeric item, the reply is left justified in the field and filled with blanks. 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.
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 You might encounter absent fields when processing messages of delimited format or messages that contain conditionally present fields. The TCP considers a field to be absent when: • • The message specifies that field delimiters are enabled and optionally that message delimiters are enabled.
Data Division PW-QUEUE-FKEY-TIMEOUT Special Register value is internally queued in the 6530 terminal. The function key value is read upon execution of the next ACCEPT statement. If the PW-QUEUE-FKEY-UMP special register equals NO and an unsolicited message arrives during an ACCEPT...ESCAPE ON UNSOLICITED MESSAGE statement, the TCP issues a command to the terminal to lock the keyboard before executing the unsolicited message logic. The keyboard is unlocked at the next ACCEPT statement.
Data Division PW-TERMINAL- ERROR-OCCURRED Special Register The Guardian process can then use the values in an UMP header and communicate with the identified SCREEN COBOL program.
Data Division PW-USE-NEW-CURSOR Special Register The following is an example of how to use this register: IF PW-UNSOLICITED-MESSAGE-QUEUED EQUALS "YES" PERFORM process-message UNTIL PW-UNSOLICITED-MESSAGE-QUEUED EQUALS "NO". PW-USE-NEW-CURSOR Special Register The PW-USE-NEW-CURSOR special register preserves the current cursor position following unsolicited message processing.
Data Division REDISPLAY Special Register For redisplay processing to apply to a DISPLAY statement, these requirements must be met: • • • The REDISPLAY register must be set to YES at the time the DISPLAY BASE statement for the current base screen runs. This enables redisplay processing for the screen. The REDISPLAY register must be set to YES at the time the affected DISPLAY statement runs.
Data Division RESTART-COUNTER Special Register In this example, the REDISPLAY register is set to YES before the DISPLAY BASE statement runs to enable REDISPLAY for the screen. After the DISPLAY BASE statement runs, the REDISPLAY register can be reset as desired for subsequent execution of the DISPLAY screen statement. RESTART-COUNTER Special Register The RESTART-COUNTER special register contains the number of times a transaction has been restarted during transaction mode.
Data Division • TERMINAL-FILENAME Special Register The TCP waits for any function key from the terminal operator, then resets the field and completes the accept operation. When this register is set to NO, display of the tell message is postponed. The register has the following implicit declaration: 01 TELL-ALLOWED PIC AAA. TERMINAL-FILENAME Special Register The TERMINAL-FILENAME special register contains the internal form of the file name for the terminal executing the program unit.
Data Division TERMINATION-SUBSTATUS Special Register MESSAGE, REPLY TO UNSOLICITED MESSAGE, SEND, SEND MESSAGE, or TRANSFORM. The register has the following implicit declaration: 01 TERMINATION-STATUS PIC 9999 COMP.
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... Reference to a paragraph name permits branching from one area of code to another.
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 (page 1 of 2) Arithmetic ADD COMPUTE DIVIDE MULTIPLY SUBTRACT Conditional BEGIN-TRANSACTION ... ON ERROR CALL ... ON ERROR DIALOG-ABORT ... ON ERROR DIALOG-BEGIN ... ON ERROR DIALOG-END ... ON ERROR DIALOG-SEND ... ON ERROR IF SEND...
Procedure Division ABORT-TRANSACTION Statement Table 6-1. Categories of Statements (page 2 of 2) Program Control EXIT GO TO PERFORM STOP RUN Compiler Directing COPY USE Transaction Management ABORT-TRANSACTION BEGIN-TRANSACTION END-TRANSACTION RESTART-TRANSACTION ABORT-TRANSACTION Statement The ABORT-TRANSACTION statement aborts the transaction of a terminal operating in transaction mode.
Procedure Division • • ACCEPT Statement Returns only valid data to the program, determining the validity of the data from the definitions in the Screen Section of the Data Division If invalid data is entered and an ADVISORY field is defined for the base screen, displays an error message and enhances the field in error so the data can be corrected or reentered.
Procedure Division ACCEPT Statement the identifiers of items included in the overlay declaration. It is not sufficient to specify the base screen without the overlay screen specification. The order in which fields appear in the screen-identifier list is the order in which they are checked and converted. If this parameter is omitted, the completion condition in either the UNTIL or ESCAPE clause determines when the statement is to terminate.
Procedure Division ACCEPT Statement INPUT indicates that the ACCEPT statement terminates with valid screen input. This phrase is effective only for terminals in conversational mode. If the terminal is in block mode, INPUT is treated as a comment. TIMEOUT timeout-value specifies a time limit in seconds that the terminal operator has to complete the data entry. The timeout-value can be a numeric literal or a numeric data item; valid values are 0 through 32,767 seconds.
Procedure Division ACCEPT Statement mnemonic-name-1 THROUGH mnemonic-name-2 indicates a set of function keys as a single condition. The mnemonic-names must be associated with the keys from the same range (shifted or unshifted) of function keys; for example, F2 THROUGH F15. Use of this option can produce unexpected results if you change function key mapping in the SPECIAL-NAMES paragraph.
Procedure Division • • • ACCEPT Statement The validated data from all screen fields referred to and present, including all required fields, is converted and moved into the TO or USING data items in Working-Storage associated with the screen fields. Absent screen input fields do not change the associated Working-Storage data items unless specifically requested with the WHEN ABSENT field-characteristic clause.
Procedure Division ACCEPT Statement DEPENDING ON TERMINATION-STATUS. GO TO get-oper-input. Conversational Mode Accept Operation The ACCEPT statement displays the prompt value for the first screen field described with a PROMPT clause, enables the keyboard, and waits for data to be entered from the terminal. (If no screen field description contains a PROMPT clause, the ACCEPT statement begins at the first column of the screen.
Procedure Division • • ACCEPT Statement If a field with the ADVISORY clause is defined for the current screen, the advisory field is displayed on the next line following the line with the error. ACCEPT processing restarts after the error display operation. The prompt for the field containing the error is redisplayed, and the cursor is positioned to accept the correct input. Not all errors are detected immediately.
Procedure Division ACCEPT Statement Modified Data Tag (MDT) There is a modified data tag (MDT) associated with each nonliteral screen field. The MDT is a 1-bit field that indicates whether data in the screen field has been modified and, therefore, should be transmitted to the TCP upon completion of the ACCEPT statement. The terminal sends data only for fields with MDT set on. If the screen field has not been modified, MDT is not set and data in the screen field is not transmitted to the TCP.
Procedure Division ACCEPT DATE/DAY/TIME Statement These two exceptions apply only to the TURN and RESET statements that have the TEMP modifier. This MDT convention allows fields to be handled correctly when they contain errors. When an error is detected in a field, a TURN TEMP statement of a display attribute is normally performed on that field, whether explicitly by the program or implicitly by the action of the ACCEPT statement.
Procedure Division ACCEPT DATE/DAY/TIME Statement DAY is the current Julian date expressed as a 5-digit number yyddd where yy is the year and ddd is the day of the year. For example, March 3, 1998, would be returned as 98062. TIME is the current time based on a 24-hour clock, expressed as an 8-digit number hhmmsscc where hh is the hour, mm the minutes, ss the seconds, and cc the hundredths of seconds. For example, the time 2:41 P.M. would be returned as 14410000.
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. 05 children.
Procedure Division BEGIN-TRANSACTION Statement imperative-statement is the statement to be run 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 page 5-3 for more information about correspondence between the Linkage Section and the 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...
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 Compatibility for a Called Program Programs compiled for a particular terminal type are allowed to call programs compiled for any other terminal type. You must ensure that the called program is compatible with the calling program so that the results are predictable. The following are considerations regarding compatibility between a called and a calling program.
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 line is recognized or end-of-file is reached. In the following example, text-0 has no SECTION command and could never be copied: text-0 ?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.
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 giveup. EXIT PROGRAM WITH ERROR. 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).
Procedure Division DIALOG-ABORT ON ERROR provides a point of control if an error occurs in the DIALOG-ABORT statement. If this clause is omitted and an error is detected, the standard system action is performed. Depending on the error, system action involves either abending or suspending the terminal running the SCOBOL program. imperative-statement is the statement to be run if an error is detected.
Procedure Division DIALOG-BEGIN TERMINATION-STATUS 25 RETRYABLE ROUT CONNECT ERROR Cause. While executing a DIALOG-ABORT statement, TCP could not connect to the ROUT process because of a retryable ROUT connect error. Typical file-system errors are FENOTRDY, FENOLCB and FETOOMANY. The message did not reach the server process. Since the errors are retryable, the SCOBOL requester can retry the operation after some time delay. The TERMINATION-SUBSTATUS special register stores the file system error. Note.
Procedure Division DIALOG-BEGIN identifier-1 is a data item to be sent to the server. The data item represented by this identifier cannot exceed 32,000 bytes. If identifier-1 is a variable length data item, the DIALOG-BEGIN statement sends only the 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 is still returned from the server.
Procedure Division DIALOG-BEGIN reply-code-value is an integer literal or integer data item that specifies an expected reply code from the server. The maximum number of reply code values associated with one YIELDS clause is 255. TERMINATION-STATUS can be used to identify the actual reply code received. VARYING controls error logging when variable-length replies are expected.
Procedure Division imperative-statement is the statement to be run if an error is detected.
Procedure Division DIALOG-BEGIN Use of Reply Codes and Termination Status Specifying reply-code-value after the CODE keyword identifies the structure of the reply. When the DIALOG-BEGIN operation receives the reply from the server, the first two bytes are interpreted as 16-bit integer. The code must match one of the CODE reply code values. The entire reply is then distributed to the items in the identifier -2 list associated with the reply-code-value.
Procedure Division DIALOG-BEGIN The example is run as: 1. The transaction message is constructed using the values of HEADER and LASTNAME from the SCREEN COBOL program data area. This message is sent to a server process of the server class SALARY-UPDATE, and the requester waits for a reply. 2. When the reply arrives, the reply is identified and moved into NEWSALARYCODE, NEW-SALARY and STOCK-OPTION, or TERMINATIONNOTICE, depending on the reply code.
Procedure Division DIALOG-BEGIN Server reply shorter than YIELDS buffer TERMINATION-SUBSTATUS equals server reply length. Server reply length equals YIELDS buffer length TERMINATION-SUBSTATUS is undefined. This case does not cause the TCP to invoke the ON ERROR clause. Server reply longer than YIELDS buffer but shorter than Pathsend buffer TERMINATION-SUBSTATUS equals server reply length.
Procedure Division DIALOG-BEGIN Termination Status Error Messages of PATHTCP4 TERMINATION-STATUS 1 SERVER CLASS FROZEN Cause. The server class to which the message is directed is frozen or is in freeze pending state. Action Without ON ERROR Clause. TCP suspends the terminal and the processing of the statement. However, the terminal can be resumed at the last statement. TERMINATION-STATUS 2 RESOURCE UNAVAILABLE Cause. A free server class control block cannot be found.
Procedure Division • • • DIALOG-BEGIN The LINKMON process rejected the Pathsend request because it has too many outstanding send requests. The LINKMON process rejected the Pathsend request because it is already communicating with too many Pathsend requesters. TCP is already handling 256 active dialogs and a 257th dialog is being requested for which a link to the server process cannot be obtained for the current TCP. Action Without ON ERROR Clause.
Procedure Division DIALOG-BEGIN TERMINATION-STATUS 8 MAXIMUM REPLY TOO LARGE Cause. The size of one or more replies specified in the DIALOG-BEGIN statement is larger than allowed by the TCP configuration.
Procedure Division DIALOG-BEGIN TERMINATION-STATUS 12 I/O ERROR Cause. The ROUT process had an I/O error with the server while forwarding the message to the server. The I/O error could be a server time-out error as well. Note. The TERMINATION-SUBSTATUS special register contains the file-system error. Action Without ON ERROR Clause. TCP periodically retries the Pathsend operation until the Pathsend operation is successful. TERMINATION-STATUS 13 TRANSACTION MODE VIOLATION Cause.
Procedure Division DIALOG-BEGIN TERMINATION-STATUS 16 ILLEGAL SYSTEM NAME Cause. The system name given is not in the correct format. Action Without ON ERROR Clause. TCP suspends the terminal and an error message is sent to the PATHMON log file. TERMINATION-STATUS 17 ILLEGAL PATHMON NAME Cause. The Pathmon name given is not a valid guardian process name. This error could also occur when the Pathmon process, due to an internal error, replies with an invalid reply message. Action Without ON ERROR Clause.
Procedure Division DIALOG-BEGIN TERMINATION-STATUS 20 DIALOG ABORTED Cause. While running a DIALOG-BEGIN statement, the dialog has been aborted for one of these reasons: • • • The server requested a dialog abort by replying with FEEOF. The server terminated between send operations. The server terminated immediately after replying and before TS/MP ROUT process could reply to TCP. Note. The TERMINATION-SUBSTATUS special register contains the file-system error.
Procedure Division DIALOG-BEGIN TERMINATION-STATUS 23 TRANSACTION ABORTED Cause. While running a DIALOG-BEGIN statement, TCP found that the transaction associated with the dialog has been aborted. The message did not reach the server process. The associated dialog is now aborted. The SCOBOL requester must now end the dialog by calling DIALOG-END. Action Without ON ERROR Clause. The system aborts the terminal. TERMINATION-STATUS 24 TCP ABENDED WHILE SEND/DIALOG OUTSTANDING Cause.
Procedure Division DIALOG-END DIALOG-END The DIALOG-END statement cleans up resources for the specified dialog after the server has ended the dialog. A call to DIALOG-BEGIN must be matched by a call to DIALOG-END/DIALOG-ABORT at the end of the dialog. For the DIALOG-END to work properly, the server must end the dialog replying with an error value other than FECONTINUE (preferably FEOK).
Procedure Division DIALOG-SEND Termination Status Error Messages of PATHTCP4 TERMINATION-STATUS 19 PATHMON LICENSE ERROR Cause. This error is not used in Pathway/iTS 1.1 and is retained to facilitate compatibility with the existing applications. TERMINATION-STATUS 22 DIALOG INVALID Cause. While running a DIALOG-END statement, TCP found that the associated dialog has been aborted because of a primary TCP failure. The message did not reach the server process. The associated dialog is already aborted.
Procedure Division DIALOG-SEND identifier-1 is a data item to be sent to the server. The data item represented by this identifier cannot exceed 32,000 bytes. If identifier-1 is a variable length data item, the DIALOG-SEND statement sends only currently defined occurrence (a variable length data item is an item defined with an OCCURRS DEPENDING ON clause). If this parameter is omitted, zero bytes are sent to the server. A reply is still returned from the server.
Procedure Division DIALOG-SEND Errors that occur during execution of a DIALOG-SEND statement can be referred to on number basis in the TERMINATION-STATUS special register to determine the meaning and recommended action. For some errors, additional information is reported in the TERMINATION- SUBSTATUS special register. imperative-statement is the statement to be run if an error is detected.
Procedure Division DIALOG-SEND Consider this example of the DIALOG-BEGIN statement: 77 YEARLY-REVIEW PIC 999 VALUE 3. : MOVE YEARLY-REVIEW TO TRANSCODE OF HEADER. DIALOG-SEND HEADER, LASTNAME OF PERSONAL-REC 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 run as: 1.
Procedure Division DIALOG-SEND For a DIALOG-SEND, the PATHTCP4 allocates a Pathsend buffer of length 1 + max(sndlen, maxyldlen). The value of TERMINATION-SUBSTATUS depends on the length of the actual reply, the length of the YIELDS buffer, and the length of the Pathsend buffer as: Server reply shorter than YIELDS buffer TERMINATION-SUBSTATUS equals server reply length. Server reply length equals YIELDS buffer length TERMINATION-SUBSTATUS is undefined.
Procedure Division DIALOG-SEND Termination Status Error Messages of PATHTCP4 TERMINATION-STATUS 1 SERVER CLASS FROZEN Cause. The server class to which the message is directed is frozen or is in freeze pending state. Action Without ON ERROR Clause. TCP suspends the terminal and the processing of the statement. However, the terminal can be resumed at the last statement. TERMINATION-STATUS 7 MESSAGE TOO LARGE Cause. The message to the server is larger than allowed by the TCP configuration.
Procedure Division DIALOG-SEND corresponding DIALOG-SEND statement is retried. If the terminal is in transaction mode, the transaction is backed out and the terminal is suspended. If terminal execution is resumed, the transaction is restarted. TCP logs error 3112 only if the directed PATHMON is the owning PATHMON for TCP. No error is logged if the directed PATHMON is external to TCP. TERMINATION-STATUS 11 REPLY LENGTH INVALID Cause.
Procedure Division DIALOG-SEND TERMINATION-STATUS 20 DIALOG ABORTED Cause. While executing a DIALOG-SEND statement, the dialog has been aborted for one of these reasons: • • • The server requested a dialog abort by replying with FEEOF. The server terminated between send operations. The server terminated immediately after replying and before TS/MP ROUT process could reply to TCP. Note. The TERMINATION-SUBSTATUS special register contains the file-system error.
Procedure Division DIALOG-SEND TERMINATION-STATUS 23 TRANSACTION ABORTED Cause. While executing a DIALOG-SEND statement, TCP found that the transaction associated with the dialog has been aborted. The message did not reach the server process. The associated dialog is now aborted. The SCOBOL requester should now end the dialog by calling DIALOG-END. Action Without ON ERROR Clause. The system aborts the terminal. TERMINATION-STATUS 24 TCP ABENDED WHILE SEND/DIALOG OUTSTANDING Cause.
Procedure Division DISPLAY BASE Statement DISPLAY BASE Statement The DISPLAY BASE statement formats the specified screen from the screen definition in the Screen Section. The statement selects the screen description for subsequent operations but does not display the screen. The DISPLAY BASE DYNAMIC statement performs the same function as the twostatement sequence DISPLAY BASE and DISPLAY. (DISPLAY follows DISPLAY BASE.
Procedure Division • • DISPLAY BASE Statement One of the following statements is run: ACCEPT; BEGIN-TRANSACTION, ENDTRANSACTION, RESTART-TRANSACTION, or ABORT-TRANSACTION; CALL; CHECKPOINT; DELAY; EXIT PROGRAM; PRINT SCREEN; or SEND The DISPLAY statement is run for a conversational terminal During execution of the first DISPLAY BASE statement for a SCREEN COBOL program, the I/O startup messages prepare the terminal for Pathway/iTS operation.
Procedure Division DISPLAY OVERLAY Statement DISPLAY OVERLAY Statement The DISPLAY OVERLAY statement formats the specified overlay screen from the screen definition in the Screen Section and associates the overlay screen with the overlay area in the current base screen. The statement also selects the overlay screen description for subsequent operations, but does not display the screen.
Procedure Division DISPLAY RECOVERY Statement When a shadowed screen field has an associated Working-Storage item with its SELECT bit set to 1, the screen field acquires its initial screen contents from its FROM or USING Working-Storage data item. Otherwise, the initial screen contents are acquired from the compile-time literal value or the default initial value. The DISPLAY BASE statement must appear before the DISPLAY OVERLAY statement, or else an error is generated.
Procedure Division DISPLAY Statement the current value of the associated Working-Storage item must be saved, the value changed, the new value displayed, and the previous current value restored. nonnumeric-literal is a value that is sent to the terminal for each selected field. The value is not converted; it is truncated or extended with the fill character if necessary. The value must be in quotation marks.
Procedure Division 05 screen-fld1 05 screen-fld2 05 screen-fld3 DISPLAY Statement at 4, 20 PIC X(10) from fld1. at 5, 40 PIC X(10) from fld2. at 6, 60 PIC X(10) from fld3. PROCEDURE DIVISION. : BODY-PARAGRAPH. : DISPLAY BASE MENU1. DISPLAY SCREEN-FLD1, SCREEN-FLD2, SCREEN-FLD3, DEPENDING ON WS-SCREEN-STATUS. If WS-SCREEN-STATUS equals 1, SCREEN-FLD1 is displayed. If WS-SCREENSTATUS equals 2, SCREEN-FLD2 is displayed, and so on.
Procedure Division • • • • DIVIDE Statements The DISPLAY statement places screen items on the output line in the column location specified in the Screen Section. If another screen item has the same line number description, but is not named in the DISPLAY statement, that screen item appears in the screen display. If you specify a screen group name to display multiple screen fields, each screen field appears in the column described for that field.
Procedure Division DIVIDE Statements dividend is the identifier of an elementary numeric data item that is the dividend and receiving field for the quotient. DIVIDE GIVING Statement The DIVIDE GIVING statement divides one data item into another and stores the quotient in one or more data items. DIVIDE divisor INTO dividend GIVING { quotient } ,... divisor is either a numeric literal or the identifier of an elementary numeric data item.
Procedure Division END-TRANSACTION Statement PROCEDURE DIVISION. : DIVIDE inv-year BY 4 GIVING divide-result. : END-TRANSACTION Statement The END-TRANSACTION statement marks the completion of a sequence of operations that are treated as a single transaction. When this statement runs, the terminal leaves transaction mode. Transaction mode is an operating mode in which Pathway servers that are configured to run under the Transaction Management Facility (TMF) can lock and update audited files.
Procedure Division GO TO Statements program executing the EXIT PROGRAM statement is the initial program used when the terminal was started, the terminal is stopped. EXIT PROGRAM [ WITH ERROR ] . WITH ERROR is an option that provides a way to reassert the error condition described by special registers TERMINATION-STATUS and TERMINATION-SUBSTATUS.
Procedure Division IF Statement procedure-name is a series of procedure names. Only one is chosen, based on the value of depend. depend is the identifier of an elementary numeric integer data item. This item acts like an index because its value selects the procedure name to which the program branches. If the value of depend is outside the range of procedure-name, no branching occurs and control passes to the next statement.
Procedure Division IF Statement IF statements within IF statements are considered as paired IF and ELSE statements, proceeding from left to right. An ELSE is assumed to apply to the immediately preceding IF that has not already been paired with an ELSE. The following conventions apply to the IF statement: • • • • • If condition is true, statement-1 is run; if NEXT SENTENCE has been substituted for statement-1, no operation is performed.
Procedure Division IF ... DOUBLEBYTE Statement NEXT SENTENCE ELSE MOVE 1 TO flag. IF ... DOUBLEBYTE Statement The IF ... DOUBLEBYTE statement tests for the existence of only double-byte characters in an alphanumeric data item. IF data-name [ IS ] [ NOT ] DOUBLEBYTE Aligned double spaces are seen as %H2020 and are valid double-byte characters. A single space or a nonaligned space is not a double-byte character. IF ... WITHIN Statement The IF ...
Procedure Division • • MOVE Statements Using either one of the NOT options causes the compiler to issue the same code and the statements following the IF ... WITHIN statement are run only if the row and column values in data-item are not the same as the defined row and volume values in screen-item in the Screen Section. Using both of the NOT options cancels their effect and is equivalent to using neither one. Note. For screen fields that wrap, only the first row is tested.
Procedure Division MOVE Statements PROCEDURE DIVISION. begin-processing. MOVE item-a TO temp1. (1) MOVE item-a TO temp2. (2) MOVE item-b TO temp3. (3) MOVE item-b TO temp4. (4) MOVE SPACES TO record-in. MOVE ZEROS TO item-b. (1) Item-a is truncated to fit temp1. (2) The remainder of temp2 is blank filled. (3) The remainder of temp3 is zero filled. (4) If the value in item-b is greater than 9.9, this move causes the TCP to suspend the program unit with an arithmetic overflow error.
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 If control passes to these procedures by a means other than a PERFORM statement, control passes through the last statement of the procedure to the next executable statement as if no PERFORM statement referred to these procedures. 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.
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 05 FILLER PIC X(36) VALUE "DELETE - DELETE A RECORD". : 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 D DEPENDING ON I. 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 An unexpected value might be printed because the value in the Working-Storage item has never been displayed or contains data that is different from what is presently displayed on the screen. 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 PRINT SCREEN Statement Table 6-5. PRINT SCREEN Statement Errors (page 2 of 2) TERMINATIONSTATUS 4 Meaning A fatal error has occurred. During I/O to the device, an operating system file error code indicating a fatal error condition was returned. Default system action: The terminal is suspended with the possibility of restart, and a message describing the error is logged to the log file.
Procedure Division RECEIVE UNSOLICITED MESSAGE Statement RECEIVE UNSOLICITED MESSAGE Statement The RECEIVE UNSOLICITED MESSAGE statement reads an unsolicited message into Working-Storage. The message is either read directly into Working-Storage or is mapped through the Message Section. RECEIVE UNSOLICITED [ MESSAGE ] [ CODE FIELD [ IS ] code-field ] { YIELDS rcv-message } { } { { CODE rcv-code [,rcv-code ]... YIELDS rcv-message }...
Procedure Division RECEIVE UNSOLICITED MESSAGE Statement A nonnumeric literal must be enclosed within quotation marks. TIMEOUT timeout-value specifies a time limit in seconds that the RECEIVE UNSOLICITED MESSAGE operation will wait for an unsolicited message. The timeout-value can be a numeric literal or a numeric data item; valid items are 0 through 32,767 seconds.
Procedure Division RECONNECT MODEM Statement CODE RC-2 YIELDS R-MSG-2 TIMEOUT MAX-TIME ON ERROR GOTO ERROR-HANDLER. PERFORM ONE OF MSG-1-RCD MSG-2-RCD DEPENDING ON TERMINATION-STATUS. ERROR-HANDLER. IF TERMINATION-STATUS = 1 AND TERMINATION-SUBSTATUS = 40 PERFORM RCV-TIMED-OUT ELSE PERFORM ANALYZE-ERROR. This code executes as follows: 1. The RECEIVE UNSOLICITED MESSAGE statement waits for the arrival of an unsolicited message.
Procedure Division RECONNECT MODEM Statement If the connection to the Pathway/iTS terminal or to the intelligent device is over a switched line, the RECONNECT MODEM statement breaks the connection with the SCREEN COBOL program and causes the program to wait for another incoming call. After the next incoming call completes connection to the terminal or device, the SCREEN COBOL program resumes execution at the next program instruction.
Procedure Division REPLY TO UNSOLICITED MESSAGE Statement SEND MESSAGE REPLY YIELDS MESSAGE-IN. : REPLY TO UNSOLICITED MESSAGE Statement The REPLY TO UNSOLICITED MESSAGE statement sends a reply to a message previously received by a RECEIVE UNSOLICITED MESSAGE statement.
Procedure Division RESET Statement See the explanation of the error numbers contained in TERMINATION-STATUS later in this section.. RESET Statement The RESET statement restores the display attributes and the data of screen fields to the compile-time definition. The statement restores only the terminal display, not the internal data. RESET cannot be used by programs communicating with intelligent devices. RESET [ TEMP ] [ ATTR ] { screen-identifier } ,...
Procedure Division RESET Statement For a terminal operating in conversational mode, RESET DATA has no effect; you can specify either RESET ATTR or RESET TEMP ATTR to reset the display attributes of fields on conversational-mode terminals. screen-identifier specifies the fields to be reset; the maximum is 127 screen fields per RESET statement. Each screen-identifier can name an entire screen, a screen group, or an elementary item of any base or overlay screen that is currently displayed.
Procedure Division RESTART-TRANSACTION Statement The DEPENDING ON clause for the RESET 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 9(4) COMP VALUE 1. 01 ws-table. 05 ws-table-item PIC X(10) OCCURS 4 TIMES. SCREEN SECTION. : 01 MENU1 SIZE 24, 80. 05 screen-table at 3, 4 PIC X(10) OCCURS ON 4 LINES SKIPPING 1 VALUE "0000000000" USING ws-table-item. PROCEDURE DIVISION.
Procedure Division SCROLL Statement Execution of this statement indicates the current attempt to perform the transaction failed because a transient problem occurred. The statement requests TMF to back out any updates made on a database during this transaction; terminal execution resumes at the BEGIN-TRANSACTION statement. TMF assigns a new transaction-ID to the transaction; the TCP marks the screen for screen recovery and increments by 1 the special register RESTART-COUNTER.
Procedure Division SEND Statement and receives a reply from that server process. The SEND statement includes the message and a list of reply specifications. In processing the SEND statement, the TCP retains the reply code values to use when the server sends the reply. Upon receipt of a reply, the TCP compares the reply code value to the list of reply code values and determines which reply was received and, consequently, determines the structure of the data.
Procedure Division SEND Statement A SEND statement directed through an external PATHMON must specify a valid network process name. The value specified for pathmon-name must begin with a $ and can be followed by 1 to 4 alphanumeric characters. If this parameter is omitted, the PATHMON that controls the server class is assumed to have the same name as the PATHMON process that controls the TCP. system-name is the name of the HP NonStop system on which the named PATHMON process is running.
Procedure Division SEND Statement The CODE OTHER clause must be the last CODE clause in the SEND verb; if it is followed by a CODE clause, SCREEN COBOL will report error 616 ('CODE OTHER' must be last statement in reply code list of SEND). Reply code values must not appear in the same CODE clause as the keyword OTHER. The sequence CODE 1 2 OTHER will produce error 44 (SYNTAX ERROR DETECTED AT TOKEN) and error 48 (PARSING RESUMED AT TOKEN); the sequence CODE OTHER 1 2 will produce the same error.
Procedure Division SEND Statement In the SEND statement, the position of a reply code affects the value set for the TERMINATION-STATUS special register as illustrated in the following example: SEND HEADER, LASTNAME OF EMP-REC TO "PERS-DEPT" REPLY CODE 1, 21, 31 YIELDS R-CODE, NEW-SALARY CODE 2, 42, 62 YIELDS NEW-RATE, STOCK-OPTION, BENEFIT CODE 0, 200 YIELDS TERMINATION-NOTICE ON ERROR PERFORM SERVER-LIST.
Procedure Division SEND Statement indicating the type of error, and the imperative statement PERFORM SERVERDUMB is executed. 4. If the ON ERROR clause had not been included and an error occurred, the standard system action would be performed (see Sending to an External PATHMON Process on page 6-103 for a list of SEND ERROR numbers) Variable Reply Length The ON ERROR clause prevents the requester from being suspended when the reply length does not match the YIELDS buffer length.
Procedure Division SEND Statement Unspecified Reply Codes In the following example a reply code other than 1 or 2 (in the first two bytes of the reply) causes error 3112 (REPLY NUMBER NOT KNOWN TO PROGRAM) to be logged, and causes the terminal to be suspended. If a reply code of 1 or 2 is received, but the reply length does not match the length of rply-1 or rply-2, respectively, error 3115 (TRANSACTION REPLY SIZE INVALID) is logged, and the terminal is suspended because there is no ON ERROR clause.
Procedure Division SEND Statement Additional Information on Variable Reply Length In the following example, the reply is received into two Working-Storage items. The first two bytes are stored into a common reply code, while the rest are stored into a reply-specific buffer. The common reply code identifies which buffer contains the reply, in the event that a length mismatch sets TERMINATION-STATUS to 11.
Procedure Division SEND Statement 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. The example is executed as follows, assuming that the REPLY CODE is either 15 or 37: 1. If the reply length matches the length of the corresponding YIELDS items, the reply is stored in the corresponding items, and the ON ERROR branch is not taken. 2.
Procedure Division MOVE MOVE MOVE SEND SEND Statement AT SYSTEM "\TS" REPLY CODE 1 YIELDS R-CODE, EMPLOYEE-REC CODE 2 YIELDS R-CODE, HIRE-DATE ON ERROR PERFORM 899-SEND-ERROR. : : WS-DEFAULT-SERVER TO WS-SERV-NAME. WS-DEFAULT-PATHMON TO WS-SCRN-PATHMON. WS-DEFAULT-SYSTEM TO WS-SCRN-SYSTEM. : : MSGID, EMP-TRANSFER TO WS-SERV-NAME UNDER PATHWAY WS-SCRN-PATHMON AT SYSTEM WS-SCRN-SYSTEM REPLY CODE 1 YIELDS R-CODE, EMPLOYEE-LOC CODE 2 YIELDS R-CODE, CODE 3 YIELDS R-CODE ON ERROR PERFORM 899-SEND-ERROR.
Procedure Division SEND Statement Action Without ON ERROR Clause. The system waits until the resource is available, then continues with the processing of the SEND statement. TERMINATION-STATUS 4 LINK DENIED Cause. The request to PATHMON for a link to the server class has been denied for indeterminate reasons, and the TCP has no previously established links to the class. Action Without ON ERROR Clause.
Procedure Division • • SEND Statement The longest outgoing message from any SEND statement from any terminal controlled by the TCP The longest reply possible from any server replying to a SEND statement from any terminal controlled by the TCP TERMINATION-STATUS 10 UNDEFINED REPLY Cause. The reply code found in the reply from the server does not match any codes specified in the SEND statement. Action Without ON ERROR Clause. The system suspends the terminal.
Procedure Division SEND Statement TERMINATION-STATUS 14 NO PMCB AVAILABLE Cause. The request requires the TCP to communicate with an external PATHMON process, but the maximum number of PATHMON processes the TCP can communicate with has been reached. The value specified in the SET TCP MAXPATHWAYS command sets this limit. Action Without ON ERROR Clause. The system suspends the terminal and an error message is sent to the PATHMON log file. TERMINATION-STATUS 15 UNDEFINED SYSTEM Cause.
Procedure Division SEND Statement TERMINATION-STATUS 19 PATHMON I/O ERROR DUE TO LICENCING PROBLEMS Cause. An external Pathmon process rejects the OPEN message due to licensing problems. Note. The TERMINATION-SUBSTATUS special register contains this additional information of file-system error number. Termination Status Error Messages of PATHTCP4 TERMINATION-STATUS 1 SERVER CLASS FROZEN Cause. The server class to which the message is directed is frozen or is in freeze pending state.
Procedure Division SEND Statement TERMINATION-STATUS 4 LINK DENIED Cause. A SEND statement failed because the LINKMON process could not obtain a link to the server process. The reason could be due to the server resources not available or due to the Pathsend resources not available. These are the most probable causes: • • • • • There are not enough links available for the specified server class. There are server process creation failures.
Procedure Division SEND Statement TERMINATION-STATUS 7 MESSAGE TOO LARGE Cause. The message to the server is larger than allowed by the TCP configuration. Action Without ON ERROR Clause. TCP suspends the terminal and an error message is sent to the PATHMON’s log file. TERMINATION-STATUS 8 MAXIMUM REPLY TOO LARGE Cause. The size of one or more replies specified in the SEND statement is larger than allowed by the TCP configuration.
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 information of the reply length received (in bytes). Action Without ON ERROR Clause. TCP suspends the terminal. TCP logs error 3115 only if the directed PATHMON is the owning PATHMON for TCP.
Procedure Division SEND Statement TERMINATION-STATUS 15 UNDEFINED SYSTEM Cause. The system name given is not known to the network. Action Without ON ERROR Clause. TCP suspends the terminal and an error message is sent to the PATHMON log file. TERMINATION-STATUS 16 ILLEGAL SYSTEM NAME Cause. The system name given is not in the correct format. Action Without ON ERROR Clause. TCP suspends the terminal and an error message is sent to the PATHMON log file. TERMINATION-STATUS 17 ILLEGAL PATHMON NAME Cause.
Procedure Division SEND Statement TERMINATION-STATUS 19 PATHMON LICENSE ERROR Cause. This error is not used in Pathway/iTS 1.1 and is kept for being compatible with the existing applications. TERMINATION-STATUS 24 TCP ABENDED WHILE SEND/DIALOG OUTSTANDING Cause. The primary TCP abended while a SEND was outstanding to a server process. Action Without ON ERROR Clause.
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 When a timeout error occurs, it is logged to the Pathway log. If the TCP attribute SENDMSGTIMEOUT is set to OFF, only the first SENDMSGTIMEOUT timeout error is logged for the TCP. When the ON ERROR clause is used with a SEND 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.
Procedure Division • • SEND MESSAGE Statement send-message considerations: ° If send-message identifies a message template in the Message Section, the data is obtained from the data item specified in the FROM or USING clause of the message, is converted and edited according to the message definition, and is then sent to the intelligent device.
Procedure Division SEND MESSAGE Statement COBOL rules for equality (see Section 2, SCREEN COBOL Source Program). The test is performed exactly as if it were written: IF code-field EQUALS reply-code • 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.
Procedure Division SEND MESSAGE Statement C1 A2 B2 C2 3 4 5 6 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 SAVE-OUTCOME. IF TERMINATION-SUBSTATUS = 187 MOVE OP-QUIESCENT TO OP-OUTCOME ELSE IF TERMINATION-SUBSTATUS = 188 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 187 No data 188 Data lost 189 Data forthcoming With UNSOLICITED MESSAGE Clause With TIMEOUT Clause Front-end process in quiescent state. 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.
Procedure Division SET Statement screen-identifier specifies the screen fields whose positions are to be stored; maximum of 127 per SET statement. Each screen-identifier can name an entire screen, a screen group, or 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.
Procedure Division SET Statement terminals, the cursor position is at the first field of the ACCEPT statement defined with a TO or USING clause. If you do not want the cursor positioned at a protected field on an IBM3270 terminal, you can use a SET statement to position the cursor at an unprotected field. 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.
Procedure Division SET MINIMUM-ATTR Statement SET MINIMUM-ATTR Statement The SET MINIMUM-ATTR statement establishes the minimum level of support for highlight and outline display attributes. SET MINIMUM-ATTR USING data-name. data-name specifies the Working-Storage group item template for highlight and outline display attributes. The Working-Storage group item template for highlight and outline display attributes must be defined in Working-Storage as follows: 01 WS-MINIMUM-ATTRIBUTE.
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 the input phase TRANSFORM processes the data from this internal buffer. The data is stored directly into the Working-Storage Section or is mapped through a Message Section template on its way to Working-Storage. 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.
Procedure Division 01 01 TRANSFORM Statement WS-DESTINATION-TEMP-1. 05 WS-DEST-1-FLD1 05 WS-DEST-1-FLD2 PIC X(50). PIC X(50). WS-DESTINATION-TEMP-2. 05 WS-DEST-2-FLD1 05 WS-DEST-2-FLD2 05 WS-DEST-2-FLD3 PIC X(30). 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.
Procedure Division TRANSFORM Statement fields are processed by the TCP and discarded so that they are not stored in Working-Storage. 4. Because there can be more than one input record, TRANSFORM compares the contents of the first two bytes of the input record to determine where to send the data. If the select code is 44 or 54, TRANSFORM sends the data through DESTINATION-TEMP-1. If the select code is 64 or 74, TRANSFORM sends the data through DESTINATION-TEMP-2.
Procedure Division TURN Statement MESSAGE SECTION. 01 MS-SOURCE PIC X(102) FROM WS-SOURCE. 01 DESTINATION-TEMP-1. 05 MS-DEST-1-FLD1 05 FILLER 05 MS-DEST-1-FLD2 05 MS-DEST-1-FLD3 PIC PIC PIC PIC X(30) TO WS-DEST-1-FLD1. 9(4) COMP. X(20) TO WS-DEST-1-FLD2. X(50) TO WS-DEST-1-FLD3. DESTINATION-TEMP-2. 05 MS-DEST-2-FLD1 05 FILLER 05 MS-DEST-2-FLD2 05 MS-DEST-2-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. 01 PROCEDURE DIVISON.
Procedure Division TURN Statement TEMP or TEMPORARY indicates the fields are to be reset to their initial display attributes when the next RESET TEMP or ACCEPT statement is executed. 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.
Procedure Division TURN Statement SHADOWED selects from the screen-identifier list only those fields that have SHADOWED items with the SELECT bit 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. The attributes of the selected fields are changed to those specified by mnemonicname.
Procedure Division Attribute Handling for IBM 3270 Terminals The DEPENDING ON clause for the TURN 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 • • • • • • • • Attribute Handling for 6500-Series Terminals If you change a field with a BLINK attribute to REVERSE, the field goes reverse but it does not blink. If you change a field with a BLINK attribute to UNDERLINE, the field is underlined but it does not blink. If a field is originally REVERSE and you change it to BLINK, the field only blinks and is not reversed. If you change a REVERSE field to UNDERLINE, then the field is underlined but not reversed.
Procedure Division HIDDEN USE FOR SCREEN RECOVERY Statement PROTECTED BLINK MDTON DIM Dim & Mdton Dim UNDERREVERSE LINE DIM Text is Dim & Dim & Hidden & Protected Blink area is Dim Dim & Reverse Dim & Under-line REVERSE Reverse Reverse & Reverse & Reverse & Reverse & Reverse & Hidden Protected Blink Mdton Dim UNDERLINE Underline Underline Underline Underline Underline Underline Under-line & Hidden & & Blink & Mdton & Dim & Reverse Protected Reverse & Underline USE FOR SCREEN RECOVERY Stat
Procedure Division USE FOR TERMINAL-ERRORS Statement declarative procedures complete execution, control returns to the statement that was being executed when the problem was detected; the statement is executed again. USE FOR SCREEN RECOVERY must immediately follow a section header in the Declaratives portion of the Procedure Division. The following example illustrates this USE statement: PROCEDURE DIVISION. DECLARATIVES. S-R SECTION. USE FOR SCREEN RECOVERY. RECOV-1.
Procedure Division USE FOR TERMINAL-ERRORS Statement The following SCREEN COBOL statements add data to the terminal buffers and thus could cause an irrecoverable terminal I/O error: ACCEPT CLEAR INPUT DISPLAY BASE DISPLAY OVERLAY DISPLAY RECOVERY DISPLAY RECONNECT MODEM RESET SCROLL TURN For programs operating in conversational mode, an irrecoverable terminal I/O error can be associated directly with one of the statements listed.
Procedure Division • • • USE FOR TERMINAL-ERRORS Statement Pathway logging is not performed on errors handled by the USE FOR TERMINALERRORS procedure. If an irrecoverable terminal I/O error occurs during an ACCEPT statement, the TCP resets TERMINATION-STATUS to zero before returning to the statement following the ACCEPT.
Procedure Division 01 REPLY-STRUCT. 02 OUTCOME 02 EXTENSION . . . USE FOR TERMINAL-ERRORS Statement 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. EXIT PROGRAM. END DECLARATIVES. MAIN SECTION. . . . The following example contains only an EXIT PROGRAM statement. PROCEDURE DIVISION. DECLARATIVES. U-T-E SECTION. USE FOR TERMINAL-ERRORS. TERM-ERRORS.
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 The default file names are: POBJCOD, POBJDIR, and POBJSYM. 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 SCOBOLX2 are running. If there is no processor with a higher number, SYMSERV runs in the processor with the lowest number. 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.
Compilation Using Compiler Commands For example, the command sequence to specify $MINT as the disk volume on which temporary work files reside is: TACL 3> PARAM SWAPVOL $MINT 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 When Compiler Commands Take Effect When Compiler Commands Take Effect The SCREEN COBOL compiler treats the commands specified in the SCOBOLX run command as if they were specified at the beginning of the source file. The compiler lists them at the beginning of the list file. The commands are in effect at the beginning of the compilation in the order in which they appear in the command. If conflicting commands are specified, the last command overrides the others.
Compilation Compiler Command Descriptions Table 7-1. Compiler Option Commands (page 2 of 2) Command Default NOSHOWCOPY SHOWCOPY NOSMAP NOSYMBOLS NOWARN WARN OPTION SHOWCOPY SMAP NOSMAP SYMBOLS NOSYMBOLS SYNTAX COMPILE TANDEM WARN Table 7-2. Compiler Cross-Reference Commands Command Default CROSSREF NOCROSSREF NOCROSSREF Table 7-3.
Compilation COMPILE Command Lines longer than 80 characters are truncated; shorter lines are padded with trailing blanks. The positions following Margin R (columns 73 through 80) form the identification field. This field, which can contain any ASCII characters, is treated as a comment and has no effect on the meaning of a program. If this command is omitted, TANDEM is the source text format. Note.
Compilation CROSSREF Command EXCLUDE deletes a class of identifiers from an existing class list.
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 ?IFNOT 1 . . . 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 compiler discards all data descriptors for nonreferenced data declarations. For SYMBOLS, all data descriptors are retained in the run unit. 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.
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 NonStop 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 The maximum number of screen field identifiers in a DEPENDING clause is 127 per RESET, SET, DISPLAY, or TURN statement.
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 SET PATHWAY SET PATHWAY START PATHWAY MAXTERMS 5 MAXSERVERCLASSES 5 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. 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 02 SERVER-RECORD PIC X(64). 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.
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 The MSGNUM parameter is the internal message number as given in the list of advisory messages in this appendix, or as returned by the user conversion procedure. If new 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.
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 HP NonStop Pathway/iTS SCREEN COBOL Reference Manual— 426750-003 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 Cause. Only a numeric data item can be described with the BLANK WHEN ZERO clause. BLANK WHEN ZERO syntax is enforced when used, but data items using this syntax cannot be accessed by SCREEN COBOL programs. 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 (*).
SCREEN COBOL Compiler Diagnostic Messages Cause. The data description entry of a containing group item has an initial value. The subordinate data item cannot be a variable occurrence table. 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.
SCREEN COBOL Compiler Diagnostic Messages 150 INITIAL VALUE NOT PERMITTED FOR TABLE ITEM Type. Error Cause. A data item that is described with an OCCURS clause or is subordinate to a group table item cannot be initialized. 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.
SCREEN COBOL Compiler Diagnostic Messages Cause. A RENAMES clause cannot rename a level 66 item. 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.
SCREEN COBOL Compiler Diagnostic Messages Cause. The data item to be redefined must have the same level number as the redefining data description entry. 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.
SCREEN COBOL Compiler Diagnostic Messages Cause. The required VALUE clause is missing from a data description entry with level number 88. 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 Cause. The indicated data item cannot be aligned to the first character position of the area it redefines. SCREEN COBOL does not permit a redefinition that requires allocation of implicit FILLER character positions to align the first elementary item. 175 REDEFINITION HAS INCORRECT SIZE Type. Error Cause.
SCREEN COBOL Compiler Diagnostic Messages Cause. Assignment of the initial value to the numeric data item would require truncation of nonzero digits to the left of the decimal point. 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.
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 SEND MESSAGE statement or a TRANSFORM statement, TERMINATION-SUBSTATUS contains the number of bytes received. 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.
Errors for Message Section Statements • If the error is for a RECEIVE UNSOLICITED MESSAGE statement, the code received did not match any of the receive code values specified. Effect. If the error is for a RECEIVE UNSOLICITED MESSAGE statement, the unsolicited message is rejected. An error 10 (COULD NOT DELIVER) is returned by the TCP to the sender. 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 • • SEND MESSAGE statement TRANSFORM 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. 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.
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 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.
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 BASE ABORT-INPUT BE ABORT-TRANSACTION BEFORE ABSENT BEGIN-TRANSACTION ACCEPT BLANK ACCESS BLOCK ADD BOTTOM ADVANCING BY ADVISORY CALL AFTER CANCEL ALARM CD ALL CF ALPHABETIC CH ALSO CHARACTER ALTER CHARACTERS ALTERNATE CHARACTER-SET AND CHECKPOINT APPROXIMATE CLEAR ARE CLOCK-UNITS AREA CLOSE AREAS COBOL ASCENDING CODE ASSIGN CODE-SET AT COLLATING ATTR COLUMN AUDIBLE COLUMNS AUTHOR COMMA HP NonStop Pathway/iTS SCREEN CO
SCREEN COBOL Reserved Words COMMUNICATION DEBUG-SUB-2 COMP DEBUG-SUB-3 COMPUTATIONAL DEBUGGING COMPUTE DECIMAL-POINT CONFIGURATION DECLARATIVES CONTAINS DELAY CONTROL DELETE CONTROLLED DELIMITED CONTROLS DELIMITER CONVERSATIONAL DEPENDING CONVERSION DESCENDING COPY DESTINATION CORR DETAIL CORRESPONDING DIAGNOSTIC-ALLOWED COUNT DISABLE CROSSREF DISPLAY CURRENCY DIVIDE DATA DIVISION DATE DOUBLEBYTE DATE-COMPILED DOWN DATE-WRITTEN DUPLICATES DAY DYNAMIC DE DEBUG-CON
SCREEN COBOL Reserved Words END FOR END-OF-INPUT FROM END-OF-PAGE FULL END-TRANSACTION GENERATE ENTER GENERIC ENVIRONMENT GIVING EOP GO EQUAL GREATER ERROR GROUP ERROR-ENHANCEMENT GROUP-SEPARATOR ESCAPE ESI HEADING EVERY HIGH-VALUE EXCEPTION HIGH-VALUES EXCLUSIVE EXIT I-O EXTEND I-O-CONTROL I-O-ERROR FD IDENTIFICATION FIELD-SEPARATOR IF FILE IN FILE-CONTROL INDEX FILL INDEXED FILLER INDICATE FINAL INITIAL FIRST INITIATE FIXED-LENGTH INPUT FOOTING INPUT-OUTPU
SCREEN COBOL Reserved Words INSTALLATION LOW-VALUE INTO LOW-VALUES INVALID LP-ATTENTION-KEY IS LP-ENTER-KEY LP-SELECTABLE JUST JUSTIFIED MEMORY MERGE KANJI-KATAKANA MESSAGE KEY MINIMUM-ATTR MINIMUM-COLOR LABEL MODE LAST MODEM LEADING MODULES LEFT MOVE LENGTH MULTIPLE LESS MULTIPLY LIKE MUST LIMIT LIMITS NATIVE LINAGE NEGATIVE LINAGE-COUNTER NEW-CURSOR LINE NEW-CURSOR-COL LINE-COUNTER NEW-CURSOR-ROW LINES NEXT LINKAGE NO LOCK NOSHADOW LOCKFILE NOT LOGICAL-TERMIN
SCREEN COBOL Reserved Words NUMERIC PICTURE NUMERIC-SHIFT PLUS POINTER OBJECT-COMPUTER POSITION OCCURS POSITIVE OF PRINT OFF PRINTING OFFSET PROCEDURE OLD-CURSOR PROCEDURES OLD-CURSOR-COL PROCEED OLD-CURSOR-ROW PROGRAM OMITTED PROGRAM-ID ON PROGRAM-STATUS ONE PROGRAM-STATUS-1 OPEN PROGRAM-STATUS-2 OPTIONAL PROMPT OR PROTECT ORGANIZATION PW-INPUT-FIELDS-MISSING OUTPUT PW-TCP-PROCESS-NAME OVERFLOW PW-TCP-SYSTEM-NAME OVERLAY PW-TERMINAL- PAGE ERROR-OCCURRED PAGE-COUNT
SCREEN COBOL Reserved Words QUOTE QUEUE QUOTES RESET RESTART-COUNTER RANDOM RESTART-INPUT RD RESTART-TRANSACTION READ RETURN RECEIVE REVERSED RECEIVE-CONTROL REWIND RECONNECT REWRITE RECORD RF RECORDS RH RECOVERY RIGHT REDEFINES ROUNDED REDISPLAY RUN REEL REFERENCES SAME RELATIVE SCREEN RELEASE SCREEN-CONTROL REMAINDER SCROLL REMOVAL SD RENAMES SEARCH REPLACING SECTION REPLY SECURITY REPORT SEGMENT REPORTING SEGMENT-LIMIT REPORTS SELECT RERUN SEND RESERVE
SCREEN COBOL Reserved Words SEPARATE SUBTRACT SEQUENCE SUM SEQUENTIAL SUPPRESS SET SYMBOLIC SHADOWED SYNC SHARED SYNCDEPTH SIGN SYNCHRONIZED SIZE SYSTEM SKIP SKIPPING TAB SORT TABLE SORT-MERGE TAL SOURCE TALLYING SOURCE-COMPUTER TAPE SPACE TELL-ALLOWED SPACES TEMP SPECIAL-NAMES TEMPORARY STANDARD TERMINAL STANDARD-1 TERMINALINFO START TERMINAL-ERROR-OCCURRED STARTBACKUP TERMINAL-FILENAME STATUS TERMINAL-PRINTER STOP TERMINATE STOP-MODE TERMINATION-STATUS STRING
SCREEN COBOL Reserved Words THRU VALUE TIME VALUES TIMEOUT VARYING TIMES TO WHEN TOP WITH TRAILING WITHIN TRANSACTION-ID WORDS TRANSFORM WORKING-STORAGE TRANSPARENT WRITE TURN YIELDS UNDER YYYYDDD UNIT YYYYMMDD UNLOCK UNLOCKFILE ZERO UNLOCKRECORD ZEROES UNSOLICITED ZEROS UNSTRING UNTIL UP UPON UPSHIFT USAGE USE USER USING HP NonStop Pathway/iTS SCREEN COBOL Reference Manual— 426750-003 E- 8
F Data Type Correspondence and Return Value Sizes The following tables contain the return value size generated for each data type by HP language compilers for HP NonStop 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 Pascal INT64 UNSIGNED(n), 1 ð n ð 16 INT(n), 1 ð n ð 16 DECIMAL 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 HP NonStop Pathway/iTS SCREEN COBOL Reference Manual— 426750-003 F-6
Index Numbers 0 (character string symbol) 5-48 0 (editing character) 2-5 0 (editing string symbol) 5-79 1 (character string symbol) 5-79 6510 terminals 4-8, 5-54 6520 terminals 4-8 6530 terminals 4-8 6540 terminals 4-8 9 (character string symbol) 5-11, 5-48, 5-79 A A (character string symbol) 5-11, 5-48, 5-79 A (editing character) 2-5 ABORT-INPUT clause 5-30 ABORT-TRANSACTION statement 6-6 ACCEPT 6-7 ACCEPT DATE/DAY/TIME statement 6-15 ACCEPT statement 6-6/6-10, 6-15 ABORT-INPUT clause 5-30 completion cond
Index B Asterisk(*) 2-14 AT clause 5-35 Attributes changing attributes of screen fields 6-134 defining screen field attributes 5-42 restoring display attributes 6-91 Automatic alignment of data 5-18 B B (character string symbol) 5-48, 5-79 B (editing character) 2-5 Base screen 5-22, 5-24 BEGIN-TRANSACTION statement 6-19/6-21 Binary arithmetic operators 2-14 Blank fields 5-60 BLINK 4-8 Block mode ACCEPT operations 6-10 coding example 8-3 DISPLAY BASE 6-59 program specification 4-2 BLUE 4-8 BOTTOMLINE 4-8,
Index C Clauses (continued) SYNCHRONIZED 5-16 TO/FROM/USING 5-57, 5-92 UPSHIFT 5-58 USAGE 5-19 USER CONVERSION 5-58, 5-95 VALUE 5-20, 5-59 WHEN ABSENT/BLANK 5-60 WHEN FULL 5-60 CLEAR statement 6-29, 6-30 CLEAR system name 4-8 COBOL 1-5 COD file-name suffix 7-2 Color display attributes 6-124 Combined and negated condition 2-22 Combined relation conditions 2-22 Combining extended field attributes 4-9 Comma (editing character) 2-5 Command lines, compiler 2-13 Comment characters 2-12 Comment lines 2-12 Commen
Index D Conventions IF statement 6-69 MOVE CORRESPONDING statement 6-74 Conversational mode ACCEPT operations 6-12 coding example 8-7 DISPLAY BASE 6-59 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-24 programs written for 2-2 PROMPT clause 5-50 Conversational terminal 4-2 CONVERT BLANKS clause 5-40 Converting SCREEN COBOL programs to web clients 1-10 Copy library 7-3 COPY statement 6-30/6-32 Copy t
Index E Data Division 5-1/5-104 (continued) 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-79 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 Declarative procedures 6-2, 6-139 Defining data items 5-2 records 5-2 screen field attributes 5-42 DELAY 6-
Index F Environment Division (continued) 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-70 for BEGIN-TRANSACTION statement 6-20 for CALL statement 6-22/6-27 for Message Section statements D-1/D-10 for PRINT SCREEN statem
Index G Field-characteristic clauses (continued) USER CONVERSION clause 5-58 VALUE clause 5-59 WHEN ABSENT/BLANK clause 5-60 WHEN FULL clause 5-60 FIELD-DELIMITER clause 5-65 FIELD-SEPARATOR clause 5-31 FIELD-STATUS clause field editing errors 5-69 shadow data item 5-67 Figurative constants 2-9 FILL clause 5-40 FILLER data description entry 5-7 implicit bytes 5-17 message description entry 5-61 restrictions 5-62 screen description entry field-characteristic clauses 5-33 screen field 5-27 screen group 5-26
Index J 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-100 Interprogram communication 6-5 Item size 5-50, 5-81 I/O operations for PRINT SCREEN statement 6-85 J Julian date 6-15 JUSTIFIED clause 2-9, 2-30, 5-8 K Kanji characters 2-4, 4-5 KANJI-KATAKANA 2-4, 4-5 Katakana characters 2-4, 4-5 Keywords, reserved words 2-6 L Language elemen
Index N Message description entry 5-61 (continued) USER CONVERSION clause 5-95 Message descriptions 1-6 MESSAGE FORMAT clause 5-72 Message Section 5-2, 5-4 field editing errors 5-69 intelligent devices 2-2 Messages See also Error messages delimiter 5-71 field occurrences 5-75 fixed length 5-72 unsolicited 6-86, 6-90 varying length 5-72 MESSAGE-DELIMITER clause 5-71 Message-field types, association clause 5-93 Message-oriented requester 4-2 Minus sign (editing character) 2-5 Minus sign (-) 2-14 Mixed data
Index P OCCURS clause and SUBTRACT CORRESPONDING statement 6-126 and SYNCHRONIZED clause 5-18 field-characteristic clause 5-43/5-47 in data description entry 5-9/5-10 in message description entry 5-75 OCCURS DEPENDING ON clause field-characteristic clause 5-43/5-47 in data description entry 5-9/5-10 in message description entry 5-75 OLD-CURSOR special register 5-96 ON ERROR clause in CALL statement 6-22 in PRINT SCREEN statement 6-83 in SEND statement 6-96 Online transaction processing 1-1 Operand compari
Index Q PICTURE clause (continued) item size 5-50 Message Section restrictions 5-63 numeric input 5-47 PINK 4-8 Plus sign (+) 2-14 PRESENT IF clause 5-84 and FIELD STATUS clause 5-69 Message Section restrictions 5-64 Primary working-storage data 5-54 PRINT SCREEN statement and TERMINAL-PRINTER special register 6-83 diagnostic screens 6-85 error codes 6-84 I/O operations 6-85 syntax 6-83 Printer considerations 6-83 Procedure Division declarative procedures 6-2 defined 2-3 format 6-1, 6-143 header 6-1 parag
Index S Reference table elements, subscripts 2-27 Registers, special 5-95 Relation condition 2-20 Relational operators 2-20 RENAMES clause 5-14/5-16 Repeating items 5-9 Reply code unspecified 6-100 use of 6-97 REPLY TO UNSOLICITED MESSAGE statement described 6-90 error messages D-1 Requesters 1-1, 1-5 Reserved words, SCREEN COBOL 2-6 RESET statement 6-91 RESETTOG compiler command 7-14 RESTART-COUNTER special register and BEGIN-TRANSACTION statement 6-20 description 5-102 RESTART-INPUT clause 5-33 RESTART-
Index S Screen description entry (continued) screen group 5-26 screen overlay area 5-25 Screen field attributes 5-42 description 5-27 field-characteristic clauses 5-28 syntax 5-27 types 5-28 Screen group 5-26 Screen image printing 6-83 Screen overlay area 5-25 Screen Section 5-2, 5-4 Screen-oriented requester 4-2 SCROLL statement 6-94 Secondary working-storage data 5-53 SECTION compiler command 7-14 SELECT bit 5-54, 5-56 SEND MESSAGE statement edit advisory errors 5-70 error messages D-1/D-10 syntax 6-113
Index S Special registers (continued) RESTART-COUNTER 5-102 STOP-MODE 5-102 TELL-ALLOWED 5-102 TERMINAL-FILENAME 5-103 TERMINAL-PRINTER 5-103 TERMINATION-STATUS 5-103 TERMINATION-SUBSTATUS 5-104 TRANSACTION-ID 5-104 SPECIAL-NAMES paragraph 4-6/4-10 Standard alignment 2-30 Starting a transaction 6-19 Statements ABORT-TRANSACTION 6-6 ACCEPT 6-6 ACCEPT DATE/DAY/TIME 6-15 ADD 6-17 ADD CORRESPONDING 6-17 ADD GIVING 6-17 ADD TO 6-17 BEGIN-TRANSACTION 6-19 CALL 6-21 categories 6-5 CHECKPOINT 6-29 CLEAR 6-29 COMP
Index T Storage for COMPUTATIONAL data items 2-30, 5-19 Stroke (/) (editing character) 2-5 Subordinate data items.
Index U TERMINATION-STATUS values (continued) SEND statement 6-97, 6-103 SET MINIMUM-ATTR statement 6-28 SET MINIMUM-COLOR statement 6-28 TRANSFORM statement D-1 TERMINATION-SUBSTATUS special register 5-104 CALL statement 6-22 EXIT PROGRAM statement 6-67 TERMINATION-SUBSTATUS values SEND MESSAGE statement 6-120 Timeout, for output to intelligent device 6-114 Toggle commands, compiler 7-6 Toggle number 7-10, 7-11 TOPLINE 4-8, 4-10 TO/FROM/USING clause 5-57, 5-92 Transaction Management Facility (TMF) 1-2, 5
Index W W WARN compiler command 7-16 Warnings from compiler C-1 Web clients, converting SCREEN COBOL programs to 1-10 WHEN ABSENT/BLANK clause 5-60 WHEN FULL clause 5-60 Words in storage 2-30 SCREEN COBOL 2-6/2-7 system names 2-7 Working-Storage Section 5-2 data description entries 5-6 data structure 5-4 X X (character string symbol) 5-11, 5-48, 5-79 X (editing character) 2-5 Y YELLOW 4-8 YYYYDDD 6-15 YYYYMMDD 6-15 Z Z (character string symbol) 5-48, 5-79 Z (editing character) 2-5 Zero suppress (editin
Index Special Characters HP NonStop Pathway/iTS SCREEN COBOL Reference Manual— 426750-003 Index -18
Content Feedback First Name: __________________ Phone: _____________________ Company: ___________________ Last Name: _________________ e-mail address: ______________ (All contact information fields are required.) If you’re reporting an error or omission, is your issue: Minor: I can continue to work, but eventual resolution is requested. Major: I can continue to work, but prompt resolution is requested. Critical: I cannot continue to work without immediate response.