Bootcamp

Sample of customised program for a particular company. This program can be modified in different ways such as replacing IMS with CICS and adding or subtracting from materials presented such as DB2.

Week / Day

Topic

Content

Documents / Exercises

KISS

Keep it simple stupid!

1.1

Introduction to the Mainframe

SYSPLEXES / LPAR�s

Mainframe Training Introduction.docx

DASD

zOS / MVS / TSO / ISPF

Batch versus Online

What is JCL?

SOA (Systems Orientated Architecture)

Datasets

Sequential, GDG, VSAM (INDEXED / RELATIVE) & PDS

How to create datasets using ISPF 3.2 based on an existing dataset

(h0.docx) MF Theory - ISPF Commands.docx + MF Theory - QSAM File Allocation.docx

Dataset information

ISPF

START for new ISPF panel

SWAP LIST to see all panels

SWAPBAR for list of panels on bottom of screen

SWAPBAR OFF to end display of list of panels on bottom of screen

Settings / PANELID ON / Home Key / Function Keys / Line Commands / Saving ISPF Settings

DASD & SPACE

Tracks / Cylinders / SECTORS / Blocks / Directory Blocks

Calculate space required for a given number of programs of a particular size

LRECL / BLOCKSIZE / SPACE / EXTENTS

3380 vs 3390 DASD

1.2

FTP

How to upload ASCII files from PC to mainframe.

MF Theory - FTP from PC to Mainframe.docx

EBCDIC & ASCII

Introduction to Cobol

Sample program to be used as basis for a standard program.

Remove all redundant code and keep working storage section headings and sample of main program code using ESUPR48.TXT as a basis.

Introduction to programming standards.

CCA Mainframe Programming Standards v1.0.DOCX

Cobol Program Structure

MF Theory - Cobol Program Structure.docx

Naming sections work areas and sections.

Use VERBS & NOUNS. Be consistent. No use of INP or OUT.

File Control Section / File Description Section

Extra: https://condor.depaul.edu/jpetlick/COBOL.html

Sequential Files

Difference between F, FB and FBA

FBA�- is a "print"�file format, normally 133 bytes in length with 132 printable characters where the first character is a carriage control. When in Browse mode on a�file�with this�format, the first column is not shown. (RECORD FORMAT)

Convert FBA file to FB file using SORT

Convert FBA to FB File using SORT.docx

Overview of Cobol Programming Language

Working Storage: NUMERIC & CHARACTER FIELDS

7078941-Eds-Cobol-Training.pdf

Create Template

esupr48.txt

1.3

Overview of Cobol Programming Language

PROCEDURE DIVISION structure: Initialization / Mainline / Finalization / GOBACK

PROFILE NUMBER DISPLAY COBOL to NUMBER OFF (for correct code line numbers)

BASIC Cobol commands / Multiply / Divide

(h22.docx) MF Theory - Cobol Divide + Multiply.docx

STRING command DELIMITED BY / UNSTRING

https://www.mainframestechhelp.com/tutorials/cobol/string-statement.htm

Numeric & Character MOVES

Continuation

First program exercise: MOVE / ADD / DISPLAY.

MF Exercise 1 - Simple Moves.docx

GOBACK / STOP RUN / EXIT

GOBACK STOP RUN EXIT.docx

ISPF

Allocate Datasets using 3.2 dataset model

Basic Cobol program structure

MF Theory - Cobol Program Structure.docx

ISPF Primary Commands for editing source

MF Theory - ISPF Commands.docx

ISPF Function Keys

ISPF Line Commands

ISPF Block Commands

ISPF Miscellaneous Commands

Saving PROFILE in ISPF.

Data representation

HEX / Binary / EBCDIC / ASCII

ENDEVOR

PROCESSOR Types

Endevor Basic Training.docx

SCL

Add / Update program to TEST

SOURCE: PWDS1.SPOCM.TEST.SORC / MF Theory - Endevor - ADD + UPDATE + TYPES.docx

Development LEVELS: TEST / HOLD / PROD

$WDS1SPO

LOAD Libraries / LOAD Modules

Endevor copybooks: COC System / programs: EEA system / DB2: EBA

Importance of program name

1.4

Cobol

Review Cobol exercise 1 & Endevor results in SDSF

PROCEDURE DIVISION code

7078941-Eds-Cobol-Training.pdf P.56

PERFORM UNTIL / PERFORM VARYING

(h4.docx) MF Theory - Cobol Perform UNTIL + VARYING.docx (rewrite)

INSPECT / TALLYING

https://www.mainframestechhelp.com/tutorials/cobol/cobol-inspect-statement.htm

EVALUATE FIELD / EVALUATE TRUE

Program structure: Positional vs Functional Hierarchy

https://www.tonymarston.net/cobol/cobolstandards.html

"Derivative labelling".

PROCEDURE DIVISION file handling

7078941-Eds-Cobol-Training.pdf p.87 - p.100

File Status

View sample student code mutprg07

88 Levels

JCL

Creating a JCL library.

Basic JCL: Columns / Name / OPERATOR / OPERAND.

https://www.mainframestechhelp.com/tutorials/jcl/coding-sheet.htm

Jobcard: MSGCLASS / MSGLEVEL(1,2) / CLASS / NOTIFY / TIME / &SYSUID.

https://www.mainframestechhelp.com/tutorials/jcl/jcl-msgclass-parameter.htm

https://www.mainframestechhelp.com/tutorials/jcl/class-parameter.htm

https://www.mainframestechhelp.com/tutorials/jcl/msglevel-parameter.htm

Basic JCL to execute program / SUB / EJCK

One space should exist between the operation and the operand - JCL-INTRO-SAMPLE.txt

JCL

Coding sheet

https://www.mainframestechhelp.com/tutorials/jcl/coding-sheet.htm

Rules

1. // IN FIRST 2 COLS

2. * IN COL 3 MEANS COMMENT

3. COL 3-10 IS FOR NAME FIELD (DD NAME, JOB STEP NAME)

4. COL 11 HAS 1 SPACE AFTER THE NAME

5. DD, EXEC STATEMENT BEGIN IN COL 12-15

6. COL 16 ONE SPACE AFTER DD NAME, EXEC

7. COLS 17-71 HAS OPERANDS

1.5

JCL

DISP / STATUS / DCB / SPACE

https://www.tutorialbrain.com/mainframe/jcl_disp_parameter/

Allocate Datasets using JCL

(h4.docx: DISP / STATUS) MF Theory - QSAM File Allocation.docx

Cobol

Second program exercise: Salary Input / Output; Calculate employee Salaries.

MF Exercise 2 - Employee Salaries.docx (p43. Standards for Input File read)

Approach to coding

Always start with the data and compare to layout and requirements

File Status

SWITCHES

88 LEVELS

Priming Reads

Logic flow of processing input file

MF Theory - How to process a sequential file.docx

File Control Coding

Code Controlled ABEND in Cobol

Example in program and GM standards: CCA Mainframe Programming Standards v1.0.DOCX Cobol Abend Processing Code.txt

Structured English

Document on 3 elements of a structured program. No GO TO's. Minimum switches. MF Theory - JSP Structured Programming.docx

Structured english of exercise

We break it down in validation + switch plus processsing. (see Exercise 2 supplement - to be redone)

Use 3.2 to create student input file of SYS4 salary input file

Cobol

2nd Review of 2nd exercise again to cover file control, file status, file description, switches, read section, work areas, accumulators and program abend.

2.2

Cobol

Review Abend handling

Review code 2nd Exercise

Unit Testing

Introduction to UNIT Testing

Software Testing Foundation Handbook.pdf / Test all branches of a program

Types of Testing: UNIT / INTEGRATION / FUNCTIONAL / SYSTEM / REGRESSION / PERFORMANCE / VOLUME / UAT

https://devops.api.compuware.com/guidelines/ttt/ttt_best_practices.html

JCL

Review JCL for program 1 and program 2

2.3

Cobol

Review code 2nd Exercise

MF Exercise 3 - Salary Report.docx (Use DUP to copy input file)

Cobol

Third Program Exercise: Reports

Create structured english together

IEFBR14

Delete output files at start of job using MOD & SPACE

https://www.ibm.com/docs/en/zos-basic-skills?topic=utilities-iefbr14-utility-do-almost-nothing

Delete files if they exist

Return code is zero.

Set MAXCC does not work with IEFBR14 as it does not action it.

Cobol Mainframe Reports

Reports + Edited PIC Clauses:

Carriage control

(h6.docx) MF Theory - Cobol Reports + Special Edit Picture Clauses.docx

Special insertion editing

Floating insertion editing

Zero suppression and replacement

Use of ALL '-'

Mock up of report file layout using CC and COLS with 133 characters

NUMBERS ON / UNNUMBER for numbers on RHA

JCL

Create JCL for exercise 3

Structured Programming

Sequence, Selection & Iteration

MF Theory - JSP Structured Programming.docx

Worked example program 3 (print report program)

MF Exercise 3 - Salary Report.docx (Use DUP to copy input file)

Review program 2

2.4

ISPF

Use of locators .a .b etc

Use of FIRST e.g. F 'SECTION' FIRST

NUM ON RENUM UNNUM NUM OFF

Num on/Renum will ensure all lines have line numbers. UNNUM removes them all and num off ensures your edit profile for the dataset won't add numbers back in.

SRCHFOR

Cobol

How to create mock up of report file Exercise 3.

ACCEPT DATE

h5.docx (MF Theory - Cobol ACCEPT FROM DAY DATE TIME.docx)

ACCEPT TIME

Complete program 3

Data Types:

NUMERIC / Packed Decimal COMP-3

h4.docx (Packed Decimal) MF Theory - SORT + Data Types.docx

PACKED DECIMAL FORMT DISCUSSION

http://www.simotime.com/datapk01.htm

ZONED DECIMAL

BINARY

http://www.simotime.com/databn01.htm

Binary to Decimal calculator

https://www.rapidtables.com/convert/number/binary-to-decimal.html

HEX ASCII & EBCDIC

https://www.cs.umd.edu/~meesh/cmsc311/clin-cmsc311/Lectures/lecture6/ebcdic.html

HEX to EBCDIC Calculator

http://mcraigweaver.com/ebcdic.htm

2.5

GDG's

GDG Definition

https://www.tutorialbrain.com/mainframe/gdg_in_jcl/

IDCAMS

Define GDG

GDG Model: use name of any file to inherit its characteristics via DCB = file name

Replace DCB=parameters with DCB=filename

JCL

COND CODE / IF ELSE ENDIF in JCL

https://www.tutorialbrain.com/mainframe/cond_in_jcl/

Diff between Job Step COND and Job COND

(h62.docx) MF Theory - JCL COND CODES.docx

COND CODE / IF ELSE Exercise

COND CODE exercise doesn't work - convert to IF-ELSE exercise]

PROCEDURES: Instream & Cataloged (to be done)

https://www.tutorialspoint.com/jcl/jcl_procedures.htm

JCL

IEBGENER for copying sequential files

https://www.mainframestechhelp.com/utilities/iebgener/

IEBCOPY for copying PDS files

https://www.mainframestechhelp.com/utilities/iebcopy/

Prepare JCL for third exercise

MF Theory - IEBGENER + IEBCOPY.docx (h8.doc)

3.2

Cobol

Static & Dynamic Calls

(h14.docx) MF Theory - Cobol Linkage Section.docx

Linkage Section

MF Theory - Cobol Static + Dynamic Calls.docx

INSPECT / TALLYING (to be done)

INSPECT / REPLACING (to be done)

Cobol

Fourth exercise: Calculate using 2-D table for each merchant within city

MF Exercise 4 - Quarterly Sales.docx

Tables

MF Theory - Cobol 2 Dimensional Tables.DOCX + MF Theory - Cobol 2-D Table Example.docx (h8.doc)

Explain how City and Merchant are used to set the subscript for adding the quarterly sales to table.

Initialize Tables

Structured english

Prepare Test Files: backup input to GDG

3.3

Quiz: Lessons from Day 3.2

IF / ELSE in JCL Exercise completion & review

Cobol

Review code to check students initialising table correctly

Mainframe Abend Codes

MF Theory - Important SQL CODES and ABEND Codes.doc

Fault Analyser

Compiled listing = Footprint

Finding an abend instruction using HEXLOC & OFFSET

MF Theory - Locating Abending Instruction in Program.docx / SOC7 Error - Modify input data from numeric to character

Option L for Footprint

OFFSET gives us HEXLOC in Footprint

3.4

SUBSCRIPT VS INDEXED BY

https://www.mainframestechhelp.com/tutorials/cobol/differences-between-subscript-and-index.htm

SEARCH

http://www.mainframegurukul.com/tutorials/programming/cobol/cobol-search.html

SEARCH ALL

http://www.mainframegurukul.com/tutorials/programming/cobol/cobol-search-all.html

Q. Can we use subscript with SEARCH & SEARCH ALL?

No as SEARCH ALL cannot use subscript for binary search and the WHEN clause needs to vary the array item in the search.

SEARCH VS SEARCH ALL

https://www.techagilist.com/mainframe/cobol/search-vs-search-all/

Exercise 4A

Modify Ex 4 touse INDEXES and add a linear search with multiple WHEN clauses.

Add subroutine to Calculate average quarterly sales for each city / merchant combination

MF Exercise 5 - Average Quarterly Sales.docx

3.5

VSAM

VSAM Components: Cluster / Control Area / Control Interval

vsam_tutorial.pdf (REVIEW BEFORE CLASS)

VSAM Structures

MF Theory - VSAM Structures - KSDS ESDS RRDS.docx

IDCAMS / DELETE / DEFINE CLUSTER / REPRO

MF Theory - VSAM DEFINE CLUSTER + REPRO.docx

SHARE OPTIONS

https://ibmmainframes.com/about43098.html

Primary Index Vs Secondary Index

MF Theory - VSAM ALTERNATE INDEXES.docx

Create VSAM file for City Codes

Cobol

VSAM INPUT and OUTPUT statements

https://www.ibm.com/support/knowledgecenter/SS6SG3_6.3.0/pg/tasks/tpvsm18.html

Recording mode not used with VSAM. Only for SEQUENTIAL files.

Coding VSAM statements in a Cobol program

03 - VSAM KSDS and COBOL.ppt

Differences between File Control / FD for normal sequential files and VSAM files.

Sequential Files

Cannot open for I-O

DISP=MOD

VSAM Commands

ALTER

https://www.tutorialspoint.com/vsam/vsam_commands.htm

REPRO

MF Theory - VSAM LISTCAT + VERIFY.docx

LISTCAT

EXAMINE

VERIFY

DELETE

https://www.ibmmainframer.com/vsam-tutorial/vsam-delete-cluster-syntax/

Cobol

Opening Files: Input / Output / Extend / I-O

4.1

JCL

SORT Data Types / Parameters / ZD / FS

MF Theory - SORT + Data Types.docx

SORT FIELDS / INCLUDE COND / SUM FIELDS

Review of hexadecimal representation of data: Packed Decimal / Zoned Decimal

UNIT Testing

Testing all sceanarios in the code.

Software Testing Foundation Handbook.pdf

3.12 for SUPERC Sequential File Compare & E.FM.3.11 for File Manager VSAM File Compare

4.2

Cobol

Calculate Invoice Totals for each cutomer: invoice & customer files.

MF Exercise 6 - Invoice Details.docx

Priming read of both files: inner and outer read of files

Program ends whenever we reach the end of either file.

If driver # to invoice # => process invoice

Create structured english document.

If driver # < invoice # => read driver

Create unit test plan.

If driver # > invoice # read invoice

4.3

Cobol

Review structured english

Customer #'s are validated via the sort. Only need to validate invoice amount.

Review code

J17 Program Unit Test Plan.docx

Review results

UTP-ASJPRO06.xcl

Missing customer nos in Driver file: 1089, 1230, 1655, 1535, 1554, 1444

* Never perform a section until it is needed i.e. don't do a check in the section if it can be done before.

4.4

JCL

Copy input file for Ex 7 using IEBGENER

MF Exercise 7 - Stock Control Update.docx

Create VSAM master file from sequential file data

Cobol

Create structured english for Stock Control Update exercise using multiple input file layouts

26+4 record length RDW record descriptor word

Single file multiple record layouts and 88 levels

(h22.docx) MF Theory - Cobol Variable Files.docx

Create copybook layout with header record for Ex 7

Program the correct FD for a variable length record file of 12 to 26.

Abend on reading STOCK INPUT record due to an 11 byte input record. Should be 12 bytes.

Cobol

Create flow chart of Driver exercise to distinguish bettwen code and structure.

Read is not for coding!

4.5

Unit Testing

Review test plans.

Check headings on test plan

Testing all sceanarios in the code

Software Testing Foundation Handbook.pdf

3.12 for SUPERC Sequential File Compare & E.FM.3.11 for File Manager VSAM File Compare

SDSF

Using XDC on SDSF / SE

Discuss issue of looping and use of TIME=(0,1) in JCL, SYSOUT=*,OUTLIM=10000

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.2.0/com.ibm.zos.v2r2.ieab600/iea3b6_Examples_of_the_TIME_parameter.htm

Cobol

Review VSAM creation by individuals

Call it STOCK-INPUT and STOCK-MASTER.

Walk through structured english

Review copybook creation in Exercise 7

Ensure STOCK INPUT HEADER record is 12 bytes.

Review code and results finished while others continue.

Those finished do unit test plans.

SORT

Create reject set of records and COUNT

SORT with count of total records

SORT with count of valid records

VSAM

Alternate Indexes (to be done)

MF Theory - VSAM Alternate Indexes.docx

Test

Review questions (to be done)

5.1

Hierarchical vs Relational Databases

Hierarchical model: advantages and disadvantages

https://www.tutorialspoint.com/Hierarchical-Database-Model

Relational model: advantages and disadvantages

https://www.tutorialspoint.com/Relational-Database-Model

DB2

Data Normalization

https://www.guru99.com/database-normalization.html

http://www.gitta.info/LogicModelin/en/html/DataConsiten_Norm3NF.html

DB2 data types & how they compare to Cobol data types - INTEGER, SMALLINT, CHAR & DECIMAL

Change link - confusing. https://www.tutorialbrain.com/mainframe/data_types_in_db2/

DB2 Date Time Timestamp

https://www.microfocus.com/documentation/enterprise-developer/ed40pu5/ETS-help/GUID-46320801-3CD0-43F0-9BDC-7F7F08B35314.html

Binary fields PIC 9 COMP and 1 bit sign

Convert binary to decimal

https://www.calculator.net/binary-calculator.html

Table storage structure (advanced)

https://www.mainframestechhelp.com/tutorials/db2/db2-table-storage-structure.htm

DB2 Tutorial: begin with Topics covered - end with data types

https://www.tutorialbrain.com/mainframe/db2_tutorial/

Check this out: https://www.db2tutorial.com/db2-basics/

DB2I

SPUFI

Generate a DCLGEN

DB2 DCLGEN + COMPILATION PROCESS + DATA TYPES.docx

5.2

DB2

SQLCA and common SQLCODES

https://docs.actian.com/ingres/11.0/index.html#page/SQLRef/SQL_Communications_Area_(SQLCA).htm Important SQL CODES and ABEND.docx

CURSOR OPEN FETCH CLOSE and similarity to processing sequential file

DB2 Cursor�builds a results table to hold all the rows retrieved by executing a SELECT statement.

Stand alone select in DB2 program

DB2 exercise: use cursor to return a small set of rows, keep a count and at end compare with a stand alone select (*).

Sample program FPIPU64 on AHIN

DB2 Program: example EBAPR56

Working Storage:

1. DB2 Work Areas at end of working storage

2. DB2 INCLUDES (Table DCL's that we created)

3. DB2 Communication area (SQLCA)

4. End of working storage

You need to add a member of type DDLTD2 into Endevor:

Procedure Division:

GRANT� EXECUTE ON PLAN ZK5PCT01 TO PUBLIC;

1. Open cursor

We need to use the table view. Otherwise it wont compile:

2. Fetch cursor

Table name: W014502

3. Close cursor

Table view: FPIT002 PWDS1.SPOCM.PROD.INCL(FPIT002)

A simple SQL statement:

DB2 exercise in JCL of SQL - sample code on right hand side screenshot

SELECT * FROM WDDBD2.W014502; (returns 7 rows)

5.3

DB2

DB2 Compilation Process

https://topictrick.medium.com/cobol-db2-compilation-process-11916a4ea366

Importance of Timestamp

A package contains control structures that DB2� uses when it runs SQL statements. An application plan relates an application process to a local instance of DB2 and specifies processing options. Packages are produced during program preparation.

DB2 JCL

Execute SQL in JCL (DSNTIAUL data sets.docx)

SYS4.CORE.JCL(MDOPMR36)

Execute DB2 program

PWDS1.SPOCM.PROD.PROC(DB2BTLEM) / SYS4.CLASS.JCL.MAR(MUTPRG09)

COUNT(*) S9(4) COMP SMALLINT 2 bytes

SELECT *

FROM WDDBD2.AVZ1_AHINIM15_V_RL2ASSEM

WHERE RL2ASSEM_PART_NBR_KEY < 100

PWDS1.SPOCM.TEST.INCL(EEAT001)

Quiz

5.4

IMS

Intro: Demo FM for IMS (segments/databases), DINPU97 pgm PSB (PCB's+default PCB for ENTRY+PCB's for checkpoint), Show PSB in Endevor, PROCOPT, set up FM for IMS with views, segment copybooks

Look at program code, FM IMS, PSB in Endevor, copybooks of segments

5.4

Overview of IMS

https://www.tutorialspoint.com/ims_db/ims_db_overview.htm

IMS DBD Definition

https://www.mainframestechhelp.com/tutorials/imsdb/imsdb-database-description.htm

JCL PROCS: DLIBTLEP & MDLDBTLE

Executing an IMS Program.docx

// JCLLIB ORDER=(PWDS1.SPOCM.PROD.PROC)

PSB / PCB

MF Theory - IMS PSBs and PCBs and TPPCB.docx / MF Theory - IMS Program Notes.docx

SSAs

Command codes

MF Theory - IMS SSAs.docx / https://www.tutorialspoint.com/ims_db/ims_db_data_retrieval.htm

Multiple qualifications

Segment & SSA copybooks

File Manager for IMS: view database online

IMS Calls

GU / GN

https://www.tutorialspoint.com/ims_db/ims_db_data_retrieval.htm

Status Codes

https://v8doc.sas.com/sashtml/imsdi/zlicalls.htm

Cobol

BMP vs DLI program

MF Theory - IMS Program Notes.docx

IMS Exercise to read a particular row in a particular segment using 2 levels of SSA's

MF Exercise 13 - IMS Template.docx

CBLTDLI / Linkage Section / ENTRY

DLI program PFMPE04

5.5

Catch up day

Use of switches

EOF

VSAM READ

VALIDATION

Don�t do calculations in file layouts.

Test Preparation

6.1

Test

6.2

IDZ

IDZ (IBM Developer for z Systems) setup

MF Theory - IDZ setup.docx

IDZ LPAR connections

IDZ LPARS Connection Details.EXCEL

IDZ Features for zOS Projects

MF Theory - IDZ Features for zOS Projects.docx

Run JCL of exisitng program in IDZ

6.3

IEBGENER

Copy sequential file with reformatting exercise

MF Exercise - IEBGENER Date Reorder Exercise.docx (Theory & answer)

SORT

Insert sequence field

SORT + Data Types.docx (Adds sequence numbers to inpout)

https://www.techagilist.com/mainframe/seqnum-use-sort-jcl/

Dataset utilities

https://www.lascon.co.uk/zOS-file-utilities.php

6.4

Review Test

Review standards in final program.

Discuss 8, 9 and 10.

In between revision and correction carry out flowcharts and structured english.

Structured English for Exercises 8, 9 & 10.

MF Exercise 10 - Process Book Orders.docx

Break down code into tasks. Secondary tasks appear in lower level.

VSAM verify.

6.5

Wrap up

Delete all code added to Endevor.

Walk through of students structured english.

Go through next exercise 30

Walk through of students JCL.

Continue with IMS program

Walk though of start of coding.

Discussion on use of DISP for VSAM master file.

WDS1SPO

Discussion on parameter substitution into PROC.

EBA = DB2

Work on coding.

COC = copybooks

Notification of 20 question exam test

EEA = cobol

Check the results based on the input.

Extras

Easytrieve/Plus

Record types U

http://www.longpelaexpertise.com.au/ezine/RECFMU.php

JCL DD Statement

https://www.tutorialspoint.com/jcl/jcl_dd_statement.htm