• Aucun résultat trouvé

I N I T I A L P R O G R A M L O A D ( I P L }

System operation begins with an initial program load (lpL) which clears main storage and transfers the supervisor (a component of the system control program) from disk into main storage.

IPL should be performed every time the system power is turned on, the system pack is changed, or a recovery procedure requires it. lt is initiated from one of the following five sources: a card reader (alternate), the F1 s i m u l a t i o n a r e a o n d r i v e l, t h e R1 simulation a r e a o n d r i v e 1 , th e F l simulation a r e a o n d r i v e 3 ( 3 3 4 4 o n l y ) , o r t h e R l s i m u l a t i o n a r e a o n d r i v e 3 ( 3 3 4 4 o n l y ) .

IPL from drive 3 provides operation of the system entirely from fixed media. Also, it enables drives 1 andlor 2 to be used as offline devices when there are no simulation areas o n d r i v e s 1 a n d 2 c u r r e n t l y i n u s e . I n t h i s case, i t i s r e c o m -m e n d e d t h a t a l l 5 4 4 4 u n i t codes ( F l , FZ, R1, R2) be assigned to simulation areas on drives 3 and 4.

Choosing any of the disk program load positions results in a s p e c i f i c s i m u l a t i o n a r e a b e i n g a s s i g n e d t h e F l o r R 1 u n i t code. This assignment overrides any assignment made for that unit code during system generation. The assignment of this unit code is made for all partitions; this provides a common system pack for all partitions. Following are the simulation areas assigned to the four switch positions:

After the IPL device is selected and the program Load button is pressed, the date prompt appears on the CRT screen. The date is entered in the format chosen during system generation (either mm/ddlVV or dd/mm/yy). lf the system date is not given, it must be supplied before any program execution is initiated. The date is then supplied with a DATE OCL statement or a DATE command. The system date is used for time stamping certain messages by t h e ti m e - o f - d a y m a c r o i n s t r u c t i o n s , t h e R p G ll T I M E o p e r a t i o n c o d e , a n d b y t h e C O B O L and FORTRAN CFTOD modules. The system date can be changed by the operator o n l y w i t h t h e D A T E command a n d o n l y w h e n a l l p a r t i t i o n s are at end of job. lf the interval timer is specified at system generation. the system date is changed at midnight, when the timer changes from 23.59.59 to 00.00.00.

After the response to the system date has been processed, the CRT display contains EJ messages for all the partitions.

At this point. there are three possible actions:

o lf spooling was not chosen during system generation, the operator can now initiate program execution by responding to the EJ message for the partition in which the program is to execute.

o When spooling is chosen at system generation, the spooling support is loaded with the supervisor during lPL. lf spool is not going to be used, the operator has the option to cancel spooling support at this point.

The CANCEL SPOOL command causes the spooling routines to be removed from main storage. making addi_

t i o n a l m a i n s t o r a g e a v a i l a b l e t o a n y p a r t i t i o n . ( y o u must perform another lpL when spooling support is desired.) The operator can now initiate program execu-tion by responding to the EJ message for the partition in which the program is to execute.

a When spooling is to be used, the operator can start spooling either by responding to an EJ message for a partition or by entering a START SPOOL command.

Activating spool automatically by initiating execution in a partition causes space for the spool file to be obtained on a main data area according to the disk unit and size specified during system generation. Any exist-i n g s p o o l e d d a t a re m a i n s i n t h e s p o o l f i l e a n d is n o t l o s t . Activating spool with a START command is required only to override the disk unit and/or size of the spool file specifications made during system generation or to remove any existing spooled data. After the START command has been entered and processed, the CRT display contains SPOOL lS ACTIVE messages for each partition being spooled. After jobs have been placed on the spool reader queue, the operator can initiate program execution by responding to the program message for the partition in which the program is to execute. lSee IBM System/3 Model lS User's Guide to Spooling, CG21-7632.1

On 5704-SC2, there are generally more messages on the CRT than on 5704-SC1. lf all active messages do not fit one CRT screen, it may be necessary to scroll through all messages by repeatedly pressing the PF12 key.

At this point, it may be helpful for the operator to display the system status to determine that the system is set up as desired. The DISPLAY STATUS command provides the system status on the CRT screen.

P R O G R A M E X E C U T I O N

A minimum of two OCL statements are required to load a program into the system for execution. LOAD and RUN are the two basic OCL statements needed to load and execute programs;for those programs in which no disk files are used, they may be the only OCL statements. The

LOAD statement identifies the program to be executed and indicates whether the program is to be loaded from an object library or from the partition's system input device. One LOAD statement is required for each program executed.

The following examples show the OCL statements needed to load two system service programs: disk initialization a n d fi l e d e l e t e .

The f ile delete program is loaded.

T h e d i s k in i t i a l i z a t i o n p r o g r a m is loaded.

/ / L Q A D $ D E L E T , F l

/ / L O A D $ I N I T , F 1

S y s t e m F a c i l i t i e s 2 4 3

To load an object program from the system input device, an *

must follow the word LOAD. (The * tells the system that an object deck follows the RUN statement.) A /*

statement must follow the object deck; any data will f o l l o w th e /*. The following e x a m p l e i l l u s i r a t e s t h e s t a t e -ments required to load a program from the system Input d e v i c e :

The object program is temporarily copied into the object library on the system pack and then loaded into main storage for execution. LOAD * programs will be accepted in any partition; 5704-SC2 permits several partitions to execute non-overlay LOAD * program simultaneouslv.

Job and Step processing

The input stream (programs to be processed) is made up of two different units of work: jobs and job steps. To support these two units of work, the system provldes two processing modes: job mode and step mode, Job mode is indicated to the system by the presence of JOB statements in the input stream. Step mode is indicated by the absence of JOB statements in the input stream (see Figure 2-3).

B o t h m o d e s c a n b e u s e d i n t h e m u l t i p r o g r a m m i n g e n v i r o n _ m e n t {two or more partitions r u n n i n g c o n c u r r e n t l y ) o r w h e n o n l y o n e p a r t i t i o n is in use. One partition can be r u n n i n g i n j o b m o d e while another i s in s t e p m o d e . Only job mode can be used in partitions with spooling active.

Job Step Mode

A job step is a request for execution of a program and includes a description of the system ,urour"", required by the program. A job step may or may not be part of a job.

When a job step is part of a job, the system is in job mode {indicated by the presence of a JOB OCL statement}. When rio JOB OCL statements have been encountered in the input stream in which job steps are running, the system is in step mode. In step mode, each set of LOAD/RUN statements is processed independently, The system input device is released after the RUN statement has been processed and the program is executing. Step mode is not supported in partitions that have spooling support active.

rVofe; Some programs. such as the RpG ll compiler and disk sort, require system input device dedication while executing, in which case, the system input device remains assigned to that partition until those programs release it.

An attribute bit in the object library directory entry indicates whether or not a program requires system ,nput d e d i c a t i o n .

When a 2 or 3 option is selected for a system message and the system is in step mode, only the current job step is canceled. The system flushes the input stream until a JOB. LOAD, CALL, /., or l& statement is encountered.

l f a J O B , L O A D , or CALL statement t e r m i n a t e s t h e f l u s h , the system input device stays assigned to the partition.

The LOAD statement is usually the beginning of a job step's OCL; however, the beginning may be indicated by o n e o f t h e f o l l o w i n g :

o The first record of a job's OCL.

o lf the previous job step was canceled and the flush ended on a I. or l&, the record after the l. or l&.

o l f t h e p r e v i o u s j o b step was canceled a n d th e f l u s h d i d not end on the /. or /&, the statement that ended the f l u s h .

o lf the previous job step was not canceled and the parti-tion is not in a nested procedure, the record after the last record read for the previous job step.

o lf in a nested procedure, the statement after the CALL to a procedure with a LOAD statement (end of procedure goes to the statement after the CALL in a nested proce-dure or. if at the end of a proceproce-dure nest, the nexr record in the input stream).

The statements following this record (the beginning of a job step's OCL), through the next RUN statement and any records read from the input stream by this step, are asso-c i a t e d w i t h t h i s jo b s t e p . I n j o b m o d e , a n y im m e d i a t e l V following /. or l& statement is also included. lf the step is canceled in job mode, the end of the step's OCL is the end of the OCL for the job in which it is contained. lf the step is canceled in step mode, the end of the step's OCL is the statement before the next /., /&, CALL, LOAD, or JOB statement (the /. or /& statement is included in this step).

Job Mode

A job is a group of related job steps that must be executed in sequence. Each job step must be successfully completed before the next job step can be executed. A job includes all the programs. files, and OCL statements necessary ro c o m p l e t e t h e t a s k . T h e b e g i n n i n g o f a j o b i s u s u a l l y i n d i -cated by the JOB OCL statement in the input stream for a partition. However, the beginning of a job's OCL may be indicated by one of the following:

o The first record in an input stream after lPL.

o With input spooling, the first record of the spooled records for a job.

o The first record from the input stream after the last record of the previous job (if the previous processing mode was job mode) or job step (if the previous process-ing mode was step mode).

All OCL statements that follow this record or the JOB statement but precede the next JOB statement are associa t e d w i t h t h e j o b . A n y n u m b e r o f L O A D / R U N c o m b i n associa -t i o n s a n d / o r C A L L / R U N c o m b i n a -t i o n s c a n b e in c l u d e d i n a job. The job name from the JOB OCL statement is used t o i d e n t i f y , m o n i t o r , a n d c o n t r o l j o b s w h e n s p o o l i n g . When job mode is used, JOB OCL statements must be i n c l u d e d in t h e i n p u t s t r e a m to d e f i n e th e j o b s . T h e y indicate to the system that job mode is active and that the system input device assigned to the partition will not be r e l e a s e d u n t i l j o b m o d e i s t e r m i n a t e d . P r o c e s s i n g i n j o b mode ensures that a group of programs are executed s e q u e n t i a l l y , i n t h e c o r r e c t p a r t i t i o n , a n d i n a p a r t i t i o n that has sufficient main storage to accommodate all steps of the job. When a job is initiated, the system checks the P A R T I T I O N a n d C O R E p a r a m e t e r s , i f s p e c i f i e d , i n t h e J O B O C L s t a t e m e n t to e n s u r e th a t t h e j o b i s i n i t i a t e d in the correct partition and that enough main storage is allocated to the partition to satisfy the CORE parameter.

lf either of these conditions is not met, the system issues a message and the job must be canceled. The system input device, unless it is the CRT/keyboard, must be dedicated t o t h e p a r t i t i o n b e i n g r u n i n j o b m o d e o n n o n s p o o l i n g systems, or on systems that do not have input spooling.

To end job mode and return to step mode, a /. OCL statem e n t i s p l a c e d in t h e i n p u t s t r e a statem . J ' h i s s t a t e statem e n t in d i -cates to the system that job mode is to be terminated and the system input device is no longer ,iedicated to that job.

Job mode will resume when another JOB statement is processed.

Job mode must be used when spooling is active. The spool-i n g r o u t spool-i n e s h a n d l e jo b s c h e d u l spool-i n g a n d j o b i n i t i a t i o n . J o b s are scheduled for execution based upon the priority speci-fied in the JOB statement. Spooling ensures that jobs are executed in the requested partition, and that all job steps are executed sequentially in the same partition. Jobs that c a n n o t b e s c h e d u l e d f o r i n i t i a t i o n b e c a u s e t h e r e q u i r e d m a i n storage is not available are bypassed until the required m a i n s t o r a g e i s a v a i l a b l e .

When a 2 or 3 option is selected to a system message and t h e s y s t e m is i n j o b m o d e , a l l r e m a i n i n g j o b s t e p s in t h e job are canceled. On systems that have input spooling, job processing in the partition resumes with the next job on the reader queue. On systems that do not support input spooling, the job stream is flushed until a JOB or /. state-ment is encountered. lf output spooling is supported on the system, spooled output that has been created by the job are saved. lf a JOB statement terminates the flush, the system input device stays assigned to the partition.

S v s t e m F a c i l i t i e s 2 4 5

Without Procedure

Input Stream OCL Job and Step Classif ication (with cancellation

of a Job or Job 3tep as indicated) Statements Read From the Input Davice

Input Stream OCL Job and Step Clarsif ication (without cancella-tion of a Job or Job stepl

c a n c e l l a t i o n

Step 2

Step 3

Step 4

cancel lation

Step I

Job (step) 3

€ n e l l a t i o n

Irr aa:r _l

| // to^D I I / / R U N

I

|

(data)

| / . . |I

t

-| / / P R T N T E R I

| // Loc I

I

| // LoAD I

| / / R U N

l r a Il

l-l/ NoHALr-l

| // LoAD

r // RUN _l I

Job (step) 3 f l u s h

Job (step)4 canc€llation

Job (step) s

J o b ( s t e p ) 4 Step Mode

J o b ( s t e D ) 5

Figure 2-3. (Part I of 21. Job and Job Step Classif ication

246

With Nested Procedures

Run with Canellation of a Job or Job Step as lndicated

Statements Read from the Input Stream or Proedures

Proeduro Proedure Procadur€

E X T E R N A L INDICATORS

External indicators enable a user to influence the execution of a program from a source outside the program itself.

Eight external indicators are assigned to each partition;

all external indicators are set off during lpL. The SWITCH OCL statement is provided to modify the external indi-cators for the partition in which the statement is received.

When a SWITCH statement sets an indicator, that indicator remains on until one of the following occurs:

. Another SWITCH statement sets it off.

o A JOB statement is received in the partition.

. A /. statement is received in the partition. in job mode.

o Another IPL is performed.

Eight characters in the SWITCH statement correspond to the eight external indicarors.

I n t h e f o l l o w i n g e x a m p l e , a p r o g r a m u s i n g o n e d i s k fi l e (INVMSTR, an inventory master file) uses the SWITCH statement to set on one external indicator and set off all others.

S Y S T E M S E V E R I T Y C O D E S

A severity code is an indicator to the system specifying when the default option can be used for a system message.

When a severity code is not specified on the NOHALT OCL statement, the operator must respond to all system mes-sages except informational messages; this includes informa-tional end-of-step and end-of-job messages.

T h e s e v e r i t y c o d e c a n b e 1 , 2 , 4 , o r g . The system s e l e c t s the default option for system messages of a severity less than or equal to the code indicated. Severity codes and defaults are assigned to most system messages and cannot be altered. lf the severity assigned to a system message is greater than the severity indicated in the NOHALT state-ment. the system stops, waiting for the operator,s response.

lf the severity assigned to the message is equal to or less than the severity indicated in the NOHALT statement, the system selects the default option for the system message and processing continues. The severity code does not affect system messages having no default options or requiring operator intervention. Severity code 1 is the least severe;

severity code 8 is the most severe. Severity code6 are reset to no severity at end of job. For more information on system messages and severity codes, see IBM Svstem/3 Model l5 System Messages, GC21-5076.

rVofe.' Halts displayed in the message display unit are not affected by the SEVER lTy parameter.

JOB STREAM EXAMPLE

The example in Figure 2-4 illustrates the processing of a job stream and some uses of OCL statements (part 1). The example consists of two jobs with each job containing related job steps. The jobs involve three files: cusromer, inventory, and transaction. The customer file contains such information as customer names and addresses, total amounts of charges over a period, and total amounts of payments over the same period. The inventory file contains such information as item numbers and descriptions, prices of the items, and the numbers of items in stock. The transaction file contains such information as orders for items, refund orders for items returned, and cusromer payments. The transaction file is used to update the inventory and customer files.

The OCL statements for the jobs are shown in Figure 2-4.

Sets of statements in the figure are numbered. The expla-nations corresponding to those numbers are given in the following section. Separate job streams are indicated by statements 4 through 7 and 9 through 13.

The LOG statement assigns the 1403 printer as the log device for partition 1. The DATE statement supplies the system date, 10120176. The operator can enter the system date by responding to the IPL prompt for DATE or by entering a DATE OCC or OCL before the first JOB, LOAD, or CALL statement after initial program load.

The JOB statement places the system in job mode.

T h e jo b m u s t b e s u b m i t t e d i n p a r t i t i o n 1 ( P A R T I T I O N parameter).

There must be 32K of main storage available in parti-tion 1 to execute the job (CORE parameter).

Spooling must not be active (SPOOL parameter).

The JOB statement assigns the name BUILD to the j o b .

In the first job, three programs are being compiled and executed. One transfers the customer file from cards to disk, one transfers the inventory file from cards to disk, and one transfers the transaction file from cards to disk. The OCL statements for the

R P G ll c o m p i l e r a r e in a p r o c e d u r e c a l l e d R P G . A CALL statement, therefore, is used to instruct the system to read the procedure each time the compiler is run. The procedure is located on the F1 simulation a r e a .

I n e a c h o f t h e s e j o b steps, t h e R P G ll c o m p i l e r is executed and creates a program with the name

RPGOBJ. This program is placed in the object library o n F 1 .

ln each of these job steps, a disk file is created. The names that identify the files on disk are:

Customer f ile CUST I n v e n t o r y f i l e I N V T r a n s a c t i o n f i l e T R A N S The date for all files is 1O/2O176.

The cards containing the records to be transferred to disk are being read from the same device as the OCL statements. In each case, the cards follow the OCL statements that load the program.

T o h e l p id e n t i f y e a c h j o b step, a u n i q u e n a m e h a s been placed in each of the LOAD statements. This name follows the // in the LOAD statement.

/& statements are used as a precautionary measure in case the /* statements had not been placed after the source and data cards.

The /. statement ends job mode and acts as a delimiter between jobs.

The second iob uses files created in the first job.

The f irst job step compiles a program. The second job step executes the program compiled in the first job step. The third job step sorts a data f ile.

The JOB statement places the system back in job m o d e . T h e n a m e a s s i g n e d t o t h i s jo b i s I N V E N T O R Y . Spooling must not be active. The job must be sub-mitted in partition 1. There must be 32K of main storage available in partition 1 to execute the job.

T h e R P G ll c o m p i l e r i s c a l l e d t o c o m p i l e a p r o g r a m designed to update the inventory file. The program i s p l a c e d i n t h e o b j e c t l i b r a r y o n F 1 .

This job step loads the program compiled in step 10 and updates the inventory file. This program can also print the transaction f ile records. The printer f ile is conditioned by external indicator 1. The SWITCH statement sets external indicator 1 on, which prevents the printing of the records.

The last job step sorts the newly updated inventory file and writes the sorted file back to the same area o n d i s k .

@ A /. statement ends job mode.

S y s t e m F a c i l i t i e s 2 4 9

o .

@ ,

o i

{

ol

(

'i

\

.l @ J

@ {

'l

(

@

e

@

(

@ .

o

(

(Part Figure 24

2-50

\

( ( (

o

@

o

@

@

@ (

Figure 24 lPart 2 ot 21. Job Stream Example

S v s t e m F a c i l i t i e s 2 ' 5 1

M U L T I P R O G R A M M I N G

One of the prime measures of a system,s effioency is the t h r o u g h p u t ; t h a t i s . th e amount of work handled i n a certain period of time. CpU processing time and its usage are major factors that influenc, ,yrt.r- througnput.

Multiprogramming, the concurrent execution of more than one program, provides efficient use of the CpU time by allowing programs to share the CpU facilities, thus reducing the time the system is in an unproductive *ri, ,au,..

With multiprogramming, control is transferred from one task (for exampre, a user program or a system function such as spool) to another wl

await compr etion of #;::*;Ti:[1i],*'::,

await compr etion of #;::*;Ti:[1i],*'::,