COBOL for Dummies - Arthur Griffith - Librairie Eyrolles
Tous nos rayons

Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
COBOL for Dummies
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

COBOL for Dummies

COBOL for Dummies

Arthur Griffith - Collection For Dummies

386 pages, parution le 10/11/1997

Résumé

COBOL (COmmon Business-Oriented Language) is an old-timer in a world of Java and Visual Basic upstarts. But although newer languages garner all the attention, COBOL continues to be the programming workhorse for major, long-established industries, such as banking, insurance, and utilities.

COBOL For Dummies is the indispensable, practical reference for anyone charged with writing, tweaking, updating, or just double-checking COBOL code. Programming expert Arthur Griffith knows COBOL inside and out and shows you, among other things, how to Y2K-proof your mainframe or minicomputer.

Plus, the bonus CD-ROM accompanying COBOL For Dummies features plenty of ready-to-use source code and Fujitsu COBOL, complete and fully functional. In addition, the CD-ROM includes:

  • Demo versions of Acucobol for Windows 3.1, 95, and NT
  • A set of COBOL interpreters from Deskware for AIX, Linux, SunOS, Solaris, and Windows 95/NT
  • A demo version of the Micro Focus NetExpress development environment
  • A bonus appendix that shows you how to write COBOL programs that generate reports with headers, footers, running totals, and subtotals
  • Another bonus appendix full of diagrams to help you remember the syntax of COBOL's verbs

Table of contents

Introduction

About This Book
The Portability of COBOL
How This Book Is Organized
Part I: COBOL Has Structure; Boy, Does It!
Part II: The DATA DIVISION Is Where You Put Things
Part III: The PROCEDURE DIVISION Is Where You Do Things
Part IV: Input, Output, and Sorting
Part V: The Part of Tens
Icons Used in This Book
How'd I Do?
Part I: COBOL Has Structure; Boy, Does It!

Chapter 1: The Smallest COBOL Programs in the World

A Program So Small That It Does Nothing
A Small Program That Actually Does Something
Making a Place to Put Things
You Have a Punched Card in Your Past
Going from What You See to What You Get
Things to Consider While Programming in COBOL

Chapter 2: The Anatomy of a COBOL Program

Program, Know Thyself: Looking at the IDENTIFICATION DIVISION
Creating a Safe ENVIRONMENT DIVISION
Stashing Stuff in the DATA DIVISION
Talking to disk -- the FILE SECTION
Pigeonholing data in WORKING-STORAGE
Going to Work in the PROCEDURE DIVISION
All Together Now

Chapter 3: COBOL Mechanics -- A Look under the Hood

The COBOL Cast of Characters
That's What Little Programs Are Made Of
A tale of two cases
Hear the one about the space, the comma, and the semicolon?
Hear the one about the period, the number, and the sentence?
The Reserved Words
The END of Things
Taking Action with COBOL Verbs
Zoning and the Indention Tradition
Part II: The DATA DIVISION Is Where You Put Things

Chapter 4: Creating Data Descriptions: Describing the Real World or the Planet Pljfmyx

Assigning Level Numbers -- And 01 and 02 and 03...
Assigning New Field Names -- The 66 Level and RENAMES
Using REDEFINES
A rose is a rose -- unless you REDEFINE it
One fit sizes all
Changing the data type
Declaring Independent Data -- The 77 Level
Declaring Conditional Data -- The 88 Level
Qualifying References with OF and IN
Inserting the FILLER
Determining the Size of a Record
Sizing up COMP and BINARY
Allowing for synchronization and the slack byte

Chapter 5: Yes, Virginia, There Is a PICTURE Clause

A PICTURE Can Contain a Thousand Words
The Symbols That Make the PICTUREs
A is for alphabetic
Asterisk ( * ) replaces leading zeros
B is for blank
Comma ( , ) displays a comma character
Currency ( $ ) positions the currency symbol
DB and CR (Debit and Credit) indicate negative values
Minus sign ( - ) displays a minus sign or a blank
Nine ( 9 ) displays a digit
P is for placeholder
Period ( . ) displays a decimal point character
Plus sign ( + ) displays a plus or minus sign
S is for sign
Slash ( / ) displays a slash character
V is for implied decimal point
X is for any character
Z is for suppressing zeros
Zero ( 0 ) displays a zero character
Identifying the Five Kinds of Data
Alphabetic
Alphanumeric
Alphanumeric edited
Numeric
Numeric edited
You're a Cute Number; What's Your SIGN?
The USAGE Clause: Specifying How You Want Your Data Stored
If USAGE IS DISPLAY, it's the default
If USAGE IS BINARY, it's base-2
If USAGE IS COMP, it's probably binary
If USAGE IS PACKED-DECIMAL, the size is cut in half
If USAGE IS INDEX, it's for use with OCCURS
If you put it on a group, they all get it
The JUSTIFIED Cause...er, Clause
The BLANK WHEN ZERO Clause
The Special Name CURRENCY
The Special Name DECIMAL-POINT

Chapter 6: Literals, Constants, and Some Special Names

Playing the Numbers: Numeric Literals
Stringing Together Some Nonnumeric Literals
Numeric-edited fields and the VALUE clause
Double or single? And how long do you want it?
Moving a literal to an edited field
Figuring Out Figurative Literals
ZERO, ZEROS, and ZEROES
SPACE and SPACES
QUOTE and QUOTES
LOW-VALUES and HIGH-VALUES
The SPECIAL-NAMES Clause

Chapter 7: Several Things in One Place and Several Places for One Thing

Using the OCCURS Clause to Define Arrays
Accessing the Data in an Array
Simple indexing with an integer constant
Using a data item as a subscript
Using INDEX or INDEXED BY
How to diddle with the values of an INDEX data type
Placing tables within tables
Setting Initial Values for a Table
Using a VALUE clause on the OCCURS
Using REDEFINES and a flat list
Blammit! Clearing out an array
Making one record and then looping and moving
Part III: The PROCEDURE DIVISION Is Where You Do Things

Chapter 8: It's PARAGRAPHs and SECTIONs THROUGH and THRU

Understanding COBOL Sentence Structure
Paragraphs Contain Sentences
Sections Contain Paragraphs
EXIT Is a Lonely Statement
CONTINUE Does Nothing, and Does It Very Well
STOP RUN: A Self-Contradiction
END PROGRAM

Chapter 9: Verbs That Change the Direction in Which COBOL Runs

Leaping about with Your Basic GO TO
Plain vanilla GO TO
A GO TO with a DEPENDING clause
Taking Action with the PERFORM Verb
The traditional PERFORM
The traditional PERFORM THROUGH
PERFORMing over and over
PERFORMing nothing
The PERFORM and the GO TO
Creating Old-Fashioned Spaghetti with ALTER
Making Simple Decisions with an IF Statement
Decisions within Decisions: Nesting IF Statements
Writing Conditional Expressions
Making a simple comparison
Comparing nonnumerics
Determining the class of a field
Naming your own conditions
Checking the sign
Combining conditions with AND and OR
Reading from left to right
Reading in any direction you want
NOT is okay, but NOT NOT is not
Combining and compacting conditionals
Choosing a Course of Action with EVALUATE
EVALUATE a Conditional

Chapter 10: Using MOVE to Put Data in Its Place

Making a Simple MOVE
Making a MOVE TO a Bigger Place
Making an Unfit MOVE
Shoving Entire Records Around with MOVE
Using MOVE as a Record Initializer
Initializing with SPACES and ZEROES
You take the HIGH-VALUE, and I'll take the LOW-VALUE
Filling records with anything at all
Making Your MOVE to Lots of Places
Some Sneaky Stuff about MOVE and OCCURS
Reformatting Data with MOVE CORRESPONDING

Chapter 11: Verbs That Put Lots of Data in Lots of Places

Getting Your Records Off to a Good Start with INITIALIZE
The Four Horsemen of Arithmetic
Combining numbers with ADD
GIVING a target to an ADD statement
Creating a well-ROUNDED ADD
Catching a SIZE ERROR
Wrapping things up with END-ADD
Summing several fields at once with ADD CORRESPONDING
You can't take anything away from SUBTRACT
GIVING a target to a SUBTRACT statement
Creating a well-ROUNDED SUBTRACT
Catching a SIZE ERROR
Wrapping things up with an END-SUBTRACT
Doing group take-aways with SUBTRACT CORRESPONDING
Producing products with MULTIPLY
Producing a well-ROUNDED product
Catching a SIZE ERROR
Wrapping things up with END-MULTIPLY
Conquering COBOL's DIVIDE verb
Producing a well-ROUNDED DIVIDE
Catching a SIZE ERROR
Wrapping things up with END-DIVIDE
Becoming Arithmetically Expressive with COMPUTE
The overworked minus sign
The exponentiation of COMPUTE
The options of COMPUTE
The order of COMPUTE

Chapter 12: Characters, Strings, and the Verbs That Know Them

Putting Some Text on DISPLAY
Formatting numbers for output
Lining up multiple DISPLAY statements
Some notes about quotes
Reading Data with ACCEPT
Reading keyboard entries with ACCEPT
Getting the date and time with ACCEPT
Part IV: Input, Output, and Sorting

Chapter 13: Working with Sequential Input and Output

Defining a Sequential File
Step 1: SELECT an access method and names
Step 2: Specify the ORGANIZATION
Step 3: SELECT an OPTIONAL file
Step 4: RESERVE some extra space
Step 5: Set the character used for padding
Step 6: Define the record delimiter
Step 7: Create a place to stick the file status
Step 8: Add an I-O CONTROL paragraph
Step 9: Add the SAME clause
Step 10: Describe the structure in the FILE SECTION
Step 11: Define the RECORD size
Step 12: Specify the BLOCK size
Step 13: Define the LABEL RECORDS
Step 14: Create the DATA RECORDS clause
Opening a Sequential File
Opening a file for INPUT
Opening a file for OUTPUT
Opening a file for EXTEND
Opening a file for I-O
Closing a Sequential File
Writing to a Sequential File
Reading from a Sequential File
Rewriting a Sequential File

Chapter 14: Working with Relative Files

What Is a Relative File Good for, Really?
Defining a Relative File
Step 1: SELECT the file you want to use
Step 2: Decide on your ACCESS MODE
Step 3: Specify whether the file is OPTIONAL
Step 4: Create a place to stick the file status
Steps 5-11: Complete the file definition
Opening a Relative File
Opening a file for INPUT
Opening a file for OUTPUT
Opening a file for EXTEND
Opening a file for I-O
Closing a Relative File
Writing to a Relative File
Reading a Relative File in a Sequential Way
Reading in a Relative Way
Rewriting a Record in a Relative File
Deleting a Record from a Relative File

Chapter 15: Working with Indexed Files

Defining an Indexed File
Step 1: SELECT the file you want to use
Step 2: Add an ALTERNATE Key
Step 3: Specify whether the file is OPTIONAL
Step 4: RESERVE some extra space
Step 5: Select the ACCESS MODE
Step 6: Create a place to stick the file status
Steps 7-13: Complete the file definition
Opening an Indexed File
Opening a file for INPUT
Opening a file for OUTPUT
Opening a file for EXTEND
Opening a file for I-O
Closing an Indexed File
Writing to an Indexed File
Reading from an Indexed File
Reading from a Specific Starting Point in an Indexed File
Rewriting a Record in an Indexed File
Deleting a Record from an Indexed File

Chapter 16: Using SORT and MERGE

SORT and MERGE Work Together
Creating a Sort File Definition
Step 1: SELECT your sort file
Step 2: Decide whether to put several sort files in the SAME space
Step 3: Define the record layout for the sort file
Sorting One File into Another
Making the collating go like you want
Sorting with DUPLICATES
Sorting from a File to a Procedure
Sorting from a Procedure to a File
Sorting from a Procedure to a Procedure
Merging the Sorted Files
Part VI: The Part of Tens

Chapter 17: Ten Faces of the Millennium Problem

Understanding the Two-Digit Year
Totally Obscure Names for YY
Converting a File that Contains YY
Windowing the Year Doesn't Change the File Format
Adding a Century Indicator to DD or MM
Using a Single Character for DD or MM
Don't Get Bitten by the Leap-Year Bug
Using 99 as a Special YY Is a No-No
The Special Form YYDDD
The Peculiar ACCEPT -- A Built-In Oops
The Embedded Date

Chapter 18: Ten Tasks That Are Really Hard to Do in COBOL

Determining the Actual Size of a Record
Arranging Data into Columns
Extracting Part of a Text String
Combining Text Strings
Writing Comma-Delimited Text
Reading Comma-Delimited Text
Converting Between Uppercase and Lowercase
Finding a Square Root
Generating Random Numbers

Appendix: About the CD

Index

License Agreement

Installation Instructions

Book Registration Information

L'auteur - Arthur Griffith

Arthur Griffith est l'auteur de 14 livres. La plupart sont sur la programmation, quelques uns sont sur Java. Dans sa carrière, il a travaillé sur 23 langages de programmation. Il a co-écrit un livre sur Linux avec Peter Norton et a enseigné Java en ligne durant quatre ans, et a enseigné à l'Université d'Alaska. L'adaptation française de son dernier Tutorom sur Java 6 a été réalisée par Corine Badou.

Caractéristiques techniques

  PAPIER
Éditeur(s) IDG
Auteur(s) Arthur Griffith
Collection For Dummies
Parution 10/11/1997
Nb. de pages 386
Format 18,8 x 23,3
Poids 713g
EAN13 9780764502989

Avantages Eyrolles.com

Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients sav@commande.eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription