Professional Documents
Culture Documents
Joy Patnaik
Agenda
Commonly Used Terms
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 separate software components on other systems (ex. Database)
IPL
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.
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 their authorities Commands : CRTUSRPRF, DSPUSRPRF, etc
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
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.
Important Libraries
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 less system objects. Typically message queues for user profiles.
IBM-Supplied Libraries - 2
QHLPSYS: QGPL:
All help information Search Index Objects 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 QGPL Do not delete or rename this library.
IBM-Supplied Libraries - 3
QSPL:
Spooling library. Contains several databases files in spooling system. Used to store reports and printed output waiting to print. Folders and documents created and maintained in library QDOC. Use Save Document Library Objects (SAVDLO) and Restore Document Library Objects (RSTDLO).
QDOC:
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.
Creating a Library
Create Library (CRTLIB)
*PROD *BLANK
Additional Parameters
Authority . . . . . . Auxiliary storage pool Create authority . . . Create object auditing . . ID . . . . . . . . . . . . *LIBCRTAUT 1 *SYSVAL *SYSVAL Name, *LIBCRTAUT, *CHANGE... 1-16 Name, *SYSVAL, *CHANGE... Character value, *SYSVAL...
F5=Refresh
F12=Cancel
F5=Refresh
F12=Cancel
Usage of Library
When an object is created, it is created in a particular library. To access an object, the AS/400 needs to know what library the object is in. The library is really a directory which contains pointers to the objects in that library.
Library List - 1
OS/400 searches for the objects required for executing any program or command in the LIBL that is enforced at the time of running the program or command
Similar to PATH in Windows systems Library list give the default list of libraries to be searched for an object. Every job has a library list. Library list has a maximum of 251 names. Scanned from top to bottom.
Library List - 2
System Library
Product Library Current Library User Library
QSYSLIBL
Optional CHGCURLIB QUSRLIBL
Library List - 2
Usage of LIBL
you can always access a library not on the list! (as long as your user profile has proper authority to the library)
Library List - 3
Each job has an attached Library List
Different Types of Libraries:
System: Product: Current: User: IBM Supplied Added automatically when an IBM product is used Defined by an individual user ID
User IDs default Library Dont rename or delete your current Library!
Files
customer file: customer #, address, billing info etc. for each customer
source file
special
eg. Judy stores all her source code in source file Judysrc (in library Judylib)
File Member
Source
one
member for each source program eg. Judysrc file has 3 members: RPGPGM1, RPGPGM2, CLPROG, each contains a different program
PDM
gives
Database Files
Types of *FILES
Physical File PF (Source and Data) Logical File LF Printer File PRTF Display File DSPF
Data stored as
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
Work Management - 2
Subsystem
Jobs run in subsystems. An pre-defined operating environment in which system resources (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
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
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)
A Jobs Life - 1
Submit a job
On submitting a job to an iSeries server, it (the job) is created 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 to go through the work management life-cycle. These properties include the user profile the job will start to run under, the request data (which tells the job what it will do), and the initial user portion of the library list, as well as others.
A Jobs Life - 2
Job queues are work entry points for batch jobs to enter 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 the job queue, the sequence number of the job queue, and the maximum active jobs. When all of these factors work together, the job will be pulled off the job queue to start running in the subsystem.
A Jobs Life - 3
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 number of active jobs currently in the subsystem.
A Jobs Life - 4
Memory is a resource from the memory pool that the subsystem uses to run the job.
The amount of memory from a memory pool, as well as how many other jobs are competing for memory affect how efficiently a job runs.
The subsystem gives the memory pool the information it needs to process the order in which jobs are allocated memory, and the memory pool allocates memory for the job to run to completion.
Subsystems use different memory pools to support different types of jobs that run within them.
A Jobs Life - 5
Job finishes
Spooled File - 1
When you print something, a spool file is created with the data to be printed and stored in an Output Queue WRKSPLF shows your spooled files (WRKSPLF groups all of YOUR spooled files together on one screen regardless of the Output Queue)
Output Queue is a queue of all spooled files awaiting printing. (WRKOUTQ groups together all of the spooled file in ONE output queue regardless of the USER) To print a Spooled File, the file must be moved to an Output Queue attached to a printer.
Spooled File - 2
Printer Writer is a job that monitors a specified output queue When a spooled file entry is placed in an output queue, the printer writer will direct the spooled file to printer device.
Commands
Data
*FILE
WRKJOB :
Display information about your current Interactive job Display information about any other job, by entering Job Name and User (Job Number is Optional) To display your Batch Jobs, use the Work with Submitted Jobs Commands Shows you a list of all of the jobs that you own on the system regardless of the subsystem
WRKSBMJOB :
WRKUSRJOB :
Job Status
Active = Job is currently running Outq = Job is finished Jobq = Job is waiting to process.
Not every job follows this exact path; however, you can better understand how other work is completed on the system by the below-mentioned flow :
The life of a simple batch job begins when you submit it to the system. The job is then sent to a job queue where it waits to enter a 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 (for example, printing).
Summary
The AS/400 is easy to use
Menu driven Lots of built-in help Built-in security