Transcript Lecture # 1

Azmat Bhatti
[email protected]



Two Mid-Term tests (40%)
Two Assignments (30%)
One Final Exam (30%)




Traditional Structured Programming & Design
Techniques.
Transactional Processing
How to use our DB2 skills learned in IBC233
Learn some COBOL syntax!
◦ Maintain Legacy systems

IPC144
◦ Transaction processing
◦ Arrays

IBC233
◦ Interactive screens

OPS400
◦ iSeries IBM AS/4000 System
IBM Midrange Computer
zeus.senecac.on.ca
History of AS/400
1983 - 1994
System 3
1969 - 1985
System 32
1975 - 1984
System 34
1977 - 1985
System 36
System 38
1980 - 1994
AS/400
1988 - present
iSeries
2000 - present
system i
2005 - 2006
i
2007
Power Systems 2008
IBM i
2014
IBM iSeries AS/400 Overview
MATRIX
ZEUS
(Power
Systems)
PCs in
the Lab
Fire
Wall
PCs at
Home




Telnet doesn’t work - doesn’t support system i
Function Keys
Rational Developer (RDI)
Client Access (Available from CS Students
Download site at Seneca)
Mochasoft (at home)
◦ Available for download from the CS site.
◦ Select Software for Windows ‘95 and look for
MOCHA
◦ Or from http://mochasoft.dk/ 30 days trial
version. Uninstall and download again after 30
days or pay for the full version.
Facts about ibm i
 Operating System (OS/400, i5/OS)
 Object-Based
 Everything that takes up space and has a description
is an object
 Types of Objects include:

–
–
–
User Profiles
Job Queues
Files
Programs
Traditional ibm i Data Storage
Hierarchy
Library
Objects
Members
contain data Files only
Traditional IBM i Data Storage Hierarchy
Azmat - *LIB
BAC344LIB - *LIB
Object1
*PGM
QCBLLESRC
*FILE
PGM1
Object2
*OUTQ
Object3
*FILE
Object4
*JOBQ
OPS400 - *LIB
OPS400
*OUTQ
PGM2
QCBLLESRC
*FILE
PGM3
PG1
PGM1
*PGM
PG2
PGM3
*PGM
PG1
*PGM
Library Lists
• Each job has an attached Library List
• Different Types of Libraries:
– System: IBM Supplied
– Product: Added automatically when an IBM product is used
– Current: Defined by an individual user ID
User ID’s default Library
– User:
Non-IBM Supplied Libraries
Created by Business to organize programs, files, etc.



Object used to organize data storage.
Are different for each student.
Get set back to your “default” when you
signoff.
IBM i finds Objects
• Qualified Names
Library/Object
BAC344LIB/QCBLLESRC
• Using Library Lists!
How are Library Lists sequenced?
System vs Subsystem
• System = ZEUS
• Subsystem is a logical grouping of
resources such as QINTER, QBATCH etc
etc.
IBM DB2/400 on the IBM i







PF
PF
PF
PF
holds data
consists of record format
consists of file/field definitions
may hold KEY fields
LF is a view to a selection of subset of data
LF does not hold any data
LF has KEY fields defined with Ascending or
Descending or other options
Control Language
CL Syntax
Command-name
(space) parameter
Keyword vs Positional Notation
Keyword
WRKOUTQ OUTQ(PRT01)
CRTLIB LIB(STUDENT1) +
TEXT(‘Student1 Library’)
Positional
WRKOUTQ PRT01
CRTLIB STUDENT1 *PROD ‘Student1 Library’
Naming of Commands
• Based on English!
• Combination of Verb and Noun
CRTLIB
Create
Library


Use Menus to find the command
Use F11 and Help to find the Syntax


STRPDM
Look at SEU
Week 1 - 2nd Lecture
Intro to COBOL Programming
Defining Files and Processing Data







How does a compiler work?
Creating a COBOL Program
Parts of a COBOL Program
The Perform Statement
Defining Files
Defining Variables
COBOL Verbs

Translate programs written by humans into
Machine Language Code.
Source
Code
QCBLLESRC
(PGM1)
Compiled
Listing
(PGM1)
COBOL
Compiler
Program
Object
(PGM1)
1. Create a Source Physical File - QCBLLESRC
2. Create a Source Member in the Source
Physical file with the type CBLLE
3.
Type in the COBOL code using SEU
4. Exit & Save
5. Compile


Designed by the US defense department
Meant to be English like for ease of
maintenance
COmmon Business Oriented Language




Identification Division
Environment Division
Data Division
Procedure Division
(See Page 51 of your text)
IDENTIFICATION DIVISION.
PROGRAM-ID. program-name.
[AUTHOR. [comment-entry] … ]
[INSTALLATION. [comment-entry] …]
[DATE-WRITTEN. [comment-entry] …]
[DATE-COMPILED. [comment-entry] …]
[SECURITY. [comment-entry] …]

Required
◦ Name of the Program in the Program-ID paragraph.

Optional
◦
◦
◦
◦
Author
Installation
Date-Written
etc.
[ENVIRONMENT DIVISION.]
[CONFIGURATION SECTION.]
[SOURCE-COMPUTER. AS/400.]
[OBJECT-COMPUTER. AS/400.]
[INPUT-OUTPUT SECTION.]
[FILE-CONTROL.]
[SELECT nice-file-name
ASSIGN to DISK/PRINTER/WORKSTATIONphysical-file-name.]

INPUT-OUTPUT SECTION is only required if
your program uses files.
◦ Contains the FILE-CONTROL paragraph





DISK
PRINTER
DATABASE
WORKSTATION
FORMATFILE
◦ similar to setting up file pointers
Select Product-File
Assign to disk-PRODPF.
Select Product-file
Assign to database-PRODPF
Access is Sequential.
Select Display-File
assign to workstation-PRDSPF
organization is transaction.
Select Display-File
assign to workstation-PRDSPF-SI
organization is transaction.
Select Product-Report
assign to printer-qprint.
Select Product-Report
assign to printer-qsysprt.
Select Product-Report
assign to formatfile-qsysprt.