Compaq COBOL AAQ2G1FTK Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Bootszubehör Compaq COBOL AAQ2G1FTK herunter. Compaq COBOL AAQ2G1FTK User Manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 620
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
CompaqCOBOL
UserManual
Order Number: AA–Q2G1F–TK
October 2000
This manual provides information to help you develop Compaq COBOL
programs for the OpenVMS Alpha and Compaq Tru64 UNIX platforms.
Revision/Update Information: This manual supersedes the
DIGITAL COBOL User Manual,
Version 2.5.
Operating System and Version: OpenVMS Alpha Version 6.2 or higher;
Tru64 UNIX Version 4.0F or higher
Software Version: Compaq COBOL Version 2.7
Compaq Computer Corporation
Houston, Texas
Seitenansicht 0
1 2 3 4 5 6 ... 619 620

Inhaltsverzeichnis

Seite 1 - UserManual

CompaqCOBOLUserManualOrder Number: AA–Q2G1F–TKOctober 2000This manual provides information to help you develop Compaq COBOLprograms for the OpenVMS Al

Seite 2

11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAY . . . . 11–3111.3.1 Using Screen Section Options . . . ...

Seite 3 - Contents

Handling Numeric Data2.6 Using the MOVE Statement2.6 Using the MOVE StatementThe MOVE statement moves the contents of one item into another item. Thef

Seite 4 - 2 Handling Numeric Data

Handling Numeric Data2.6 Using the MOVE StatementIf the sending item has fewer digit positions than the receiving item, the moveoperation supplies zer

Seite 5 - 4 Handling Tables

Handling Numeric Data2.6 Using the MOVE StatementFor a complete description of these symbols see the Compaq COBOL ReferenceManual.The numeric-edited m

Seite 6

Handling Numeric Data2.6 Using the MOVE StatementTable 2–3 (Cont.) Numeric EditingFLD-BTOTAL-AMTPICTURE String Contents After MOVE-6543^21 $,$$$,$$$.9

Seite 7

Handling Numeric Data2.7 Using the Arithmetic Statementsarithmetic operation being performed. Should the temporary work item exceedthe maximum size, t

Seite 8 - 10 Producing Printed Reports

Handling Numeric Data2.7 Using the Arithmetic StatementsThe default is /MATH_INTERMEDIATE=FLOAT (or-math_intermediate float).If you specify /ARITHMETI

Seite 9 - Video Forms

Handling Numeric Data2.7 Using the Arithmetic StatementsArithmetic expressions in nonarithmetic statements are also affected.Nonarithmetic statements,

Seite 10 - Environment

Handling Numeric Data2.7 Using the Arithmetic StatementsTable 2–4 shows several ROUNDING examples.Table 2–4 ROUNDINGPICTURE clause Initial Value03 ITE

Seite 11 - 14 Using the REFORMAT Utility

Handling Numeric Data2.7 Using the Arithmetic StatementsThe SIZE ERROR phrase cannot be used with numeric MOVE statements. Thus,if a program moves a n

Seite 12 - Compatibility and Migration

Handling Numeric Data2.7 Using the Arithmetic StatementsEquivalent coding: ADD A, B, GIVING TEMP.ADD TEMP, C, GIVING TEMP.ADD TEMP, D, GIVING TEMP.ADD

Seite 13

13.3.1 OpenVMS Alpha Run-Time Library Routines ... 13–413.3.2 System Services . . ... 13–413.4 Ca

Seite 15

3Handling Nonnumeric DataNonnumeric data in Compaq COBOL is evaluated with respect to a specifiedcollating sequence of the operands.Information to be f

Seite 16

Handling Nonnumeric Data3.1 Storage of Nonnumeric DataSometimes the text refers to alphabetic, alphanumeric, and alphanumeric editeddata items as nonn

Seite 17

Handling Nonnumeric Data3.2 Data OrganizationIn Compaq COBOL, all records, and elementary items with level 01 or 77, beginat an address that is a mult

Seite 18

Handling Nonnumeric Data3.4 Testing Nonnumeric ItemsTable 3–1 Relational Operator DescriptionsOperator DescriptionIS [NOT] GREATER THANIS [NOT] >Th

Seite 19

Handling Nonnumeric Data3.4 Testing Nonnumeric ItemsASCII bytes, take part in the comparison, and zeros are not supplied for Pcharacters in the PICTUR

Seite 20

Handling Nonnumeric Data3.4 Testing Nonnumeric ItemsIf the item being tested is described as a numeric data item, it can only be testedas NUMERIC or N

Seite 21

Handling Nonnumeric Data3.5 Data Movementreceiving item must first be described with the JUSTIFIED clause.) Charactersfrom the middle of the sending it

Seite 22

Handling Nonnumeric Data3.6 Using the MOVE StatementTable 3–2 Nonnumeric Elementary MovesReceiving Item CategorySending Item Category AlphanumericAlph

Seite 23 - Document Structure

Handling Nonnumeric Data3.6 Using the MOVE Statement3.6.2.1 Edited MovesThis section explains the following insertion editing characters:B Blank inser

Seite 24 - Associated Documents

15.7.2 Relative Files ... 15–1615.7.2.1 Maximum Record Number (MRN) ... 15–1615.7.2.2 C

Seite 25

Handling Nonnumeric Data3.6 Using the MOVE StatementTable 3–4 Data Movement with the JUSTIFIED ClauseFIELD1FIELD2PICTURECharacter-String ContentsPICTU

Seite 26

Handling Nonnumeric Data3.6 Using the MOVE StatementIn the following example, the compiler evaluates FIELD3(FIELD2) immediatelybefore moving the data

Seite 27 - References

Handling Nonnumeric Data3.6 Using the MOVE Statement3.6.7 Using Reference ModificationYou can use reference modification to define a subset of a data ite

Seite 28 - Reader’s Comments

4Handling TablesA table is one or more repetitions of one element, composed of one or more dataitems, stored in contiguous memory locations.In this ch

Seite 29 - New Features

Handling Tables4.1 Defining TablesExample 4–1 One-Dimensional Table01 TABLE-A.05 ITEM-B PIC X OCCURS 2 TIMES.The organization of TABLE-A is shown in Fi

Seite 30

Handling Tables4.1 Defining TablesFigure 4–2 Organization of Multiple Data Items in a One-Dimensional Table11234ABBLongword numberByte numberLevel 01Le

Seite 31

Handling Tables4.1 Defining TablesThe organization of this table is shown in Figure 4–3.Figure 4–3 Organization of a Table with an Index and an Ascendi

Seite 32 - 1.1.1 Compilation Performance

Handling Tables4.1 Defining TablesFigure 4–4 Organization of a Two-Dimensional Table12ZK−6042−GE2D−TABLE−XLY LYLZ LZ LZ LZA B A B A B A B1 2

Seite 33

Handling Tables4.1 Defining TablesIt uses from two to four occurrences depending on the integer value assignedto NUM-ELEM. You specify the table’s mini

Seite 34

Handling Tables4.1 Defining TablesFigure 4–6 shows how the table defined in Example 4–7 is mapped intomemory.Example 4–7 Sample Record Description Defini

Seite 35 - MB= megabytes

B.4.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX StatementDifferences ... B–16B.4.4.1 ACCEPT and DISPLAY

Seite 36 - End of line Margin R

Handling Tables4.1 Defining TablesExample 4–8 describes a table containing a COMP SYNC data item. Figure 4–7illustrates how it is mapped into memory.Ex

Seite 37

Handling Tables4.1 Defining TablesFigure 4–8 Memory Map for Example 4–9Level 03Longword numberByte numberLevel 011230 0 0 0 0 0 0 0 0

Seite 38 - VM-0610A-AI

Handling Tables4.2 Initializing Values of Table Elements4.2 Initializing Values of Table ElementsYou can initialize a table that contains only DISPLAY

Seite 39

Handling Tables4.2 Initializing Values of Table Elements• SECOND-LEG occurs five times; each occurrence is initialized to 5.Often a table is too long t

Seite 40

Handling Tables4.2 Initializing Values of Table ElementsExample 4–14 Initializing Alphanumeric Items01 A-RECORD-ALT.03 FILLER PIC X(30) VALUE IS"

Seite 41

Handling Tables4.3 Accessing Table Elements4.3.2 Subscripting with LiteralsA literal subscript is an integer value, enclosed in parentheses, that repr

Seite 42

Handling Tables4.3 Accessing Table ElementsNoteBecause ITEM5 is not subordinate to ITEM2, an occurrence number forITEM2 is not permitted in the subscr

Seite 43

Handling Tables4.3 Accessing Table ElementsYou cannot access index items as normal data items; that is, you cannot use them,redefine them, or write the

Seite 44

Handling Tables4.3 Accessing Table Elements4.3.6 Index Data ItemsOften a program requires that the value of an index be stored outside of thatitem. Co

Seite 45

Handling Tables4.3 Accessing Table Elements4.3.8.1 Implementing a Sequential SearchThe SEARCH statement allows you to perform a sequential search of a

Seite 46

D Porting to Compaq COBOL from Other CompilersD.1 Porting Assistance ... D–1D.2 Flagged Foreign Extensions...

Seite 47

Handling Tables4.3 Accessing Table ElementsWhen you omit the VARYING phrase, the first index you specify in the INDEXEDBY phrase becomes the controllin

Seite 48

Handling Tables4.3 Accessing Table ElementsA useful variation of the binary search is that of specifying multiple searchkeys. Multiple search keys all

Seite 49

Handling Tables4.3 Accessing Table ElementsExample 4–18 (Cont.) Sample Table02 MARRIED-DEDUCTION-DATA.03 FILLER PIC X(119) VALUE"0480009600000001

Seite 50

Handling Tables4.3 Accessing Table ElementsExample 4–20 Using SEARCH and Varying an Index Other than the First Index01 TAXABLE-INCOME PIC 9(6) VALUE 5

Seite 51

Handling Tables4.3 Accessing Table ElementsExample 4–22 Using SEARCH and Varying an Index not Associated with theTarget Table01 TAXABLE-INCOME PIC 9(6

Seite 52

Handling Tables4.3 Accessing Table ElementsExample 4–24 shows how to perform a multiple-key, binary search.Example 4–24 A Multiple-Key, Binary SearchI

Seite 54

5Using the STRING, UNSTRING, and INSPECTStatementsThe STRING, UNSTRING, and INSPECT statements give your Compaq COBOLprograms the following capabiliti

Seite 55

Using the STRING, UNSTRING, and INSPECT Statements5.1 Concatenating Data Using the STRING StatementIf FIELD2 is not large enough to hold all three ite

Seite 56

Using the STRING, UNSTRING, and INSPECT Statements5.1 Concatenating Data Using the STRING StatementFigure 5–1 Results of the STRING Operation16 spaces

Seite 57

6–1 Sample Record Description . ... 6–96–2 Determining Fixed-Length Record Size . ... 6–106–3 Determi

Seite 58 - VM-0611A-AI

Using the STRING, UNSTRING, and INSPECT Statements5.1 Concatenating Data Using the STRING StatementRemember, the remainder of the receiving item is no

Seite 59

Using the STRING, UNSTRING, and INSPECT Statements5.1 Concatenating Data Using the STRING StatementThe ON OVERFLOW phrase cannot distinguish the overfl

Seite 60

Using the STRING, UNSTRING, and INSPECT Statements5.1 Concatenating Data Using the STRING Statement5.1.5 Common STRING Statement ErrorsThe following a

Seite 61

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING StatementThe compiler-generated code performs the UNSTRING op

Seite 62

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING StatementConsider the following statement with reference to t

Seite 63

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING StatementTable 5–4 Results of Delimiting with an AsteriskFIEL

Seite 64

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING StatementTable 5–5 Results of Delimiting Multiple Receiving I

Seite 65

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING Statementthe delimiter item. It considers the ALL delimiter t

Seite 66

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING Statement5.2.2.1 Multiple DelimitersThe UNSTRING statement sc

Seite 67

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING StatementThe compiler then counts the number of characters be

Seite 68

6–37 Extending a Sequential File ... 6–506–38 Rewriting Relative Records in Sequential Access Mode . ... 6–516–3

Seite 69

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING StatementWhen a sending string is delimited by the end of the

Seite 70

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING StatementPNTR contains the current position of the scanner in

Seite 71

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING StatementIf the compiler has moved only three sending strings

Seite 72

Using the STRING, UNSTRING, and INSPECT Statements5.2 Separating Data Using the UNSTRING Statement• Omitting the word INTO (or writing it as TO) befor

Seite 73

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT Statement5.3.2 Restricting Data Inspection

Seite 74

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementFigure 5–2 Matching Delimiter Char

Seite 75

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementTable 5–10 Values Resulting from I

Seite 76

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementTable 5–10 (Cont.) Values Resultin

Seite 77

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementFigure 5–4 Typical REPLACING Phras

Seite 78

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementTable 5–11 Relationship Among INSP

Seite 79

10–10 Sample Program EX1010 . . . ... 10–7510–11 Printing Labels Four-Up . . . ... 10–8310–1

Seite 80

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementWhen an active argument finds a mat

Seite 81

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT Statement• An identifier must be an elementa

Seite 82 - 1.4 Program Run Messages

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementThese three tally arguments have t

Seite 83 - 1.4.2 Program Logic Errors

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT Statement5.3.5.4 Interference in Tally Argu

Seite 84

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementSometimes you can use the interfer

Seite 85

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementThese statements count the number

Seite 86

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT Statement5.3.6 Using the REPLACING PhraseWh

Seite 87

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT Statement• LEADING specifies that only adjac

Seite 88

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementINSPECT FIELD1 REPLACINGALL "

Seite 89 - 1.5 Using Program Switches

Using the STRING, UNSTRING, and INSPECT Statements5.3 Examining and Replacing Characters Using the INSPECT StatementThe action of a search argument is

Seite 90

C–1 Source Code Used in the Sample Debug Sessions ... C–4Figures1–1 Commands for Developing Compaq COBOL Programs on Tru64UNIX ...

Seite 92

6Processing Files and RecordsThe Compaq COBOL I/O system offers you a wide range of record managementtechniques while remaining transparent to you. Yo

Seite 93

Processing Files and Records6.1 Defining Files and RecordsA record is a group of related data elements. The space a record needs ona physical device de

Seite 94

Processing Files and Records6.1 Defining Files and RecordsTable 6–1 (Cont.) Compaq COBOL File Organizations—Advantages and DisadvantagesFileOrganizatio

Seite 95

Processing Files and Records6.1 Defining Files and RecordsSequential files always contain an end-of-file (EOF) indication. On magnetictapes, it is the EO

Seite 96 - 2.3 Sign Conventions

Processing Files and Records6.1 Defining Files and RecordsFigure 6–3 Line Sequential File OrganizationEnd of file...ZK−6813A−GEBeginning of fileRECORD1

Seite 97 - 2.5 Evaluating Numeric Items

Processing Files and Records6.1 Defining Files and RecordsIn relative file organization, not every cell must contain a record. Although eachcell occupie

Seite 98 - 2.5.3 Numeric Class Tests

Processing Files and Records6.1 Defining Files and RecordsIndexed file organization allows you to use a key to uniquely identify a recordwithin the file.

Seite 99 - 2.5.4 Success/Failure Tests

Processing Files and Records6.1 Defining Files and RecordsFigure 6–5 Indexed File OrganizationrecordKey Definition... ...Primary key index (employee na

Seite 100 - 2.6 Using the MOVE Statement

Processing Files and Records6.1 Defining Files and RecordsIf a file has more than one record description, the different record descriptionsautomatically

Seite 101 - Handling Numeric Data

10–15 EX1006.LIS Listing ... 10–4810–16 EX1007.LIS Listing ... 10–5610–17 EX10

Seite 102

Processing Files and Records6.1 Defining Files and RecordsExample 6–2 Determining Fixed-Length Record SizeFD FIXED-FILERECORD CONTAINS 100 CHARACTERS.0

Seite 103 - 2.7.1 Temporary Work Items

Processing Files and Records6.1 Defining Files and RecordsExample 6–4 Creating Variable-Length Records with the DEPENDING ONPhraseFILE SECTION.FD INFIL

Seite 104

Processing Files and Records6.1 Defining Files and RecordsIf you describe a record with both the RECORD VARYING...DEPENDING ONphrase on data-name-1 and

Seite 105

Processing Files and Records6.1 Defining Files and RecordsStreamStream files contain records of different length, delimited by a record terminator.The c

Seite 106

Processing Files and Records6.1 Defi

Seite 107

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramDefining a File Connector with SELECT and ASSIGNYour

Seite 108 - 2.7.6 Using the GIVING Phrase

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramExample 6–9Defining a Magnetic Tape File (OpenVMS)EN

Seite 109

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramExample 6–10 (Cont.) Defining a Magnetic Tape File (

Seite 110

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramOn Tru64 UNIX, with this code OPEN would create a fi

Seite 111 - Handling Nonnumeric Data

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramOn Tru64 UNIX, you can also use the literal or alph

Seite 112 - 3.2 Data Organization

© 2000 Compaq Computer CorporationCOMPAQ, VAX, VMS, the Compaq logo, and the DIGITAL logo Registered in U.S. Patent andTrademark Office.OpenVMS and Tru

Seite 113 - 3.4 Testing Nonnumeric Items

3–2 Nonnumeric Elementary Moves . . ... 3–83–3 Data Movement with Editing Symbols ... 3–93–4 Data Movem

Seite 114

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramPROCEDURE DIVISION.P0. OPEN OUTPUT F-DISK.CLOSE F-D

Seite 115

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramExamples 6–13, 6–14, and Example 6–15 illustrate ho

Seite 116 - 3.5 Data Movement

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramExample 6–15 (Cont.) Specifying Indexed File Organi

Seite 117 - 3.6 Using the MOVE Statement

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramRecord Access ModeThe methods for retrieving and st

Seite 118

Processing Files and Records6.2 Identifying Files and Records from Within Your Compaq COBOL ProgramSample SELECT statements for indexed files with dyna

Seite 119

Processing Files and Records6.3 Creating and Processing FilesExample 6–21 OPEN and CLOSE Statements...OPEN INPUT MASTER-FILE.OPEN OUTPUT REPORT-FILE.O

Seite 120 - 3.6.4 Subscripted Moves

Processing Files and Records6.3 Creating and Processing Files6. If the file characteristics specified by the program attempting an OPENoperation differ

Seite 121

Processing Files and Records6.3 Creating and Processing FilesExample 6–23 Creating a Line Sequential FileIDENTIFICATION DIVISION.PROGRAM-ID. LINESEQ01

Seite 122

Processing Files and Records6.3 Creating and Processing Files• OUTPUT—Output mode can create the following two kinds of files:Storage files—A storage fil

Seite 123 - Handling Tables

Processing Files and Records6.3 Creating and Processing Files----------------(1)---------------- --------------(2)---------------WRITE STOCK-RECORD FR

Seite 124 - 4.1 Defining Tables

13–4 COBOL Implementation of the OpenVMS Alpha Data Types(OpenVMS) ... 13–816–1 Boundaries for Naturally Ali

Seite 125

Processing Files and Records6.3 Creating and Processing FilesCreating a Relative File in Sequential Access ModeWhen your program creates a relative fil

Seite 126

Processing Files and Records6.3 Creating and Processing FilesExample 6–25 (Cont.) Creating a Relative File in Random Access ModeIDENTIFICATION DIVISIO

Seite 127

Processing Files and Records6.3 Creating and Processing FilesTable 6–5 Valid I/O Statements for Relative FilesOpen ModeFileOrganizationAccessMode Stat

Seite 128

Processing Files and Records6.3 Creating and Processing FilesExample 6–26 Creating and Populating an Indexed FileIDENTIFICATION DIVISION.PROGRAM-ID. I

Seite 129

Processing Files and Records6.3 Creating and Processing FilesTable 6–6 lists the valid I/O statements and illustrates the followingrelationships:• Fil

Seite 130

Processing Files and Records6.3 Creating and Processing Files01 EMPLOYEE.02 FORENAME PIC X(10).02 BADGE-NO PIC X(6).02 DEPT PIC X(2).02 SURNAME PIC X(

Seite 131

Processing Files and Records6.3 Creating and Processing FilesExample 6–27 (Cont.) Using Segmented KeysDATA DIVISION.FILE SECTION.FD FLAVORS.01 ICE-CRE

Seite 132

Processing Files and Records6.4 Reading Files6.4 Reading FilesReading sequential, line sequential, relative, and indexed files includes thefollowing ta

Seite 133 - Handling Tables 4–11

Processing Files and Records6.4 Reading FilesExample 6–28 Reading a Sequential FileIDENTIFICATION DIVISION.PROGRAM-ID. SEQ02.ENVIRONMENT DIVISION.INPU

Seite 134 - 4.3 Accessing Table Elements

Processing Files and Records6.4 Reading FilesExample 6–29 Reading a Relative File SequentiallyIDENTIFICATION DIVISION.PROGRAM-ID. REL04.ENVIRONMENT DI

Seite 136

Processing Files and Records6.4 Reading FilesReading a Relative File RandomlyReading relative records randomly involves the following:1. Specifying OR

Seite 137 - 4.3.5 Relative Indexing

Processing Files and Records6.4 Reading Filesavailable to the program. In dynamic mode, the program can switch from randomaccess I/O statements to seq

Seite 138 - 4.3.6 Index Data Items

Processing Files and Records6.4 Reading Files6.4.3 Reading an Indexed FileYour program can read an indexed file sequentially, randomly, or dynamically.

Seite 139

Processing Files and Records6.4 Reading FilesExample 6–32 (Cont.) Reading an Indexed File SequentiallyPROCEDURE DIVISION.A000-BEGIN.OPEN INPUT FLAVORS

Seite 140

Processing Files and Records6.4 Reading FilesExample 6–33 (Cont.) Reading an Indexed File RandomlyDATA DIVISION.FILE SECTION.FD FLAVORS.01 ICE-CREAM-M

Seite 141

Processing Files and Records6.4 Reading FilesSequential processing need not begin at the first record of an indexed file. TheSTART statement specifies th

Seite 142

Processing Files and Records6.4 Reading FilesA100-GET-RECORDS.READ IND-ALPHA NEXT RECORD AT END MOVE "Y" TO END-OF-FILE.IF END-OF-FILE NOT =

Seite 143

Processing Files and Records6.4 Reading FilesExample 6–35 (Cont.) Reading an Indexed File Dynamically, with READ PRIOR*+* READ PREVIOUS after file ope

Seite 144

Processing Files and Records6.4 Reading FilesTable 6–7 (Cont.) Indexed File—ISAM MappingCOBOL Data Type Maps To Transformation Methodsigned quadwordPI

Seite 145

Processing Files and Records6.5 Updating FilesStatements (1) and (2) in the following example are logically equivalent:FILE SECTION.FD STOCK-FILE.01 S

Seite 146

PrefaceThis manual provides information to help you develop Compaq COBOL programsfor the OpenVMS Alpha and Compaq Tru64 UNIX platforms.Compaq COBOL is

Seite 147 - Statements

Processing Files and Records6.5 Updating FilesExample 6–37 shows how to extend a sequential file.Example 6–37 Extending a Sequential FileIDENTIFICATION

Seite 148

Processing Files and Records6.5 Updating Files4. Using a START statement and then a READ statement to read the targetrecord5. Updating the record6. Re

Seite 149 - AYER MA. 01432

Processing Files and Records6.5 Updating FilesRewriting Relative Records in Random Access ModeRewriting relative records in random access mode involve

Seite 150

Processing Files and Records6.5 Updating FilesExample 6–39 (Cont.) Rewriting Relative Records in Random Access ModeA100-UPDATE-RECORD.DISPLAY "TO

Seite 151

Processing Files and Records6.5 Updating FilesExample 6–40 (Cont.) Deleting Relative Records in Sequential Access ModeACCESS MODE IS SEQUENTIALRELATIV

Seite 152

Processing Files and Records6.5 Updating FilesExample 6–41 (Cont.) Deleting Relative Records in Random Access ModeACCESS MODE IS RANDOMRELATIVE KEY IS

Seite 153

Processing Files and Records6.5 Updating FilesUpdating an Indexed File SequentiallyUpdating indexed records in sequential acess mode involves the foll

Seite 154

Processing Files and Records6.5 Updating FilesExample 6–42 (Cont.) Updating an Indexed File SequentiallyPROCEDURE DIVISION.A000-BEGIN.OPEN I-O FLAVORS

Seite 155 - Legend: # = space

Processing Files and Records6.5 Updating FilesExample 6–43 (Cont.) Updating an Indexed File RandomlyFILE-CONTROL.SELECT FLAVORS ASSIGN TO "DAIRY&

Seite 156

Processing Files and Records6.5 Updating FilesExample 6–43 (Cont.) Updating an Indexed File RandomlyIF LETS-SEE-NEXT-STORE ANDICE-CREAM-STORE-STATE =

Seite 157

• Chapter 8 describes file sharing and record locking for sequential, relative,and indexed files.• Chapter 9 describes how to sort and merge files using

Seite 158 - 5.2.3 Using the COUNT Phrase

Processing Files and Records6.6 Backing Up Your Files6.6 Backing Up Your FilesFiles can become unusable if either of the following situations occur:•

Seite 159

7Handling Input/Output Exception ConditionsMany types of exception conditions can occur when a program processes a file; notall of them are errors. The

Seite 160

Handling Input/Output Exception Conditions7.1 Planning for the AT END Condition7.1 Planning for the AT END ConditionCompaq COBOL provides you the opti

Seite 161

Handling Input/Output Exception Conditions7.2 Planning for the Invalid Key Conditionin the file, or when you receive the AT END condition for a subsequ

Seite 162

Handling Input/Output Exception Conditions7.3 Using File Status Values and OpenVMS RMS Completion CodesExample 7–3Defining a File Status for a FileDATA

Seite 163 - Statement

Handling Input/Output Exception Conditions7.3 Using File Status Values and OpenVMS RMS Completion CodesExample 7–4 (Cont.) Using the File Status Value

Seite 164 - 5.3.3 Implicit Redefinition

Handling Input/Output Exception Conditions7.3 Using File Status Values and OpenVMS RMS Completion CodesThese special registers supplement the file stat

Seite 165 - ZK−1426A−GE

Handling Input/Output Exception Conditions7.3 Using File Status Values and OpenVMS RMS Completion CodesExample 7–5 (Cont.) Referencing RMS-STS, RMS-ST

Seite 166

Handling Input/Output Exception Conditions7.3 Using File Status Values and OpenVMS RMS Completion CodesExample 7–5 (Cont.) Referencing RMS-STS, RMS-ST

Seite 167 - ZK−6052−GE

Handling Input/Output Exception Conditions7.4 Using Declarative USE ProceduresExample 7–6 The Declaratives SkeletonPROCEDURE DIVISION.DECLARATIVES...

Seite 168 - INSPECT FIELD1 REPLACING

where nnn is the version and release number, for example, 027 for Version2.7.On the Tru64 UNIX operating system, the release notes are in:/usr/lib/cmp

Seite 169

Handling Input/Output Exception Conditions7.4 Using Declarative USE Procedures• INPUT—You can define only one INPUT Declarative USE procedure for eachp

Seite 170 - 5.3.5 The TALLYING Phrase

Handling Input/Output Exception Conditions7.4 Using Declarative USE ProceduresExample 7–8 (Cont.) Five Types of Declarative USE Procedures************

Seite 171

Handling Input/Output Exception Conditions7.4 Using Declarative USE ProceduresExample 7–8 (Cont.) Five Types of Declarative USE Procedures************

Seite 172

8Sharing Files and Locking RecordsThis chapter includes the following information about sharing files and protectingrecords for sequential, relative, a

Seite 173

Sharing Files and Locking Records8.1 Controlling Access to Files and RecordsFile sharing and record locking allow you to control file and record operat

Seite 174

Sharing Files and Locking Records8.1 Controlling Access to Files and RecordsWRITEREWRITEDELETEUNLOCK8.2 Choosing X/Open Standard or Compaq Standard Fi

Seite 175

Sharing Files and Locking Records8.2 Choosing X/Open Standard or Compaq Standard File Sharing and Record Locking• The /STANDARD=[NO]XOPEN qualifier on

Seite 176

Sharing Files and Locking Records8.3 Ensuring Successful File SharingIn the OpenVMS Alpha file protection facility, four different categories of userse

Seite 177 - ";"ALL

Sharing Files and Locking Records8.3 Ensuring Successful File Sharing8.3.3 Determining the Intended Access Mode to a FileOnce you establish disk resid

Seite 178

Sharing Files and Locking Records8.3 Ensuring Successful File SharingLOCK MODE IS EXCLUSIVEYou can also select X/Open file sharing by just specifying W

Seite 179

Convention MeaningBraces used in a general format enclose lists from which youmust choose only one item. For example:SEQUENTIALRANDOMDYNAMICBrackets u

Seite 180

Sharing Files and Locking Records8.3 Ensuring Successful File SharingExample 8–1 (Cont.) X/Open Standard Lock Modes and Opening FilesPROCEDURE-DIVISIO

Seite 181 - Processing Files and Records

Sharing Files and Locking Records8.3 Ensuring Successful File SharingIf the mode is INPUT (reader), access to the file is granted insteadof denied when

Seite 182 - 6.1.1 File Organization

Sharing Files and Locking Records8.3 Ensuring Successful File Sharinga file is shared. Note that some streams can be locked out if their intentions are

Seite 183

Sharing Files and Locking Records8.3 Ensuring Successful File SharingLegend3 Second stream is denied access to the file because the first stream intends

Seite 184

Sharing Files and Locking Records8.3 Ensuring Successful File SharingLegend6 For indexed files, when the first stream allows READERS, file lock doesnot e

Seite 185

Sharing Files and Locking Records8.3 Ensuring Successful File SharingFile Status 91 indicates that a previous access stream has denied access to thefil

Seite 186

Sharing Files and Locking Records8.3 Ensuring Successful File SharingExample 8–2 (Cont.) Program Segment for File Status Values* handle other possible

Seite 187

Sharing Files and Locking Records8.3 Ensuring Successful File SharingYou can obtain the values that apply to file-sharing exceptions (or to successfulfi

Seite 188 - 6.1.2 Record Format

Sharing Files and Locking Records8.3 Ensuring Successful File SharingFigure 8–3 Why a Record-Already-Exists Error OccursRecord 1Record 2Record 3Record

Seite 189

Sharing Files and Locking Records8.4 Ensuring Successful Record Locking8.4.1 X/Open Standard Record LockingThis section describes the X/Open standard

Seite 190

Convention Meaningextensions Compaq extensions to the 1985 ANSI COBOL Standard arecolor coded in blue or gray. Note that the term extension inthis man

Seite 191

Sharing Files and Locking Records8.4 Ensuring Successful Record LockingExample 8–4 X/Open Standard Record LockingUser 1 (Automatic Record Locking):---

Seite 192

Sharing Files and Locking Records8.4 Ensuring Successful Record LockingYou deaccess a record by using the next READ operation, a REWRITE ora DELETE op

Seite 193 - 6.1.3 File Design

Sharing Files and Locking Records8.4 Ensuring Successful Record LockingWhen you specify manual record locking you must use all of the following clause

Seite 194

Sharing Files and Locking Records8.4 Ensuring Successful Record LockingTable 8–5 (Cont.) Manual Record Locking CombinationsLock Held (for first stream)

Seite 195

Sharing Files and Locking Records8.4 Ensuring Successful Record Lockingstream on the file (UNLOCK ALL RECORDS). (On Tru64 UNIX and Windows NTsystems fo

Seite 196

Sharing Files and Locking Records8.4 Ensuring Successful Record LockingWhen you close a file, any existing record lock is released automatically. TheUN

Seite 197

Sharing Files and Locking Records8.4 Ensuring Successful Record LockingSoft Record LocksSoft record locks can occur only with Compaq standard record l

Seite 198

Sharing Files and Locking Records8.4 Ensuring Successful Record LockingSoft Record Locks and Declarative USE ProceduresIf a soft record lock occurs, t

Seite 199

Sharing Files and Locking Records8.4 Ensuring Successful Record LockingExample 8–7 (Cont.) Program Segment for Record-Locking ExceptionsIF record-lock

Seite 200

9Using the SORT and MERGE StatementsThis chapter includes the following information about using the SORT andMERGE statements to sort and merge records

Seite 201

Compaq Tru64 UNIX was formerly known as DEC OSF/1 or as DIGITAL UNIX.Compaq COBOL was formerly known as DIGITAL COBOL or DEC COBOL.Compaq COBOL for Op

Seite 202

Using the SORT and MERGE Statements9.1 Sorting Data with the SORT StatementSorting ConceptsRecords are sorted based on the data values in the sort key

Seite 203

Using the SORT and MERGE Statements9.1 Sorting Data with the SORT Statement9.1.2 Specifying Sort Parameters with the ASCENDING and DESCENDING KEYPhras

Seite 204

Using the SORT and MERGE Statements9.1 Sorting Data with the SORT StatementRETURN statement to transfer records from the sort. For example, you can us

Seite 205

Using the SORT and MERGE Statements9.1 Sorting Data with the SORT StatementExample 9–1 (Cont.) INPUT and OUTPUT PROCEDURE Phrases*********************

Seite 206

Using the SORT and MERGE Statements9.1 Sorting Data with the SORT StatementExample 9–2 USING Phrase Replaces INPUT PROCEDURE Phrase...PROCEDURE DIVISI

Seite 207

Using the SORT and MERGE Statements9.1 Sorting Data with the SORT StatementIn contrast, the WITH DUPLICATES IN ORDER phrase guarantees that recordswit

Seite 208

Using the SORT and MERGE Statements9.1 Sorting Data with the SORT StatementExample 9–4 (Cont.) Using Two Sort Files01 SORT-REC-2.03 FILLER PIC X(20).0

Seite 209

Using the SORT and MERGE Statements9.1 Sorting Data with the SORT StatementIf you specify the GIVING phrase and the output file contains variable-lengt

Seite 210

Using the SORT and MERGE Statements9.1 Sorting Data with the SORT StatementIf you select Hypersort at DCL level, it will be in effect for a SORT state

Seite 211

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–7 Sorting a File with the USING and GIVING Phrases

Seite 212

User Programs and the Year 2000Even subsequent to the turn of the century, there still exist potential disruptionsin previously problem-free software

Seite 213

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–8 Using the USING and OUTPUT PROCEDURE PhrasesIDEN

Seite 214

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–8 (Cont.) Using the USING and OUTPUT PROCEDURE Phr

Seite 215

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–9 Using the INPUT PROCEDURE and OUTPUT PROCEDUREPh

Seite 216

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–9 (Cont.) Using the INPUT PROCEDURE and OUTPUTPROC

Seite 217 - 6.4 Reading Files

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–9 (Cont.) Using the INPUT PROCEDURE and OUTPUTPROC

Seite 218 - 6.4.2 Reading a Relative File

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–10 (Cont.) Using the COLLATING SEQUENCE IS PhraseF

Seite 219

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–11 (Cont.) Creating a New Sort Key03 INCOME-FOURTH

Seite 220

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–11 (Cont.) Creating a New Sort Key120-WRITE.RETURN

Seite 221

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–12 (Cont.) Merging FilesFD TOTAL-SALESLABEL RECORD

Seite 222 - 6.4.3 Reading an Indexed File

Using the SORT and MERGE Statements9.3 Sample Programs Using the SORT and MERGE StatementsExample 9–12 (Cont.) Merging Files050-TALLY-AMOUNTS.ADD M-SA

Seite 223

ContentsPreface ... xxiii1 Developing Compaq COBOL Programs1.0.1 Files Installed on Your Syst

Seite 226

10Producing Printed ReportsThere are three Compaq COBOL programming capabilities for producingformatted reports: conventional, linage file, and Report

Seite 227

Producing Printed Reports10.2 Components of a ReportFigure 10–1 Sample Layout Worksheet1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

Seite 228 - 6.5 Updating Files

Producing Printed Reports10.2 Components of a ReportExample 10–1 (Cont.) Components of a Report204-NOVEMBER-96 Year To Date Sales Report Page 1Salesma

Seite 229

Producing Printed Reports10.2 Components of a Report3Control Heading (CH)—The control heading consists of one or more lines ofinformation identifying

Seite 230

Producing Printed Reports10.4 The Logical Page and the Physical PageFigure 10–2 Subtotals, Crossfoot Totals, and Rolled Forward Totals04−NOVEMBER−96

Seite 231

Producing Printed Reports10.4 The Logical Page and the Physical Pagepage is defined, your program must stay within those bounds; otherwise, theprinted

Seite 232

Producing Printed Reports10.5 Programming a Conventional File ReportOnce you have defined the logical page, you must handle vertical spacing,horizontal

Seite 233

Producing Printed Reports10.5 Programming a Conventional File ReportExample 10–2 Checking for the Page-Overflow Condition...PROCEDURE DIVISION.A000-BEG

Seite 234

Producing Printed Reports10.5 Programming a Conventional File Report10.5.4 Printing the Conventional ReportWhen you are ready to print your report, yo

Seite 235

1Developing Compaq COBOL ProgramsCompaq COBOL is a powerful optimizing compiler produced by CompaqComputer Corporation. It operates comfortably in the

Seite 236

Producing Printed Reports10.5 Programming a Conventional File ReportExample 10–3 (Cont.) Page Advancing and Line Skipping01 FORM1-LINE-14.02 PIC X(4)

Seite 237

Producing Printed Reports10.5 Programming a Conventional File ReportExample 10–3 (Cont.) Page Advancing and Line SkippingA900-PRINT-HEADERS-ROUTINE.**

Seite 238

Producing Printed Reports10.5 Programming a Conventional File ReportThe second report, Figure 10–5, is a double-spaced master listing of all inputreco

Seite 239

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL ReportOn Tru64 UNIX, the linage file contains variable length records. All advanci

Seite 240 - 6.6 Backing Up Your Files

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL ReportFor example, to define how many lines you want your program to skip at theto

Seite 241

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL ReportADVANCING PAGE clause or the AFTER ADVANCING PAGE clause. For anexample of

Seite 242

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL ReportFigure 10–7 A 28-Line Logical PagePPPPPPPFPFPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Seite 243

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL ReportExample 10–4 (Cont.) Checking for End-of-Page on a 28-Line Logical PageDATA

Seite 244 - 7.3.1 File Status Values

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL ReportExample 10–4 (Cont.) Checking for End-of-Page on a 28-Line Logical Page01 H

Seite 245

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL ReportExample 10–4 (Cont.) Checking for End-of-Page on a 28-Line Logical PageA300

Seite 246 - (continued on next page)

Developing Compaq COBOL Programs1.1 Compaq COBOL and Alpha Architecture System Resources1.1 Compaq COBOL and Alpha Architecture System ResourcesFor ma

Seite 247

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL Report10.6.7 A Linage-File Report ExampleExample 10–5 shows a Compaq COBOL progra

Seite 248

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL Reportto exceed 15. The pointer is then positioned on the first print line of the

Seite 249

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL ReportExample 10–5 Programming a 20-Line Logical Page Defined by the LINAGEClause

Seite 250

Producing Printed Reports10.6 Programming a Linage-File Compaq COBOL ReportExample 10–5 (Cont.) Programming a 20-Line Logical Page Defined by theLINAGE

Seite 251

Producing Printed Reports10.7 Modes for Printing Reports• You tie up the printer for as long as your job runs. If your program doescomputations and ru

Seite 252

Producing Printed Reports10.8 Programming a Report Writer ReportDetailed examples using Report Writer are documented in Section 10.9.10.8.1 Using the

Seite 253 - ZK−6323−GE

Producing Printed Reports10.8 Programming a Report Writer ReportThe RD entry example in Section 10.8.2 contains the following PAGE clauseinformation:R

Seite 254 - ZK−6105−GE

Producing Printed Reports10.8 Programming a Report Writer ReportFigure 10–9 Presentation Order for a Logical PageREPORT HEADINGPAGE HEADINGCONTROL HEA

Seite 255 - -std [no]xopen

Producing Printed Reports10.8 Programming a Report Writer ReportFigure 10–10 Sample Report Using All Seven Report GroupsSALES REPORTMONTH WK. SALESCON

Seite 256 - 8.3.2 Using File Protection

Producing Printed Reports10.8 Programming a Report Writer Report01 REPORT-HEADER TYPE IS REPORT HEADING.01 PAGE-HEADER TYPE IS PAGE HEADING.01 CONTROL

Seite 257

Developing Compaq COBOL Programs1.1 Compaq COBOL and Alpha Architecture System Resources• Check program sizes. Larger amounts of system resources are

Seite 258

Producing Printed Reports10.8 Programming a Report Writer ReportYou can also specify absolute line spacing with the NEXT GROUP clause. Anabsolute line

Seite 259

Producing Printed Reports10.8 Programming a Report Writer ReportIn the next example, the COLUMN NUMBER clauses are subordinate to a LINENUMBER clause:

Seite 260

Producing Printed Reports10.8 Programming a Report Writer ReportYou can also code a SOURCE clause with PAGE-COUNTER or LINE-COUNTERas its operand, as

Seite 261 - RW I-O, INPUT, OUTPUT, EXTEND

Producing Printed Reports10.8 Programming a Report Writer ReportWhen the value of a control name changes, a control break occurs. The ReportWriter ack

Seite 262

Producing Printed Reports10.8 Programming a Report Writer ReportThis example produces the following output:12345column 1234567890123456789012345678901

Seite 263

Producing Printed Reports10.8 Programming a Report Writer Report10.8.11.2 CrossfootingIn crossfooting, the SUM clause adds all the sum counters in the

Seite 264

Producing Printed Reports10.8 Programming a Report Writer Report10.8.11.4 RESET OptionWhen a CONTROL FOOTING group is printed, the SUM counter in that

Seite 265

Producing Printed Reports10.8 Programming a Report Writer ReportIn the preceding example, the value of ADD-COUNTER is added to theCONTROL FOOTING FINA

Seite 266

Producing Printed Reports10.8 Programming a Report Writer ReportWith the GROUP INDICATE clause, the program produces the following output:123123456789

Seite 267

Producing Printed Reports10.8 Programming a Report Writer Report10.8.13.2 Generating a Report Writer ReportThe GENERATE statement prints the report.Yo

Seite 268 - ZK−6060−GE

Developing Compaq COBOL Programs1.1 Compaq COBOL and Alpha Architecture System ResourcesCOPY files referenced). Alternatively, multiply 25 times the nu

Seite 269

Producing Printed Reports10.8 Programming a Report Writer Report• CONTROL FOOTING and CONTROL HEADING report groups print afterthe specified control br

Seite 270

Producing Printed Reports10.8 Programming a Report Writer ReportIf no GENERATE statement has been executed for the report, the TERMINATEstatement does

Seite 271

Producing Printed Reports10.8 Programming a Report Writer ReportThe following example indicates that the phrase BEGINNING-OF-REPORTis to be displayed

Seite 272

Producing Printed Reports10.8 Programming a Report Writer Report10.8.14.2 Summary ReportingIn summary reporting, the GENERATE statement performs all o

Seite 273

Producing Printed Reports10.9 Report Writer ExamplesFigure 10–14 Sample MASTER.DAT FileAbbott John B12 Pleasant Street Nashua

Seite 274

Producing Printed Reports10.9 Report Writer ExamplesExample 10–6 Sample Program EX1006IDENTIFICATION DIVISION.PROGRAM-ID. EX1006.ENVIRONMENT DIVISION.

Seite 275

Producing Printed Reports10.9 Report Writer ExamplesExample 10–6 (Cont.) Sample Program EX1006REPORT SECTION.RD MASTER-LISTPAGE LIMIT IS 66HEADING 1FI

Seite 276

Producing Printed Reports10.9 Report Writer ExamplesExample 10–6 (Cont.) Sample Program EX1006PIC X(4) VALUE "CITY".03 COLUMN 71PIC X VALUE

Seite 277

Producing Printed Reports10.9 Report Writer ExamplesExample 10–6 (Cont.) Sample Program EX1006000-DO-SORT.DISPLAY "*** EX1006 ***".SORT SORT

Seite 278

Producing Printed Reports10.9 Report Writer Examples10.9.3 EX1007—Detail Report ProgramExample 10–7 (EX1007) is a Report Writer program that uses the

Seite 279

Developing Compaq COBOL Programs1.1 Compaq COBOL and Alpha Architecture System ResourcesMore physical memory can also be made available to a process (

Seite 280

Producing Printed Reports10.9 Report Writer ExamplesExample 10–7 (Cont.) Sample Program EX1007RD MASTER-LISTPAGE LIMIT IS 66HEADING 1FIRST DETAIL 13LA

Seite 281

Producing Printed Reports10.9 Report Writer ExamplesExample 10–7 (Cont.) Sample Program EX100703 COLUMN 45PIC X VALUE "*".03 COLUMN 75PIC X

Seite 282

Producing Printed Reports10.9 Report Writer ExamplesExample 10–7 (Cont.) Sample Program EX100703 COLUMN 1PIC X VALUE "|".03 COLUMN 2PIC X(11

Seite 283

Producing Printed Reports10.9 Report Writer ExamplesExample 10–7 (Cont.) Sample Program EX1007TYPE DETAILLINE PLUS 2.02 COLUMN 1 PIC X(15) SOURCE LAST

Seite 284 - ORDER Phrase

Producing Printed Reports10.9 Report Writer ExamplesExample 10–7 (Cont.) Sample Program EX100703 COLUMN 45PIC X VALUE "*".03 COLUMN 75PIC X

Seite 285 - 9.1.7 Multiple Sorting

Producing Printed Reports10.9 Report Writer ExamplesExample 10–7 (Cont.) Sample Program EX1007DISPLAY "*** EX1007 ***".DISPLAY "Enter C

Seite 286

Producing Printed Reports10.9 Report Writer ExamplesFigure 10–16 EX1007.LIS Listing ***********************

Seite 287 - 9.1.10 Sorting Tables

Producing Printed Reports10.9 Report Writer ExamplesFigure 10–16 (Cont.) EX1007.LIS ListingCUSTOMER MASTER FILE REPORT

Seite 288

Producing Printed Reports10.9 Report Writer ExamplesExample 10–8 Sample Program EX1008IDENTIFICATION DIVISION.PROGRAM-ID. EX1008.ENVIRONMENT DIVISION.

Seite 289

Producing Printed Reports10.9 Report Writer ExamplesExample 10–8 (Cont.) Sample Program EX100803 INVOICE-NUMBER PIC 999999.03 INVOICE-SALES PIC S9(5)V

Seite 290

Developing Compaq COBOL Programs1.1 Compaq COBOL and Alpha Architecture System Resources1.1.2.3 Improving Compile Performance with Separate Compilatio

Seite 291

Producing Printed Reports10.9 Report Writer ExamplesExample 10–8 (Cont.) Sample Program EX100802 LINE 29.03 COLUMN 45PIC X VALUE "*".03 COLU

Seite 292

Producing Printed Reports10.9 Report Writer ExamplesExample 10–8 (Cont.) Sample Program EX100803 COLUMN 1PIC X VALUE "|".03 COLUMN 2PIC X(11

Seite 293

Producing Printed Reports10.9 Report Writer ExamplesExample 10–8 (Cont.) Sample Program EX100802 LINE 11.03 COLUMN 1PIC X VALUE "+".03 COLUM

Seite 294

Producing Printed Reports10.9 Report Writer ExamplesExample 10–8 (Cont.) Sample Program EX100803 COLUMN 45PIC X VALUE "*".03 COLUMN 55PIC Z9

Seite 295

Producing Printed Reports10.9 Report Writer ExamplesExample 10–8 (Cont.) Sample Program EX1008MAIN SECTION.000-DO-SORT.SORT SORT-FILE ON ASCENDING KEY

Seite 296

Producing Printed Reports10.9 Report Writer ExamplesFigure 10–17 EX1008.LIS Listing ***********************

Seite 297

Producing Printed Reports10.9 Report Writer ExamplesExample 10–9 (Cont.) Sample Program EX1009DATA DIVISION.FILE SECTION.SD SORT-FILE.01 SORTED-CUSTOM

Seite 298

Producing Printed Reports10.9 Report Writer ExamplesExample 10–9 (Cont.) Sample Program EX100902 LINE 24.03 COLUMN 45PIC X(31) VALUE ALL "*"

Seite 299

Producing Printed Reports10.9 Report Writer ExamplesExample 10–9 (Cont.) Sample Program EX100903 COLUMN 45PIC X VALUE "*".03 COLUMN 75PIC X

Seite 300

Producing Printed Reports10.9 Report Writer ExamplesExample 10–9 (Cont.) Sample Program EX1009PIC X(6) VALUE "STREET".03 COLUMN 48PIC X VALU

Seite 301 - Producing Printed Reports

Developing Compaq COBOL Programs1.1 Compaq COBOL and Alpha Architecture System Resources1.1.3.2 ANSI Reference FormatANSI format is useful on a card-o

Seite 302 - 10.2 Components of a Report

Producing Printed Reports10.9 Report Writer ExamplesExample 10–9 (Cont.) Sample Program EX100902 LINE 59.03 COLUMN 45PIC X(16) VALUE "C O M P A N

Seite 303

Producing Printed Reports10.9 Report Writer ExamplesExample 10–9 (Cont.) Sample Program EX100903 COLUMN 45PIC X VALUE "*".03 COLUMN 55PIC Z9

Seite 304

Producing Printed Reports10.9 Report Writer ExamplesExample 10–9 (Cont.) Sample Program EX1009100-END-OF-FILE.TERMINATE MASTER-LIST.CLOSE SORTED-FILE,

Seite 305

Producing Printed Reports10.9 Report Writer ExamplesFigure 10–18 EX1009.LIS Listing ***********************

Seite 306

Producing Printed Reports10.9 Report Writer ExamplesFigure 10–18 (Cont.) EX1009.LIS ListingCUSTOMER MASTER FILE REPORT

Seite 307

Producing Printed Reports10.9 Report Writer ExamplesExample 10–10 Sample Program EX1010IDENTIFICATION DIVISION.PROGRAM-ID. EX1010.ENVIRONMENT DIVISION

Seite 308

Producing Printed Reports10.9 Report Writer ExamplesExample 10–10 (Cont.) Sample Program EX1010REPORT SECTION.RD MASTER-LISTPAGE LIMIT IS 66HEADING 1F

Seite 309

Producing Printed Reports10.9 Report Writer ExamplesExample 10–10 (Cont.) Sample Program EX101003 COLUMN 45PIC X VALUE "*".03 COLUMN 75PIC X

Seite 310

Producing Printed Reports10.9 Report Writer ExamplesExample 10–10 (Cont.) Sample Program EX1010PIC X VALUE "|".03 COLUMN 72PIC X(2) VALUE &q

Seite 311

Producing Printed Reports10.9 Report Writer ExamplesExample 10–10 (Cont.) Sample Program EX101001 FINAL-FOOTING TYPE IS CONTROL FOOTING FINALNEXT GROU

Seite 312

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXFigure 1–1 Commands for Developing Compaq COBOL Programs on Tru64UNIXlibrariesCOM

Seite 313

Producing Printed Reports10.9 Report Writer ExamplesExample 10–10 (Cont.) Sample Program EX101002 LINE 59.03 COLUMN 45PIC X(16) VALUE "C O M P A

Seite 314

Producing Printed Reports10.9 Report Writer ExamplesFigure 10–19 EX1010.LIS Listing ***********************

Seite 315

Producing Printed Reports10.9 Report Writer ExamplesFigure 10–19 (Cont.) EX1010.LIS ListingCUSTOMER MASTER FILE REPORT

Seite 316

Producing Printed Reports10.10 Solving Report ProblemsFigure 10–20 Printing Labels Four-Up12345678ZK−6088−GEExample 10–11 Printing Labels Four-UpIDENT

Seite 317

Producing Printed Reports10.10 Solving Report ProblemsExample 10–11 (Cont.) Printing Labels Four-Up07 LABEL-CITY PIC X(10).07 FILLER PIC XXXX.07 LABEL

Seite 318

Producing Printed Reports10.10 Solving Report ProblemsFigure 10–21 Printing Labels Four-Up in Sort Order1234561ZK−1556−GE78910131516192021221112141718

Seite 319

Producing Printed Reports10.10 Solving Report ProblemsExample 10–12 (Cont.) Printing Labels Four-Up in Sort OrderDATA DIVISION.FILE SECTION.FD INPUT-F

Seite 320

Producing Printed Reports10.10 Solving Report ProblemsExample 10–12 (Cont.) Printing Labels Four-Up in Sort OrderA100-READ-INPUT.READ INPUT-FILE AT EN

Seite 321

Producing Printed Reports10.10 Solving Report ProblemsTable 10–2 (Cont.) Results of Group IndicatingWithout Group Indicating With Group IndicatingSTAT

Seite 322

Producing Printed Reports10.10 Solving Report Problems10.10.5 Underlining Items in Your ReportsThe examples in this section apply only to printers tha

Seite 323

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIX.cob.COB.cbl.CBLTable 1–1 shows other file name suffixes.Table 1–1 Other File Name

Seite 324

Producing Printed Reports10.10 Solving Report ProblemsFor example:WRITE PRINT-LINE FROM TOTAL-LINE BEFORE ADVANCING 0 LINES.** Move spaces over the it

Seite 325

11Using ACCEPT and DISPLAY Statements forInput/Output and Video FormsACCEPT and DISPLAY statements are used to make low-volume data availableto specifi

Seite 326

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.1 Using ACCEPT and DISPLAY for I/OOn the OpenVMS Alpha operating system, you ca

Seite 327

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.1 Using ACCEPT and DISPLAY for I/OThe following example illustrates the UPON ph

Seite 328

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsFigure 11–1

Seite 329

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement Extensions• ERASE LIN

Seite 330

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsFigure 11–2

Seite 331

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsFigure 11–3

Seite 332

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsIn Example

Seite 333

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsTable 11–1

Seite 334

1.2.5 Program Development Stages and Tools ... 1–251.3 Developing Programs on OpenVMS Alpha ... 1–271.3.1 Cr

Seite 335

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXCompaq recommends that you not name a Compaq COBOL program ‘‘main.’’If you have a

Seite 336

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsFigure 11–5

Seite 337

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsExample 11–

Seite 338

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsFigure 11–6

Seite 339

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsWhen you us

Seite 340

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsFigure 11–7

Seite 341

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsWhen you us

Seite 342

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsFigure 11–8

Seite 343 - 10.9 Report Writer Examples

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement Extensions• There is

Seite 344

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsExample 11–

Seite 345

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsExample 11–

Seite 346

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXAn examplecobolcommand line would be:% cobol -v test.cob pas.oThis command specifi

Seite 347

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement Extensions11.2.6 Usin

Seite 348

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsTable 11–2

Seite 349

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsTable 11–2

Seite 350

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsTable 11–2

Seite 351

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsFigure 11–1

Seite 352

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsExample 11–

Seite 353

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsExample 11–

Seite 354

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsExample 11–

Seite 355

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsFigure 11–1

Seite 356

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsExample 11–

Seite 357

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXTable 1–2 Compaq COBOL Command Flags on Tru64 UNIXFlag Default-align [padding]off

Seite 358

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.2 Designing Video Forms with ACCEPT and DISPLAY Statement ExtensionsExample 11–

Seite 359

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYFigure 11–13 Form

Seite 360

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYFor example:SCREE

Seite 361

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYTable 11–4 (Cont.

Seite 362

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYTable 11–5 Color

Seite 363

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYScreen Section Cl

Seite 364

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYscreen (starting

Seite 365

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYExample 11–12 (Co

Seite 366

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYExample 11–12 (Co

Seite 367

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYExample 11–12 (Co

Seite 368

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXTable 1–2 (Cont.) Compaq COBOL Command Flags on Tru64 UNIXFlag Default-machor-mac

Seite 369

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAYFigure 11–14 MENU

Seite 370

12Interprogram CommunicationCOBOL programs can communicate with each other, as well as with non-COBOLprograms. Program-to-program communication is con

Seite 371

Interprogram Communication12.1 Multiple COBOL Program Run UnitsExample 12–1 Run Unit with Three Separately Compiled ProgramsIDENTIFICATION DIVISION. I

Seite 372

Interprogram Communication12.1 Multiple COBOL Program Run UnitsExample 12–2 Run Unit with a Main Program and Two Contained ProgramsIDENTIFICATION DIVI

Seite 373

Interprogram Communication12.2 COBOL Program AttributesExample 12–3 Run Unit with Three Separately Compiled Programs, One withTwo Contained ProgramsID

Seite 374

Interprogram Communication12.2 COBOL Program AttributesWhen an INITIAL clause is not present, the status of the files and internalprogram data are the

Seite 375

Interprogram Communication12.3 Transferring Flow of ControlNoteA program cannot cancel itself nor can any program cancel the programthat called it.In

Seite 376

Interprogram Communication12.3 Transferring Flow of ControlExample 12–4 (Cont.) Execution Sequence of Nested CALL StatementsBEGIN.DISPLAY " 1. MA

Seite 377

Interprogram Communication12.3 Transferring Flow of ControlExample 12–5 Sequence of Messages Displayed When Example 12–4 Is Run1. MAINPROG has control

Seite 378

Interprogram Communication12.4 Accessing Another Program’s Data DivisionFigure 12–2 Transfer of Control Flow from a Main Program to Multiple Subprogra

Seite 379

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXTable 1–2 (Cont.) Compaq COBOL Command Flags on Tru64 UNIXFlag Default-T numoff-t

Seite 380

Interprogram Communication12.4 Accessing Another Program’s Data DivisionFigure 12–3 Accessing Another Program’s Data DivisionIDENTIFICATION DIVISION.P

Seite 381

Interprogram Communication12.4 Accessing Another Program’s Data Division• On OpenVMS, DESCRIPTOR—The address of (pointer to) the data item’sdescriptor

Seite 382 - 10.10 Solving Report Problems

Interprogram Communication12.4 Accessing Another Program’s Data DivisionValues can also be returned through the BY REFERENCE parameter in theUSING phr

Seite 383

Interprogram Communication12.5 Communicating with Contained COBOL ProgramsFigure 12–4Defining Data Names in the Linkage SectionIDENTIFICATION DIVISION.

Seite 384

Interprogram Communication12.5 Communicating with Contained COBOL Programs12.5.1 The COMMON ClauseThe COMMON clause is a program attribute that can be

Seite 385

Interprogram Communication12.5 Communicating with Contained COBOL ProgramsPROG-MAIN (1) can call PROG-NAME-B (2) because PROG-MAIN directlycontains PR

Seite 386

Interprogram Communication12.5 Communicating with Contained COBOL ProgramsIDENTIFICATION DIVISION.PROGRAM-ID. MAINPROG...DATA DIVISION.FILE SECTION.F

Seite 387 - 10.10.2 Group Indicating

Interprogram Communication12.5 Communicating with Contained COBOL ProgramsAt run time, two special precedence rules apply for the selection of a decla

Seite 388

Interprogram Communication12.5 Communicating with Contained COBOL ProgramsFigure 12–7 Executing Declaratives Within Contained Programs (Rule 2)

Seite 389

Interprogram Communication12.5 Communicating with Contained COBOL ProgramsBecause you cannot specify a Configuration Section for a program containedwit

Seite 390

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIX4. Any copy file that contains a PROGRAM-ID or END PROGRAM statement fora program

Seite 391 - Input/Output and Video Forms

Interprogram Communication12.6 Calling Compaq COBOL Programs from Other LanguagesExample 12–7 Calling a COBOL Program from C#include <stdio.h>#i

Seite 392

Interprogram Communication12.6 Calling Compaq COBOL Programs from Other LanguagesExample 12–9 COBOL Called Program "CALLEDFROMC"IDENTIFICATI

Seite 393 - Extensions

Interprogram Communication12.6 Calling Compaq COBOL Programs from Other LanguagesExample 12–10 C Program Using cobcall, cobfunc, and cobcancel/* File:

Seite 394 - 11.2.1 Clearing a Screen Area

Interprogram Communication12.6 Calling Compaq COBOL Programs from Other LanguagesExample 12–11 (Cont.) COBOL Called Program "PROGCOB"data di

Seite 395

Interprogram Communication12.6 Calling Compaq COBOL Programs from Other Languages[Windows NT] c:\> cobol -c progmain.cob progcob.cobc:\> cl -c p

Seite 396 - ZK−6091−GE

Interprogram Communication12.6 Calling Compaq COBOL Programs from Other Languages[3] After calling cobcall again:================================retva

Seite 397 - ZK−6092−GE

Interprogram Communication12.7 Calling Non-COBOL Programs from Compaq COBOLExample 12–12 (Cont.) Calling a Fortran Program from a COBOL ProgramDATA DI

Seite 398 - ZK−6120−GE

Interprogram Communication12.7 Calling Non-COBOL Programs from Compaq COBOLSample Run of GETROOT (OpenVMS)$ RUN GETROOTReturnEnter number (with decima

Seite 399

Interprogram Communication12.7 Calling Non-COBOL Programs from Compaq COBOLExample 12–14 (Cont.) Calling a BASIC Program from a COBOL ProgramDISPLAY &

Seite 400

Interprogram Communication12.7 Calling Non-COBOL Programs from Compaq COBOL12.7.3 Calling a C ProgramCalling a program or routine that is written in C

Seite 401

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIX• Compiles the filemainprog.cob, which contains the main program• Usesldto link bo

Seite 402 - ZK−6094−GE

Interprogram Communication12.8 Special Considerations for Interprogram Communication12.8 Special Considerations for Interprogram CommunicationCertain

Seite 403

Interprogram Communication12.8 Special Considerations for Interprogram Communication• upper—Forces all external data names, PROGRAM-ID names, and CALL

Seite 404 - ZK−6095−GE

Interprogram Communication12.8 Special Considerations for Interprogram CommunicationPROGRAM ID JOB1.CALL "Job2."END-PROGRAM JOB1.PROGRAM ID

Seite 405

13Using Compaq COBOL in the Alpha CommonLanguage EnvironmentThe Compaq COBOL compiler is part of the common language environment. Thisenvironment defin

Seite 406 - ZK−6109−GE

Using Compaq COBOL in the Alpha Common Language Environment13.1 Routines, Procedures, and FunctionsFor more information on system routines on OpenVMS

Seite 407

Using Compaq COBOL in the Alpha Common Language Environment13.2 The OpenVMS Alpha Calling Standard (OpenVMS)Table 13–1 (Cont.) OpenVMS Alpha Register

Seite 408

Using Compaq COBOL in the Alpha Common Language Environment13.3 OpenVMS Alpha System Routines (OpenVMS)13.3.1 OpenVMS Alpha Run-Time Library RoutinesT

Seite 409 - ZK−6097−GE

Using Compaq COBOL in the Alpha Common Language Environment13.3 OpenVMS Alpha System Routines (OpenVMS)Table 13–3 (Cont.) System Services (OpenVMS)Gro

Seite 410

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling RoutinesAlthough you can call most system routines as a procedure call, it isr

Seite 411 - Keyboard Keys

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling RoutinesOnce you have determined which arguments you need, read the argumentde

Seite 412

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXThe object file is in Tru64 UNIX extendedcoffformat. The object file providesthe fo

Seite 413

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling RoutinesRemember, you must specify the name of the routine being called and al

Seite 414 - Keypad and Keyboard

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling RoutinesTable 13–4 (Cont.) COBOL Implementation of the OpenVMS Alpha Data Type

Seite 415

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling RoutinesTable 13–4 (Cont.) COBOL Implementation of the OpenVMS Alpha Data Type

Seite 416

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling RoutinesTable 13–4 (Cont.) COBOL Implementation of the OpenVMS Alpha Data Type

Seite 417

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling RoutinesAs stated earlier, this example does not pass a value for the optional

Seite 418 - ZK−6100−GE

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling RoutinesEven when you use the default passing mechanism, you can include the p

Seite 419

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling RoutinesFor example:01 SS$_NORMAL PIC S9(5) COMP VALUE EXTERNAL SS$_NORMAL...C

Seite 420

Using Compaq COBOL in the Alpha Common Language Environment13.4 Calling Routines13.4.5.1 Library Return Status and Condition Value Symbols (OpenVMS)Li

Seite 421 - ZK−1516A−GE

Using Compaq COBOL in the Alpha Common Language Environment13.5 Establishing and Removing User Condition Handlers (OpenVMS)new-handlerSpecifies the nam

Seite 422

Using Compaq COBOL in the Alpha Common Language Environment13.5 Establishing and Removing User Condition Handlers (OpenVMS)The condition handler is wr

Seite 423

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIX2.% cobol -V *.cobCompaq COBOL source files with file names that end with .cob are

Seite 424

Using Compaq COBOL in the Alpha Common Language Environment13.5 Establishing and Removing User Condition Handlers (OpenVMS)Example 13–1 (Cont.) User-W

Seite 425 - REVERSE-VIDEO REVERSED

Using Compaq COBOL in the Alpha Common Language Environment13.5 Establishing and Removing User Condition Handlers (OpenVMS)To run this example program

Seite 426

Using Compaq COBOL in the Alpha Common Language Environment13.6 Examples (OpenVMS)Example 13–3 Using the SYS$SETDDIR System Service (OpenVMS)01 DIRECT

Seite 427

Using Compaq COBOL in the Alpha Common Language Environment13.6 Examples (OpenVMS)Example 13–5 Sample Run of CALLTIME (OpenVMS)CALL SYS$ASCTIMDATE/TIM

Seite 428

Using Compaq COBOL in the Alpha Common Language Environment13.6 Examples (OpenVMS)Example 13–6 Using LIB$K_* and LIB$_* Symbols (OpenVMS)identificatio

Seite 429

14Using the REFORMAT UtilityThe REFORMAT Utility converts source programs between terminal format andconventional ANSI format. Consider the two format

Seite 430

Using the REFORMAT Utility14.1 Running the REFORMAT UtilityREFORMAT -REFORMAT - Enter Y for ANSI-to-terminal conversion, orREFORMAT - Enter N (default

Seite 431 - Interprogram Communication

Using the REFORMAT Utility14.2 ANSI-to-Terminal Format Conversion• Placing the converted code in positions 1 to the end of the line, therebycreating a

Seite 432 - 12.1.2 Calling Procedures

Using the REFORMAT Utility14.3 Terminal-to-ANSI Format Conversionis a text processor and does not perform the level of checking required by linessuch

Seite 433 - 12.2 COBOL Program Attributes

Using the REFORMAT Utility14.4 REFORMAT Error MessagesTo process another file, type a new input file specification and continue theprompting message sequ

Seite 434 - 12.2.1 The INITIAL Clause

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXAny messages issued during the compilation are inserted in the listing file. Alist

Seite 436

15Optimizing Your Compaq COBOL ProgramYou can specify optimization and data alignment on the COBOL compilercomnp15l.19BOL improv9BOL You can als

Seite 437

Optimizing Your Compaq COBOL Program15.1 Specifying Optimization on the Compiler Command LineThe-tuneflag has the following form:-tune keyword♦The-tune

Seite 438

Optimizing Your Compaq COBOL Program15.1 Specifying Optimization on the Compiler Command Line• EV6—Generates and schedules code for the 21264 chip imp

Seite 439 - 12.4.1 The USING Phrase

Optimizing Your Compaq COBOL Program15.1 Specifying Optimization on the Compiler Command Line• EV56—Generates code for some 21164 chip implementations

Seite 440

Optimizing Your Compaq COBOL Program15.1 Specifying Optimization on the Compiler Command LineOn OpenVMS Alpha systems, in general, specify /NOOPTIMIZE

Seite 441

Optimizing Your Compaq COBOL Program15.3 Using COMP Data Items for SpeedPrecision Not Reduced by Conversion to COMPThe data types usually employed for

Seite 442 - 12.4.2 The Linkage Section

Optimizing Your Compaq COBOL Program15.3 Using COMP Data Items for SpeedSCA and LSEThe Source Code Analyzer (SCA) can help discover program interdepen

Seite 443

Optimizing Your Compaq COBOL Program15.4 Other Ways to Improve the Performance of Operations on Numeric Dataintermediate data items will have very lar

Seite 444 - 12.5.1 The COMMON Clause

Optimizing Your Compaq COBOL Program15.5 Choices in Procedure Division Statements15.5.2 Using Indexing Instead of SubscriptingUsing index names for ta

Seite 445 - 12.5.2 The GLOBAL Clause

2.7.2 Standard and Native Arithmetic ... 2–102.7.2.1 Using the /MATH_INTERMEDIATE Qualifier . ... 2–102.7.2.2 Usi

Seite 446

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXIf the symbol is undefined, U appears in the column before the symbol name. Anysym

Seite 447

Optimizing Your Compaq COBOL Program15.5 Choices in Procedure Division Statements15.5.5 Minimizing USE Procedures with LINKAGE SECTION ReferencesCompa

Seite 448

Optimizing Your Compaq COBOL Program15.6 I/O OperationsSpecifying APPLY PREALLOCATION preallocates noncontiguous disk blocks.When you specify the CONT

Seite 449

Optimizing Your Compaq COBOL Program15.6 I/O OperationsEach WRITE or REWRITE statement can cause an I/O operation. The APPLYDEFERRED-WRITE clause perm

Seite 450

Optimizing Your Compaq COBOL Program15.6 I/O Operations15.6.3 Sharing Record AreasThe compiler allocates unique storage space in the Data Division for

Seite 451

Optimizing Your Compaq COBOL Program15.6 I/O OperationsFigure 15–1 Sharing Record AreasProgram Without SharedRecord AreaMOVE INP−REC TO OUT−REC.SAME R

Seite 452

Optimizing Your Compaq COBOL Program15.6 I/O Operations15.6.4 Using COMP Unsigned Longword IntegersThe compiler generates the most efficient code to pr

Seite 453

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)FILE SECTION.FD FILE-ABLOCK CONTAINS 5 RECORDS.01 FILE-A-REC PIC X(64)...By

Seite 454

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)15.7.2.3 Bucket SizeA bucket’s size is from 1 to 63 blocks. A large bucket im

Seite 455

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)To improve I/O access time: (1) specify a small bucket size, and (2) use theB

Seite 456

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)15.7.3 Indexed FilesAn indexed file contains data records and pointers to faci

Seite 457

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIX1.2.3.3 Specifying Types of Object LibrariesCertaincobolflags influence whetherldse

Seite 458

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)A data level bucket may not be large enough to contain a new record. In thisc

Seite 459 - 12.7.3 Calling a C Program

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)For each record moved, a 7-byte pointer to the new record location remains in

Seite 460

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)Total record space is (100 + 7) * 5 = 535 bytes (Record size is 100 bytes, re

Seite 461

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)• Index records:If a file has more than 65,536 blocks, the 3-byte index record

Seite 462 - 12.8.5 Additional Information

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)Continue calculating index depth until you reach the root level—that is, when

Seite 463 - Language Environment

Optimizing Your Compaq COBOL Program15.7 Optimizing File Design (OpenVMS)15.7.3.3 Caching Index RootsThe system requires at least two buffers to proce

Seite 466 - 13.3.2 System Services

Managing Memory and Data Access16.1 Managing Memory Granularitygranularity for best performance if you are sure the processes never makeconcurrent upd

Seite 467 - 13.4 Calling Routines

Managing Memory and Data Access16.1 Managing Memory Granularity19 if a1 not = 1 display "?1".20 if a2 not = 2 display "?2".21 if a

Seite 468

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIX1.2.3.5 Shared Library RestrictionsWhen creating a shared library usingld, be awa

Seite 469

Managing Memory and Data Access16.3 Aligning Data for Performance and CompatibilityTable 16–1 Boundaries for Naturally Aligned Binary DataCOBOLUSAGEPI

Seite 470

Managing Memory and Data Access16.3 Aligning Data for Performance and CompatibilityIn addition to the primary goal of optimum performance, specifying

Seite 471

Managing Memory and Data Access16.4 Using Alignment Directives, Qualifiers, and Flags16.4 Using Alignment Directives, Qualifiers, and FlagsAlignment dir

Seite 472

Managing Memory and Data Access16.4 Using Alignment Directives, Qualifiers, and FlagsTable 16–2 Alignment and Padding Order of PrecedenceCompiler Direc

Seite 473

Managing Memory and Data Access16.4 Using Alignment Directives, Qualifiers, and FlagsExample 16–1 Using *DC SET ALIGNMENT Directives..1.*DC SET ALIGNME

Seite 474

Managing Memory and Data Access16.4 Using Alignment Directives, Qualifiers, and Flags• The effects of the SYNCHRONIZED clause, the alignment command-li

Seite 475

Managing Memory and Data Access16.4 Using Alignment Directives, Qualifiers, and FlagsExample 16–3 shows the differences in the actions of /NOALIGN, /AL

Seite 476

Managing Memory and Data Access16.4 Using Alignment Directives, Qualifiers, and FlagsExample 16–4 Data Map for /NOALIGNMENTSource ListingData Names in

Seite 477 - (OpenVMS)

Managing Memory and Data Access16.4 Using Alignment Directives, Qualifiers, and FlagsByte Layout for Example 16–5:|REC1 ||FLD1 |FLD2 |FLD3 ||FLD1-1 |FL

Seite 478

Managing Memory and Data Access16.4 Using Alignment Directives, Qualifiers, and Flags3. These three pad bytes bring FLD3 up to:16 = 4*4 bytes4. The tot

Seite 479

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXThe message-text may be on multiple lines and is sometimes accompanied by acobole

Seite 481 - 13.6 Examples (OpenVMS)

ACompiler Implementation SpecificationsThe following list summarizes the specifications and restrictions for the CompaqCOBOL compiler. The compiler issu

Seite 482

Compiler Implementation Specifications• The value of an integer in the WINDOW option of the APPLY clause must befrom 0 to 127, inclusive, or equal to 2

Seite 483

Compiler Implementation Specifications• The Sort-32 (available on OpenVMS) record size limit is 65,535 bytes.• The Sort-32 key size limit is 65,529 byt

Seite 485 - Using the REFORMAT Utility

BCompaq COBOL for OpenVMS VAX andCompaq COBOL Compatibility and MigrationCompaq COBOL is based on and is highly compatible with Compaq COBOL forOpenVM

Seite 486

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.1 Compatibility MatrixTable B–1 (Cont.) Cross-Platform Compatibility of COB

Seite 487

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.1 Compatibility MatrixTable B–1 (Cont.) Cross-Platform Compatibility of COB

Seite 488 - 14.4 REFORMAT Error Messages

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.2 Differences in Extensions and Other Features• A qualifier (/FLOAT, on the

Seite 489

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.3 Command-Line Qualifiers (Options or Flags)information about Compaq COBOL f

Seite 490

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXYou provide definitions for the command-line arguments with the SPECIAL-NAMES para

Seite 491

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.3 Command-Line Qualifiers (Options or Flags)Oracle CDD/Repository is not sup

Seite 492 - -tune keyword

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.3 Command-Line Qualifiers (Options or Flags)Table B–3 (Cont.) Compaq COBOL O

Seite 493

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.3 Command-Line Qualifiers (Options or Flags)Table B–3 (Cont.) Compaq COBOL O

Seite 494

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.3 Command-Line Qualifiers (Options or Flags)Table B–4 (Cont.) Compaq COBOL f

Seite 495

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.3 Command-Line Qualifiers (Options or Flags)When you specify /STANDARD=OPENV

Seite 496

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesOn Wind

Seite 497 - Numeric Data

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesL 12 FI

Seite 498

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesCompaq

Seite 499

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesB.4.2.6

Seite 500 - 15.6 I/O Operations

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesCompaq

Seite 501

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXExample 1–1 (Cont.) Accessing Environment Variables and Command-LineArgumentsDISP

Seite 502 - 15.6.2 Using Multiple Buffers

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesB.4.3 O

Seite 503 - 15.6.3 Sharing Record Areas

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior Differences• When

Seite 504

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesB.4.4.3

Seite 505 - 15.7.1 Sequential Files

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesThe bad

Seite 506 - 15.7.2 Relative Files

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesThe Com

Seite 507 - TOTAL = 1536 bytes

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior Differences• There

Seite 508 - TOTAL = 512 bytes

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesFor exa

Seite 509 - 15.7.3 Indexed Files

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesB.4.12

Seite 510

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior DifferencesCIT3 gi

Seite 511 - Bucket overhead = 15 bytes

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.5 Compaq COBOL Differences Across Operating SystemsB.5.1 REWRITEA REWRITE o

Seite 512 - TOTAL = 550 bytes

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIXTable 1–3 lists and describes some of the software tools you can use whendevelopi

Seite 513

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.5 Compaq COBOL Differences Across Operating SystemsB.5.3 VFC File FormatIf

Seite 514

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.5 Compaq COBOL Differences Across Operating SystemsOn Windows NT and Tru64

Seite 515

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.6 File Compatibility Across Languages and PlatformsData Type DifferencesDat

Seite 516

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.9 Debugger Support DifferencesB.9 Debugger Support DifferencesCompaq COBOL

Seite 517

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and MigrationB.11 DBMS SupportYou may also receive the following general diagnostic messag

Seite 518

CProgramming Productivity ToolsVarious programming productivity tools can help you increase your productivityas a Compaq COBOL programmer. These inclu

Seite 519 - 16.3.1 Data Boundaries

Programming Productivity ToolsC.1 Compaq FUSE—an Integrated Development Environment (Tru64 UNIX)• Create and use nested (recursive) makefiles.• Use def

Seite 520 - 16.3.2 Data Field Padding

Programming Productivity ToolsC.2 Debugging Tools for Compaq COBOL Programs• Perform other functions, such as executing shell commands, examiningcorefi

Seite 521

Programming Productivity ToolsC.2 Debugging Tools for Compaq COBOL ProgramsExample C–1 Source Code Used in the Sample Debug Sessionsmodule TESTA1: IDE

Seite 522

Programming Productivity ToolsC.3 Ladebug Debugger (Tru64 UNIX)this section is available in the man page. For example, you can typeman cobol,and page

Seite 523 - -align pad

Developing Compaq COBOL Programs1.2 Developing Programs on Tru64 UNIX• Thestripcommand removes symbolic and other debugging information tominimize ima

Seite 524

Programming Productivity ToolsC.3 Ladebug Debugger (Tru64 UNIX)8. Use thelistcommand to display the source lines where you set breakpoints.(ladebug) l

Seite 525

Programming Productivity ToolsC.3 Ladebug Debugger (Tru64 UNIX)16. Deposit a new value into CHARCT.(ladebug) assign charct=15.9517. CHARCT now contain

Seite 526

Programming Productivity ToolsC.3 Ladebug Debugger (Tru64 UNIX)23. Resume execution with thecontcommand. TESTA executes its final display.The debugger

Seite 527

Programming Productivity ToolsC.4 OpenVMS Debugger (OpenVMS)During instruction scheduling, instructions are reordered to minimize waitingtime. As a re

Seite 528

Programming Productivity ToolsC.4 OpenVMS Debugger (OpenVMS)$ RUN TESTAOpenVMS Alpha DEBUG Version V7.1-000%DEBUG-I-INITIAL, Language: COBOL, Module:

Seite 529 - 36 = 12 + 8 + 16 bytes

Programming Productivity ToolsC.4 OpenVMS Debugger (OpenVMS)11. Set a watchpoint on the data item DISP-COUNT. When an instruction triesto change the c

Seite 530

Programming Productivity ToolsC.4 OpenVMS Debugger (OpenVMS)21. You can examine any character of a subscripted data item by specifying thecharacter po

Seite 531

Programming Productivity ToolsC.4 OpenVMS Debugger (OpenVMS)C.4.2.1 Separately Compiled ProgramsWhen you debug a Compaq COBOL program, the default mod

Seite 532

Programming Productivity ToolsC.5 Language-Sensitive Editor (LSE) and the Source Code Analyzer (SCA) (OpenVMS)SCA performs the following types of prog

Seite 533

Programming Productivity ToolsC.5 Language-Sensitive Editor (LSE) and the Source Code Analyzer (SCA) (OpenVMS)This command line compiles the input file

Seite 534

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaFigure 1–2 DCL Commands for Developing ProgramslibrariesCOMMANDSCreate asource

Seite 535 - B.1 Compatibility Matrix

Programming Productivity ToolsC.5 Language-Sensitive Editor (LSE) and the Source Code Analyzer (SCA) (OpenVMS)LSE provides several commands to help yo

Seite 536

Programming Productivity ToolsC.6 Using Oracle CDD/Repository (OpenVMS)Oracle CDD/Repository can also store information about the structure of aprogra

Seite 537

Programming Productivity ToolsC.6 Using Oracle CDD/Repository (OpenVMS)C.6.2 Accessing Oracle CDD/Repository Definitions from Compaq COBOLProgramsYou a

Seite 538

Programming Productivity ToolsC.6 Using Oracle CDD/Repository (OpenVMS)C.6.3 Recording DependenciesWhen you compile a program with the /DEPENDENCY_DAT

Seite 539 - Not available on Windows NT

Programming Productivity ToolsC.6 Using Oracle CDD/Repository (OpenVMS)• A relationship between the MASTER_FILE object and the EMPLOYEE_ADDRESS_RECORD

Seite 540

Programming Productivity ToolsC.6 Using Oracle CDD/Repository (OpenVMS)Table C–1 Oracle CDD/Repository Data TypesData Type Level of SupportUNSPECIFIED

Seite 541

Programming Productivity ToolsC.6 Using Oracle CDD/Repository (OpenVMS)C.6.5 For More InformationFor more information about Oracle CDD/Repository, ref

Seite 542

DPorting to Compaq COBOL from OtherCompilersCompaq COBOL has built-in porting assistance that recognizes foreign COBOLextensions and helps you migrate

Seite 543 - -warn all

Porting to Compaq COBOL from Other CompilersD.1 Porting Assistance-rsv foreign_extensions♦Without full porting assistance enabled, if you compile prog

Seite 544 - Behavior Differences

Porting to Compaq COBOL from Other CompilersD.1 Porting Assistanceproduce fatal diagnostic messages for programs that have successfully compiledbefore

Seite 545 - -noobject

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaYou can use the COPY FROM DICTIONARY statement in your program to accessa data

Seite 547

IndexA2000 A.D., xxixdate change problem, 1–62a.out file, 1–9, 1–17, 1–19ACCEPT/DISPLAY with file input or output,B–17ACCEPT statementSee also Video for

Seite 548

ANSI format source linestructure and content of, 1–7ANSI reference format, 1–7ANSI-to-terminalformat conversion, 14–2/ANSI_FORMAT, 1–7, 1–32APPLY clau

Seite 549

Calling Tru64 UNIX Shareable Objects, 12–30CALL statementnesting, 12–6transferring execution control, 12–5use of, 12–5-call_shared flag, 1–12, 1–21Case

Seite 550 - Differences

cobol flags (cont’d)-display_formatted, 1–12-D num, 1–12-feedback file, 1–12-fips 74, 1–12-flagger [option], 1–12<foot-tune, 1–14-g0, 1–12-g1, 1–12-g2

Seite 551

COBOL_SWITCHES, 1–59Code Management Systemintegration with LSE, C–13Codingbased on architectural differences, B–18COLLATING SEQUENCE IS, 9–7Phrase, ov

Seite 552 - B.4.5 System Return Codes

Compatibility (cont’d)fixed-length records, B–27ORGANIZATION INDEXED file, reading,B–27print-controlled files, B–27reading COBOL indexed files, 6–47variab

Seite 553

Compilingand linking for debugging, C–9for debugging, C–5Compiling programs, 1–29C language file suffix, 1–9C language with cobol, 1–18compile command q

Seite 554 - B.4.6 Diagnostic Messages

Data itemsexceeding size of (cont’d)compiler implementation specifications,A–2index, 4–16intermediate, 15–7padding, 16–4Data movement, 3–6, 3–12Data na

Seite 555 - B.4.8 File Status Values

Directives (cont’d)memory allocation and access, 16–3SET VOLATILE, 16–3DISPLAY data items, avoiding for arithmetic,15–5DISPLAY statementSee also Video

Seite 556

4.3.7 Assigning Index Values Using the SET Statement... 4–164.3.7.1 Assigning an Integer Index Value with a SET Statement ... 4–164.3

Seite 557 - B.4.12 Arithmetic Operations

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha/qualifierSpecifies an action to be performed by the compiler on all files or spe

Seite 558

External report filenumber of characterscompiler implementation specifications,A–2FFD record lengthcompiler implementation specifications, A–1-feedback fi

Seite 559 - B.5.1 REWRITE

File sharingspecifying OPEN EXTEND (cont’d)with a shared sequential file, 8–15successful, 8–4summarizing related file-sharing criteria, 8–9using file sta

Seite 560 - B.5.5 Indexed Files

flags (cont’d)-T num, 1–14-tps, 1–14, 1–15-trunc, 1–14-tune, 1–14-v, 1–14-V, 1–14-w, 1–14-warn, 1–14-warn all, 1–14-warn none, 1–14-warn [no]informatio

Seite 561

Image activation optimization, 15–25/INCLUDE, 1–33-include flag, 1–12Index data item, 4–16declaration, 4–16modifying with SET, 4–16where defined, 4–3Ind

Seite 562 - B.8 Reserved Words

INSPECT statementREPLACING phrase (cont’d)search argument, 5–30sample (fig.), 5–21TALLYING option, 5–17TALLYING phrase, 5–24argument list, 5–25argument

Seite 563 - B.11 DBMS Support

-Ldir flag, 1–12, 1–20ld linkercreating shared object libraries, 1–21 to 1–22functions performed, 1–19locating undefined symbols using nm, 1–19messages,

Seite 564 - B.11.2 Multistream DBMS DML

Logicalaccessing at run time, 1–49Logical name, 6–18 to 6–20COB$INPUT, 11–2COB$OUTPUT, 11–2for file, 11–1implementor name, 11–1SYS$INPUT, 11–2SYS$OUTPU

Seite 565 - (Tru64 UNIX)

Nested IF statementsstatic nesting depthcompiler implementation limitations, A–3Nested programSee Contained programNestingCALL statements, 12–6nm comm

Seite 566

Numeric itemstesting (cont’d)relation test, 2–3sign test, 2–3Numeric moveselementary, 2–6Numeric relational operators (tab.), 2–3O-O0 flag, 1–13-O1 flag

Seite 567

Optimizationrelative files (cont’d)maximum record number, 15–16selection of data types, 15–8sequential files, 15–15/OPTIMIZE, 1–34and /DEBUG, 15–4in pro

Seite 568 - (ladebug)

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha1.3.2.4 Separately Compiled ProgramsIf a compilation unit consists of multiple

Seite 569 - (ladebug) stop at 47

Program run messages, 1–52Program structure differences, B–10Compaq COBOL (ex.), B–10Compaq COBOL for OpenVMS VAX, B–10debugging a Compaq COBOL progra

Seite 570

Relative filecreating (cont’d)random access mode, 6–30, 6–31sequential access mode, 6–30deleting records, 6–53randomly, 6–54, 6–55sequentially, 6–53, 6

Seite 571

Reportproblem solving (cont’d)logical lines, 10–82physical lines, 10–82physical page, 10–88printing, 10–82, 10–88bold, 10–89details, 10–88totals, 10–8

Seite 572

ROUNDED phrase, 2–12with SIZE ERROR, 2–13Rounding off arithmetic results, 2–12Routines, 13–1Named ‘‘main’’, 1–9-rsv [no]200x flag, 1–13-rsv [no]foreign

Seite 573

Sequential file organization (fig.), 6–3Sequential search, 4–16 to 4–18See also SEARCH statementfunction of AT END statement, 4–17requirements for, 4–17

Seite 574

SORT statementSELECT statement (cont’d)example, 9–1sorting variable-length records, 9–8USING phrase, 9–3with the OUTPUT PROCEDURE phrase,9–5USING phra

Seite 575

SWITCH clausevalue of switch numberscompiler implementation specifications,A–1Switcheschecking, 1–60, 1–61controlling, 1–61controlling externally, 1–61

Seite 576

Tablesmemory map (cont’d)initializing alphanumeric items (fig.), 4–12initializing mixed usage items (fig.), 4–11initializing with VALUE clause (fig.), 4–

Seite 577 - Analyzer (SCA) (OpenVMS)

UNSTRING statementDELIMITED BY phrase (cont’d)delimiting with all double asterisksresults of (tab.), 5–11delimiting with an asteriskresults of (tab.),

Seite 578

Version 2.7—what’s new since V2.5 (cont’d)-math_intermediate cit4 flag, 1–13name conflict difference documented, B–21/OPTIMIZE=TUNE qualifier, 1–34, 15–2

Seite 579

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaTable 1–4 COBOL Command QualifiersQualifier Default/ALIGNMENT[=[NO]PADDING] or/N

Seite 581

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaTable 1–4 (Cont.) COBOL Command QualifiersQualifier Default/DEBUG=[NO]SYMBOLS[NO

Seite 582 - Programs

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaTable 1–4 (Cont.) COBOL Command QualifiersQualifier Default/MACHINE_CODE or/NOMA

Seite 583 - C.6.3 Recording Dependencies

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaTable 1–4 (Cont.) COBOL Command QualifiersQualifier Default/RESERVED_WORDS=[NO]2

Seite 584 - C.6.4 Data Types

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha• Forgetting to use a file suffix in the file specification, or not specifying/SOU

Seite 585 - S –Fully supported

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alphamessage-textThe compiler’s message. In many cases, it consists of no more than

Seite 586 - C.6.5 For More Information

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha1.3.2.9 Using Compiler Listing FilesA compiler listing file provides informatio

Seite 587 - Compilers

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha1.3.3 Linking a Compaq COBOL ProgramAfter you compile a Compaq COBOL source pr

Seite 588 - D.1 Porting Assistance

6 Processing Files and Records6.1 Defining Files and Records ... 6–16.1.1 File Organization . ...

Seite 589 - D.3 Implemented Extensions

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha1.3.3.2 LINK QualifiersLINK qualifiers allow you to control various aspects of t

Seite 590

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha2. Calls a Compaq COBOL program that contains CALL by data name, extendedACCEP

Seite 591

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaDefining Default User Object Module LibrariesYou can define one or more of your

Seite 592

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaDefining the Search Order for LibrariesWhen you specify libraries as input for

Seite 593

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaSee the OpenVMS Linker Utility Manual and the Guide to Creating OpenVMSModular

Seite 594

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaExample 1–2 Main Program and Subprograms* CALLER.COBIDENTIFICATION DIVISION.PR

Seite 595

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaExample 1–3 (Cont.) Command Procedure to Link a Program as a ShareableImage$!

Seite 596

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha1.3.3.6 Interpreting Messages from the LinkerIf the linker detects any errors

Seite 597

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha1.3.4 Running a Compaq COBOL ProgramAfter you compile and link your program, u

Seite 598

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaYou provide definitions for the command-line arguments with theSPECIAL-NAMES pa

Seite 599

9 Using the SORT and MERGE Statements9.1 Sorting Data with the SORT Statement ... 9–19.1.1 File Organization Considerations for

Seite 600

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaWhen you execute the following command line:$ MYPROG 1028 powers.datThe follow

Seite 601

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS Alpha1.3.4.5 Interpreting Run-Time MessagesDuring execution, an image can generate

Seite 602

Developing Compaq COBOL Programs1.3 Developing Programs on OpenVMS AlphaFor more information about the OpenVMS Debugger, refer to Appendix C and theOp

Seite 603

Developing Compaq COBOL Programs1.4 Program Run Messages01 PAY-RECORD.03 P-NUMBER PIC X(5).03 P-WEEKLY-AMT PIC S9(5)V99 COMP-3.03 P-YEARLY-AMT PIC S9(

Seite 604

Developing Compaq COBOL Programs1.4 Program Run MessagesIf, during execution, the program increments A-COUNTER by a value otherthan 1 (2 or 1.5, for e

Seite 605

Developing Compaq COBOL Programs1.4 Program Run Messages050-READ-MASTER.READ INDEXED-MASTERINVALID KEY PERFORM 100-CHECK-STATUSGO TO 200-INVALID-READ.

Seite 606

Developing Compaq COBOL Programs1.4 Program Run MessagesRefer to the Compaq COBOL Reference Manual and the OpenVMS RecordManagement Services Reference

Seite 607

Developing Compaq COBOL Programs1.4 Program Run MessagesExample 1–5 (Cont.) Using RMS Special Registers to Detect Errors (OpenVMS)REPORT SECTION.RD RP

Seite 608

Developing Compaq COBOL Programs1.4 Program Run MessagesExample 1–5 (Cont.) Using RMS Special Registers to Detect Errors (OpenVMS)100-INITIALIZE.ACCEP

Seite 609

Developing Compaq COBOL Programs1.4 Program Run MessagesExample 1–6 (Cont.) Using RMS-CURRENT Special Registers to Detect Errors(OpenVMS)DATA DIVISION

Seite 610

10.8.8 Defining the Source for a Print Field . . . ... 10–3110.8.9 Specifying Multiple Reports . ... 1

Seite 611

Developing Compaq COBOL Programs1.5 Using Program Switches1.5.1 Setting and Controlling Switches InternallyTo set switches from within the image, defin

Seite 612

Developing Compaq COBOL Programs1.5 Using Program SwitchesThe switch-list can contain up to 16 switches separated by commas. To set aswitch ON, specif

Seite 613

Developing Compaq COBOL Programs1.5 Using Program SwitchesOn OpenVMS, to test the previous program on an OpenVMS Alpha system,compile and link it and

Seite 614

Developing Compaq COBOL Programs1.6 Special Information for Year 2000 Programming4-digit ACCEPT FROM DATE YYYYMMDD4-digit ACCEPT FROM DAY YYYYDDDCompa

Seite 616

2Handling Numeric DataNumeric data in Compaq COBOL is evaluated with respect to the algebraicvalue of the operands.This chapter describes the followin

Seite 617

Handling Numeric Data2.2 Specifying AlignmentOpenVMS VAX, or flexibility. (See Chapter 16, Managing Memory and DataAccess and Chapter 15, Optimizing Yo

Seite 618

Handling Numeric Data2.4 Invalid Values in Numeric Itemsboth the /CHECK=DECIMAL and the /CONVERT qualifiers on OpenVMS Alpha,the conversion of blanks w

Seite 619

Handling Numeric Data2.5 Evaluating Numeric ItemsThe length of the literal or arithmetic expression operands (in terms of thenumber of digits represen

Seite 620

Handling Numeric Data2.5 Evaluating Numeric Itemscontains an invalid sign value, the NUMERIC class test rejects the item, andprogram control takes the

Kommentare zu diesen Handbüchern

ChrisLic 18 Apr 2024 | 02:09:45

Hello, im noob :)