AS400 - An Introduction (Part 2)

Embed Size (px)

Citation preview

  • 7/29/2019 AS400 - An Introduction (Part 2)

    1/48

    HCL Technologies Ltd.

    An Introduction to the

    AS/400 / iSeries / i5

    Mid-Range Sys tem

    (Part 2)

    Joy Patnaik

  • 7/29/2019 AS400 - An Introduction (Part 2)

    2/48

    Agenda

    Commonly Used Terms

  • 7/29/2019 AS400 - An Introduction (Part 2)

    3/48

    Commonly Used Terms - 1

    System The AS/400 is the system

    The system is downorThe system is slow today

    OS/400 AS/400s Object-Based Operating System

    Controls all the activity on the AS/400

    Incorporates many features that would be separatesoftware components on other systems (ex. Database)

    IPL Initial Program Loading (Programs executed during

    Boot-sequence)

  • 7/29/2019 AS400 - An Introduction (Part 2)

    4/48

    Commonly Used Terms - 2

    Licensed Internal Code (LIC)

    Work Management Provides the hardware interface

    Any changes to the hardware invite corresponding changes to the LIC. However, the application programs need not undergo any changes, thereby

    reducing maintenance costs.

    Users never interact directly with the LIC, and it cannot be

    tampered by programmers or system operators.

    Programming Languages Pascal, PL/1, Basic, RPG, C, C++, Cobol, Java, SQL, etc.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    5/48

    Commonly Used Terms - 3

    System Values Control and Configuration attributes that allow you to customize the

    operating environment to suit the company.

    These values define what the default values will be. You cant changethem, but you can look at them.

    Examples : QDATE, QTIME

    Commands : DSPSYSVAL

    User A person who uses the AS/400

    A User-Id identifies you to the system when you sign-on User Class : *USER, *SYSOPR, *PGMR, *SECADM, *SECOFR

    Each User-Id has a User Profile which describes the user and theirauthorities

    Commands : CRTUSRPRF, DSPUSRPRF, etc

  • 7/29/2019 AS400 - An Introduction (Part 2)

    6/48

    Commonly Used Terms - 4

    Library Library is a container of Objects but cannot contain other Libraries

    Exception : QSYS library contains other libraries

    Commands :CRTLIB

    File Contained in a Library

    Data Container that can contain either

    Application Data

    Application program source code

    Member One File can be made up of one or more members

    Can be data or program source

  • 7/29/2019 AS400 - An Introduction (Part 2)

    7/48

    Commonly Used Terms - 5

    Library List List of commonly-used libraries (Short notation *LIBL)

    Similar to PATH in Windows systems

    Messages Message Queues

    Work Station Queue

    User Message Queue

    Message Types

    Information : *INFO

    Inquiry : *INQ Commands :

    SNDMSG - Sends Messages to user message queue.

    SNDBRKMSG - Send Messages to work station.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    8/48

    Important Libraries

  • 7/29/2019 AS400 - An Introduction (Part 2)

    9/48

    IBM-Supplied Libraries - 1

    QSYS: Most important library on the AS/400. Contains OS/400, and master directory of

    all libraries.

    Dont delete or rename. Need to operate the system.

    Some objects MUST be in QSYS.

    User Profiles

    Device descriptions

    Authorization lists

    Library object descriptions

    QUSRSYS: Place user objects, considered more or lesssystem objects.

    Typically message queues for user profiles.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    10/48

    IBM-Supplied Libraries - 2

    QHLPSYS: All help information Search Index Objects

    QGPL: General Purpose Library. Contains objects used by the system or users.

    Contains job queues, subsystem descriptions,

    source physical files and output queues.

    Dont store unnecessary objects in QGPLDo not delete or rename this library.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    11/48

    IBM-Supplied Libraries - 3

    QSPL: Spooling library. Contains several databases files in spooling

    system.

    Used to store reports and printed outputwaiting to print.

    QDOC: Folders and documents created andmaintained in library QDOC.

    Use Save Document Library Objects

    (SAVDLO) and Restore Document Library

    Objects (RSTDLO).

  • 7/29/2019 AS400 - An Introduction (Part 2)

    12/48

    IBM-Supplied Libraries - 4

    QTEMP: Created for every active job automatically. Lasts only for the duration of the job.

    Functions as a scratch pad, for temporary

    objects.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    13/48

    Working With Libraries

  • 7/29/2019 AS400 - An Introduction (Part 2)

    14/48

    Creating a Library

    Create Library (CRTLIB)

    Type choices, press Enter.

    Library . . . . . . . . . . . . Name

    Library type . . . . . . . . . . *PROD *PROD, *TEST

    Text 'description' . . . . . . . *BLANK

    Additional Parameters

    Authority . . . . . . . . . . *LIBCRTAUT Name, *LIBCRTAUT, *CHANGE...

    Auxiliary storage pool ID . . 1 1-16

    Create authority . . . . . . . *SYSVAL Name, *SYSVAL, *CHANGE...

    Create object auditing . . . . *SYSVAL Character value, *SYSVAL...

    Bottom

    F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display

    F24=More keys

  • 7/29/2019 AS400 - An Introduction (Part 2)

    15/48

    Working with Libraries

    Work with Libraries (WRKLIB)

    Type choices, press Enter.

    Library . . . . . . . . . . . . *LIBL Name, generic*, *LIBL...

    Bottom

    F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display

    F24=More keys

  • 7/29/2019 AS400 - An Introduction (Part 2)

    16/48

    Using Library, File andMember

  • 7/29/2019 AS400 - An Introduction (Part 2)

    17/48

    How the AS/400 finds Objects When an object is created, it is created in a particular

    library.

    To access an object, the AS/400 needs to know what librarythe object is in.

    The library is really a directory which contains pointers to theobjects in that library.

    Usage of Library

  • 7/29/2019 AS400 - An Introduction (Part 2)

    18/48

    Library List - 1

    What is a Library List List of commonly-used libraries (Short notation *LIBL)

    OS/400 searches for the objects required for executing any

    program or command in the LIBL that is enforced at the time ofrunning the program or command

    Similar to PATH in Windows systems

    Library list give the default list of libraries to be searched foran object.

    Every job has a library list.

    Library list has a maximum of 251 names.

    Scanned from top to bottom.

    Four library list types System (SYS), Product (PRD), Current (CUR), User (USR)

  • 7/29/2019 AS400 - An Introduction (Part 2)

    19/48

    Library List - 2

    Library List Sections

    Portion Values/Command Contents

    System Library QSYSLIBL QSYS

    1-15 libraries

    Product

    Library

    Optional

    Current

    Library

    CHGCURLIB From User

    Profile

    User

    Library

    QUSRLIBL QTEMP

    1-25 Libraries

  • 7/29/2019 AS400 - An Introduction (Part 2)

    20/48

    Library List - 2

    Usage of LIBL Library List is a convenience only

    you can always access a library not on the list! (as long as your

    user profile has proper authority to the library) We could have a program object named PROGA in two

    different libraries!

    Qualified Object Name: Library/Object(ex. CMOPS324/REVIEWS)

    Library Descriptions, Device Descriptions and User Profiles are stored

    in library QSYS. This means that you do not have to specify a library name when

    you access these objects.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    21/48

    LibraryList - 3

    Each job has an attached Library List

    Different Types of Libraries:

    System: IBM SuppliedProduct: Added automatically when an IBM product is used

    Current: Defined by an individual user IDUser IDs default Library

    Dont rename or delete your current Library!

    User: Non-IBM Supplied LibrariesCreated by Business to organize programs, files, etc.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    22/48

    Library List Commands - 1

    ADDLIBLE

    Adds an entry to a library list to the USER portion of

    the library list

    RMVLIBLERemoves an entry from the USER portion of the

    library list

    EDTLIBL

    Adds/Deletes/Changes entries on the USER portionof the library list

  • 7/29/2019 AS400 - An Introduction (Part 2)

    23/48

    Library List Commands - 2

    CHGCURLIB

    Changes the Current Library

    CHGLIBL

    Changes the Current Library and allowsAdd/Change/Delete to the USER portion of the

    library list.

    All Library List commands are listed on the CMDLIBLmenu.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    24/48

    Library List contd

  • 7/29/2019 AS400 - An Introduction (Part 2)

    25/48

    Files

    objects that store dataie. customer file: customer #, address, billing info etc. foreach customer

    source file

    special file that stores a programmers source codeeg. Judy stores all her source code in source file Judysrc (in

    library Judylib)

  • 7/29/2019 AS400 - An Introduction (Part 2)

    26/48

    File Member

    Source files have many membersone member for each source program

    eg. Judysrc file has 3 members: RPGPGM1, RPGPGM2,

    CLPROG, each contains a different program

    PDM (Prog Dev Mgr)gives easy access to a programmers stuff (libs/files/mbrs)

  • 7/29/2019 AS400 - An Introduction (Part 2)

    27/48

    Database Files Types of *FILES

    Physical File PF (Source and Data)

    Logical File LF

    Printer File PRTF

    Display File DSPF

    Data stored as EBCDIC - Extended Binary Coded Decimal Interchange

    Code

  • 7/29/2019 AS400 - An Introduction (Part 2)

    28/48

    Source Physical File vs

    Data Physical File

    Source Physical File

    Layout is fixed: 3 fields

    programmers can only alter the length of the text

    field

    Used to store code

    Data Physical File Layout is determined by Application Design

    Used to store data

  • 7/29/2019 AS400 - An Introduction (Part 2)

    29/48

  • 7/29/2019 AS400 - An Introduction (Part 2)

    30/48

    What is Work Management ? Important building block of OS/400

    Work enters the system

    Gets Processed

    Gets completed

    Supports commands and internal system

    functions

  • 7/29/2019 AS400 - An Introduction (Part 2)

    31/48

    Work Management - 1

    Job A job is any and every piece of work on the AS/400

    Commands : DSPJOB

    Interactive Jobs

    A job that begins when a user signs on to the system and ends when they

    sign off. It is a job with interaction between the user and the AS/400, similar to a

    conversation ( a polite conversation!).

    Input for the job is entered via the screen.

    Batch Jobs

    A job that runs in the background.

    They do not require input from the screen, but would read data from files. They are generally jobs that use a lot of resources and are lower priority

    than interactive jobs.

    Usually submitted by interactive jobs e.g. a program compile

  • 7/29/2019 AS400 - An Introduction (Part 2)

    32/48

    Work Management - 2

    Subsystem Jobs run in subsystems.

    An pre-defined operating environment in which systemresources (eg. main storage) are divided up and allocated for the

    work to be done Described in subsystem descriptions.

    Most subsystems are started at IPL (Initial Program Load) time. IPL can be equated to the processes that get executed when a PC boots up.

    Subsystems (Examples) Interactive jobs run in subsystem QINTER

    Batch jobs run in subsystem QBATCH

    Commands : DSPSBSD

  • 7/29/2019 AS400 - An Introduction (Part 2)

    33/48

    Work Management - 3

    Queue A queue is a line-up! A place where things wait.

    Examples of AS/400 queues:

    job queues: where batch jobs wait

    message queues: where messages wait output queues: where spool files wait to print

  • 7/29/2019 AS400 - An Introduction (Part 2)

    34/48

    Work Management - 4

    Job Description Defines the attributes of the job

    Important parameters

    Job queue Output Queue

    Initial Library list

    Job Priority

    QDFTJOBD ( Default Job description)

  • 7/29/2019 AS400 - An Introduction (Part 2)

    35/48

    Most Often-used Work

    Management Conceptsand Tasks

  • 7/29/2019 AS400 - An Introduction (Part 2)

    36/48

    A Jobs Life - 1 Submit a job

    On submitting a job to an iSeries server, it (the job) iscreated and enters the system. At this time, the

    properties of a job are given to the job. Once the properties have been defined, the job moves

    to the job queue where it waits to enter the subsystem.

    The job description holds properties the job will use togo through the work management life-cycle. These

    properties include the user profile the job will start torun under, the request data (which tells the job what itwill do), and the initial user portion of the library list, aswell as others.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    37/48

    A Jobs Life - 2 Job enters a job queue

    Job queues are work entry points for batch jobs toenter the system. They can be thought of as "waiting

    rooms" for the subsystem. A number of factors affect when the job is pulled off the

    job queue into the subsystem, like job priority on thejob queue, the sequence number of the job queue, andthe maximum active jobs.

    When all of these factors work together, the job will bepulled off the job queue to start running in thesubsystem.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    38/48

    A Jobs Life - 3 Job enters the subsystem

    When the job enters the subsystem it becomes active.

    Until a job gets its activity level and memory from a

    memory pool, it cannot run. The job uses several pieces of information before it can

    receive memory to run.

    The subsystem description, like the job description,carries information, such as the memory pool to use, the

    routing entry, the maximum active jobs, and the numberof active jobs currently in the subsystem.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    39/48

    A Jobs Life - 4 Memory pool allocates memory to

    the subsystem

    Memory is a resource from the memory pool that thesubsystem uses to run the job.

    The amount of memory from a memory pool, as well ashow many other jobs are competing for memory affect

    how efficiently a job runs.

    The subsystem gives the memory pool the informationit needs to process the order in which jobs are allocatedmemory, and the memory pool allocates memory forthe job to run to completion.

    Subsystems use different memory pools to supportdifferent types of jobs that run within them.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    40/48

    A Jobs Life - 5 Job finishes

  • 7/29/2019 AS400 - An Introduction (Part 2)

    41/48

    Spooled File - 1 What is a Spooled File ?

    When you print something, a spool file is created withthe data to be printed and stored in an Output Queue

    WRKSPLF shows your spooled files (WRKSPLF groups allof YOUR spooled files together on one screen regardlessof the Output Queue)

    What is an Output Queue (OUTQ) ? Output Queue is a queue of all spooled files awaiting

    printing. (WRKOUTQ groups together all of the spooledfile in ONE output queue regardless of the USER)

    To print a Spooled File, the file must be moved to anOutput Queue attached to a printer.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    42/48

    Spooled File - 2 What is a Printer Writer ?

    Printer Writer is a job that monitors a specified outputqueue

    When a spooled file entry is placed in an output queue,the printer writer will direct the spooled file to printerdevice.

    Commands DSPSPLF WRKOUTQ , CRTOUTQ

    WRKWTR, STRPRTWTR, ENDWTR

  • 7/29/2019 AS400 - An Introduction (Part 2)

    43/48

    How Do Spooled Files get

    Created?

    Program/

    Command

    Data Report

    Layout

    Job Output Queue

    *FILE*FILE

    Spooled File

    QINTER

  • 7/29/2019 AS400 - An Introduction (Part 2)

    44/48

    DC234X99

    SPLF#1

    SPLF#2

    PRT01

    SPLF#3

    SPLF#4

    WRKSPLF

    option 2.

    Changethe

    Spooled

    File

    to OutQ

    PRT01

    How Do Spooled Files get

    Printed?

  • 7/29/2019 AS400 - An Introduction (Part 2)

    45/48

    Working with Jobs - 1

    How to get info about Jobs WRKJOB :

    Display information about your current Interactive job

    Display information about any other job, by entering JobName and User (Job Number is Optional)

    WRKSBMJOB :

    To display your Batch Jobs, use the Work with SubmittedJobs Commands

    WRKUSRJOB : Shows you a list of all of the jobs that you own on the

    system regardless of the subsystem

  • 7/29/2019 AS400 - An Introduction (Part 2)

    46/48

    Working with Jobs - 2

    Job Status Active = Job is currently running

    Outq = Job is finished

    Jobq = Job is waiting to process.

  • 7/29/2019 AS400 - An Introduction (Part 2)

    47/48

    Work Management Summary Not every job follows this exact path; however, you can betterunderstand how other work is completed on the system by thebelow-mentioned flow :

    The life of a simple batch job begins when you submit it tothe system.

    The job is then sent to a job queue where it waits to entera subsystem where it can run.

    Once the job moves to the subsystem it is allocated

    memory in which to run. When the job is complete, it is sent to a printer output

    queue to await further instruction on what to do (forexample, printing).

  • 7/29/2019 AS400 - An Introduction (Part 2)

    48/48

    Summary

    The AS/400 is easy to use Menu driven

    Lots of built-in help

    Built-in security