360 likes | 485 Vues
“User”. A person who “uses” the AS/400 You are all “ Users” each with an unique Userid A Userid identifies you to the system when you signon or run a job Each Userid has a User Profile which describes the user attributes, one of which is authorities.
E N D
“User” • A person who “uses” the AS/400 • You are all “Users” each with an unique Userid • A Userid identifies you to the system when you signon or run a job • Each Userid has a User Profile which describes the user attributes, one of which is authorities.
User Profile (*USRPRF) and Object Authorities • The user profile is an object that defines system access for the user: • what objects can be accessed, what libraries can be used, • what authorities are assigned, and what special groups the user belongs. • DSPUSRPRF (F4 , F1) • The Current library is where any new objects that the user create reside by default. • User classes: *SECOFR *SECADM *PGMR *SYSOPR *USER Each user profile class has special default authorities based on the • security level. • Each object has authorities attached to the object. *ALL *CHANGE *USE *EXCLUDE • A group profile (*GRPPRF) is similar to a user's profile • except it gives the same set of authorities to multiple users.
“Subsystem” • Each (there are many) has been allocated a share of the total resources available in the system based on requirements. • A Job runs in a specific subsystem. • A subsystem is where the system brings together the resources needed to process work of LIKE type. Enable better performance tuning. • Described / defined in subsystem descriptions. (*SBSD). • Most are started at IPL time.
System vs Subsystems • Access the WoRK with ACTive JOB Command to see the difference • System is the entire AS/400 • Sub-System is a logical grouping of system resources designed to process jobs with similar requirements and demands on the resources.
“Jobs and subsystems” • Each Job runs in a specific subsystem based on type. • A subsystem is where the system brings together and prioritizes the resources needed to process work of LIKE type to optimize performance.
A JOB Consists of a set /group of related (one or many) programs Receives all of its attributes from one or all System values, User profile, a job description, inheritance such as name, library list, datefmt, queue, output - run priorities, message logging level, printer. We use the QDFTJOBD (IBM supplied) as a default job description here at Seneca. Commands DSPJOB, WRKJOB, CHGJOB related commands CRTJOBD, WRKJOBD, CHGJOBD
JOBS - HOW INVOKED? • Signing on and starting an interactive session • Called by another JOB. (spawned) • Automatic system function • SCHEDULED once or repetitively
Job Inheritance • Attributes / properties are passed on from the initiating / spawning job • The initial Job (starting session) inherits attributes from other sources such as System values, values from a user profile and from a job description are retrieved.
JOB TYPES Batch typically a series of programs to be executed consecutively Back up , Month end SBMJOB CMD(CALL PGM(ARPOST) PARM(DB400A01)) Interactiveon line real time processing - a dialogue between users and programs CALL PGM(ARPOST) PARM(DB400A01)) Spooledcan be input or output - retrieved or send to queues WRKSPLF Communication - started by a request from a remote system to initialize a program and allocate resources
the best known are • Interactive jobs run in subsystemQINTER • Batch jobs run in subsystemQBATCH
Some Types of jobs INTERACTIVE (USER) High run time priority on job queue (20) QUICK response Low resource requirement (memory – disk) BATCH NO interactivity (only messaging) Low run time priority on job queue (50) High resource requirement (memory – disk – media) In UNIX Batch, Daemons, cron CLI – Command line interface
“Interactive Jobs”also called sessions • it begins when a user signs on to the system and ends when they sign off. • Has interaction between the user and the AS/400, similar to a conversation (a polite conversation!). • Input entered via the work station.
“Batch Jobs” • Runs in the background. • No interactive input from the screen, receives data from files or data communication. • Generally uses a lot of resources. • Submitted / initiated by ANY job e.g. a program compile • Communicate with the system through messaging.
Queues • 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 • Controlled by • Run time priority • Position in Stack • Etc
CL - Control Language Used from the command line - interactively or in CL programs(Scripting in UNIX) which can be called from - the command line - A Command directly - From within other programs in either batch or interactive mode
“Objects” • anything on the AS/400 that has a name and takes up space in storage and is not of a temporary nature and has action” • on Unix/Windows, everything is a file • on AS/400, everything is an object • on Windows, files have extensions (.txt) • on AS/400 objects are of TYPE and subtype • Common object types include: • libraries, files, job queues, programs
Some OBJECTtype identifiers are (special values) *ALL *CTLD *AUTL *DEVD *DOC *DTAARA *CMD *DTAQ *FILE *LIND *MENU *MSGQ *JOBQ *LIB *OUTQ *QRYDFN *SBSD *PGM *USRPRF
Data Storage Hierarchy Library Files Members contain data
“Libraries” • Library: an object whose purpose is to ‘store’ and index other objects. ie. objects are ‘stored’ in libraries. • Exactly like a directory in Unix/Windows however you do not have libraries within libraries on the AS/400 (one exception).
Files - type *FILE • Are objects that store data subtypes / attribute • PF-DTA DATA file ie. customer file: customer #, address, billing info etc. for each customer • PF-SRC SOURCEfile special file that stores a programmer’s source code (scripts)
File Members • Source files have many ‘members’ • one member for each source (script) program • PDM (Prog Dev Mgr) gives easy access to a programmer’s stuff (libs/files/mbrs)
Library Liststype *LIBL • A list of Libraries, in order of importance • Similar to the DOS ‘Path’ concept • Each Job has it’s own library list (Can be inherited) • It determines where a Job finds Objects when SIMPLE naming is used
Library Lists cont’d • A Library List consists of 4 parts: • System Libraries (up to 15) • Product Libraries (none, 1 or 2) • Current Library(1 only) • User Library ( remaining) Your library list can have up to 250 entries • To view your library list - DSPLIBL
Object storage in daily life Public Library *Secretary desk (0-many) 1 : NN (root level) *Check out counter (0-many) *Reading corner (0-many) *Magazine stand (0-many) ……(many other object types)….... *Shelves (0-many)1 : NN *DVD’s (0-many) *Audio tapes (0-many) *VHS tapes (0-many) ……(many other types except Shelves) ….... *Books (0-many) 1 : NN Book1 Chapter 1 (1-many) …….. Book2 Chapter 1 ……(more maybe!)……. *Shelves N O O T H E R L E V E L S
AS/400 STORAGE HIERARCHY QSYS *USRPRF (0-many) 1 : NN (root level) *DEVD (0-many) *LIND (0-many) *CTLD (0-many) ……(many other types)….... *LIB(0-many)1 : NN *PGM (0-many) *OUTQ (0-many) *MSGF (0-many) ……(many other types except libraries ) ….... *FILE (0-many) 1 : NN MEMBER1 (1-many) MEMBER2 ……(more)……. *FILE *LIB N O O T H E R L E V E L S
AS/400 STORAGE HIERARCHY . QSYS (root level) . *LIB *USRPRF *DEVD *LIND etc etc etc …(many other types)… (0-many. Of each object type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ) . Library level . *PGM *OUTQ *MSGF *FILE ……(many other types except libraries ) ….... (0-many) (0-many) File level NO OTHER LEVELS! ! MBR1 , MBR2 , …..1-many
F1 = Help F2 = Extended Help F3 = Exit command completely F4 = Prompt F5 = Refresh Screen F9 = Retrieve Previous Command F12 = Cancel current level and return to previous level in command F23 = more options F24 = more functions Commonly Used Function Keys
Using ‘ * ‘ On the AS/400 • As a special value when used leading a parameter value.Eg. *all, *libl, *curlib • As a wild card when used as a trailer in a parameter value. • like in DOS e.g. WRKUSRPRF DC234F*
Using F4 and ? • The ? is used the same way F4 is. • Entered into a command field, it gives you the possible values for the field. • Entered beforea command, puts you in prompt mode for that command.Eg. ?CRTLIB
STORAGE HIERARGY • Library: an object whose purpose is to ‘store’ and index other objects. ie. objects are ‘stored’ in libraries. • Files: objects that store data • Members:Source files have many ‘members’ each source program = one member Data Files: most common 1 member only exception multiple members (multi territory, multi company)
Hierarchy of Storing Objects • When an object is created, it is stored in the library specified. • If no library is specified, it is stored in *CURLIB (current library). • If there is no current library, it is stored in QGPL library. • Exception: Libraries, Device Descriptions and User Profiles are always stored in library QSYS.
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 library the object is in. • You can prompt (CL) Commands for required parameters such as object name and library name. • *LIBL is the default entry for a library parameter name request
Qualified Name vs SIMPLE Name • If you specify an object name and library, it is called a qualified name) e.g. Call OPS400LIB/PGM01 • if you just use the object name, it is called a simple name. The *LIBL is used to find the object .e.g. Call PGM01
Keyword v.s. Positional Notation KEYWORD NOTATION - any order - no space separation between keyword and bracket ADDPFM FILE(BBBBB/AAAA) MBR(CCCCC) TEXT('SAMPLE COMMAND') WRKUSRJOB USER(*ALL) STATUS(*ACTIVE) JOBTYPE(*INTERACT) WRKUSRJOB JOBTYPE(*INTERACT) STATUS(*ACTIVE) USER(*ALL) POSITIONAL NOTATION - parameters must be entered in the exact order of the command syntax - limit to maximum number of parameters entered ADDPFM BBBBB/AAAA CCCCC 'SAMPLE COMMAND' WRKUSRJOB *ALL *ACTIVE *INTERACT
Keyword v.s. Positional Notation KEYWORD NOTATION - any order - no space separation between keyword and bracket ADDPFM FILE(BBBBB/AAAA) MBR(CCCCC) TEXT('SAMPLE COMMAND') WRKUSRJOB USER(*ALL) STATUS(*ACTIVE) JOBTYPE(*INTERACT) WRKUSRJOB JOBTYPE(*INTERACT) STATUS(*ACTIVE) USER(*ALL) POSITIONAL NOTATION - parameters must be entered in the exact order of the command syntax - limit to maximum number of parameters entered ADDPFM BBBBB/AAAA CCCCC 'SAMPLE COMMAND' WRKUSRJOB *ALL *ACTIVE *INTERACT