Ending Subsystems


Powering down an advanced computer system like the i5 is no simple matter. You cannot simply flip the power switch to the OFF position, or pull the plug.

The i5 power-down process is so complex because, at any given time, dozens of users may be signed on and performing all sorts of tasks. The system may also be running batch jobs, communicating with other systems elsewhere in the world, or printing reports (to name a few possible functions). Before you can shut down your system, you must ensure that all active tasks have ended.

Tip 

You can check system activity using the Work with Active Jobs (WRKACTJOB) command. This command shows what jobs are currently active (i.e., which jobs are actually running). Some jobs are "system" jobs that you will see all the time, even when you are the only person using the system. This situation is normal.

You must not use the WRKACTJOB command indiscriminately all day long. WRKACTJOB builds a large overhead in order to display statistical information about each job. If you don't need to see all active jobs during your normal daily work, you should consider using the Work with User Jobs (WRKUSR-JOB) command, which displays jobs by user profile name, or the Work with Subsystem Jobs (WRKSBSJOB) command, which displays jobs by subsystem name.

The easiest way to ensure that no new jobs start on the system is to end all subsystems. When you end a subsystem, you may allow active jobs to continue running or force them to end.

The first thing you should do to power down the system is to announce it to all your users by sending them a message. The message should be friendly yet authoritative. Your users should understand that, if you are going to cut them off the system, it is because you have a good reason to do so. Keep the users' view-point in mind; don't think that the work they are doing is unimportant. Give users plenty of time to end the tasks they are performing.

Announcing Power Down

The best way to announce the upcoming power down is to send everyone a break message using the Send Break Message (SNDBRKMSG) command. When you send a message using this command, the message is immediately displayed at the user's screen and interrupts whatever the user is doing. The user is forced to read the message and must press Enter to return to whatever she was doing.

When you prompt for the SNDBRKMSG command, you must type the message text and identify who should receive the message. For example:

      SNDBRKMSG MSG('Shutting down the system in 30 minutes. +                     Please sign off as quickly as possible.') +                  TOWS(*ALLWS) 

This command sends the same message to all display stations, whether they are signed on or not.

The ENDSBS Command

Before you can power down the system, you must stop all subsystems.

Subsystems are discussed in greater detail in Chapter 4. For now, it is sufficient to know that a subsystem is a division of system resources in which work is performed.

Use the End Subsystem (ENDSBS) command to shut down a subsystem. At a command line, type ENDSBS (case doesn't matter) and press the F4 key to prompt for parameters. When you prompt the ENDSBS command, the system asks you for the name of the subsystem you want to end, and whether you want a controlled end (*CNTRLD) or an immediate end (*IMMED).

If you specify OPTION (*CNTRLD), all active jobs are allowed to continue for as long as the DELAY parameter specifies. You can change the value presented by default for a given number of seconds or *NOMAX, which literally means "no maximum," which lets active jobs continue indefinitely.

Tip 

Because few people enjoy waiting, it is tempting to request *IMMED every time. You must resist that temptation. Ending jobs immediately forces the system to take drastic measures to end jobs. If the jobs were updating files (especially keyed files), the system must spend additional time repairing the files the next time you IPL.

If you used the SNDBRKMSG command as indicated above, you can run the ENDSBS command now. Specify *ALL subsystems and a DELAY of 1800 seconds (30 minutes):

      ENDSBS SBS(*ALL) OPTION(*CNTRLD) DELAY(1800) 

You must run this command from the system console. When you execute this command, the following will happen:

  • All workstations that are presently showing the sign-on display will be varied off. The sign-on display disappears, and the cursor moves to the top-left corner. This makes all display stations unusable except the system console.

  • All active jobs are given 30 minutes to end of their own accord (such as by signing off).

  • Thirty minutes from now, the system forces all jobs to finish, no matter what they are doing.

All subsystems will be ended, including the controlling subsystem. The only display station that remains available is the system console. Do not sign off from the console.



IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 245

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net