Cover image for Cobol Y2K in plain English
Title:
Cobol Y2K in plain English
Author:
Griffith, Arthur.
Personal Author:
Publication Information:
Foster City, Calif. : M&T Books, [1999]

©1999
Physical Description:
459 pages ; 22 cm
Language:
English
ISBN:
9780764545863
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Item Holds
Searching...
QA76.76.S64 G75 1999 Adult Non-Fiction Central Closed Stacks
Searching...

On Order

Summary

Summary

COBOL Y2K in Plain English The millennium is upon us! Combining a refresher on COBOL fundamentals and a rundown of proven Year 2000 COBOL solutions, COBOL Y2K In Plain English is your ticket to millennial programming success. COBOL in Plain English If you don't understand COBOL's syntax quirks, skim through the sample demonstration programs that explain difficult topics, like Picture clauses, array indexing, and file input-output Y2K A to Z If you don't know where to start exterminating the date shortcuts responsible for the millennium bug, turn to these helpful sample fixes from real-world projects COBOL Reference Tools If you know what you want to do, but can't remember how, check out the alphabetical and task-oriented cross-references and the list of the most common Y2K problems Syntax Diagrams If you don't recall the exact form of a COBOL statement, a glance at the verb's syntax diagram shows you all the options and how to use them.


Author Notes

Arthur Griffith is a programmer with more than 20 years of experience. A witness to the genesis and fallout of COBOL-related Y2K problems, he has worked on numerous projects to correct them. He is the author of COBOL For Dummies and the Java Master Reference.


Table of Contents

Prefacep. ix
Acknowledgmentsp. xiii
Introductionp. xxv
Part I The COBOL Programming Languagep. 2
Chapter 1 The Shape of COBOLp. 5
How COBOL Got into This Shapep. 5
The Legacy of the Punched Cardp. 7
How Names Are Madep. 8
The Four Divisionsp. 9
Identification Divisionp. 10
Environment Divisionp. 11
Data Divisionp. 13
Procedure Divisionp. 16
The Hello World Programp. 16
A Starter Kitp. 17
Working Examplesp. 18
Writing Data Recordsp. 18
Reading Data Recordsp. 21
A Program and a Subprogramp. 24
Chapter 2 The Primitive Data Typesp. 27
The Basic Picturep. 27
The Characters of the Picturep. 28
Ap. 29
Asterisk (*)p. 29
Bp. 30
Comma (,)p. 30
Currency ($)p. 31
DB and CRp. 32
Minus Sign (-)p. 32
Nine (9)p. 33
Pp. 33
Period (.)p. 33
Plus Sign (+)p. 34
Sp. 34
Slash (/)p. 34
Vp. 35
Xp. 35
Zp. 36
Zero (0)p. 36
The Five Kinds of Datap. 36
Alphabeticp. 37
Numericp. 37
Alphanumericp. 37
Numeric Editedp. 38
Alphanumeric Editedp. 38
Some Field Modificationsp. 39
Usage Is Displayp. 39
Usage Is Binaryp. 39
Usage Is Compp. 42
Usage Is Packed-Decimalp. 42
Usage Is Indexp. 42
Usage Is Something Elsep. 42
Justifiedp. 42
Synchronizedp. 42
Blank When Zerop. 42
Valuep. 42
Think Positive and Negative: A Synopsis of Signsp. 42
Literals, Figurative Literals, and Some Special Namesp. 42
Numeric Literalsp. 42
Nonnumeric Literalsp. 42
Zerop. 42
High-Values and Low-Valuesp. 42
Quotep. 42
Spacep. 42
Currencyp. 42
Decimal-Pointp. 42
Chapter 3 Combining Primitive Types Into Data Recordsp. 43
Tables, Records, and Level Numbersp. 44
Basics of Level Numberingp. 44
Qualifying Nested Namesp. 45
An Anonymous Field or Recordp. 47
Arraysp. 48
An Array of Fieldsp. 48
Indexing from a Variablep. 49
An Array of Recordsp. 52
Indexing an Array of Arraysp. 53
Renames (The 66 Level)p. 54
Redefinesp. 56
The 77 Levelp. 58
The 88 Levelp. 58
The Slack Byte and Synchronizedp. 61
Chapter 4 Control Flowp. 67
Paragraphs and Sectionsp. 67
Statements and Sentencesp. 69
Go Top. 70
The Unconditional Branchp. 71
The Conditional Branchp. 72
Performp. 72
Perform a Paragraphp. 73
Perform a Sectionp. 74
Perform Throughp. 75
Perform Multiple Timesp. 76
Perform Untilp. 76
Perform Varyingp. 78
Performing a Group of Paragraphsp. 79
Perform Inlinep. 81
Testing at the Top and the Bottomp. 82
Ifp. 83
The Power of the Periodp. 85
Evaluatep. 86
Evaluate a Field Valuep. 87
Evaluate Which Is True or Falsep. 88
Evaluate for True or Falsep. 90
Continue and Exitp. 90
Alterp. 92
Conditional Expressionsp. 94
Comparing Two Fieldsp. 94
Comparing More Than Two Fieldsp. 95
Looking for a Signp. 97
Collation Orderp. 97
Field Classificationp. 97
Chapter 5 Data Manipulationp. 101
Movep. 101
Characters in Motionp. 102
Edited Fields Are a One Way Streetp. 105
Correspondingp. 105
Setp. 108
Arithmeticp. 109
Checking for Overflowp. 109
Roundedp. 111
Addp. 111
Subtractp. 112
Multiplyp. 112
Dividep. 113
Computep. 113
Initializep. 115
Accept and Displayp. 117
Displayp. 119
Acceptp. 119
Chapter 6 Filesp. 125
Introduction to COBOL Filesp. 126
Not All Files Are Created Equalp. 126
Creating File Definitionp. 127
Step 1 The Name of the Filep. 128
Step 2 A File That Does Not Yet Existp. 129
Step 3 The File Organizationp. 129
Step 4 The Access Modep. 130
Step 5 Name the Primary Keyp. 132
Step 6 Name the Alternate Keysp. 133
Step 7 Allocate Some Buffersp. 134
Step 8 Specify the Padding Characterp. 134
Step 9 Specify the Record Delimiterp. 135
Step 10 Define the Location of the File Statusp. 136
Step 11 Buffer Sharingp. 137
Step 12 Defining the Record Layoutp. 137
Step 13 Defining the Record Sizep. 138
Step 14 The Block Sizep. 140
Step 15 The Label Recordsp. 141
Step 16 Specifying the Data Records Namesp. 141
Sequential Filep. 141
Writing to a New Sequential Filep. 142
Writing to a New Sequential File -- Againp. 144
Extending an Existing Sequential Filep. 145
Reading from a Sequential Filep. 146
Updating Records Inside a Sequential Filep. 148
Relative Filep. 150
Writing to a Relative Filep. 150
Sequentially Reading a Relative Filep. 153
Reading by Using Relative Positioningp. 157
Rewriting a Record in a Relative Filep. 159
Deleting a Record from a Relative Filep. 163
Indexed Filep. 167
Writing to an Indexed Filep. 168
Reading an Indexed Record by a Keyp. 170
Reading Indexed Records Sorted by Keyp. 173
Rewriting an Indexed Recordp. 176
Deleting an Indexed Recordp. 179
Sortingp. 181
The Sort Filep. 182
Sorting from One Procedure to Anotherp. 183
Sorting from One File to Anotherp. 187
Mixing Files and Procedures in Sortingp. 188
Changing the Collation Orderp. 189
Mergingp. 190
Why Merge?p. 190
Chapter 7 Some Special Considerationsp. 195
COBOL Coding Standardsp. 196
Indention Traditionsp. 197
Modularityp. 199
The Forbidden Alterp. 199
Structured and Object Programmingp. 200
Perform Section Through Section-End with EXITp. 201
Header Blocksp. 202
Cases and Hyphensp. 203
Paragraph Naming Conventionsp. 204
Data Naming Conventionsp. 205
Ordering Data Typesp. 205
Lone Fieldsp. 206
The COPY Commandp. 207
Part II The Year 2000 as Seen from COBOLp. 208
Chapter 8 Getting from Here to the Final Fixp. 211
The Self-Unfulfilling Prophecyp. 211
Not Normalp. 213
The Automatic Solutionsp. 214
Source? What Source?p. 215
The Inevitable Stepsp. 216
Raw Inventoryp. 216
Matching Inventoryp. 217
Cross-Reference Inventoryp. 218
External Force Inventoryp. 219
Prioritizep. 219
Planningp. 219
Documentationp. 220
Estimate, Eliminate, and Executep. 221
Testingp. 221
Some Things Not to Dop. 222
Don't Be Inconsistentp. 222
Don't Upgrade the Systemp. 223
Don't Change Compilersp. 223
Don't Add Any Enhancementsp. 223
Don't Change Things That Don't Need Changingp. 224
Don't Skimp on Testingp. 224
Chapter 9 Bad Datesp. 227
Gregory and the Three Juliansp. 227
The First Julianp. 228
Enter Gregoryp. 228
The Second and Third Juliansp. 229
Storage Formatp. 229
The Basic Formp. 230
Determining a Leap Yearp. 231
Acceptp. 235
The Window Solutionp. 238
The Sliding Window Solutionp. 241
Century Encoding with Month Numbersp. 244
Century Encoding with Day Numbersp. 248
Encoding Decade Numbersp. 250
Sorting on a Windowed Keyp. 255
Time Shiftp. 258
Date Verificationp. 259
Binary Datesp. 264
Determining the Day of the Weekp. 278
Date Inputp. 278
Dates on Displayp. 278
Converting Garbagep. 278
Chapter 10 Files with Bad Datesp. 279
Find Some Slopp. 281
Space Left on Purposep. 281
If Nobody's Using It, Take Itp. 282
The Accordion Filesp. 283
The Slack Bytep. 283
Adding Logic to a Logicalp. 285
Dates in Key Fieldsp. 286
Dates in Database Filesp. 288
Two Versions of the Same Filep. 289
Client-Serverp. 290
Isolate the Filep. 290
BCDp. 291
Compatible Conversion to Binaryp. 291
Obscure Date Fields in Recordsp. 293
Terminators in Date Fields in Recordsp. 294
Calculating Record and Field Sizesp. 294
Chapter 11 War Storiesp. 301
Source Code Controlp. 302
What an Opportunity!p. 303
The Automaton and the Windowed Constantp. 304
The Scattered Datep. 305
Jo-Anne and the Fiscal Yearp. 306
After the Compliance Announcementp. 306
A Date Conversion Panicp. 307
A Little Knowledgep. 308
Go To Depending on YYp. 309
Change, Test, Retest ... and Retestp. 309
Dates and the Hard-Coded 19p. 310
A Real Hard Testp. 310
Straight to the Solutionp. 310
Part III Referencep. 312
Cobol Y2K in Plain Englishp. 315
A to Zp. 319
Chapter 12 Tablesp. 325
Reserved Wordsp. 325
Operators and Conditionalsp. 326
Literal and Figurative Constantsp. 334
Picture Clause Charactersp. 335
The Five Kinds of Datap. 336
Level Numbersp. 336
I-O Status Codesp. 339
The Format of a Line of COBOL Codep. 342
ASCII, EBCDIC, and Unicodep. 343
Chapter 13 File, Field, and Record Declarationsp. 347
Chapter 14 Verbsp. 363
Indexp. 441