Sign In
Upload
Manuals
Brands
Compaq Manuals
Software
COBOL AAQ2G1FTK
User Manuals: Compaq COBOL AAQ2G1FTK Accessories
Manuals and User Guides for Compaq COBOL AAQ2G1FTK Accessories. We have
1
Compaq COBOL AAQ2G1FTK Accessories manual available for free PDF download: User Manual
Compaq COBOL AAQ2G1FTK User Manual (620 pages)
Compaq Computer Accessories User Manual
Brand:
Compaq
| Category:
Software
| Size: 1.59 MB
Table of Contents
Table of Contents
3
Intended Audience
23
Preface
23
1 Developing Compaq COBOL Programs
31
Files Installed on Your System
31
Compaq COBOL and Alpha Architecture System Resources
32
Compilation Performance
32
Tuning Openvms Alpha for Large Compaq COBOL Compiles
33
Optimizing Virtual Memory Usage
33
Optimizing Physical Memory Usage
34
Improving Compile Performance with Separate Compilation (Openvms)
36
Choosing a Reference Format
36
Terminal Reference Format
36
ANSI Reference Format
37
Converting between Reference Formats
37
Developing Programs on Tru64 UNIX
37
Creating a Compaq COBOL Program on Tru64 UNIX
37
Commands for Developing Compaq COBOL Programs on Tru64
38
Other File Name Suffixes
39
Compiling a Compaq COBOL Program on Tru64 UNIX
40
COBOL Command Flags
41
Compaq COBOL Command Flags on Tru64 UNIX
42
External File Handler Support
45
Specifying Multiple Files and Flags
45
Compiling Multiple Files
45
Debugging a Program
46
Output Files: Object, Executable, Listing, and Temporary Files
46
Naming Output Files
47
Temporary Files
47
Examples of the COBOL Command
47
Other Compilers
48
Interpreting Messages from the Compiler
48
Linking a Compaq COBOL Program on Tru64 UNIX
49
Specifying Object Libraries for Linking
49
Specifying Additional Object Libraries
50
Creating Shared Object Libraries
51
Specifying Types of Object Libraries
51
Installing Shared Libraries
52
Interpreting Messages from the Linker
52
Shared Library Restrictions
52
Running a Compaq COBOL Program on Tru64 UNIX
53
Accessing Command-Line Arguments
53
Accessing Environment Variables
54
Errors and Switches
55
Program Development Stages and Tools
55
Main Tools for Program Development and Testing
56
Developing Programs on Openvms Alpha
57
Creating a Compaq COBOL Program on Openvms Alpha
57
DCL Commands for Developing Programs
58
Compiling a Compaq COBOL Program on Openvms Alpha
59
Format of the COBOL Command on Openvms Alpha
59
Compiling Multiple Files
60
Debugging a Program
60
COBOL Qualifiers
61
Separately Compiled Programs
61
COBOL Command Qualifiers
62
Common Command-Line Errors to Avoid
65
Compiling Programs with Conditional Compilation
66
Interpreting Messages from the Compiler
66
Using Compiler Listing Files
68
Linking a Compaq COBOL Program
69
The LINK Command
69
LINK Qualifiers
70
Specifying Modules Other than Compaq COBOL Modules
70
Commonly Used LINK Qualifiers
70
Specifying Object Module Libraries
71
Creating Shareable Images
73
Main Program and Subprograms
75
Command Procedure to Link a Program as a Shareable Image
75
Interpreting Messages from the Linker
77
Running a Compaq COBOL Program
78
Accessing Command-Line Arguments at Run Time
78
Accessing System Logicals at Run Time
79
Accessing Logicals and Command-Line Arguments
79
Accessing Input and Output Devices at Run Time
80
Debugging Environment
80
Interpreting Run-Time Messages
81
Program Run Messages
82
Data Errors
82
Program Logic Errors
83
Run-Time Input/Output Errors
84
I/O Errors and RMS (Openvms)
85
Using RMS Special Registers to Detect Errors (Openvms)
86
Using Program Switches
89
Setting and Controlling Switches Internally
90
Setting and Controlling Switches Externally
90
Special Information for Year 2000 Programming
92
2 Handling Numeric Data
95
How the Compiler Stores Numeric Data
95
Specifying Alignment
95
Sign Conventions
96
Invalid Values in Numeric Items
96
Evaluating Numeric Items
97
Numeric Relation Test
97
Numeric Relational Operator Descriptions
97
Numeric Sign Test
98
Numeric Class Tests
98
Sign Tests
98
Success/Failure Tests
99
Using the MOVE Statement
100
Elementary Numeric Moves
100
Elementary Numeric-Edited Moves
101
Subscripted Moves
103
Common Move Errors
103
Using the Arithmetic Statements
103
Temporary Work Items
103
Standard and Native Arithmetic
104
Using the /MATH_INTERMEDIATE Qualifier
104
Using the /ARITHMETIC Qualifier
106
Specifying a Truncation Qualifier
106
Using the ROUNDED Phrase
106
ROUNDED with REMAINDER
107
Using the SIZE ERROR Phrase
107
Using the GIVING Phrase
108
Multiple Operands in ADD and SUBTRACT Statements
108
Common Errors in Arithmetic Statements
109
3 Handling Nonnumeric Data
111
Storage of Nonnumeric Data
111
Data Organization
112
Group Items
112
Special Characters
113
Testing Nonnumeric Items
113
Relation Tests of Nonnumeric Items
113
Classes of Data
114
Comparison Operations
115
Class Tests for Nonnumeric Items
115
Data Movement
116
Item Concatenation Using Two MOVE Statements
116
Using the MOVE Statement
117
Group Moves
117
Elementary Moves
117
Nonnumeric Elementary Moves
118
Edited Moves
119
Justified Moves
119
Data Movement with Editing Symbols
119
Multiple Receiving Items
120
Subscripted Moves
120
Data Movement with the JUSTIFIED Clause
120
Common Nonnumeric Item MOVE Statement Errors
121
Using the MOVE CORRESPONDING Statement for Nonnumeric Items
121
Statement
121
Using Reference Modification
122
Defining Tables
123
Defining Fixed-Length, One-Dimensional Tables
123
Organization of the One-Dimensional Table in Example
124
Multiple Data Items in a One-Dimensional Table
124
Defining a Table with an Index and an Ascending Search Key
125
4 Handling Tables
123
Organization of Multiple Data Items in a One-Dimensional Table
125
Defining Fixed-Length, Multidimensional Tables
126
Organization of a Table with an Index and an Ascending Search Key
126
Defining a Two-Dimensional Table
126
Defining Variable-Length Tables
127
Organization of a Two-Dimensional Table
127
Organization of a Three-Dimensional Table
127
Storage Allocation for Tables
128
Defining a Variable-Length Table
128
Sample Record Description Defining a Table
129
Using the SYNCHRONIZED Clause
129
Memory Map for Example 4–7
129
Record Description Containing a COMP SYNC Item
130
Adding an Item Without Changing the Table Size
130
Memory Map for Example 4–8
130
How Adding 3 Bytes Adds 4 Bytes to the Element Length
131
Memory Map for Example 4–9
131
Memory Map for Example 4–10
131
Initializing Values of Table Elements
132
Initializing Tables with the VALUE Clause
132
Initializing a Table with the OCCURS Clause
132
Memory Map for Example 4–11
132
Initializing Mixed Usage Items
133
Memory Map for Example 4–13
133
Accessing Table Elements
134
Subscripting
134
Initializing Alphanumeric Items
134
Memory Map for Example 4–14
134
Subscripting with Literals
135
Using a Literal Subscript to Access a Table
135
Subscripting a Multidimensional Table
135
Subscripting with Data Names
136
Subscripting Rules for a Multidimensional Table
136
Relative Indexing
137
Subscripting with Index Name Items
137
Index Data Items
138
Assigning Index Values Using the SET Statement
138
Assigning an Integer Index Value with a SET Statement
138
Incrementing an Index Value with the SET Statement
138
Identifying Table Elements Using the SEARCH Statement
138
Implementing a Sequential Search
139
Implementing a Binary Search
140
Sample Table
141
A Serial Search
142
Using SEARCH and Varying an Index Other than the First Index
143
Using SEARCH and Varying an Index Data Item
143
Table
144
Doing a Serial Search Without Using the VARYING Phrase
144
A Multiple-Key, Binary Search
145
5 Using the STRING, UNSTRING, and INSPECT Statements
147
Concatenating Data Using the STRING Statement
147
Multiple Sending Items
147
Using the DELIMITED by Phrase
148
Using the STRING Statement and Literals
148
Results of the STRING Operation
149
Using the POINTER Phrase
150
Using the OVERFLOW Phrase
150
Sample Overflow Condition
151
Results of Sample Overflow Statements
151
Common STRING Statement Errors
152
Separating Data Using the UNSTRING Statement
152
Multiple Receiving Items
152
Values Moved into the Receiving Items Based on the Sending Item Value
153
Controlling Moved Data Using the DELIMITED by Phrase
154
Handling a Short Sending Item
154
Results of Delimiting with an Asterisk
155
Results of Delimiting Multiple Receiving Items
156
Results of Delimiting with Two Asterisks
156
Results of Delimiting with ALL Asterisks
157
Results of Delimiting with ALL Double Asterisks
157
Multiple Delimiters
158
Using the COUNT Phrase
158
Results of Multiple Delimiters
158
Saving UNSTRING Delimiters Using the DELIMITER Phrase
159
Controlling UNSTRING Scanning Using the POINTER Phrase
160
Counting UNSTRING Receiving Items Using the TALLYING Phrase
161
Exiting an UNSTRING Statement Using the OVERFLOW Phrase
162
Common UNSTRING Statement Errors
162
Examining and Replacing Characters Using the INSPECT Statement
163
Using the TALLYING and REPLACING Options of the INSPECT Statement
163
Restricting Data Inspection Using the BEFORE/AFTER Phrase
164
Implicit Redefinition
164
Matching Delimiter Characters to Characters in a Field
165
Values Resulting from Implicit Redefinition
166
Examining the INSPECT Operation
167
Sample INSPECT Statement
167
Setting the Scanner
168
Active/Inactive Arguments
168
Typical REPLACING Phrase
168
Finding an Argument Match
169
Argument Active Position
169
The TALLYING Phrase
170
The Tally Argument
170
The Tally Counter
170
The Tally Argument List
171
LEADING Delimiter of the Inspection Operation
171
Results of the Scan with Separate Tallies
172
Interference in Tally Argument Lists
173
Using the REPLACING Phrase
176
The Search Argument
176
The Replacement Argument
177
The Replacement Argument List
177
The Replacement Value
177
Interference in Replacement Argument Lists
178
Using the CONVERTING Option
179
Common INSPECT Statement Errors
179
6 Processing Files and Records
181
Defining Files and Records
181
File Organization
182
Compaq COBOL File Organizations-Advantages and Disadvantages
182
Sequential File Organization
183
A Multiple-Volume, Sequential File
184
Line Sequential File Organization
185
Relative File Organization
186
Record Format
188
Indexed File Organization
188
Record Format Availability
188
Sample Record Description
189
Determining Fixed-Length Record Size
190
Descriptions
190
Creating Variable-Length Records and Using the OCCURS Clause with the DEPENDING on Phrase
191
Defining Fixed-Length Records with Multiple Record Descriptions
192
File Design
193
Program
193
Defining a Disk File
195
Defining a File Connector
195
Defining a Magnetic Tape File (Tru64 UNIX)
196
Using Environment Variables for File Specification
199
Specifying File Organization and Record Access Mode
200
For a Sequential File
201
Relative File
201
An Indexed File
201
Mode
202
Access Modes
203
Mode
203
Creating and Processing Files
204
Opening and Closing Files
204
Sequential Access Modes
204
OPEN and CLOSE Statements
205
File Handling for Sequential and Line Sequential Files
206
Creating a Sequential File
206
Creating a Line Sequential File
207
Valid I/O Statements for Sequential Files
207
Valid I/O Statements for Line Sequential Files
208
File Handling for Relative Files
209
Creating a Relative File in Sequential Access Mode
210
Creating a Relative File in Random Access Mode
210
File Handling for Indexed Files
212
Valid I/O Statements for Relative Files
212
Creating and Populating an Indexed File
213
Valid I/O Statements for Indexed Files
214
Using Segmented Keys
215
Reading Files
217
Reading a Sequential or Line Sequential File
217
Reading a Relative File
218
Reading a Sequential File
218
Reading a Relative File Sequentially
219
Reading a Relative File Randomly
220
Reading a Relative File Dynamically
221
Reading an Indexed File
222
Reading an Indexed File Randomly
223
Reading an Indexed File Dynamically
225
Reading an Indexed File Dynamically, with READ PRIOR
226
Indexed File-ISAM Mapping
227
Updating Files
228
Updating a Sequential or Line Sequential File
228
Rewriting a Sequential File
229
Updating a Relative File
230
Rewriting a Relative File
230
Extending a Sequential File
230
Rewriting Relative Records in Sequential Access Mode
231
Rewriting Relative Records in Random Access Mode
232
Deleting Records from a Relative File
233
Deleting Relative Records in Sequential Access Mode
233
Deleting Relative Records in Random Access Mode
234
Updating an Indexed File
235
Updating an Indexed File Sequentially
236
Updating an Indexed File Randomly
237
Backing up Your Files
240
7 Handling Input/Output Exception Conditions
241
Planning for the at END Condition
242
Planning for the Invalid Key Condition
242
Handling the at END Condition
242
Using File Status Values and Openvms RMS Completion Codes
243
Handling the Invalid Key Condition
243
File Status Values
244
Defining a File Status for a File
244
Using the File Status Value in an Exception Handling Routine
244
RMS Completion Codes (Openvms)
245
Referencing RMS-STS, RMS-STV, RMS-CURRENT-STS, and RMS-CURRENT-STV Codes (Openvms)
247
Using Declarative USE Procedures
248
The Declaratives Skeleton
249
A Declarative USE Procedure Skeleton
249
Five Types of Declarative USE Procedures
250
8 Sharing Files and Locking Records
253
Controlling Access to Files and Records
253
Multiple Access to a File
253
Relationship of Record Locking to File Sharing
254
Choosing X/Open Standard or Compaq Standard File Sharing and Record Locking
255
Ensuring Successful File Sharing
256
Providing Disk Residency
256
Using File Protection
256
Determining the Intended Access Mode to a File
258
Specifying File Access Using X/Open Standard File Sharing
258
Specifying File Access Using Compaq Standard File Sharing
260
File-Sharing Options (Openvms)
262
File-Sharing Options (Tru64 UNIX)
263
Error Handling for File Sharing
264
File Status Values Used in a File-Sharing Environment
264
Program Segment for File Status Values
265
RMS-STS Values Used in a File-Sharing Environment (Openvms)
266
Program Segment for RMS-STS Values (Openvms)
267
Ensuring Successful Record Locking
268
Why a Record-Already-Exists Error Occurs
268
X/Open Standard Record Locking
269
Compaq Standard Record Locking
270
X/Open Standard Record Locking
270
Automatic Record Locking (Compaq Standard)
271
Manual Record Locking Combinations
272
Error Handling for Record Locking
275
Program Segment for Record-Locking Exceptions
277
9 Using the SORT and MERGE Statements
279
Sorting Data with the SORT Statement
279
File Organization Considerations for Sorting
280
Specifying Sort Parameters with the ASCENDING and DESCENDING KEY Phrases
281
Resequencing Files with the USING and GIVING Phrases
281
Manipulating Data before and after Sorting with the INPUT PROCEDURE and OUTPUT PROCEDURE Phrases
281
INPUT and OUTPUT PROCEDURE Phrases
282
Maintaining the Input Order of Records Using the with DUPLICATES in ORDER Phrase
284
USING Phrase Replaces INPUT PROCEDURE Phrase
284
Specifying Non-ASCII Collating Sequences with the COLLATING
285
SEQUENCE IS Alphabet-Name Phrase
285
Multiple Sorting
285
Overriding the COLLATING SEQUENCE IS Phrase
285
Using Two Sort Files
285
Sorting Variable-Length Records
286
Preventing I/O Aborts
287
Sorting Tables
287
Sorting at the Operating System Level
287
The Declarative USE after STANDARD ERROR PROCEDURE
287
Merging Data with the MERGE Statement
288
Sample Programs Using the SORT and MERGE Statements
288
Using the MERGE Statement
288
Sorting a File with the USING and GIVING Phrases
289
Using the USING and OUTPUT PROCEDURE Phrases
290
Phrases
292
Using the COLLATING SEQUENCE IS Phrase
294
Creating a New Sort Key
295
Merging Files
297
10 Producing Printed Reports
301
Designing a Report
301
Components of a Report
301
Components of a Report
302
Sample Layout Worksheet
302
Accumulating and Reporting Totals
304
The Logical Page and the Physical Page
305
Subtotals, Crossfoot Totals, and Rolled Forward Totals
305
Programming a Conventional File Report
306
Defining the Logical Page in a Conventional Report
306
Logical Page Area for a Conventional Report
306
Controlling the Spacing in a Conventional Report
307
Advancing to the Next Logical Page in a Conventional Report
307
Programming for the Page-Overflow Condition in a Conventional Report
307
Checking for the Page-Overflow Condition
308
Using a Line Counter
308
Printing the Conventional Report
309
A Conventional File Report Example
309
Page Advancing and Line Skipping
309
A 20-Line Logical Page
311
Programming a Linage-File Compaq COBOL Report
312
A Double-Spaced Master Listing
312
Defining the Logical Page in a Linage-File Report
313
Logical Page Areas for a Linage-File Report
313
Controlling the Spacing in a Linage-File Report
314
Using the LINAGE-COUNTER
314
Advancing to the Next Logical Page in a Linage-File Report
314
Programming for the End-Of-Page and Page-Overflow Condition
315
Checking for End-Of-Page on a 28-Line Logical Page
316
A 28-Line Logical Page
316
Printing a Linage-File Report
319
A Linage-File Report Example
320
A 20-Line Logical Page
320
With Automatic Page Overflow
322
Modes for Printing Reports
323
Directly Allocating a Printer
323
Spooling to a Mass Storage Device
324
Programming a Report Writer Report
324
Using the REPORT Clause in the File Section
325
Defining the Report Section and the Report File
325
Defining a Report Writer Logical Page with the PAGE Clause . . . . . . Describing Report Group Description Entries
325
Report Writer Report Group Types
326
Presentation Order for a Logical Page
327
Sample Report Using All Seven Report Groups
328
Vertical Spacing for the Logical Page
329
Horizontal Spacing for the Logical Page
330
Assigning a Value in a Print Line
331
Defining the Source for a Print Field
331
Specifying Multiple Reports
332
Generating and Controlling Report Headings and Footings
332
Defining and Incrementing Totals
334
Subtotaling
334
Crossfooting
335
Rolling Forward
335
RESET Option
336
UPON Option
336
Restricting Print Items
337
Processing a Report Writer Report
338
Initiating the Report
338
Generating a Report Writer Report
339
Automatic Operations of the GENERATE Statement
339
First GENERATE Statement
339
Ending Report Writer Processing
340
Applying the USE before REPORTING Statement
341
Suppressing a Report Group
342
Selecting a Report Writer Report Type
342
Detail Reporting
342
Summary Reporting
343
Report Writer Examples
343
Input Data
343
EX1006-Detail Report Program
344
Sample MASTER.DAT File
344
Sample Program EX1006
345
EX1006.LIS Listing
348
EX1007-Detail Report Program
349
Sample Program EX1007
349
EX1007.LIS Listing
356
EX1008-Detail Report Program
357
Sample Program EX1008
358
EX1009-Detail Report Program
365
Sample Program EX1009
365
EX1008.LIS Listing
365
EX1009.LIS Listing
373
EX1010-Summary Report Program
374
Sample Program EX1010
375
EX1010.LIS Listing
381
Solving Report Problems
382
Printing more than One Logical Line on a Single Physical Line
382
Printing Labels Four-Up
383
Printing Labels Four-Up in Sort Order
385
Group Indicating
387
Results of Group Indicating
387
Fitting Reports on the Page
388
Printing Totals before Detail Lines
388
Underlining Items in Your Reports
389
Bolding Items in Your Reports
389
11 Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
391
Using ACCEPT and DISPLAY for I/O
391
Designing Video Forms with ACCEPT and DISPLAY Statement Extensions
393
Clearing a Screen Area
394
Adding Information to a Master File with a Video Form
394
Horizontal and Vertical Positioning of the Cursor
395
Erasing a Screen
395
Cursor Positioning
396
Screen after the ERASE Statement Executes
396
Positioning the Data on Line 19, Column
397
Assigning Character Attributes to Your Format Entries
398
Using PLUS for Cursor Positioning
398
Cursor Positioning Using the PLUS Option
398
Using the CONVERSION Phrase to Display Numeric Data
399
Using Character Attributes
399
Available Character Attributes by Terminal Type
399
Using the CONVERSION Phrase
400
Screen Display with Character Attributes
400
Handling Data with ACCEPT Options
402
Using CONVERSION with ACCEPT Data
402
Sample Run of Program CONVERT
402
Using on EXCEPTION When Accepting Data with CONVERSION
403
Using the on EXCEPTION Phrase
403
Protecting the Screen
404
Accepting Data with the on EXCEPTION Option
404
Using the SIZE and PROTECTED Phrases
405
Assigning Default Values to Data Fields
406
Using no ECHO with ACCEPT Data
406
Using the no ECHO Phrase
406
Screen Display of NUM-DATA Using the PROTECTED Option
406
Using the DEFAULT Phrase
408
Accepting Data with the DEFAULT Phrase
409
Using Terminal Keys to Define Special Program Functions
410
Compaq COBOL Characters Returned for Cursor Positioning, Program Function, Function, Keypad, and Keyboard Keys
410
Compaq COBOL Control Keys on the Standard VT100 Keypad and Keyboard
414
Compaq COBOL Control Keys on a Typical VT200 or Later Keypad
414
And Keyboard
414
Using the CONTROL KEY in Phrase
415
Using the EDITING Phrase
418
Screen Display of Program SPECIAL
418
Key Functions for the EDITING Phrase
418
EDITING Phrase Sample Code
419
Designing Video Forms with Screen Section ACCEPT and DISPLAY
421
Form with ACCEPT with EDITING Phrase
421
Using Screen Section Options
422
Character Attribute Clauses for Screen Description Formats
422
Comparison of Screen Section Extensions with Other Extensions of ACCEPT and DISPLAY
424
Color Table
424
Designing a Video Form for a Daily Calendar
426
MENU-SCREEN Output
430
SCHEDULE-SCREEN Output
430
12 Interprogram Communication
431
Multiple COBOL Program Run Units
431
Examples of COBOL Run Units
431
Calling Procedures
432
Run Unit with Three Separately Compiled Programs
432
COBOL Program Attributes
433
Run Unit with a Main Program and Two Contained Programs
433
The INITIAL Clause
434
Contained Programs
434
The EXTERNAL Clause
435
Transferring Flow of Control
435
The CALL Statement
435
Nesting CALL Statements
436
Execution Sequence of Nested CALL Statements
436
The EXIT PROGRAM Statement
438
Accessing Another Program's Data Division
438
Sequence of Messages Displayed When Example 12–4 Is Run
438
The USING Phrase
439
Transfer of Control Flow from a Main Program to Multiple Subprograms
439
Accessing Another Program's Data Division
440
Accessing Another Program's Data Division
441
The Linkage Section
442
Communicating with Contained COBOL Programs
443
Defining Data Names in the Linkage Section
443
The COMMON Clause
444
Using the COMMON Clause
444
The GLOBAL Clause
445
Sharing GLOBAL Data
445
Sharing GLOBAL Files
445
Sharing USE Procedures
446
Executing Declaratives with Contained Programs (Rule 1)
447
Sharing Other Resources
448
Executing Declaratives Within Contained Programs (Rule 2)
448
Calling Compaq COBOL Programs from Other Languages
449
Calling COBOL Programs from C
449
Calls to COBOL Programs
449
Calling a COBOL Program from C
450
C Include File Cobfunc.h
450
COBOL Called Program "CALLEDFROMC"
451
C Program Using Cobcall, Cobfunc, and Cobcancel
452
COBOL Called Program "PROGCOB"
452
Calling Non-COBOL Programs from Compaq COBOL
455
Calling a Fortran Program
455
Calling a Fortran Program from a COBOL Program
455
Fortran Subroutine SQROOT
456
Calling a BASIC Program
457
Calling a BASIC Program from a COBOL Program
457
BASIC Program "APP" and Output Data
458
Calling a C Program
459
C Routine to be Called from a COBOL Program
459
Special Considerations for Interprogram Communication
460
CALL and CANCEL Arguments
460
Calling Openvms Alpha Shareable Images (Openvms)
460
Calling Tru64 UNIX Shareable Objects (Tru64 UNIX)
460
Case Sensitivity on Tru64 UNIX and Windows NT
460
Linker Case Sensitivity
460
Calling C Programs from Compaq COBOL on Tru64 UNIX and Windows NT
461
Calling COBOL Programs from C on Tru64 UNIX and Windows NT
461
C Routine Called by Statement: CALL ''Job1
461
C Invocation to Call COBOL PROGRAM-ID ''Job2
461
Additional Information
462
13 Using Compaq COBOL in the Alpha Common Language Environment
463
Routines, Procedures, and Functions
463
The Openvms Alpha Calling Standard (Openvms)
464
Register and Stack Usage
464
Openvms Alpha Register Usage (Openvms)
464
Return of the Function Value
465
The Argument List
465
Openvms Alpha System Routines (Openvms)
465
Openvms Alpha Run-Time Library Routines
466
System Services
466
Run-Time Library Facilities (Openvms)
466
Calling Routines
467
Determining the Type of Call (Openvms)
467
Defining the Argument (Openvms)
468
Calling the External Routine (Openvms)
469
Calling System Routines (Openvms)
470
System Routine Arguments (Openvms)
470
COBOL Implementation of the Openvms Alpha Data Types (Openvms)
470
Calling a System Routine in a Procedure Call (Openvms)
475
Checking the Condition Value (Openvms)
475
(Openvms)
477
Library Return Status and Condition Value Symbols
477
Locating the Result (Openvms)
477
Establishing and Removing User Condition Handlers (Openvms)
477
User-Written Condition Handler
479
Examples (Openvms)
481
Random Number Generator (Openvms)
481
Using $ASCTIM (Openvms)
482
Using the SYS$SETDDIR System Service (Openvms)
482
Sample Run of CALLTIME (Openvms)
483
Using LIB$K_* and LIB$_* Symbols (Openvms)
484
14 Using the REFORMAT Utility
485
Running the REFORMAT Utility
485
ANSI-To-Terminal Format Conversion
486
Terminal-To-ANSI Format Conversion
487
REFORMAT Error Messages
488
15 Optimizing Your Compaq COBOL Program
491
Specifying Optimization on the Compiler Command Line
492
Using COMP Data Items for Speed
496
Other Ways to Improve the Performance of Operations on Numeric Data
497
Limiting Significant Digits
497
Reducing the Compexity of Arithmetic Expressions
497
Selection of Data Types (Openvms)
498
Choices in Procedure Division Statements
498
Using GO to DEPENDING on Instead of IF, GO to
498
Using Indexing Instead of Subscripting
499
Using SEARCH ALL Instead of SEARCH
499
Selecting Hypersort for Sorting Tasks
499
Minimizing USE Procedures with LINKAGE SECTION References
500
I/O Operations
500
Using the APPLY Clause
500
Using the PREALLOCATION Phrase of the APPLY Clause
500
Using the EXTENSION Phrase of the APPLY Clause
501
Using the DEFERRED-WRITE Phrase of the APPLY Clause
501
Using the FILL-SIZE on Phrase of the APPLY Clause
502
Using the WINDOW Phrase of the APPLY Clause
502
Using Multiple Buffers
502
Sharing Record Areas
503
Sharing Record Areas
504
Using COMP Unsigned Longword Integers
505
Optimizing File Design (Openvms)
505
Sequential Files
505
Relative Files
506
Maximum Record Number (MRN)
506
Cell Size
506
Bucket Size
506
File Size
508
Indexed Files
509
Optimizing Indexed File I/O
510
Calculating Key Index Levels
514
Caching Index Roots
515
Image Activation Optimization (Tru64 UNIX)
515
16 Managing Memory and Data Access
518
Managing Memory Granularity
518
Using the VOLATILE Compiler Directive
519
Aligning Data for Performance and Compatibility
519
Data Boundaries
519
Data Field Padding
520
Alignment Directives, Qualifiers, and Flags
520
Boundaries for Naturally Aligned Binary Data
520
Specifying Alignment at Compile Time
521
Using Alignment Directives, Qualifiers, and Flags
522
Order of Alignment Operations
522
Nesting Alignment Directives
523
Alignment and Padding Order of Precedence
523
Comparing Alignment Directive Effects
524
Using *DC SET ALIGNMENT Directives
524
Using /ALIGNMENT with SYNCHRONIZED
525
Comparing /NOALIGN, /ALIGN and /ALIGN=PADDING
526
Data Map for /ALIGNMENT, -Align
527
Data Map for /NOALIGNMENT
527
Data Map for /ALIGNMENT=PADDING, -Align Pad
528
A Compiler Implementation Specifications
531
Compatibility Matrix
535
Unix
535
B.1 Compatibility Matrix
535
Cross-Platform Compatibility of COBOL Features
535
Differences in Extensions and Other Features
537
Command-Line Qualifiers (Options or Flags)
538
Qualifiers Shared by Compaq COBOL and Compaq COBOL for Openvms VAX and Equivalent Flags and Options
539
For Openvms VAX
540
Compaq COBOL SpecifiC Qualifiers and Flags
540
Compaq COBOL Options Not Available in Compaq COBOL for Openvms VAX
540
Qualifiers Only on Compaq COBOL for Openvms VAX
542
Compaq COBOL for Openvms VAX SpecifiC Qualifiers
542
Compaq COBOL and Compaq COBOL for Openvms VAX Behavior Differences
544
Program Structure Messages
544
Program Listing Differences
545
B.4.2.1 Machine Code
545
B.4.2.2 Module Names
545
COPY and REPLACE Statements
545
Machine Code
545
Module Names
545
Multiple COPY Statements
546
COPY Insert Statement
547
REPLACE and COPY REPLACING Statements
548
DATE COMPILED Statement
549
Compiler Listings and Separate Compilations (Openvms
549
Output Formatting
550
Compaq COBOL and Compaq COBOL for Openvms VAX Statement Differences
550
ACCEPT and DISPLAY Statements
550
B.4.3 Output Formatting
550
B.4.4.1 ACCEPT and DISPLAY Statements
550
B.4.4.2 LINAGE Clause
551
LINAGE Clause
551
B.4.4.3 MOVE Statement
552
B.4.4.4 SEARCH Statement
552
MOVE Statement
552
SEARCH Statement
552
System Return Codes
552
B–1 Signed and Unsigned Differences
552
B–2 Illegal Return Value Coding
553
Diagnostic Messages
554
B.4.6 Diagnostic Messages
554
Storage for Double-Precision Data Items
555
File Status Values
555
RMS Special Registers (Openvms
555
Calling Shareable Images
556
Sharing Common Blocks (Openvms
556
Arithmetic Operations
557
B.4.12 Arithmetic Operations
557
Compaq COBOL Differences Across Operating Systems
558
Rewrite
559
File Sharing and Record Locking
559
B.5.1 Rewrite
559
B.5.2 File Sharing and Record Locking
559
VFC File Format
560
File Attribute Checking
560
Indexed Files
560
B.5.5 Indexed Files
560
RMS Special Register References in Your Code
561
Time and Fractional Seconds
561
File Compatibility Across Languages and Platforms
561
LIB$INITIALIZE Interaction between C and COBOL
562
Reserved Words
562
B.8 Reserved Words
562
Debugger Support Differences
563
Decset/Lse Support Differences
563
DBMS Support
563
B.11 DBMS Support
563
Compiling on Tru64 UNIX and Windows NT
563
Multistream DBMS DML
564
C Programming Productivity Tools
565
Compaq FUSE-An Integrated Development Environment
565
Unix
565
Debugging Tools for Compaq COBOL Programs
565
C.2 Debugging Tools for Compaq COBOL Programs
566
Ladebug Debugger (Tru64 UNIX)
568
C–1 Source Code Used in the Sample Debug Sessions
568
Openvms Debugger (Openvms)
572
Notes on Compaq COBOL Support
572
Notes on Debugging Optimized Programs
572
Separately Compiled Programs
577
Language-Sensitive Editor (LSE) and the Source Code Analyzer (SCA) (Openvms
577
Notes on Compaq COBOL Support
578
Preparing an SCA Library
578
Starting and Terminating an LSE or an SCA Session
579
Compiling from Within LSE
579
Using Oracle CDD/Repository (Openvms)
580
Creating Record and Field Definitions
581
Accessing Oracle CDD/Repository Definitions from Compaq COBOL Programs
582
C.6.3 Recording Dependencies
583
Data Types
584
C.6.4 Data Types
584
Oracle CDD/Repository Data Types
585
For more Information
586
D.1 Porting Assistance
587
Recognized Foreign Reserved Words
588
D.2 Flagged Foreign Extensions
589
D.3 Implemented Extensions
589
Numeric Editing
607
Rounding
607
Relational Operator Descriptions
607
Two-Level Primary Index
608
Subsequent GENERATE Statements
612
TERMINATE Statement
612
Subscripting with Data Names
617
Advertisement
Advertisement
Related Products
Compaq AAR-88LB-TE
Compaq AA-Q88CE-TE
Compaq vPro Technology AMT 2.1
Compaq Deskpro EP a/P500E/810e
Compaq Armada 7400 - Notebook PC
Compaq Aero 1550
Compaq A6720f - Pavilion - 6 GB RAM
Compaq Armada 7300 - Notebook PC
Compaq AB300 - Server Console Solution
Compaq Armada MiniStation E
Compaq Categories
Desktop
Laptop
Server
Monitor
Storage
More Compaq Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL