This Blog made for CPA students @ seneca College

i ll include all my notes for all my courses

Sunday 14 August 2011

IBC233 - WEEK 2


What’s client access?
It’s the green screen to login in to the server.
Name that server ?
Our server
Machine name
Operating system name
Odin
AS/400
OS/400

Iseries
OS/400

System I
I5/os
Zeus
Power systems
IBM i

Definitions :
Power systems
Unix equivalent
User id
Account
Library
Similar to a directory
Interactive job
What you do from the time you sign on to when you sign off
Batch Job
Work that you submitted to the background
Queue









System Values VS user profile
-          System values configures Zeus for everyone .
-          User profile customizes Zeus configurations .

What’s Zeus doing ?
-          Work with active jobs.
-          System vs subsystem
-           

**Shift + ESC then number 2 to exit a program “ Shut a program “
How the system I finds objects ?
-          When an object is created , it is created ‘in a particular library .
-          To access an object . the I series

There are 8000 library  in the system .
** Library list consists
MSGS are NOT objects .
SPOOLED Files are NOT Objects .
How do libraries get on your library list
**When you create a physical file and you don’t specify the library the system assume that you want to store it in your current library.
** RPG ( REPORT PROGRAM LANGUAGE )
·         HOW WE ACCESS THE DATABASE .




Steps to writing a CL program
1-      Created a source physical file.” QCLLE  SRC “.
2-      Created a member – Type CLLE .
3-      Typed in code .
4-      Saved and complied
5-      Tested program
** CL IS NOT A HIGH LEVEL LANGUAGE .
Steps to writing a RPG program,
1-       Created a source physical file.” QRPGLE  SRC “.
2-      Created a member – Type RPLLE .
3-      Typed in code .
4-      Saved and complied
5-      Tested program
    REMINDER : SHUT THE MACHINE DOWN When you done because RDP stores your source files !

How to create physical file in RDP
1-      Right click in your library and select create source physical file .
2-      And then create member in source physical file by clicking right click on the physical file.

Whats DDS ?
6-      Created a source physical file.” QDDS  SRC “.
7-      Created a member – Type PF
8-      Typed in code .
9-      Saved and complied
10-   Tested program
DB2 – the database
·         Objects created using either DDS coded programs
·         SQL
Primary key: is a piece of information to define each record.

IBC233-Course introduction Week 1 " Cindy Laurin "



-          Prepare the  lab before the lab period that you can ask questions.
-          Cindy email  , cindy.laurin@senecac.on.ca
-          Cindy page , http://cs.senecac.on.ca/~cindy.laurin
-          Course website  , http://cs.senecac.on.ca/~ibc233
-          Grades will be in blackboard
-          Labs worth 30%
-          Tests 35%
-          Final 35%
IBM system i
-i means integration
-Designed to grow with a business
IBM system P

Connectivity tools
-          RDP Rational Developer for power systems
-          Client Access
·         Production Enviroment
-          Mochasoft
·         Production Enviroment
Download from ACS site



Definitions
Userprofile : and it contains library , default output queue ,password , class of user.
JOB: is any and every piece of work on the AS/400.
There are two types of jobs :
-Interactive Jobs.
-Batch Jobs.

·         Interactive jobs run In subsystem .
·         Batch jobs runs in the background . They are generally jobs that are currently running and their status .
*Queues is a line up! A place where things wait.
*Objects : anything on the iseries that has a name and takes up space in storage.
Every object have types .
*Library : an object whose purpose is to ‘store’ and index other objects . ie. Objects are stores in library.
*Objects that store data.
* source file – special files that stores a programmers source code.
*files like text book , source fiels have many ‘members’
Wrkobjown shows you all the objects own .
PDM commands
PDM = program development manager.
Wrklibpdm : work with libraries using pdm.
Wrkobjpdm: work with objects.


LAB 1
CL Program
I – insert
D – Delete



IBC233 - LAB 4 " hint solution "


FORDERDSP  CF   E             WORKSTN
     D corder          S             10I 0
     D avgorder        S             12S 2
     D ccan            S             10I 0
     D cusa            s             10I 0
     F/FREE
           EXFMT RECORD1;
             DOW NOT(*IN03);
               EXSR CALCTOTAL;
               WRITE RECORD1;
               EXFMT RECORD2;
               IF *IN03 = *OFF;
                   EXSR CLEARREC1;
                   EXFMT RECORD1;

               ENDIF;
             ENDDO;
             if *in03 = *on;
               exfmt record3;
             ENDIF;
         *INLR = *ON;
         RETURN;
         BEGSR CALCTOTAL;
             TOTAL = (BIKES * 1000) + (BOARDS * 100) + (BLADES * 75);
             HST = TOTAL * 0.13;
             TOTAL = TOTAL + HST;
             COMMENT = 'NEW ORDER';
             IF TOTAL > 1000;

             select;
               when shipto = 'USA' or shipto = 'usa';
                 shipcost = total / 1000 * 15;
                 cusa = cusa + 1;
               when shipto = 'CAN' or shipto = 'can';
                 shipcost = total / 1000 * 10;
                  ccan = ccan + 1;
             ENDSL;
                 ind = ccan;
                 total = (total + shipcost);
                 corder = corder + 1;
                 avgorder = (avgorder + total) / corder;
            ELSE;

            ENDIF;
               norder = corder;
               ncan = ccan;
               nusa = cusa;
               avgord = avgorder;
             SELECT;
               WHEN TOTAL > 0 AND TOTAL <= 1000;
                 COMMENT = 'Order shipped by 9am tomorrow';
               WHEN TOTAL > 1000 AND TOTAL <= 5000;
                 COMMENT = 'Order shipped by 5pm tomorrow';
               WHEN TOTAL > 5000 AND TOTAL <= 8000;
                 COMMENT = 'Order shipped in two business days';
               WHEN TOTAL > 8000;
                 COMMENT = 'Order shipped by the end of the month';
             ENDSL;
         ENDSR;
         BEGSR CLEARREC1;
           BIKES = 0;
           BOARDS = 0;
           BLADES = 0;
           shipto = ' ';

         ENDSR;