Unit 4 i5/os Work Management



Similar documents
ERserver. iseries. Work management

Security Service tools user IDs and passwords

IBM i Version 7.2. Security Service Tools

IBM i Version 7.2. Systems management Advanced job scheduler

Systems Management Advanced job scheduler

Performance Navigator Installation

Analyzing IBM i Performance Metrics

Rational Developer for IBM i (RDi) Introduction to RDi

REPRINT. Release User s Guide. iseries (AS/400) Developed and Distributed by

REPRINT. Release Reference Manual. IBM iseries (AS/400) Developed and Distributed by

Inventory Computers Using TechAtlas for Libraries

System i and System p. Customer service, support, and troubleshooting

Version 5.0. MIMIX ha1 and MIMIX ha Lite for IBM i5/os. Using MIMIX. Published: May 2008 level Copyrights, Trademarks, and Notices

1 Download & Installation Usernames and... Passwords

Lesson Plans Microsoft s Managing and Maintaining a Microsoft Windows Server 2003 Environment

Practice Fusion API Client Installation Guide for Windows

Table of Contents. FleetSoft Installation Guide

TheFinancialEdge. Administration Guide

HelpSystems Web Server User Guide

Robot SCHEDULE 12 User Guide

TheFinancialEdge. Administration Guide

HP ALM. Software Version: Tutorial

Central and Remote Users Guide

Users Guide. FTP/400 File Transfer API and Remote Command Server Version By RJS Software Systems, Inc.

IBM Sterling Control Center

i5/os and related software Distributing software

Setting Up the Device and Domain Administration

QACenter Installation and Configuration Guide. Release 4.4.2

Performance Monitoring User s Manual

Deposit Direct. Getting Started Guide

Automated Inventory System

Robot CONSOLE 6 User Guide

OVERVIEW AND TERMINOLOGY

Symantec ESM agent for IBM AS/400

Help. F-Secure Online Backup

COMMANDS 1 Overview... 1 Default Commands... 2 Creating a Script from a Command Document Revision History... 10

Cognos BI Getting Started

HP Service Manager. Software Version: 9.40 For the supported Windows and Linux operating systems. Request Management help topics for printing

How to test and debug an ASP.NET application

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

1. Data Domain Pre-requisites. 2. Enabling OST

VMware Horizon FLEX User Guide

MONITORING PERFORMANCE IN WINDOWS 7

Job Streaming User Guide

What is Work Management?

IBM Information Server

Securing Your User Profiles Against Abuse

USER GUIDE. Ethernet Configuration Guide (Lantronix) P/N: Rev 6

VMWare Workstation 11 Installation MICROSOFT WINDOWS SERVER 2008 R2 STANDARD ENTERPRISE ED.

Security Planning and setting up system security

Table of Contents User Guide... 1 Welcome... 4 Front End Life Blue... 5 General Navigation... 5 Menu Bar... 5 Continuous Scroll... 5 Hyperlinks...

User's Guide - Beta 1 Draft

Networking Guide Redwood Manager 3.0 August 2013

Operating system Dr. Shroouq J.

Suite. How to Use GrandMaster Suite. Exporting with ODBC

Lab Creating a Logical Network Diagram

Read Naturally, Inc. Version: 05 February Saint Paul, Minnesota

SQL Tuning and Maintenance for the Altiris Deployment Server express database.

Kaseya 2. User Guide. Version 1.1

Load Testing and Monitoring Web Applications in a Windows Environment

Monitor NetSight Server Health

SQL Server Setup Guide for BusinessObjects Planning

User's Guide - Beta 1 Draft

Cisco - Configure the 1721 Router for VLANs Using a Switch Module (WIC-4ESW)

Fiery E100 Color Server. Welcome

ERserver. iseries. Printing

LPR for Windows 95/98/Me/2000/XP TCP/IP Printing User s Guide. Rev. 03 (November, 2001)

Invoice Cloud Frequently Asked Questions

Why do I have to log in as a Current UM Employee?

In the same spirit, our QuickBooks 2008 Software Installation Guide has been completely revised as well.

SAM Server Utility User s Guide

BrightStor ARCserve Backup for Linux

CA ARCserve Backup for Windows

ERserver. iseries. Networking TCP/IP Setup

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

5-Bay Raid Sub-System Smart Removable 3.5" SATA Multiple Bay Data Storage Device User's Manual

CA ARCserve Backup for Windows

Type Message Description Probable Cause Suggested Action. Fan in the system is not functioning or room temperature

Data Transfer Tips and Techniques

CS10110 Introduction to personal computer equipment

Administration guide. Océ LF Systems. Connectivity information for Scan-to-File

Hardware Information Managing your server, adapters, and devices ESCALA POWER5 REFERENCE 86 A1 00EW 00

Creating a Web Service using IBM Rational HATS. For IBM System i (5250) Creating a Web Service using HATS 1

Rational Developer for IBM i (RDI) Distance Learning hands-on Labs IBM Rational Developer for i. Maintain an ILE RPG application using

FileNet System Manager Dashboard Help

Get Started MyLab and Mastering for Blackboard Learn Students

Applications Manager Version 8.0

Workplace Giving Guide

User Guide For ipodder on Windows systems

TOSHIBA GA Printing from Windows

Phone & User Assignment. Feature Overview. Feature Prerequisites. Feature Setup

Web Connect Guide MFC-J825DW MFC-J835DW. Version 0 USA

Jive Connects for Openfire

Avalanche Site Edition

Evaluator s Guide. PC-Duo Enterprise HelpDesk v5.0. Copyright 2006 Vector Networks Ltd and MetaQuest Software Inc. All rights reserved.

StreamServe Persuasion SP5 Control Center

EView/400i Management Pack for Systems Center Operations Manager (SCOM)

Tivoli Endpoint Manager for Remote Control Version 8 Release 2. User s Guide

Backup Assistant. User Guide. NEC NEC Unified Solutions, Inc. March 2008 NDA-30282, Revision 6

Transcription:

Introduction to IBM System i Unit 4 i5/os Work Management

Copyright IBM Corporation, 2006. All Rights Reserved. This publication may refer to products that are not currently available in your country. IBM makes no commitment to make available any products referred to herein. 2 Unit 4 International Business Machines, 2006

Contents Lab 1: Introduction to i5/os Work Management... 5 What this Exercise is About... 5 What you should be able to do... 5 Additional information sources... 5 CL commands associated with this lab exercise unit... 5 Task 1: Introduction to i5/os work management... 6 Task 2: Monitoring jobs with iseries Navigator... 7 Task 3: Working with jobs via command line... 10 Lab 2: Defining job environments... 13 What this Exercise is About... 13 What You Should be able to Do... 13 Additional information sources... 13 CL commands associated with this lab exercise unit... 13 Task 1: Creating job descriptions... 14 Task 2: Directing print output to a specific output queue... 15 Task 3: Using job logs for troubleshooting and control... 16 Lab 3: Creating a complete job environment... 19 What this Exercise is About... 19 What You Should be able to Do... 19 Additional information sources... 19 CL commands associated with this lab exercise unit... 19 Task 1: Creating job queue... 20 Task 2: Reviewing memory pools... 21 Task 3: Creating a subsystem... 21 Task 4: Creating a class... 22 Task 5: Tying all components and settings together... 22 Lab 4: Testing your environment... 25 What this Exercise is About... 25 What You Should be able to Do... 25 Additional information sources... 25 CL commands associated with this lab exercise unit... 25 Task 1: Defining a workstation session to use your subsystem 26 Task 2: Submitting and controlling batch jobs... 28 Task 3: Schedule batch jobs and commands... 30 Appendix A: Answers... 31 Lab 1: Introduction to i5/os Work Management... 37 Lab 2: Defining job environments... 32 Lab 3: Creating a complete job environment... 32 Lab 4: Testing your environment... 33 Notices... 34 Trademarks... 34 International Business Machines, 2006 Unit 4 3

4 Unit 4 International Business Machines, 2006

Lab 1: Introduction to i5/os Work Management What This Exercise is About What You Should be Able to Do Additional information sources CL commands associated with this lab exercise unit The objective of this exercise is to familiarize yourself with the work management concepts in i5/os. You will learn how to monitor active jobs via different user interfaces. At the end of the lab, students should be able to: Name all common job attributes and properties of an i5/os job Identify the basic components in a job environment Use i5/os functions to monitor jobs This section lists reference literature and Web resources that contain further information pertaining the different tasks within this lab exercise. Work management guide iseries Information Center, Systems management > Work management http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp/ Work management guide (PDF file) http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzaks/rzaks. pdf Job Scheduler for OS/400 http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/sc41 5324.pdf Advanced job scheduler http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzaks/rzaks ajs.pdf Performance adjuster http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm?info/experience/work3abstract.htm iseries work management concepts http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/c415 3063.pdf iseries system values http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzakz/rzakz. pdf iseries Access for Web http://www-1.ibm.com/servers/eserver/iseries/access/web The approach of this lab exercise is to learn new administrations and operations functions based on a graphical interface. However, sometimes there is a need to also know the corresponding CL commands to, for example, automate functions via CL programs. The following Table provides an overview of CL commands pertaining to the objectives of this exercise. Note that some commands might not be part of the base operating system. In these cases, the license program number that the International Business Machines, 2006 Unit 4 5

command is part of is listed in parenthesis. Command WRKACTJOB WRKSYSSTS WRKDSKSTS WRKSTSACT WRKJOB WRKUSRJOB WRKSBSJOB Description Work with Active jobs Work with System Status Work with Disk Status Work with System Activity (5722-PT1) Work with Job Work with User Job Work with Subsystem Job Table: Useful and exercise-related CL commands The previous tables contains mostly Work with commands, because they typically allow you to perform other functions, such as display or create functions as well. Task 1: Introduction to i5/os Work Management Work management is an important building block within the iseries server operating system i5/os. Its functions are the foundation through which all work enters the system, is processed, run, and completed on iseries servers. Whether you run a simple batch job once a week or you call an application daily (like Lotus Domino or daily reports), work management helps manage the jobs and objects that run on your system. It also supports the commands and internal functions necessary to control system operations and allocate resources to applications when needed. The iseries server is set up and ready to use. Most users will not need to change the default settings. However, if you need to tailor the work management piece to fit your company, you will need to understand the terms and concepts associated with it and how they integrate with each other to provide you with the best performance from your iseries server. In addition, you can also work with parts of the work management component using iseries Navigator tasks on the Web. This allows you to work with work management functions using a Web browser. Note that work management via a Web browser is not covered in this lab exercise. You can find more information about the Web interface in the resource listed in Additional information sources. Study Time To understand the concepts of work management, an easy-to-understand view of work management has been provided in the Work Management guide (available as a PDF file or online on the Web. Certain tasks in the PDF file take you to the Web). This guide contains different entry points, so you choose where you want to start learning about work management. Important: Familiarizing yourself with the following topics is an important prerequisite for the upcoming practical exercises of this lab module. A job s life Follow a job through its life cycle in the work management infrastructure use an interactive graphic to click your way to more detailed information about work management. Manage daily work This chapter lets you find out the daily tasks you can perform to efficiently manage work from iseries Navigator and when to perform these tasks. From checking job logs to monitoring system activity, you will learn important daily tasks involved with work management. The structure of your system This section of the guide lets you learn the terms and 6 Unit 4 International Business Machines, 2006

concepts associated with work management (including job, job queues, subsystems, and memory pools) that you can use to manage work on an iseries server. How work gets done Find out what you will need to do to get work done on your iseries server. Set up job queues, allocate memory to your subsystems and understand what happens to the job after it finishes running. Troubleshoot Work Management Read about how to resolve the problems with jobs through iseries Navigator. Attention: Work management on many other platforms in the market is not as sophisticated and efficient as in i5/os. The reason is mainly, because many other servers run only a single application, such as a database, a Web server, etc. On the iseries system, customers typically run many applications and application environment concurrently under i5/os. Therefore, work management is required to set up the system to run applications and application jobs with the resources they need without conflicting with other applications. Task 2: Monitoring jobs with iseries Navigator Operating a server that hosts multiple business applications where those applications have different demands on resources at different times, requires a fairly good understanding of how your system works and performs. After a while, a system is typically well tuned and performs very well. To get to this point or to isolate problems with specific jobs or the performance in general, you need tools to monitor your system. iseries Navigator is one of these tools that offers a variety of options to monitor jobs and resource utilization. Especially, when dealing with unpredictable workloads, such as Web shops, you need to watch your system closely. Of course, various tasks can be automated with CL programs, third party vendor products, or Management Central (will be covered in an upcoming lab unit). For now let s discover some of these iseries Navigator tools. Note: When we refer to system in the following lab tasks, it can actually also mean an i5/os partitioned (LPAR) environment as it is in our current lab environment. Displaying system information 1. Using iseries Navigator and your personal user profile, open a connection to <modify for your campus environment>. 2. Right-click on your connection and select System Status. International Business Machines, 2006 Unit 4 7

Figure: iseries Navigator System Status The System Status window provides several tabs with general system (partition) information. On the general tab, you find information about the percentage of used processing time from the time you opened this window or until you pressed the Reset Statistics button. This percentage is the ratio of the total amount of processing unit time used to the total elapsed time. The value in this field is normally higher than the sum of the active jobs displayed because it includes processing unit time used by system overhead (system task CPU percentages that are not listed in the list of active jobs), excluded jobs, and jobs that have ended during the measurement time interval. For an uncapped partition (you will learn what uncapped means in an upcoming lab unit, when we talk about partitioned systems and shared resources) using shared processors, this percentage can be greater than 100 percent. This field is zero when the elapsed time is zero. If there are multiple processors on the system, this field contains the average percent busy of all the processors. You can also see on the general tab, statistics about the number of jobs on the system, addresses used, and the overall disk capacity and utilization. Use the online help and information resources listed in, Additional information sources, to get familiar with the meaning of these values. Question 1: What is the difference between total and active number of jobs? 8 Unit 4 International Business Machines, 2006

Question 2: According to iseries system environment, the iseries server has far more disk capacity than displayed on the status page. Do you know what the reason for this is? 3. Select the Jobs tab and look at the number of jobs, maximum jobs, and number of threads. Read also the chapter The structure of your system in the Work Management guide to learn how the operating system uses jobs and threads. 4. Review the information on the Processors tab. Processors will be covered in more details when discussing logical partitioning in a later lab unit. 5. Review the Memory tab. Note the total amount of main memory (main storage) that is available in the partition. If you want to know the memory is assigned to various pools, you can select the option to display active memory pools. Question 3: What are the active memory pools? 6. Explore the Disk Space tab as well. From here you can see the disk capacity and utilization. There are two more options on this tab. Use them to answer the following questions. In order to use the Disk Pools option, you need the following information: Service tool user: Password: PRFLAB5 STS4SYS Certain service tasks in i5/os can only be performed by signing on to the service tools utility. This is a separate user. Different privileges exists for users in the system service tools (SST). Question 4: How many disk drives are in disk pool 1? 7. When you are finished with the system monitor tasks, close all open windows except iseries Navigator itself. Finding and monitoring jobs It is important to understand how to find jobs on your iseries server. Whatever the reason might be, at some point in time you may need certain information from a particular job. In iseries Navigator, you can do a Find on all your jobs or you can narrow your search using the Include... function followed by Find. The Include... function allows you to put limitations on what is displayed in iseries Navigator. For example, instead of doing a Find on hundreds of jobs, you can run an Include... to display only certain job types. Or, you can display only those jobs with specific job user IDs. From a performance standpoint, if you have lots of jobs on the system, it is recommended that you use the Include... function to narrow the number of jobs searched. If you have a lot of jobs on the system, searching through all of them can hinder system performance. International Business Machines, 2006 Unit 4 9

It is assumed that iseries Navigator is still open and you are signed on with your personal user profile. 1. Expand Work Management and click Active Jobs. This option shows you all active jobs on within i5/os including server jobs. There is also another option to work with server jobs only. The jobs are grouped under the subsystem they are running in. 2. Open a 5250 session and sign on with your personal user profile. 3. Display the properties of the subsystem QBATCH and then from your interactive 5250 job. Interactive jobs run by default under the QINTER subsystem. Question 5: Are subsystem job properties and user job properties different under i5/os? Question 6: Do you see other job that run under your personal user profile? If yes, do you know what kind of jobs these are? To answer this question, you may want to use the iseries Information Center and search for the job name, such as QPWFSERVSO. For i5/os server jobs, you can also find a descriptive job name on the Server tab of the job properties. Question 7: Verifying your interative session propertiesd, what job description does your job use? Read about the use of job description. 4. Verify the remaining tabs of your interactive job properties. 5. Explore the iseries Navigator Include function (F11 key). Try to perform the following: Display only interactive jobs Display all jobs that run under your personal user profile use one time your profile name as the job user name and another time as the current user Question 8: Why do you get a different list of jobs displayed when using the user name in the job user parameter and another time in the current user parameter? 6. Also use the Find function in iseries Navigator when displaying all active jobs to find particular jobs. Task 3: Work with jobs via command line Of course, you also work with jobs and system status information from a command line. It always depends on your personal preference whether you want to use the graphical interface or the character-based interface. 10 Unit 4 International Business Machines, 2006

Following are a couple of commands that allow you perform similar tasks to the ones discussed in the previous lab task. It is optional for you to try out the command line functions. Work with active jobs (WRKACTJOB) Same as working with Active Jobs in iseries Navigator. Work with System Status (WRKSYSSTS) Provides a subset of information that you see in the System Status function in iseries Navigator. Work with Disk Status (WRKDSKSTS) Provides a subset of information that you see in the System Status function in iseries Navigator. It is provides more details on the individual disk utilization. The previous commands also provide the option to go directly to other system information via function keys. International Business Machines, 2006 Unit 4 11

12 Unit 4 International Business Machines, 2006

Lab 2: Defining job environments What This Exercise is About What You Should be Able to Do Additional information sources CL commands associated with this lab exercise unit The purpose of this lab exercise is to introduce the methods to create a personalized environment for user jobs. User jobs can be interactive of batch jobs whether they perform user tasks, business applications tasks or system administration and control tasks. At the end of the lab, students should be able to: Define and use job descriptions to control job environments and characteristics Use job logs for troubleshooting Determine the level of logging details Direct print (spool) output within the system This section lists reference literature and Web resources that contain further information pertaining the different tasks within this lab exercise. Work management guide iseries Information Center, Systems management > Work management http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp / Work management guide (PDF file) http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzaks/rzaks. pdf Job Scheduler for OS/400 http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/sc41 5324.pdf Advanced job scheduler http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzaks/rzaks ajs.pdf Performance adjuster http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm?info/experience/work3abstract.htm iseries work management concepts http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/c415 3063.pdf iseries system values http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzakz/rzakz. pdf The approach of this lab exercise is to learn new administrations and operations functions based on a graphical interface. However, sometimes there is a need to also know the corresponding CL commands to, for example, automate functions via CL programs. The following Table provides an overview of CL commands pertaining to the objectives of this exercise. Note that some commands might not be part of the base operating system. In these cases, the license program number that the International Business Machines, 2006 Unit 4 13

command is part of is listed in parenthesis. Command WRKJOBD WRKOUTQ WRKSPLF WRKJOB DSPJOBLOG CHGPRF DSPLIBL Description Work with Job Descriptions Work with Output Queue Work with Spool Files Work with Job Display Job Log Change Profile Display Library List Table: Useful and exercise-related CL commands The previous tables contains mostly Work with commands, because they typically allow you to perform other functions, such as display or create functions as well. Task 1: Creating job descriptions Study Time In a system environment that runs several business critical applications, you have to plan for and implement a solid and reliable job environment. One of the i5/os functions that allows you to define job characteristics or properties for one or more application users or jobs, is the job description. Within iseries Information Center under Systems management >Work management >The structure of your system, read about job descriptions. In this lab task, you will create your own job description. 1. Using your personal user profile, sign on to a 5250 session on <modify for your campus environment>. 2. Use the CL to create a job description and prompt for its parameter. 3. Create the job description according to the following specifications: Name the new job description JOBDxxx and store it in your library <modify for your campus environment>xxx (where xxx represents your student ID). Enter your name and student as a print footer text. Make sure that the libraries <modify for your campus environment>xxx, UNIWRK, and UNIMASTER are in the library list. The job priority when submitting jobs for batch processing should be 6. 4. Familiarize yourself with the remaining parameter of a job description. When done, finish the creation of your own job description. The new job description can be used for any interactive or batch job. 5. Use the CL command to change your profile and specify your new job description in the corresponding parameter. 6. Sign off and on again to use your own job description in your 5250 job environment. 7. Display your library list and verify that the three libraries you specified in the job description are in the list. Using the previously described method, you can define job characteristics 14 Unit 4 International Business Machines, 2006

for a job environment and assign these characteristics to individual users. Task 2: Directing print output to a specific output queue In many cases, applications create print output on behalf of the application user. Typical print output might be invoices, inventory lists, orders, packaging lists, etc. In many companies, some print output will be printed centrally, put into envelopes, and send out the customers. Other print output might be printed on department printers. In i5/os, there are several ways of defining where an application output will be directed to. Usually, print output is never sent directly to printers, instead it is spooled into print output queues and then printed on a printer that is attached to an output queue. Study Time In this lab task, you will create your own print output queue and learn how use it temporarily and permanently. Before you are going to get your hands on this task, refer to the Work management section in iseries Information Center and review the section on output queues. 1. Using your 5250 session from before, use the CL command to create a new output queue. 2. Familiarize yourself with the various parameter and create the output queue according to the following specifications: Name the new output queue OUTQxxx and store it in your library <modify for your campus environment>xxx (where xxx represents your student ID). Make sure that any user who has at least read authority to the new output queue can read, display, or send spool files in the queue. Define that users with a *JOBCTL special authority in their user profiles cannot control and operate this queue. This is typically required when you produce sensitive reports, such as financial status or create payroll application output. Then you do not want a normal operator to view and control the content of the output queue. 3. Once you created the output queue, you will change your current job to redirect all spool files to your new queue. This change is only temporary. That means when you sign off and on again, the change will not be remembered. 4. Use the command to change your job and enter the new output queue in the corresponding parameter. 5. Use the command DSPUSRPRF to display your own user profile and have the command directing the output to a spool file rather than displaying it in the 5250 window. 6. Now display the spool files in your output queue. There are several ways of doing this. You can work with your job and display all spool output of the current job, you can display all spool files of your user, or you can also work with the output queue itself. You should see a spool file with a printer file name of QPUSRPRF. A printer file defines the layout of the spool output. Like i5/os provides many printer files for system output, applications can also use printer files to define the layout of, for example, reports that the application produces. Defining printer files is typically the responsibility of application programmers. 7. Display the spool file. If everything was configured correctly, your International Business Machines, 2006 Unit 4 15

output from DSPUSRPRF should be listed in the OUTQxxx output queue. Now. let s make this change a permanent one. Question 1: Can you already think of two ways to make this change permanent? What would be the places to do this and what are the reasons for selecting either approach? 8. Let s assume that your job description will be used by many users and you want to make the change permanent. Change the corresponding parameter in your job description JOBDxxx. 9. Re-signon and verify that your output is directed to the correct output queue. 10. Keep the session active for the next lab task. Note: So far you have created an output queue to hold printer output. However, you have not actually sent any output to a physical printer yet. Printers can be attached locally to the iseries server via Twinax cable or can be attached remotely via LAN. Defining printers is not in the scope of this lab exercise. You will see how to define remote printers in an upcoming lab exercise. Task 3: Using job logs for troubleshooting and control Wouldn t it be nice if all programs would do what they are intended to in the first place and wouldn t it be also nice if all tasks would always run without problems. Well, in many cases, situations come up that nobody anticipated or sometimes due to handling errors jobs are not getting done as expected. In these cases, job logs can provide crucial information to see where the problem is. Study Time Every job that runs under i5/os keeps a job log. You can always display the job log of any running job on the system permitting you have the authority to do so. Sometimes you will notice that more or less information and in some cases that even no information is showing up in the job log. How much and what level of information is kept in a job log depends on your job properties. Read the section about managing job logs in the Work management section of iseries Information Center. Permitting that the logging level is set correctly, the job logs also stores all commands that a user entered. This information is also used by the command retrieval (history) function when you press F9 on a command line to retrieve previously entered CL commands. Let s explore some of the job log functions. 1. Within iseries Navigator open a connection to <modify for your campus environment> and use your personal user profile to sign on. 2. Open Work Management and display the active jobs. 3. Open the properties of your interactive job from the previous lab task. 4. Verify the job log settings. 5. Now use iseries Navigator and display the job log of your 16 Unit 4 International Business Machines, 2006

interactive session. You should see a message about the job start time and also the commands you entered in the session. 6. Switch to the interactive 5250 session and enter a few commands you know. 7. Re-display the job log. 8. Change the job log settings to logging level 1 and enter again some commands. Then display the job log again. Question 1: Do you see the CL commands you just entered? If not, why not? 9. Another aspect of the logging level settings is whether a job log gets written to a spool output when the job finishes. Typically, the logging level is set to 4 with a message severity of 00. That only controls what level of information is kept while the job is running. If the job ends normally, you usually get no job log written to spool output. If you want to get always a spool output no matter whether a job ends normally or abnormally, you need to specify this with the Create printer output for job log if job ends normally option. 10. Change the message logging settings so that job logs are always written to an output queue and that CL commands with all their entered parameters are also logged. Make this change temporary for your job. 11. Display the job log again and open the message with the message ID of CPF1124. Review the individual message properties. Question 2: Looking at the message detail, what information can be useful for troubleshooting or debugging application problems? If you want to make this change permanent, you can do this by changing the corresponding parameters in the job description. International Business Machines, 2006 Unit 4 17

18 Unit 4 International Business Machines, 2006

Lab 3: Creating a complete job environment What This Exercise is About What You Should be Able to Do Additional information sources This lab exercise section shows you how to create a complete environment for running jobs. This includes all aspects, such as prioritizing jobs, allocating main storage, defining an execution sequence, and more. At the end of the lab, students should be able to: Define a job environment with all components, such as subsystems, job queues, routing entries, memory pools Control the sequence of job execution Control the number of active jobs in a subsystem at a given time Define an environment for interactive and batch jobs This section lists reference literature and Web resources that contain further information pertaining the different tasks within this lab exercise. Work management guide iseries Information Center, Systems management > Work management http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp / Work management guide (PDF file) http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzaks/rzaks. pdf Job Scheduler for OS/400 http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/sc41 5324.pdf Advanced job scheduler http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzaks/rzaks ajs.pdf Performance adjuster http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm?info/experience/work3abstract.htm iseries work management concepts http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/c415 3063.pdf iseries system values http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzakz/rzakz. pdf CL commands associated with this lab exercise unit The approach of this lab exercise is to learn new administrations and operations functions based on a grahphical interface. However, sometimes there is a need to also know the corresponding CL commands to, for example, automate functions via CL programs. The following Table provides an overview of CL commands pertaining to the objectives of this exercise. Note that some commands might not be part of the base operating system. In these cases, the license program number that the International Business Machines, 2006 Unit 4 19

Command WRKJOBD Description command is part of is listed in parenthesis. Work with Job Descriptions ADDJOB Add job queue entry WRKOUTQ ADDRTGE WRKSBSD WRKJOB WRKJOBQ ADDWSE WRKSCHRPOOL WRKCLS WRKDEVD Work with Output Queue Add Routing Entry Work with Subsystem Description Work with Job Work with Job Queue Add Workstation Entry Work with Shared Pools Work with Classes Table: Useful and exercise-related CL commands Task 1: Creating a job queue Work with Device Descriptions Study Time The previous tables contains mostly Work with commands, because they typically allow you to perform other functions, such as display or create functions as well. A job queue contains an ordered list of jobs waiting to be processed by a subsystem. The job queue is the first place that a submitted batch job goes before becoming active in a subsystem. The job is held here until a number of factors are met. In order for jobs on a job queue to be processed, there must be an active subsystem that is accepting work from that job queue. When a subsystem starts, it attempts to allocate the job queues that it is configured to accept work from, and it must successfully allocate a job queue in order to process jobs from that job queue. Therefore, while one subsystem may be processing jobs from multiple job queues, only one subsystem may be processing jobs from a particular job queue at a time. Priorities that can be specified when submitting jobs to a job queue determine the position within the queue. Within the work management section in iseries Information Center, read the section on job queues. 1. If not already done so, use your personal user profile and sign on to a 5250 session on system <modify for your campus environment>. 2. Prompt the command to create a job queue. Familiarize yourself with all parameters. 3. Create the job queue according to the following specifications: Name the new job queue JOBQxxx and store it in your library <modify for your campus environment>xxx (where xxx represents your student ID). Specify that this job queue is not operator controlled. Question 1: Can a job queue transfer work to more than one subsystem at a given time? 20 Unit 4 International Business Machines, 2006

Task 2: Reviewing memory pools Study Time Task 3: Creating a subsystem A memory pool is a logical division of main memory or storage that is reserved for processing a job or group of jobs. On the iseries server, all main storage can be divided into logical allocations called memory pools. By default, the system manages memory pools. The system manages the transfer of data and programs into memory pools if necessary. You can control how much work can be done in a subsystem by controlling the number and size of the memory pools. The greater the size of the memory pools in a subsystem, the more work that can be done in the subsystem. Within the work management section in iseries Information Center, read the section on memory pools and activity levels. 1. Within your 5250 session, use the command to work with shared memory pools. 2. Review the current settings. DO NOT CHANGE ANY SETTINGS AT THIS TIME. Question 1: What is the *BASE and *MACHINE pool used for? Study Time A subsystem is an environment where work is processed on the iseries server. All jobs, with the exception of system jobs run within subsystems. More technically, a subsystem is a single, predefined operating environment through which the system coordinates work flow and resource use. The system can contain several subsystems, all operating independently of each other. Subsystems manage resources. Each subsystem can run unique operations. For instance, one subsystem may be set up to handle only interactive jobs, while another subsystem handles only batch jobs. Subsystems can also be designed to handle many types of work. The system allows you to decide the number of subsystems and what types of work each subsystem will handle. A subsystem can be either active or inactive. An active subsystem is one that has been started. An inactive subsystem is one that either has not yet been started, or has been stopped. The controlling subsystem is the interactive subsystem that starts automatically when the system starts, and it is the subsystem through which the system operator controls the system during system startup. Which subsystem actually runs as the controlling subsystem is defined in the system value QCTLSBSD. Within the work management section in iseries Information Center, read the section on subsystems. In this task, you will create your own subsystem. This subsystem will be customized to runs your own jobs in the next lab exercise. 1. Prompt the command to create a subsystem description. 2. Create a subsystem description according to the following specifications: Name the new subsystem <modify for your campus environment>sbsxxx and store it in your library <modify for your campus environment>wrkxxx. Define pool number 1 to use a storage size that is defined in the shared memory pool *SHRPOOL1. There should be a limit of 10 jobs that can run concurrently in your subsystem. Enter some meaningful description Define the display file SIGNONLAB5 in library UNIWRK as the International Business Machines, 2006 Unit 4 21

sign-on display file. The sign-on display file is the login page that is displayed when you start a character-based 5250 session. The SIGNONLAB5 file has already been prepared by your lab instructor. Task 4: Creating a class A class object contains the run attributes that control the run-time environment of a job. IBM-supplied class objects, or classes, meet the needs of both typical interactive and batch applications. Some of the run attributes, or parameters, that are important to work management are: Machine run priority (RUNPTY) Purge (PURGE) Time slice (TIMESLICE) Default maximum wait time (DFTWAIT) Maximum processing time (CPUTIME) Maximum temporary storage (MAXTMPSTG) Maximum threads Note: Maximum processing unit time and maximum temporary storage limits can help prevent an erroneous program from impairing system performance. However, a sufficient amount of processing time and temporary storage must be given to allow the job to complete. 1. Prompt the command to create a class. 2. Create a class according to the following specifications: Name the new class CLSxxx and store it in your library <modify for your campus environment>wrkxxx. Set run priority to 60. Assign a time slice of 1500 milli seconds. Familiarize yourself with the remaining parameters. Question 1: What can you control with the maximum CPU time parameter in a class? Task 5: Tying all components and settings together So far you have configured various objects, such as a class, a job queue, and so forth, that are not associated with your new subsystem at all. In the following steps, you will associate your new objects with your subsystem. Note that you are going to create a very basic environment for running interactive and batch jobs. There are many more options available to create special purpose subsystems. For example, you could create a subsystem just for handling communications jobs. Adding a workstation entry As mentioned before, your subsystem will also handle interactive workload. That means, you have to tell your subsystem that it is able to process a character-based 5250 session job. So far, you have not defined any specific workstation or device description for yourself. This will actually be done in Lab 4: Testing your environment. For now, you will just tell the subsystem that it will serve display devices of a specific name. 1. Prompt the command to add a workstation entry. 2. Add the workstation entry according to the following specifications: The new workstation entry should be added to the subsystem 22 Unit 4 International Business Machines, 2006

you previously created. The subsystem should serve workstations with a name that starts with <modify for your campus environment>xxx (where xxx is your student ID). That means the workstation name must be generic. Make sure you enter the correct value. If you make a mistake here, you might not be able to work with your subsystem later on or fellow students will get served by your subsystem. Make sure the Allocation parameter is set to *SIGNON. Question 1: What is the purpose of the Allocation (AT) parameter? Adding a job queue entry Now it is time to associate the job queue you created in Task 1: Creating a job queue with your subsystem. Without this association, the job queue can never submit any work to a subsystem for processing. 1. Prompt the command to add a job queue entry. 2. Add the job queue entry according to the following specifications: The new job queue entry should be added to the subsystem you previously created. The job queue to be added is JOBQxxx in your library <modify for your campus environment>xxx. Define a maximum of 1 active job. Set the maximum number of active jobs for priorities 1 to 6 to 1. The maximum number of active jobs for priority 7 should be 2. The maximum number of active jobs for priority 8 and 9 should be *NOMAX. Adding routing entries A routing entry determines how a job enters the subsystem and what environment it runs in. A subsystem can contain many different routing entries. Each routing entry defines the following characteristics: Main storage subsystem pool to use Controlling program to run (typically the system-supplied program QCMD) Additional run-time information (stored in the class object) Thread and affinity information As mentioned previously, in a commercial application environment, running a job just under a certain priority does not meet the requirements to operate a balanced and performing application environment. Routing entries are a far superior way to define a job environment in more granular and flexible way. Study Time Review the routing entry section in the subsystem chapter in Work Management guide listed as iseries work management concepts in Additional information sources. You will add two routing entries, one for the interactive jobs and one for batch jobs. 1. Prompt the command to add a routing entry to your subsystem International Business Machines, 2006 Unit 4 23

2. Add the routing entry according to the following specifications: The new routing entry should be added to the subsystem you previously created. The routing entry sequence number should be 10 Enter QCMDI as the compare value and start the comparison in position 1. Call the program QCMD in library QSYS. Enter the name and library of the class you created in Task 4: Creating a class. Make sure you run the job in storage pool 1. Since you defined only one storage pool when you created the subsystem, this is the only choice that will eventually work. 3. Add the second routing entry according to the following specifications: The new routing entry should be added to the subsystem you previously created. The routing entry sequence number should be 20 Enter QCMDB as the compare value and start the comparison in position 1. Call the program QCMD in library QSYS. Enter the name and library of the class you created in Task 4: Creating a class. Make sure you run the job in storage pool 1. Since you defined only one storage pool when you created the subsystem, this is the only choice that will eventually work In the next lab section, you will test the complete environment that you just created. Let s see if everything works as you planned it. 24 Unit 4 International Business Machines, 2006

Lab 4: Testing your environment What This Exercise is About What You Should be Able to Do Additional information sources This lab exercise section lets you test your ow job environment that you created in the previous tasks. You will see how a job is processed from entering the system until it is completed. For an application programmer, systems architect, and IT manager, these skills are essential to implement and operate business applications efficiently. At the end of the lab, students should be able to: Define a workstation to run its interactive jobs in a given job environment (subsystem) Submit and control batch jobs Use the job scheduler to schedule repeating system and application tasks This section lists reference literature and Web resources that contain further information pertaining the different tasks within this lab exercise. Work management information iseries Information Center, Systems management > Work management http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp / Work management guide (PDF file) http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzaks/rzaks. pdf Job Scheduler for OS/400 http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/sc41 5324.pdf Advanced job scheduler http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzaks/rzaks ajs.pdf Performance adjuster http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm?info/experience/work3abstract.htm iseries work management concepts http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/c415 3063.pdf iseries system values http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzakz/rzakz. pdf CL commands associated with this lab exercise unit The approach of this lab exercise is to learn new administrations and operations functions based on a grahphical interface. However, sometimes there is a need to also know the corresponding CL commands to, for example, automate functions via CL programs. The following Table provides an overview of CL commands pertaining to the objectives of this exercise. Note that some commands might not be part of the base operating system. In these cases, the license program number that the International Business Machines, 2006 Unit 4 25

Command ENDSBS Description End Subsystem WRKACTJOB Work with Active Jobs WRKSBSJOB HLDJOBQ RLSJOBQ WRKJOBSCDE CHGJOBQE WRKSBMJOB WRKJOBQ WRKOUTQ WRKSPLF SBMJOB STRSBS command is part of is listed in parenthesis. Work with Subsystem Job Hold Job Queue Release Job Queue Work with Job Schedule Entries Change Job Queue Entry Work with Submitted Jobs Work with Job Queues Work with Output Queues Work with Spool Files Submit Job Start Subsystem Table: Useful and exercise-related CL commands The previous tables contains mostly Work with commands, because they typically allow you to perform other functions, such as display or create functions as well. Task 1: Defining a workstation session to use your subsystem The system controls most Input/Output operations, such as interacting with a user via a 5250 session, sending print output to a printer, or saving information to a tape device, via device descriptions. This is similar to the Unix or Linux world, where devices are also used to perform input/output operations. As the name implies, a device description describes the characteristics of a particular device, such as a printer or tape device. When you start a 5250 session, the system uses a display device to present you with the sign-on display. You need a separate display device for every new session request. When a session ends, the display device can be reused by another user. Note that a session does not end when a user signs off of the system. The session ends when the 5250 emulation window is closed or, in the case of the 5250 emulation program, the disconnect button was pressed. In a traditional 5250 workstation environment with Twinax workstations, each workstation represents a physical device. When using an emulation program, the display devices are virtual devices rather than physical devices. System values, such as QAUTOVRT, control if i5/os can automatically create devices when needed. In this lab task, you have the system automatically create a virtual display device for you. 1. Via the Start > All Programs > IBM iseries Access for Windows > Emulator > Start or Configure Session option, create a new iseries session. Note that the start path mentioned, refers to the default installation path for IBM iseries Access for Windows. Depending on your environment, you may need to start the session configuration via a different path. 2. Create the session according to the following specifications: Establish a session to (modify for your campus environment>. Enter the name of the workstation entry you defined in Adding a workstation entry. 26 Unit 4 International Business Machines, 2006

Select the options to avoid duplicate workstation names on your and other workstations. Remember that a display device can only be used by one session at a time. If you would save your session profile and start it twice without the option to avoid duplicate names, the second session would try to use the same device. As a result, only the first session would work. Avoiding duplicate names will add suffixes to the name, thus creating unique names. Figure: 5250 session definition 3. Save and try to start the session. Question 1: Does the session start and do you get a signon display? If not, can you imagine why? 4. Using your first 5250 session, start your subsystem. Use the following command to start the subsystem: UNIMASTER/STRSBS SBSD(<modify for your campus enviroment>sbsxxx) This is a modified command that performs further checking on the ownership of the subsystem. You are only allowed to start subsystems you are the owner of. 5. Check your new 5250 session window. You should now get your subsystem serving the signon display to your device. The previously described approach can be used to serve specific interactive International Business Machines, 2006 Unit 4 27

5250 session via different subsystems. You may ask, why is this important? Let s talk about one example. Many companies operate globally. That means they run applications which are national language enabled. They serve different signon displays, different menus, etc. to employees in various countries. To the employees, it appears that they working on totally different systems, but they are actually all working on the same system in the same operating environment. Task 2: Submitting and controlling batch jobs Now let s explore a job environment that you find with every commercial application out there in the market. Also you might have hundreds or even thousands of users working interactively on the iseries server at the same time, there are always tasks, such as creating reports, generate invoices, etc., that run in the background. These background jobs run in their own environment as batch jobs. Typically, administrators create their own subsystem environment for batch jobs, just like i5/os provides also a default batch subsystem QBATCH. In your case, you will run interactive and batch jobs in the same subsystem. You can still control via routing entries and classes the job environment of the different job types. In this task, you will perform the following: 1. Submit a job via your job queue to your subsystem using your job description. 2. Submit two jobs in a row and see how sequential job processing is done. 1. Before you submit any batch job to your job queue, put the job queue on hold. Use the hold job queue command to put your JOBQxxx job queue on hold. 2. Via the 5250 session, submit a job that prints out your subsystem description using the following command: SBMJOB CMD(DSPSBSD SBSD(<modify for your campus enviroment>wrkxxx/(<modify for your campus enviroment>sbsxxx) OUTPUT(*PRINT)) JOB(DSPSBSDxxx) JOBD((<modify for your campus enviroment>wrkxxx/jobdxxx) JOBQ((<modify for your campus enviroment>wrkxxx/jobqxxx) This is the first step in the life of a job 3. Work with submitted jobs to see the status of your job. Question 1: What is the status, the job type, and job name of your submitted job? 4. Now release the job queue. 5. Since this job runs very quickly, you probably don t have a chance to see the job working. Check out if the job completed. Use again the work with submitted jobs command and review the status of the job now. The status should have changed. Take also the option to view the generated spool files. Did you get the printout of the subsystem description? Let s dig a little bit more into batch jobs and the way you can control the processing order. In many applications, certain batch jobs have dependencies. That means, that some batch jobs can only start after another one has finished, because the second job depends on the output of 28 Unit 4 International Business Machines, 2006

the previous one. 6. Submit the program call to program UNIMASTER/BATCHA as follows (note the job name BATCH1. SBMJOB CMD(CALL PGM(UNIMASTER/BATCHA)) OUTPUT(*PRINT)) JOB(BATCH1) JOBD(<modify for your campus enviroment>wrkxxx/jobdxxx) JOBQ(<modify for your campus environment>wrkxxx/jobqxxx) 7. Submit the program again as follows (note the job name BATCH2. SBMJOB CMD(CALL PGM(UNIMASTER/BATCHA)) OUTPUT(*PRINT)) JOB(BATCH2) JOBD(<modify for your campus environment>wrkxxx/jobdxxx) JOBQ(<modify for your campus environment>wrkxxx/jobqxxx) 8. Work with the subsystem jobs of your subsystem and check the status. Question 2: How many jobs are running and what is/are the job name/s? Question 3: What is the status of the job? 9. Obviously, you need to do something to get your second job running. When you displayed the status of your subsystem jobs, you also have an option to display the messages for the job. Display the messages and take the necessary option to continue with program execution. You should then see the second job BATCH2 being processed. Question 4: Why does the subsystem processes only one job at a time? 10. Make the necessary changes in your subsystem environment to allow a maximum of 10 active jobs at a time. You need to change the job queue entry. 11. Before the change takes affect, you need to stop and start the subsystem again. As with the start subsystem command, there is also a special version of the end subsystem command. Use the following command to end your subsystem: UNIMASTER/ENDSBS SBS(<modify for your campus environment>sbsxxx) When you end subsystems that still process active jobs, by default, the subsystem waits until all jobs are ended. If you do not want to wait, you can end the subsystem immediately or after a certain time has elapsed by using the DELAY and OPTION parameter of the ENDSBS command. 12. Submit the previous batch jobs again with the names BATCH1 and BATCH2. International Business Machines, 2006 Unit 4 29

13. Check on your submitted jobs. Question 5: Are they both active at the same time? 14. Now try to get both jobs running at the same time. Display again your job queue entry definition for your subsystem and check how many jobs can be run at the same time for each priority. You will see that some priorities allow only 1 job while others allow more jobs or even set no maximum. Just remember, even if you set no maximum for a certain priority, the number is still limited by the maximum number of active jobs per job queue and for the subsystem itself. 15. Submit both jobs again, but this time with different job priorities or a job priority that allows more than one job to run at the same time. 16. Verify that both jobs are running concurrently. Task 3: Schedule batch jobs and commands Of course, the batch jobs for many applications are started automatically. This can be done via autostart jobs in a subsystem. Other batch jobs need to run on a timely basis. These might be jobs that perform some backup tasks, generate weekly financial or inventory reports, etc. To schedule the submission of batch jobs, i5/os provides two scheduling functions. The first option is the job scheduler, which is included in i5/os. It provides all basic functions that you need to schedule batch jobs that are run only once or repeatedly. A second option is the license program Advanced Job Scheduler. The Advanced Job Scheduler provides many more options, but is not covered in this lab task. Let s concentrate on the function that is integrated in i5/os. In this lab task, you will create job schedule entries to submit a batch job that creates the audit report you created in lab module 3 (Starting with i5/os CL Programming). 1. Using your 5250 session and your personal user profile, enter the command to work with job schedule entries. The new schedule entry should do the following: Has a name of AUDITxxx (where xxx is your student ID) The command to be scheduled in batch is AUDITRPT in your library <modify for your campus environment>scrxxx. Note that this is your scratch library you create in the CL lab exercise unit. If you do not have this program/command anymore, you can also submit a job of your choice, preferably a job that generates some spool file. The job should run at the last day of every month at 23:00 o clock. It should be submitted to your subsystem s job queue using also your job description. 2. Add another schedule entry, but this time run it only once in about 5 minutes from your current time. 3. Check out the other scheduling options. Optional lab As a challenge for those of you who want to explore some more functions, try to autostart the BATCHA program every time your subsystem starts. 30 Unit 4 International Business Machines, 2006

Appendix A: Answers Lab 1: Introduction to i5/os Work Management This appendix lists the answers to most of the question of this lab module. Task 2: Monitoring jobs with iseries Navigator Q1: The active number of jobs refers to the current number of jobs active in the system (jobs that have been started, but have not yet ended), including both user and system jobs. The total number of jobs refer to the number of user and system jobs that are currently in the system. The total includes: All jobs on job queues waiting to be processed. All jobs currently active (being processed). All jobs that have completed running but still have output on output queues to be produced. Q2: The iseries server is a partitioned system. That means multiple virtual systems exist on a single hardware. Currently, the i5/os partition <modify for your campus environment> has just a fraction of the available disk space allocated. Q3: By default, i5/os comes with 4 active memory pools. These are the Machine pool, the Base pool, the Interactive pool, and the Spool pool. Q4: The system has in its disk pool one 6 disk drives. You can see in the view the individual utilization and resource names. Q5: Basically No, every job under i5/os has the same basic characteristics and follows the same flow through the system. Q6: You should also see the jobs from your iseries Navigator connection. iseries Navigator uses multiple server jobs to fulfill client requests. These server jobs are also called host servers. In iseries Navigator you can view the status of the host server jobs under Network > Servers > iseries Access. Depending on the functions you used within your active iseries Navigator session, you will see different jobs for your user profile. To find out what function each of these jobs serve, you can display the Server tab of the corresponding job or search for the job name, such as QPWFSERVSO or QZRCSRVS, in the iseries Information Center. Q7: If the job environment was not changed, your job uses the job description UNIJOBDFUB. Q8: The unique identifier of a job consists of three parts, the job name, job user, and a job number. When you display jobs for a particular job user, only jobs that were started under that user are displayed. However, there are server jobs, such as the host server jobs, that are started under a different user (i.e. QUSER). If a user establishes a new iseries Navigator session with a host server, a new job gets spawned where the job user remains the server job user name while International Business Machines, 2006 Unit 4 31

the actual job is swapped to the user s profile for execution and access control. Lab 2: Defining job environments Task 2: Directing print output to a specific output queue Q1: To make the change for redirecting spool output to a specific output queue permanent, you have basically two main choices. The first one is to change the output queue parameter of your user profile via the CHGPRF command and the second method is to define the new output queue in the job description that the user profile uses. Typically you would make the change in the user profile when only a few users are affected, but the remaining properties of a commonly used job description are the same for many users. You would perform the change in the job description when all users that use the job description are affected. Task 3: Using job logs for troubleshooting and control Q1: You should not see the CL commands you just entered in the job log, because you changed the logging level to 1. In order to see the CL commands you entered, you need to set the logging level to a minimum of 3. Sometimes, if you know that a job produces many messages and the program is tested very well, you may want to reduce the number of messages that are logged by changing the logging level. Q2: The message details also show the program that send the message, which instruction number generated the message and which program received the message. The information is in many cases the entry point to debugging application code. Lab 3: Creating a complete job environment Task 1: Creating a job queue Q1: The answer is no. A job queue can only be allocated to one active subsystem at a time and, therefore, can only submit work to the subsystem that has this job queue currently allocated. However, a single job queue can be defined in multiple subsystems. Task 2: Reviewing memory pools Q1: The base memory pool contains all unassigned main storage on the system that is, all main storage that is not required by another memory pool. The base pool contains storage that can be shared by many subsystems. The base memory pool is used for batch work and miscellaneous system functions. Activity levels and the minimum base pool size is defined via system values. The machine memory pool is used for highly-shared machine and operating system programs. The machine memory pool provides storage for jobs the system must run that do not require your attention. The size for this memory pool is specified in the machine memory pool size system value (QMCHPOOL). No user jobs run in this memory pool. Task 4: Creating a class Q1: The maximum CPU time specifies the maximum processing unit time (in milliseconds) that the job can use. If the job consists of multiple routing steps, each routing step is allowed to use this amount of processing unit time. If the maximum time is exceeded, the job is ended. This parameter might be useful when operating a test subsystem for application development and test on the same partition the production environment with its applications is running on. In case, a program performs excessive use of processing units due to 32 Unit 4 International Business Machines, 2006

coding errors, the error does not affect the production environment too much. Task 5: Tying all components and settings together Q1: The Allocation (AT) parameter defines at which time a workstation device will be allocated by the subsystem. if you specify *SIGNON, the subsystem tries to allocate all workstations devices that meet either the name you specified or the workstation type. If you specify *ENTER, an interactive job can only enter the subsystem via the Transfer Job (TFRJOB) command. Lab 4: Testing your environment Task 1: Defining a workstation session to use your subsystem Q1: The session should actually start. You can see this at the bottom of the emulation window. The status line shows a message that the session started successfully. However, there is no subsystem that can actually allocate the new device description and serve the signon screen. Your subsystem has not been started yet. Task 2: Submitting and controlling batch jobs Q1: If you put the job queue on hold as directed, the submitted job stays in the job queue with a status of JOBQ. It has a type of BATCH and carries the name you specified on the SBMJOB command DSPSBSDxxx. You should always specify meaningful job names. Especially when running many jobs at the same time, the job name is typically the only way to tell the jobs apart. Q2: You should only see the job with the job name BATCH1 as an active job. Q3: The status of the job is MSGW. This means that the job waits for a message. While it might be okay for some jobs to wait for other programs to send message to them, there is also a strong possibility that there is some user intervention required. In this case, the job waits for somebody to answer a question before proceeding. Q4: Remember when you create the subsystem description and added the job queue entry to the subsystem description. At this time you specified that the maximum number of jobs that can be processed at a time is 1. Q5: Even if you allowed now 10 active jobs to run at the same time in the subsystem, you still have limited the number of jobs for specific priorities. Since the maximum number of jobs for the used priority is set to 1, only one job can run at the same time under this priority. International Business Machines, 2006 Unit 4 33

Notices This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-ibm product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-ibm Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information concerning non-ibm products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-ibm products. Questions on the capabilities of non-ibm products should be addressed to the suppliers of those products. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing, or distributing application programs conforming to IBM's application programming interfaces. 34 Unit 4 International Business Machines, 2006

Trademarks IBM Corporation 1994-2006. All rights reserved. References in this document to IBM products or services do not imply that IBM intends to make them available in every country. The following terms are trademarks of International Business Machines Corporation in the United States, other countries, or both: DRDA iseries IBM OS/400 Redbooks(logo) IBM.COM AS/400 AS/400e eserver System i5 e-business on demand IBM (logo) System i Rational is a trademark of International Business Machines Corporation and Rational Software Corporation in the United States, other countries, or both. Intel, Intel Logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Other company, product or service names may be trademarks or service marks of others. Information is provided "AS IS" without warranty of any kind. All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Information concerning non-ibm products was obtained from a supplier of these products, published announcement material, or other publicly available sources and does not constitute an endorsement of such products by IBM. Sources for non-ibm list prices and performance numbers are taken from publicly available information, including vendor announcements and vendor worldwide homepages. IBM has not tested these products and cannot confirm the accuracy of performance, capability, or any other claims related to non-ibm products. Questions on the capability of non-ibm products should be addressed to the supplier of those products. All statements regarding IBM future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. Contact your local IBM office or IBM authorized reseller for the full text of the specific Statement of Direction. Some information addresses anticipated future capabilities. Such information is not intended as a definitive statement of a commitment to specific levels of performance, function or delivery schedules with respect to any future products. Such commitments are only made in IBM product announcements. The information is presented here to communicate IBM's current investment and development activities as a good faith effort to help with our customers' future planning. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput or performance improvements equivalent to the ratios stated here. Photographs shown are of engineering prototypes. Changes may be incorporated in production models. International Business Machines, 2006 Unit 4 35