| Oakwood Computing Ltd 1 Dornton Road South Croydon Surrey CR2 7DR UK Tel: +44 (0) 20 8686 7266 courses@oakwoodcomputing.co.uk |
| Updated 11 November, 2003 |
Contents: Top
Objectives
Introduction to COBOL
Language standards, LE COBOL, ANS 85, ANS 74, ANS 68; compilation options
and procedures. Program structure: IDENTIFICATION, ENVIRONMENT, DATA, PROCEDURE
divisions; reserved words; syntax: data names, sentences, statements, clauses,
paragraphs, sections; comments; a sample program.
Getting started
Specifying the IDENTIFICATION DIVISION and ENVIRONMENT DIVISION; program name;
SPECIAL-NAMES contents, multiple currency signs; FILE-CONTROL contents: SELECT
statement for standard files and alternate indexes.
Defining data
DATA DIVISION structure: FILE, WORKING-STORAGE, and LINKAGE sections; file
descriptions; record descriptions; data item descriptions: level numbers,
elementary and group items, data types, PICTURE, SYNC, REDEFINES, VALUE, FILLER,
repeated structures, 88 levels; 31-digit decimal support, COMP-5.
Basic processing statements
Imperative and conditional statements; data movement: MOVE, ACCEPT; conditions:
relational, logical, condition-names.
Compiler input and output
Compilation options; COPY statement, DATAMANAGER, LIBRARIAN, ENDEVOR; PANVALET;
compilation output and error messages; object program structure.
Arithmetic statements
Data types; error handling; ADD, SUBTRACT, MULTIPLY, DIVIDE, COMPUTE.
Printer files
Edited picture fields; line counts, page counts; WRITE AFTER PAGE.
File handling
Opening and closing files; ACCESS clause and its implications; READ, WRITE,
DELETE, REWRITE, START, READ NEXT; alternate indexes; return codes; dynamic
file allocation.
Controlling program flow
Program termination: STOP RUN, GOBACK; GO TO, PERFORM, EXIT; NEXT SENTENCE;
GO TO DEPENDING.
Table handling
OCCURS clause, defining table entries; indexed vs subscripted tables; SET
and SEARCH statements; loading tables with data; variable length tables.
Modular programming
CALL statement and parameters; LINKAGE SECTION and parameter specification;
GOBACK, EXIT PROGRAM, ENTRY, CANCEL, the USING clause; FUNCTION calls.
Advanced features
SET condition names; INSPECT; STRING; UNSTRING; setting condition codes.
Internal SORT
Sort file description; INPUT and OUTPUT procedures; SORT and MERGE statements;
RELEASE, RETURN.
Dumps and debugging
JCL and compilation options: SYSDBOUT, SYSOUT, SYSUDUMP; typical causes of
dumps.