The first part of this course gives the student a working knowledge of COBOL. They will also gain a solid foundation in the fundamentals of COBOL coding including program structure, design, execution and debugging. The concepts of structured programming are introduced with examples and explanation. Good programming practice is encouraged throughout. The course starts with the basics and furthers learning with hands on assignments until delegates are capable of complex programming logic and design. In the second part of the course Each delegate will write, execute and debug COBOL programs which stress the advanced features of the language. This will include multi-dimensional and variable length tables, sub-program calls and VSAM file manipulation. Programming standards and style will be addressed throughout.
Application programmers with some experience in COBOL who require formal training in the advanced language features and programming techniques in the IBM z/OS COBOL environment.
Module 1: Documentation and Ancillary Information
Material used and referenced in the course.
Module 2: Structure and Syntax
Cobol syntax, Program layout, EXIT, GOBACK, STOP.
Module 3: Compiling and Debugging
Compile and Link-edit, Cleaning up compile errors, Run-time errors, Diagnosing 0C7 abend.
Module 4: Define, Move and Initialize fields (Data Division)
Defining data/variables in COBOL, Arrays, Group items, Value clause, Redefines, COMP and COMP-3, Linkage section.
Module 5: Sequential File Processing
Using QSAM, VSAM ESDS, SELECT, FD, OPEN, READ, WRITE, CLOSE, Use of RETURN CODE, Issue User abend.
Module 6: Structured Programming
Unstructured vs structured program design, Perform instruction – simple, iterative, conditional and varying.
Module 7: Decision Making
IF – THEN – ELSE, Nested IF, EVALUATE(CASE/SELECT) 88 level, SET instruction.
Module 8: Arithmetic
ADD, DIVIDE, MULTIPLY, SUBTRACT, COMPUTE, Error handling.
Module 9: Working with Dates
Day, Date and Time functions in COBOL.
Module 10: Character manipulation
COBOL character functions, Lower-case, Upper-case, Length, Reverse, Ord, Char, String, Unstring, Inspect.
Module 11: Arrays and Tables
Defining Arrays, 2D arrays, Multi-dimensional arrays, Subscripting vs Indexing of arrays, Sequential search, Binary search.
Module 12: Sub-programs
Call instruction, Static vs Dynamic calls, GOBACK vs EXIT Program, Handling parameters, Return codes
Module 13: Indexed File Processing
VSAM KSDS, Sequential vs by Key, Open, Close, Read, Write, Rewrite, Close, Select, FD, VSAM File status
Module 14: Relative Record File Processing
VSAM RRDS, Select, FD, Open, Close, Read, Write, Rewrite, Start, Delete