1 / 44

Welcome to BAC344 Business Applications using COBOL

Welcome to BAC344 Business Applications using COBOL. Azmat Bhatti azmat.bhatti@senecacollege.ca. Term Marks Breakdown. Two Mid-Term tests (40%) Two Assignments (30%) One Final Exam (30%). About Yourself -Name -CPA or CPD program -Credit or Audit -Or Why are you here?.

quade
Télécharger la présentation

Welcome to BAC344 Business Applications using COBOL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Welcome to BAC344Business Applications using COBOL Azmat Bhatti azmat.bhatti@senecacollege.ca

  2. Term Marks Breakdown • Two Mid-Term tests (40%) • Two Assignments (30%) • One Final Exam (30%)

  3. About Yourself-Name-CPA or CPD program-Credit or Audit-Or Why are you here?

  4. Why are we studying COBOL? • Traditional Structured Programming & Design Techniques. • Transactional Processing • How to use our DB2 skills learned in IBC233 • Learn some COBOL syntax! • Maintain Legacy systems

  5. Build up on prior courses! • IPC144 • Transaction processing • Arrays • IBC233 • Interactive screens • OPS400 • iSeries IBM AS/4000 System

  6. What grade are you going to get?

  7. Power System Model 520 IBM Midrange Computer zeus.senecac.on.ca

  8. System 3 1969 - 1985 History of AS/400 System 32 1975 - 1984 System 34 1977 - 1985 System 36 System 38 1983 - 1994 1980 - 1994 AS/400 1988 - present iSeries 2000 - present system i 2005 - 2006 i 2007 Power Systems 2008 IBM i 2014

  9. IBC233 Review IBM iSeries AS/400 Overview

  10. Typical Green Screen login interface

  11. Seneca Network (simplified) and connectivity to AS/400 MATRIX ZEUS (Power Systems) PCs in the Lab PCs at Home Fire Wall

  12. Connectivity Software • 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.

  13. 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

  14. Traditional ibm i Data Storage Hierarchy Library Objects Members contain data - Files only

  15. Traditional IBM i Data Storage Hierarchy Azmat - *LIB BAC344LIB - *LIB OPS400 - *LIB QCBLLESRC *FILE OPS400 *OUTQ Object1 *PGM PGM1 QCBLLESRC *FILE Object2 *OUTQ PGM2 PGM3 PG1 Object3 *FILE PG2 PGM1 *PGM Object4 *JOBQ PG1 *PGM PGM3 *PGM

  16. 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.

  17. Library Lists • Object used to organize data storage. • Are different for each student. • Get set back to your “default” when you signoff.

  18. IBM i finds Objects • Qualified Names Library/Object BAC344LIB/QCBLLESRC • Using Library Lists! How are Library Lists sequenced?

  19. System vs Subsystem • System = ZEUS • Subsystem is a logical grouping of resources such as QINTER, QBATCH etc etc.

  20. Database IBM DB2/400 on the IBM i

  21. Physical Files vs Logical Files • PF holds data • PF consists of record format • PF consists of file/field definitions • PF 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

  22. CL Control Language

  23. CL Syntax Command-name (space) parameter

  24. Keyword vs Positional Notation Keyword WRKOUTQ OUTQ(PRT01) CRTLIB LIB(STUDENT1) + TEXT(‘Student1 Library’) Positional WRKOUTQ PRT01 CRTLIB STUDENT1 *PROD ‘Student1 Library’

  25. Naming of Commands • Based on English! • Combination of Verb and Noun CRTLIB Library Create

  26. CL Syntax • Use Menus to find the command • Use F11 and Help to find the Syntax

  27. Commands that you’ll use? • STRPDM • Look at SEU

  28. Week 1 - 2nd Lecture Intro to COBOL Programming Defining Files and Processing Data

  29. Agenda • How does a compiler work? • Creating a COBOL Program • Parts of a COBOL Program • The Perform Statement • Defining Files • Defining Variables • COBOL Verbs

  30. Compilers • Translate programs written by humans into Machine Language Code.

  31. COBOL Compiler on the iSeries Compiled Listing (PGM1) Source Code QCBLLESRC (PGM1) COBOL Compiler Program Object (PGM1)

  32. Steps to Create a COBOL Program 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

  33. What is COBOL? • Designed by the US defense department • Meant to be English like for ease of maintenance COmmon Business Oriented Language

  34. Parts of a COBOL Program • Identification Division • Environment Division • Data Division • Procedure Division (See Page 51 of your text)

  35. Identification Division

  36. Identification Division(Syntax) IDENTIFICATION DIVISION. PROGRAM-ID. program-name. [AUTHOR. [comment-entry] … ] [INSTALLATION. [comment-entry] …] [DATE-WRITTEN. [comment-entry] …] [DATE-COMPILED. [comment-entry] …] [SECURITY. [comment-entry] …]

  37. Identification Division • Required • Name of the Program in the Program-ID paragraph. • Optional • Author • Installation • Date-Written • etc.

  38. Environment Division

  39. Environment Division(Syntax) [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/WORKSTATION- physical-file-name.]

  40. Environment Division • 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

  41. Select for a Database File Select Product-File Assign to disk-PRODPF. Select Product-file Assign to database-PRODPF Access is Sequential.

  42. Select Statement for a Display-File Select Display-File assign to workstation-PRDSPF organization is transaction. Select Display-File assign to workstation-PRDSPF-SI organization is transaction.

  43. Select Statement for a Spooled File Select Product-Report assign to printer-qprint. Select Product-Report assign to printer-qsysprt.

  44. Select Statement for an Externally Described Printer File Select Product-Report assign to formatfile-qsysprt.

More Related