440 likes | 660 Views
Application Development on Power System (IBM i). Application Development on Power System (IBM i ). School of Software Engineering Tongji University HUANGJie. Syllabus. Unit 1 Power System Foundation. Chapter 5 Work Management. Outline. Agenda: Work management concept and structure
E N D
Application Development on Power System (IBM i) Application Development on Power System (IBM i) School of Software Engineering Tongji University HUANGJie
Unit 1 Power System Foundation Chapter 5 Work Management
Outline • Agenda: • Work management concept and structure • Subsystem • Job • Major subsystem and job commands • Job description • Exercise/Practice • Question & Answer
Work management - TIMI Applications Direct access to hardware is not allowed! OS/400* OS • Machine Interface (MI) • - or Technology Independent Machine Interface (TIMI) • - logical not physical interface SLIC Kernel Hardware • System License Internal Code (SLIC) • - insulate applications from underlying hardware • - SLIC is hardware dependent! * called i5/OS on i5 systems
Work management - OS Functional Split Work management OS/400 Device support Database Security Machine Interface SLIC Hardware
Work Management Concept • Work management is the core of the operation system. It provides functions necessary to control system operation and job processing on the system. • A Job is a set of tasks performed on a computer system. With a job, any number of functions can be performed. • Jobs may be requested by a single control language command, a series of CL commands, a single program (i.e., a CL program or a high-level language program such as an RPG program), or a series of programs. • Work management controls batch jobs, interactive jobs and spooled jobs.
Work Management Structure • IBM i work management has three major levels in its structure. • System • Subsystem • Job entries • System • IBM i system as a whole is defined by system values and network attributes. Both of which must be configured and established when the system is first set up. • Examples of system values are system time, date, the maximum number of activity levels of the system. • Examples of network attributes are system name, local network ID, and network server name.
Work Management Structure (Continued) • Both system values and network attributes can be retrieved and changed by CL commands. • Command examples for system values: • Retrieve system values command: RTVSYSVAL – Retrieve System Value • RTVSYSVAL SYSVAL (system-value-name) RTNVAR (CL-variable-name) • Change system value command: CHGSYSVAL – Change system value • CHGSYSVAL SYSVAL (system-value-name) VALUE (new-value) • Command examples for network attributes: • RTVNETA – Retrieve Network Attributes • RTVNETA SYSNAME (CL-variable-name) LCLNETID(CL-variable-name) + NETSERVER (CL-variable-name) • CHGNETA – Change Network Attributes • CHGNETA SYSNAME (system-name) LCLNETID (local-network-ID) + NETSERVER (network-ID)
术语_选自《计算机操作系统教程[张尧学 著]》 • JOB(作业): • 在一次应用业务处理过程中,从输入开始到输出结束,用户要求计算机所做的有关该次业务处理的全部工作。 • 作业由不同的顺序相连的作业步组成。 • 作业步是在一个作业的处理过程中计算机所做的相对独立的工作。 • JOB(作业):比程序更广的概念 • 作业由程序、数据和作业说明书组成。 • 系统通过作业说明书控制程序和数据,使之执行和操作。 • Process(进程): • 并发执行的程序在执行过程中分配和管理资源的基本单位。 • Thread(线程): • 是进程的一部分,没有自己的地址空间,它和进程内的其他线程一起共享分配给该进程的所有资源。 • 使用线程的好处是:在有多个任务需要处理时,减少处理机的切换时间,且线程的创建和结束所需要的系统开销比进程的创建和结束开销少得多。
Job MI Thread Process Work management objects
Outline • Agenda: • Work management concept and structure • Subsystem • Job • Major subsystem and job commands • Job description • Exercise/Practice • Question & Answer
Subsystem • Subsystem • Subsystems contain job entries where jobs are placed and processed. • Subsystems include IBM-supplied subsystems and user-created subsystems. • IBM-supplied subsystems include the QBASE, QCTL, QBATCH, QINTER, QSPL, and QCMN. • QBASE • QBASE is the default subsystem that allows users to run all jobs when the system is first installed. • The QBASE subsystem should be regarded only as a transitory subsystem because it is very inefficient to run all jobs in just one subsystem. • As soon as the system is established up and running, you should use the CHGSYSVAL command to change the subsystems that run your jobs.
Subsystem (2) • Subsystem • QCTL • The subsystem that starts and ends other subsystems such as QBATCH, QINTER, QSPL and QCMN. QCTL also controls the functions of other subsystems. • QBATCH • The subsystem contains job queues that allows batch jobs to be submitted and run. QBATCH arranges and manages the batch entries, job priorities, and running of active jobs. • QINTER • The subsystem has workstation entries that allow interactive jobs to run simultaneously in this subsystem. • QSPL • The subsystem has spooled job queue entries for spooled jobs. Example of spooled jobs are read and write spooled jobs. • QCMN • The subsystem has communication entries for all communications jobs that are to run in this subsystem.
Subsystems A specialized environment for handling a certain type of work or function, such as: - WRKSBS INTERACTIVE SPOOLING BATCH COMMUNICATIONS
Outline • Agenda: • Work management concept and structure • Subsystem • Job • Major subsystem and job commands • Exercise/Practice • Question & Answer
Job • Job Entries • The Job Entries are the depositories where jobs actually run. • Job Queue Entries are job queues that are normally defined and created in the subsystems that run batch jobs (i.e., QBATCH, QBATCH2) • Workstation Entries are entries that are defined in the subsystems that run interactive jobs (i.e., QINTER, QINTER2). Interactive jobs are run by users through workstation terminals. Subsystems must allow multiple workstation entries running multiple interactive jobs simultaneously. • Spooled job entries are job queues that are defined in the subsystem that run spooled jobs (i.e., QSPL). Spooled job entries allow reader and writer spooled jobs to run. • Communication entries are normally defined in the QCMN subsystem. They contain communications protocols and allow communications jobs to run.
Outline • Agenda: • Work management concept and structure • Subsystem • Job • Major subsystem and job commands • Exercise/Practice • Question & Answer
Major subsystem and job commands - Job • GO CMDJOB • Lists all job related commands • DSPJOBLOG • shows commands and related messages for a job that is still active when its job log has not been written. • WRKJOB • works with or change information concerning a user job • WRKACTJOB • works with performance and status information for the active jobs in the system. • WRKSBMJOB • works with all jobs submitted from your work station, job, or user profile. • WRKUSRJOB • works with a list of selected user jobs. • CHGJOB • changes some of the attributes of a job. • SBMJOB • allows a job that is running to submit another job to a job queue to be run later as a batch job. • The default subsystem for batch job is QBATCH • DLYJOB • causes your current job to wait for a specified number of seconds, or until a specified time of day, before running resumes.
Major subsystem and job commands - Subsystem • GO CMDSBS • Lists all subsystem related commands • STRSBS • starts a subsystem using the subsystem description specified in the command • ENDSBS • ends the specified subsystem (or all active subsystems) and specifies what happens to active work being processed. • WRKSBS • allows you to work with each active subsystem in the system. • WRKSBSD • shows a list of subsystem descriptions and allows you to change, delete, display, start, and end specified subsystem descriptions.
Outline • Agenda: • Work management concept and structure • Subsystem • Job • Major subsystem and job commands • Exercise/Practice • Question & Answer
Exercise - System i work management • Qualified Job Name is built up by? • Job Number + User Name + Job Name