• Aucun résultat trouvé

L I B R A R Y D E F I N I T I O N

A library is a space on disk used for storing programs and procedures. There are two types of libraries: source and object. Source libraries contain source programs and proce-dures of OCL statements; object libraries contain executable object programs (load modules) and nonexecutable object programs (routines). Libraries are only located on simula-tion areas, not on main data areas.

The System/3 library maintenance program is used to:

Create libraries

Enter source programs. OCL statements, and object programs into I ibraries

M a i n t a i n l i b r a r i e s

Create f iles containing library entries

The library maintenance program creates a separate direc-tory for each library. Every library entry has a correspond-ing entry in its library directory. The directory entry con-tains such information as the name and location of the library entry. The program also creates a system directory that contains information about the size and available space in libraries and their directories.

S O U R C E L I B R A R Y

A source library is a disk space for storing source programs.

specifications, and procedures. Source programs are sets of user instructions, the most common of which are RPG ll source programs and disk sort sequence specif ications.

Procedures are groups of OCL statements used to load programs and may be followed by input data for the pro-grams. (Procedures for system service programs can, for example, contain control statements.)

Page of GC21-5162-l lssued 28 September 1979 By TNL: GN2'l-5674 The following illustration shows the relative location of a source library with respect to the user area and object l i b r a r y :

Source statements and procedures are two logically differ-ent types of differ-entries. When these entries are copied into source libraries. they are given different source library designations. Source programs are given an S library desig-nation; procedures are given a P library designation. The f o l l o w i n g i l l u s t r a t i o n s h o w s t h e l o g i c a l e n t r i e s w i t h i n th e s o u r c e l i b r a r y :

Source Library

The S library entries are source programs. Procedures cannot be executed from this library.

The P library entries are procedures which can be executed.

Source Librarv Directory S o u r c e L i b r a r y c o n t a i n i n g : o Source program

statements o Procedures

Oblect Library Directory Object Library

S L i b r a r y E n t r i e s a n o P L i b r a r y E n t r i e s

F i l e F a c i l i t i e s 2 - 2 6 . 1

T h i s p a g e in t e n t i o n a l l y le f t b l a n k .

2-26.2

Ph ysi cal Characteristics

A source library has the following physical characteristics:

o Size: The minimum size of a source l i b r a r y i s o n e tr a c k , o Directory: The directory acts as a table of contents and

contains the name and location of each source library entry. The first two sectors of the first track are always assigned to the directory, with additional sectors used as needed.

o Organization of Entries: Entries (source statements and procedures) within the source library need not be stored in consecutive sectors. An entry can be stored in widely separated sectors. Within each sector is a pointer to the sector that contains the next part of the entry.

The boundary of the source library cannot be expanded;

t h e r e f o r e , a n e n t r y m u s t fi t w i t h i n the available l i b r a r y space. The system provides maximum space within the prescribed limits of the source library by compressing entries. That is, all duplicate characters are removeo from the entries. Later, if the entries are printed or punched, written to diskette, or copied to a f ile, the dupl icate characters are reinserted.

o Location: A source library can only be located on a s i m u l a t i o n a r e a . n o t o n a m a i n d a t a a r e a . There i s o n l y one source library per simulation area; however, source libraries may reside on several simulation areas.

rVofe.' When the size of the source library is changed or the source library is reorganized, all temporary entries are deleted.

O B . J E C T L I B R A R Y

An object library is a disk area used for storing object programs and routines. Object programs (also known as l o a d m o d u l e s o r e x e c u t a b l e p r o g r a m s ) a r e p r o g r a m s a n d s u b r o u t i n e s t h a t c a n b e lo a d e d f o r e x e c u t i o n . R o u t i n e s (or nonexecutable programs) are programs and subroutines that need to be link-edited before they can be loaded for e x e c u t i o n . R o u t i n e s a r e u s e d b y c o m p i l e r s a n d ( e x c e p t f o r F O R T R A N ) m u s t b e o n t h e s a m e s i m u l a t i o n a r e a a s t h e c o m p i l e r u s i n g i t .

T h e fo l l o w i n g i l l u s t r a t i o n s h o w s t h e r e l a t i v e l o c a t i o n o f the object library with respect to the source library and u s e r a r e a :

U p p e r B o u n d a r y

S o u r c e L i b r a r y ( o p t i o n a l ) O b j e c t L i b r a r y D i r e c t o r y O b j e c t L i b r a r y c o n t a i n i n g : 1 . E x e c u t a b l e o b j e c t

programs

2 . R o u t i n e s (n o n e x e c u t a b l e object programs)

User Area A.-a. r-.<-V

L i b r a r y F a c i l i t i e s 2 - 2 7

The object library contains two logically different types of entries: object programs and routines. When tnese entries are copied into the object library, they are given different object library designations. Object programs are g i v e n a n O l i b r a r y d e s i g n a t i o n ; r o u t i n e s a r e g i v e n a n R l i b r a r y d e s i g n a t i o n . T h e fo l l o w i n g i l l u s t r a t i o n s h o w s t h e logical library entries within the object library.

Object Library

The O library entries are executable programs. They are loaded by the LOAD starement.

The r9 library entries are nonexecutable routines used by t h e c o m p i l e r .

Ph ysical Characteris tics

An object library has the following physical characteristics:

o Size: The size of the object library depends on whether or not the library is on a system pack (a simulation area containing the system programs). An object library can be created on any simulation area, but one library con-taining the system programs must be online. The m i n i m u m s i z e o f a n o b j e c t l i b r a r y i s 3 t r a c k s .

The disk area for an object library consisting of system programs must also be large enough to contain a scheduler work area for disk system management and a system history area. The number of tracks for the scheduler work area and the system history area are not included in the number of tracks specified for the library; the library maintenance program calculates and assigns the additionaf space. (See Scheduler Work Area under File Facilities.l

a Directory' The directory acts as a table of conrents and c o n t a i n s t h e n a m e a n d lo c a t i o n o f t h e o b j e c t l i b r a r y e n t r i e s . l f t h e o b j e c t li b r a r y is o n a system p a c k , t h r e e of the requested tracks are reserved for the directory.

lf not, only the first track is reserved for the directory.

T h e u s e r m a y o v e r r i d e t h e s e d i r e c t o r y s i z e s b y s p e c i f y i n g upper boundary of the library is extended to the end of t h e s i m u l a t i o n a r e a o r t o t h e f i r s t te m p o r a r y o r p e r m a -nent file. At the successful completion of the copy, the upper boundary is returned to the track boundarv at the end of the last temporary entry.

lf the copy was not completed successfully, the upper b o u n d a r y m a y r e m a i n e x t e n d e d . W h e n a p e r m a n e n r e n t r y is p l a c e d i n t h e l i b r a r y o r t h e li b r a r y i s r e o r g a n i z e d , a l l t e m p o r a r y e n t r i e s a r e d e l e t e d a n d th e u p p e r b o u n d a r y r e t u r n s t o i t s o r i g i n a l l o c a t i o n . P e r m a n e n t e n r n e s c a n n o t e x c e e d t h e o r i g i n a l u p p e r b o u n d a r y . To make efficient use of this feature, the area nexr to the upper boundary of the object library should be kept free of data files. When disk system management auto_

matically allocates f ile space, the area next to the object library is probably free because the files are placed as c l o s e t o t h e h i g h e n d o f t h e s i m u l a t i o n a r e a a s p o s s i b l e . U s e r s s h o u l d a l s o a l l o c a t e f i l e s t o w a r d t h e h i g h e n d o f t h e s i m u l a t i o n a r e a . T h i s le a v e s r o o m fo r o b j e c t l i b r a r y e x o a n s i o n .

o Organization of Entries: Entries are stored in the object library serially; that is, a 20-sector program occupies 20 consecutive sectors. Temporary entries follow all p e r m a n e n t e n t r i e s i n t h e o b j e c t l i b r a r y .

2-28

Maintaining an Object Library

Gaps can occur in the object library when entries are deleted. The associated directory entries point to these gaps. When the library maintenance program places a new p e r m a n e n t e n t r y in t h e l i b r a r y , i t s e a r c h e s t h e d i r e c t o r y for a gap that has the same number of sectors, or the fewest sectors over the number required by the new entry. lf the e n t r y is s m a l l e r t h a n th e g a p , t h e l a s t p a r t o f t h e g a p is n o t p o i n t e d t o b y a d i r e c t o r y e n t r y . S i n c e t h i s g a p h a s n o d i r e c t o r y e n t r y . it c a n n o t b e u s e d u n t i l th e l i b r a r v i s reorgan ized.

The library maintenance program should be used to reor-g a n i z e t h e l i b r a r y w h e n a g r e a t n u m b e r o f a d d i t i o n s a n o deletions have been done (creating an excessive number of u n a v a i l a b l e s e c t o r s ) , o r w h e n th e r e is n o a p p a r e n t r o o m . I n r e o r g a n i z i n g e n t r i e s , t h e li b r a r y m a i n t e n a n c e p r o g r a m deletes temporary entries and shifts entries so that gaps do not appear between them. This reorganization makes more sectors available for use.

B y p r i n t i n g t h e s y s t e m d i r e c t o r y . t h e l i b r a r y m a i n t e n a n c e program can be used to determine how many sectors are a v a i l a b l e .

L I B R A R Y L O C A T I O N S

Libraries can be located by the jystem anywhere on a simu-lation area. However, the location of a source librarv with respect to an object library is always the same:

S o u r c e L i b r a r y o Procedures o Source

statements T r a c k s 0 - 7

lf space is allocated for only a source or object library, the l i b r a r y m a i n t e n a n c e p r o g r a m p l a c e s t h e l i b r a r y i n t h e f i r s t a v a i l a b l e d i s k a r e a la r g e e n o u g h to c o n t a i n t h e l i b r a r y . W h e n a l l o c a t i n g s p a c e f o r a s o u r c e li b r a r y o n a s i m u l a t i o n a r e a c o n t a i n i n g a n o b j e c t l i b r a r y , a n a r e a la r g e e n o u g h fo r t h e s o u r c e li b r a r y m u s t i m m e d i a t e l y fo l l o w t h e o b j e c t l i b r a r y .

E x t e n d a b l e U p p e r B o u n d a r y

T h e l i b r a r y m a i n t e n a n c e p r o g r a m m o v e s th e o b j e c t l i b r a r y to allow space for the source library to precede it. lf an o b l e c t l i b r a r y i s b e i n g a l l o c a t e d o n a s i m u l a t i o n a r e a w i t h a s o u r c e li b r a r y , s p a c e f o r t h e o b j e c t l i b r a r y m u s t i m m e d i a t e l y f o l l o w t h e s o u r c e li b r a r v .

User Area D a t a f i l e s

System H istory Area

C h e c k p o i n t / restart Area

O b j e c t L i b r a r y o Object

programs o R o u t i n e s

User Area D a t a F i l e s

L i b r a r v F a c i l i t i e s 2 - 2 9

S T O R I N G P R O G R A M S

T h r e e m e t h o d s a r e a v a i l a b l e f o r s t o r i n g p r o g r a m s i n t o l i b r a r i e s : t h e l i b r a r y main. rance program, a specif ication o n t h e R P G l i C o n t r o l C a , , a n d th e C O M P I L E OCL state rne n t.

Library Maintenance program: Depending on user specifi_

c a t i o n s , t h e l i b r a r y m a i n r e n a n c e p r o g r a m c a n s t o r e p r o _ g r a m s b y c o p y i n g entries from one location to another ( g i v i n g n e w n a m e s ) w i t h i n a l i b r a r y ; copying entries from o n e l i b r a r y t o a n o t h e r g r v t n g new names if requireo; copy_

i n g e n t r i e s fr o m t h e s y s t e m rnput device to a librarv; or c o p y i n g e n t r i e s fr o m a f i l e to a librarv.

( S e e P a r t 4 f o r a d d i t i o n a l in f o r m a t i o n on the librarv m a t n t e n a n c e p r o g r a m . )

RPG ll Control Card: RpG ll can indicate the type of object program output after the system compiles a source program. The compiled program can be stored in an object l i b r a r y , p u n c h e d in t o c a r d s , or written to a diskette. A p r o g r a m w r i t t e n as a temporary entry in the object library is deleted by the next program written permanently in the object library or by the next program of the same name w r i t t e n a s a t e m p o r a r y e n t r y in the object librarv. The o b j e c t p r o g r a m is w r i t t e n in the object ribrary that contains t h e c o m p i l e r , u n l e s s a C O M p I L E s t a t e m e n t in d i c a t e s o t h e r w i s e .

C o l u m n 1 0 o n t h e R p G l l C o n t r o l Card is used to specify t h e o b j e c t o u t p u t . C o l u m n s 7b-90 are used to name tne o b j e c t p r o g r a m . W h e n a n a m e is not assigned, R p G O B J i s a s s u m e d . F o r d e t a i l e d in f o r m a t i o n on these specif ica-tlons, see the IBM System/3 RpG ll Reference Manual.

s c 2 1 - 7 5 0 4 .

CAMPILE OCL Statemenf.- The COMPILE OCL srarement t e l l s t h e s v s t e m t o :

C o m p i l e a s o u r c e p r o g r a m fr o m a source library ano s t o r e th e o b j e c t p r o g r a m in an object library, or

C o m p i l e a s o u r c e p r o g r a m fr o m the system input device a n d s t o r e th e o b j e c t p r o g r a m in an object librarv For the format of this statement, see COMpILE statement i n P a r t 1 o f t h i s manual.

2-30

Sample Statements

This sample job stream tells the system that the source p r o g r a m n a m e d S A L E S is lo c a t e d o n F 1 . T h e O B J E C T _ R l keyword parameter tells the system to place the object p r o g r a m o n R 1 .

This sample job stream compiles a source program from the s y s t e m i n p u t d e v i c e a n d s t o r e s i t i n a n o b j e c t l i b r a r y o n R 1 . lf the OBJECT parameter was not coded, the program would be compiled and placed into the same object library a s t h e c o m p i l e r ( F 1 ) .

L i b r a r y F a c i l i t i e s 2-31

P a g e o f G C 2 1 -5 1 6 2 - 1 lssued 28 September 1g79 B y T N L : c N 2 t - 5 6 7 4

P R O C E D U R E S

Procedures are sets of OCL statements in a source library.

Procedures are stored in the source library via the library maintenance program. Since the records in the source library are compressed, a nested procedure containing a CALL statement should not be modified by a program run as part of that nested procedure. A procedure cannot contain more than one LOAD statement and cannor con-tain any JOB statements. All other OCL statements, except /&, /* , and /., are allowed in procedures. The CALL state_

ment is allowed only in nested procedures. LOAD * state_

ments are allowed in procedures; however, the object program must be read from the system input device.

A m a x i m u m o f 3 1 c o n t r o l s t a t e m e n t s c a n b e in c l u d e d i n procedures for the system service programs. The control statements must follow the OCL statements in the proce_

dure. A RUN statement must be the last OCL statement in the procedure to separate the OCL statements from the control statements. The RUN statement in the job stream, rather than the one in the procedure, causes the system to run the program.

The following example shows how to create a procedure w i t h t h e l i b r a r y m a i n t e n a n c e p r o g r a m ( $ M A I N T ) . The p r o c e d u r e n a m e i s P R O C l ( N A M E - p R O C 1 i n C O p y s t a t e -m e n t ) . T h i s n a -m e i d e n t i f i e s t h e p r o c e d u r e i n t h e s o u r c e library. The procedure is placed in the source library on F l ( T O - F 1 i n C O P Y s t a t e m e n t ) . T h i s p r o c e d u r e i s r e f e r r e d t o i n a l l o f t h e f o l l o w i n g e x a m p l e s .

O C L b e i n g copied to the source library as a procedure

To merge the procedure (unchanged) into the job stream, two statements are used in the job stream; this is tne normal procedure call.

Parameters in any of the statements (except the INCLUDE statement) in a procedure for the first job step can be changed by procedure override statements placed between the CALL and RUN statements. Procedure override state-ments modify the procedure for the first job step. For example. the following changes can be made to procedure P R O C l :

o I n t h e f i r s t F I L E s t a t e m e n t ( N A M E - D A L T O T ) , c h a n g e t h e R E C O R D S p a r a m e t e r f r o m R E C O R D S - l 5 0 0 t o R E C O R D S - 1 7 5 0 .

a Change the parameter in the SWITCH statement from X X X 0 1 X X O t o X X X 1 O X X 1 .

The following statements are needed in the job stream to c a l l a n d m o d i f y P R O C l . N o t e th a t th e N A M E p a r a m e t e r i s a l s o s u p p l i e d i n t h e F I L E s t a t e m e n t . T h i s is n e c e s s a r y to identify the F ILE s'tatement to which the change applies.

Therefore, the NAME parameter cannot be changed.

Note: lt a valid override statement is used to change a statement which contains an OCL error. an OCL error message will still be is:;ued.

Besides changing a parameter, a parameter in a procedure statement can be enti rely deleted if it is a keyword param-eter. To delete a parameter in any of the statements, the keyword and hyphen are coded followed immediately with a comma. A PACK or REEL parameter (which is to be deleted by a procedule override statement) must precede the parameter that is to replace it. The procedure override statement in the following example deletes the RETAIN parameter completely'.

Page of GC21'5162-1 lssued 28 September 1979 B y T N L : G N 2 1 - 5 6 7 4 Statcrnents can be added to a procedure by placing the added statements between the CALL and RUN statements.

For example, to add a NOHALT statement to the proce-dure, the following statements are needed in the job stream:

Parameters can be omitted from all OCL statements in a procedure and then supplied between the CALL and RUN statements. For example, assume the procedure contained the LOAD statement shown.

To run the ENDMON program. the entire LOAD statement did not have to be supplied; only the missing parameter was included in the job stream.

Example

Procedure override statements are logged on the system log device along with the statements in the iob stream.

Library Facilities 2-33

The statements from the procedure are merged with the preceding statements and printed.

/ / C A L L P R O C ] , , F ] , X X L O A D E N D M O N , R 2

x x F I L E N A M E - D A L T . T T U N I T - F 2 r p A c K - v ' L o 4 r R E C ' R D S - ' , 5 o o r R E T A I N - p / / F I L E N A M E _ D A L T O T T R E C O R D S _ 1 , 7 5 0

x x F I L E N A M E - A . c r o r r L A B E L - T ' T A L r u N I T - R i , , p A c K - v ' L o 2 , D A T E - r z / 4 /7 6 X X S W I T C H X X X O ] , X X O

/ / S W I T C H X X X I , O X X l , X X R U N

/ / N O H A L T / / R U N

Statements preceded by XX represent the procedure state_

ments as they appear in the source library. The CALL and RUN statements and any statements intended as overrides to procedure statements or additions to the procedure begin with //.

Switch characters can be used to determine whether or not a job step will be executed. The following example shows how they are used to call a procedure based on the results of a previous program.

Assume that a program has just completed executing successfully and has set the external indicators to 10,|01010.

The OCL statements following the completed program are:

E

E

E

Step 1 is not executed because the external indicators do not agree with the switch characters. An infor_

mational message with the value of the external indicators is issued. The system then flushes to the next step.

Step 2 is executed because the external indicators agree with the switch characters. (The switch charac-ter X tells the system to cancel the compare operation with the relative external indicator.)

Step 3 is executed after step 2 is completed.

o

E

2-34

Nested Procedures

Some procedures are done in the same order every time a j o b i s p e r f o r m e d . N e s t i n g p r o c e d u r e s i s a c o n v e n i e n t w a y t o l i n k t h e p r o c e d u r e s a n d r e q u i r e s a c a l l t o o n l y t h e first procedure. Each procedure calls the next procedure u n t i l t h e j o b h a s b e e n c o m p l e t e d .

Nested procedures provide several benefits:

a Programs are always run in the correct sequence.

a Operator intervention (and chance of operator error) is decreased.

o F i l e s a r e l e s s li k e l y t o b e d e s t r o y e d as a result of running nclnrelated programs between steps of a job.

Here is an example of how nested procedures might be u s e d to b a c k u p a m a i n d a t a a r e a c o n t a i n i n g fi l e s t h a t w i l l be used in the future. The OCL statements and control statements to be entered from the system input device to c o p y o n e m a i n d a t a a r e a ( D 3 ) t o a n o t h e r m a i n d a t a a r e a ( D 2 ) w o u l d l o o k l i k e t h i s i f n e s t e d p r o c e d u r e s w e r e n o t u s e d :

Assume that the preceding OCL statements were placed in the source library as procedures with the names DEALD2 and CYD3D2, respectively. The use of nested procedures allows building a procedure to call other procedures. The following example shows how a nested procedure is built to c a l l t h e p r o c e d u r e s D E A L D 2 a n d C Y D 3 D 2 :

P l a c e d in the source (

l i b r a r v a s a J procedure

n a m e d t C P Y D 3 2

L i b r a r y F a c i l i t i e s 2 - 3 5

To call the two procedures needed to perform the copy job described, only one CALL statement is required in the job stream from the system input device.

System Input Device / / C A L L C P Y D 3 2 , F i / / R U N

Level 1 C P Y D 3 2

/ / C A L T D E A L D 2 . F 1 / I C A L L C Y D 3 D 2 , F l

Level 2

D E A L D 2

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

/ / R E M O V E . . . i / E N D

C Y D 3 D 2

// LOAD $COPY.F1 / / R U N

/ / C o P Y P A C K . . . / / E N D

')ll

\ l

\

\ \

\

\ l

\

This CALL statement links the job stream to the nested procedure (CPYD32) used to call the procedures necessary to perform the copy job. CpyD32 contains two CALL statements that call the two procedures necessary to copy D3 to D2.

Notice that CPYD32 contains only CALL statements. Any procedure within nested procedures can consist entirely of CALL statements and does not need a RUN statement to indicate the end of the procedure. Nested procedures allow an unrestricted number of CALL statements in a procedure. Therefore, CPYD32 could have more than two CALL statements if it were necessary to add any procedures.

Page of GC21-5162-1

For example, a company issues daily reports on goods bought and sold by calling the DAY procedure. By nesting procedures together. ll CALL WEEK can be used to write a daily report and a weekly report. Once a month // CALL MONTH is used to write out daily. weekly, and monthly r e p o r t s . F i n a l l y , d a i l y , w e e k l y , m o n t h l y , a n d y e a r l y reports are written once a year by the YEAR procedure, which nests all of the other procedures together.

/ / C A L L Y E A R II CALL MONTH

No more than nine levels of CALL procedures can be nested together. Levels of procedures are determined by the number of CALL statements away from the system input device a procedure is located. In this example. when ll CALL YEAR is given in the system input device, the YEAR procedure would be one level away from the system input device. MONTH and ENDl procedures are two levels away from the system input device when // CALL YEAR i s g i v e n .

With nested procedures, fewer OCL statements and control statements for system service programs are needed in the job stream from the system input device. However, certain rules must be followed to make nested procedures work:

o No more than nine levels of procedures are permitted.

o Each procedure may have an unrestricted number of CALL statements to the next level of procedures.

o Only control statements for system service programs a n d s p e c i f i c a t i o n s f o r d i s k s o r t c a n fo l l o w a R U N statement; 31 control statements can be included in a procedure.

o Procedure additions or overrides supplied between the CALL and RUN statements in the job stream are merged only between the first LOAD and RUN statements encountered in the Procedures.

Procedure overrides are merged with the first similar (same identifier) statement before the RUN of the first LOAD and RUN encountered in the procedures, except for FILE statements, which are merged based on the N A M E p a r a m e t e r .

Any OCL statements permitted before the RUN state-ment in the job stream are also permitted anywhere before the RUN statement in a procedure.

I

As an example of nesting procedures, assume the NOHALT statement is to be used to decrease operator intervention.

l n t h e i l l u s t r a t i o n o f n e s t e d p r o c e d u r e s , t h e N O H A L T statement could be placed between the CALL and RUN statements in the system input device. In this case, it would be read as an additional OCL statement for the DEALD2 procedure. However, it could be placed anywhere in the master procedure, CPYD32, or anywhere before t h e R U N s t a t e m e n t i n t h e D E A L D 2 o r C Y D 3 D 2 p r o c e -dures. The rule would still be followed no matter what procedure contained the additional OCL statement.

L i b r a r y F a c i l i t i e s 2 ' 3 7

Example of Nested procedltre Restart

Changing the value of SWITCH statement f) permits the following procedure to be restarted from an;f the steps within the nested procedure. In this example, the proce_

dure will begin executing at step F because the SWITCH statement sets the external indicators to agree with the switch characters on the // CALL e ana i CALL F statements.

@ , r*,r.H oolooool

/ / C A L L A , R 1 / / R U N

/ / 9 A L L B . R 1 , 0 0 0 1 x x x x / / C A L L E , R l , O O 1 O X X X X I / C A L L G , R 1 . O O 1 l X X X X

B

/ / O A L L C . R 1 , 0 0 0 1 0 0 0 1 / / 0 A L L D , R 1 , 0 0 0 1 0 0 1 0

E

/ / C , A L L r , n r , o o t o o o o r

c

/ / L O A D A A , R l

// swtTcH 00010010

/ / R U N D / / L O A D B B , R l / / s w l T c H 00100001 / / R U N

F

/ / L O A D C C , R 1 / / s w t T C H 0 0 1 1 0 0 0 1 / / R U N

H / / L O A D D D , R 1 / / s w t T c H 0 0 1 1 0 0 1 C / / R U N

I / / L O A D E E , R 1 / / R U N

I l_

I l*

2-38

C A T A L O G I N G T O A N A C T I V E L I B R A R Y

Program Number 5704-SC2 enables entries (permanent or temporary) to be stored (cataloged) in an object library located on an active program pack (a simulation area con-taining a program currently loaded for execution in another p a r t i t i o n ) .

An object program can be cataloged to an active library, but in some cases, a program executing in another partition may be adversely affected. An active library is one from which a program is loaded for execution. That library becomes inactive after end-of-job step for that program.

(Note, however, that a CCP library is always considered active.l

lf an object program does not have overlays, once it is loaded into a partition for execution, there is no further need to access that library. However, if an object program requires subsequent library accesses (after the program has been loaded for execution), then an access to that library from another partition may cause problems.

Figure 2-2 shows what can happen to another partition when cataloging to an active library.

Some examples of a program requiring subsequent accesses to a library are:

A program which requires an overlay from disk during execution, for example, an RPG ll object program.

A program which requires phase overlays during execu-tion, for example, a system service program.

A FORTRAN program which invokes another program from that library.

l f a l l o b j e c t l i b r a r y e n t r i e s a r e p e r m a n e n t e n t r i e s , t h e n the only conflict arises when cataloging an entry of the same name as the program executing in another partition.

(For either permanent or temporary entries, the overlay linkage editor does not allow cataloging a module with the same name as an active program running in a batch partition.)

Cataloging to an active library is an option chosen during system generation. The configuration record program may also be used to change the support selected for

Cataloging to an active library is an option chosen during system generation. The configuration record program may also be used to change the support selected for