BT36 - COBOL Programming for New Developers - 10 Days

View Dates and Locations

Course Description

This 10 day version of our COBOL programming course is intended for delegates new to IT, such as new developers, apprentices and graduates. It runs at a slower pace than the 5 day version, incorporating additional time to discuss topics such as programming concepts, program structure and design, data storage, testing, test plans and debugging. Over the 10 days, the delegate will write approximately 10 COBOL programs which contain the full set of COBOL verbs.


Pre-requisites

None.


Objectives

Whilst covering the basics of COBOL programming and how it is used, this course also aims to give an insight into structuring COBOL programs, COBOL verbs, manipulating data, and testing COBOL programs.

On completion of this course the student will be able to:

  • Develop structured COBOL programs
  • Understand and use COBOL verbs
  • Understand data storage concepts
  • Manipulate strings
  • Manipulate numeric data in various formats
  • Code conditional programming logic
  • Use COBOL looping constructs
  • Perform file manipulation using READ, WRITE, REWRITE and DELETE
  • Develop COBOL programs using the available verbs
  • Develop and test COBOL print programs
  • Produce reports
  • Access different types of files

Environment

Development will be performed on a Windows platform using the Fujitsu COBOL compiler.


Customisation

For on-site courses (i.e. at your premises), we are more than happy to tailor the course agenda to suit your exact requirements. In many cases, we are able to build your in-house standards and naming conventions into the delivered course.

On-site course enquiry (from £165 pp per day)

Course Details

View Dates and Locations

DAY 1
COBOL OVERVIEW
Introduction to COBOL Program Development
Introduction to COBOL
Input of Source Code - 80 byte records
COBOL Program Divisions
IDENTIFICATION DIVISION
Identification Division statements
DATA DIVISION
File Section
File Definitions
Working Storage Section
Declaring Variables
Simple Picture Clauses
Initialising Variables
PROCEDURE DIVISION
Sections and Paragraphs
Program Termination - GOBACK and STOP RUN
Procedure Division Statements
Program Structure
PROGRAM FLOW
Perform Statement
Simple looping constructs
If Statement
MANIPULATING VARIABLES
Move Statement
Add Statement
Subtract statement
ACCEPT system input
DISPLAY statement
PERFORM UNTIL statement

DAY 1 EXERCISES
PROGRAM 1 - Displays HELLO WORLD message
PROGRAM 2 - Allows a number to be read (via ACCEPT). Displays all numbers from 0 to the number entered. Program is modified to display both ascending and descending orders.

DAY 2
MANIPULATING VARIABLES
Move Statement
Arithmetic Manipulation
Multiply Statement
Divide Statement
Compute Statement
Exponentiation
PERFORM VARYING
PERFORM n TIMES
IF statement
Evaluate Statement
Simple Program Structure

DAY 2 EXERCISES
PROGRAM 3 - Similar to program 2 but displays a message if the number displayed is divisible by 3 or 5.
PROGRAM 4 - Age calculation. Values for DAY, MONTH and YEAR are entered. Values are validated. Error messages are displayed if invalid. Valid dates result in an AGE being displayed.

DAY 3
ENVIRONMENT DIVISION
File definition
DATA DIVISION
Level numbers
Structures
Filler
PROCEDURE DIVISION
Sections and Paragraphs
FILE ACCESS
Opening Files
Closing Files
Read Statement
Write Statement
File Status testing
FURTHER PROGRAM STRUCTURE
Splitting code into paragraphs / SECTIONs
PROGRAM TESTING
Test plan

DAY 3 EXERCISES
PROGRAM 5A - A FILE is read sequentially. Simple data manipulation takes place. Manipulated records are written to an output file. Separate SECTIONS are used to OPEN, CLOSE, READ and WRITE.

DAY 4
ACCEPT DATE Statement
DATA DIVISION
Level 88's
COMP and COMP-3
PROGRAM FLOW
In-Line Perform Statements
Evaluate Statement
PROGRAM TESTING
Test plan

DAY 4 EXERCISES
PROGRAM 5B - Validation is added to the program. Level 88s are used to validate values. Valid records are written to an EXTRACT file. Invalid records are written to an ERROR file.
PROGRAM 5C - Date validation is added to the program. Dates held on the input file are compared to CURRENT DATE. Dates in the future and dates which are more than 50 years old are written to the ERROR file. Invalid dates are written to the ERROR file.

DAY 5
Copying external code
COPY REPLACING
MANIPULATING VARIABLES
Duplicate variable names
Group Moves
Move Corresponding
DATA DIVISION
Redefinitions
Picture Clauses
Special Picture Clauses for Printing
FILE ACCESS
Writing reports
Carriage Control Characters
ACCEPT parameter

DAY 5 EXERCISES
PROGRAM 6A - A sorted version of the EXTRACT file is read sequentially and used to produce a report containing control breaks, page breaks and totals.

DAY 6
DATA DIVISION
The Occurs Clause
Defining Working Storage Arrays
MANIPULATING VARIABLES
Set Statement
TABLES AND DATA SEARCHES
Referencing Table Elements
Multi-Dimensional Tables
Searching Tables
Binary Searches

DAY 6 EXERCISES
PROGRAM 6B - An array of 10 values is added to the program. EXTRACT records which match records held in the array undergo special processing.

DAY 7
SUBROUTINES DAY
Pass by reference
Pass by value
Writing a Subroutine
Executing a Subroutine
Calling a subroutine
MANIPULATING VARIABLES
Reference Modification and Substrings
Symbol Evaluation
String Statement
Unstring Statement
Inspect Statement

DAY 7 EXERCISES
PROGRAM 7A - A subroutine used to reformat a character string, removing a comma and switching the position of the data either side. This program is then CALLED from PROGRAM6.
PROGRAM 7B - A subroutine used to validate a date and calculate an age. This program is then CALLED from PROGRAM6.

DAY 8
MERGE / MATCH Processing day.
Logic is discussed together with design and test plans.

DAY 8 EXERCISES
PROGRAM 8 - MERGE / MATCH processing. 2 ordered files are read and matched together, merging the results into a single output file.

DAY 9
INDEXED FILES
Reading INDEXED records
Writing INDEXED records
Rewriting INDEXED records
Deleting INDEXED records
Sequentially Reading INDEXED files

DAY 9 EXERCISES
PROGRAM 9 - INDEX FILE processing. The EXTRACT file created earlier is used to WRITE, REWRITE and DELETE records against a master INDEXED file. The INDEXED file is also read sequentially.

DAY 10
VARIABLE LENGTH FILES
How Variable Length records are stored
Reading Variable Length records
Writing Variable Length records

DAY 10 EXERCISES
PROGRAM 10 - VARIABLE LENGTH FILE processing. Using the EXTRACT file created earlier, a variable length file is created.
PROGRAM 11 - VARIABLE LENGTH FILE processing. The VARIABLE LENGTH file created by PROGRAM 10 is read and processed.


Availability

Course Enquiry