• Aucun résultat trouvé

Job Control Language for the Loader

Dans le document OS PL/I (Page 77-81)

Although you will probably use cataloged procedures rather than supply all the job control language (JCL) required for a job step that invokes the loader, you shculd re familiar with these JCL statements so that you can make the best use of the loader and, if necessary, override statements of the cataloged procedures.

The IBM-supplied cataloged procedures that include a loader procedure step are as follows:

• PLIXCG Compile, load-and-execute

• PLIXG Load-and-execute

The following paragraphs describe the essential JCL statements for the loader.

The IBM-supplied cataloged procedures are described in Chapter 11 and include

examples of these statements.

64 OS PL/I Optimizing Compiler: programmer's Guide

SYSLIN (primary input)

r---,

I I

IPL/I object AI

land/or BI---, Iload modules CI I

1 I I

L---J

I

r---, r---,

I I I 1 AI

L---> I 1 I B I

I loader l i e1

1 1--->1 main storage 01

r---> 1 l i E I

SYSLIB 1 L---J 1 F 1

(ca 11 library) 1 I G 1

r---,

I I

1

1

L---_____ I

J

I

IPL/I resident 01 I

Ilibrary .E I I

1.(SYS1.PLIBASE) FI---J

1 GI

I I

L---J

Figure 5-15. Basic loader processing

SYSLIN (primary input)

r---,

I I Main

IPL/I object AI storage

land/or load BI---, r---,

I module s C I I I 1 A

I I I I I

L---J 1 r---, 1 1 B--,

I

1 1---> 1 1 1

l--->

1 I 1 I

C-,

1

I 1 1 I II

I loader 1 r--->H<J I

1 1 1 1 1 1

SYSLIB r---> I I I I I O<-J

(call library)

I

I I I I 1 I

r---, I L---J I I 1 E<-J

I 1 1 1 1 1 1

IPL/I resident 01 1 1 1 1 F<-J

Ilibrary EI---J 1 1---1

I

I

(SYSl. PLIBASE) F 1 1

I

1 G<-J

I HI---J Ilink-pack 1

1

I

1 area

I

L---J L---J

Figure 5-16. Loader processing, link-pack area and SYSLIB resolution

r---,

1 storage required for: IArrcuntCmin)1

1 1 in bytes 1

1---1

ILoader program 1 10K 1

IData management access

I

4K

I

I

routines

I

1

IBuffers and tatles used by 1 3K 1

1 leader 1 1

IPL/I program to be executed 1 variable 1

L---J

Figure 5-17. Main storage requirements for the loader

EXEC STATEMENT

The name of the loader is IEWLDRGC. It also has the alias LOADER, which is used in the IBM-supplied cataloged procedures, and will be used to refer to the loader program in the rest of this chapter. The basic EXEC statement is:

//stepname EXEC PGM=LOADER

By using the PARM parameter of t.he EXEC statement, you can select one or more of the optional facilities provided by the

loader; these are described under "optional Facilities," later in this chapter.

DO STATEMENTS FOR THE STANDARD DATA SETS

The loader always requires one standard data set; that defined by the DD statement

with the name SYSLIN. Three cther standard data sets are optional and if you use them you must define them in DD staterrents with the names SYSLCUT, SYSPRINT, and SYSLIB.

The four data sets, their names" and other characteristics of the data sets, are shown in Figure 5-18.

The data sets defined by the DD

statements with the names SYSLIN, SYSLIB, and SYSLCUT are those specified at system generation for your installaticn. Other ddnames may have been specified at your installation; if they have, your JCL

statements must use them in place of those given above. In a similar rranner the IBM-supplied cataloged procedures PLIXCG and PLIXG use names as shown above; ycur systems programmer will have to modify these procedures if the names at your installation are different.

Primary Input (SYSLIN)

primary input to the loader Rust be a

standard data set defined by a DD statement with the name SYSLIN; this data set Rust have consecutive organizaticn. The input can comprise one or more object modules, one or more load modules, or a wixture of object modules and load modules.

For a PL/I program the primary input is usually a data set containing an cbject module produced by the compiler. This data set may be on magnetic tape cr en a direct-access device, or you can include i t in the input job stream. In all cases the input must be in the form of 80-byte F-format records.

The IBM-supplied cataloged procedure

r---,

1 ddname 1 Contents of Data set 1 Possible Device Classes1

1---·--- I

SYSLIN

I

Primary input (normally the output from the 1 SYSSQ or the input job

1 1 compiler) 1 stream Cspecified by DD *)

1---·---1 SYSLOUT I Loader messages and wodule map listing 1 SYSSQ, SYSDA, or SYSOUT~A

1--- 1

SYSPRINT

1

PL/I execution-time rressages and problem

1

SYSSQ, SYSDA, or SYSOUT=A

1 1

output listing

1

1---

1 SYSLIB 1 Automatic call library I SYSDA

1---

11SyssQ Magnetic tape or direct-access device 1 SYSDA Direct-access device

I

SYSOUT=A Normal printed output class for sy~tem output

L---____________________________________ ---J

F'igure 5-18. Loader standard data sets

66 OS PL/I Optimi zing Compi ler: Programmer' s Guide

PLIXCG includes the DD statement:

//SYSLIN ~D DSN=&&LOADSET,DISP=(OLD;DELETE) This statement sP,ecifies that the data set &&LOADSET is temporary. If yeu want to modify this statemerit you must refer to it by the qualified ddname GO.SYSLIN.

The IBM-supplied cataloged procedure PLIXG does not include a DD statement for the input data set; you must always supply one, specifying the characteristics of your input data set using the qualified ddnarre GO.SYSLIN.

Automatic Call Library (SYSLIB)

Unless you specify otherwise, the loader will normally attempt to resolve external references by automatic library call. The automatic call library (SYSLIB), and how to specify it, is described in the linkage editor section earlier in this chapter.

Listing (SYSLOUT)

The loader generates a listing that includes a module map (if you have

specified the MAP option) and, if errors have been detected during processing, messages referring to these. The

information that may appear is described in

"Listing Produced by the Loader," later in this chapter.

You must define the data set in which you want this listing to be stored by a DO statement with the name'SYSLOUT and it rrust have consecutive organization. Although the listing is usually printed i t can be stored on any magnetic-tape or direct-access device. For printed output the following DD statement will suffice:

//SYSLOUT DD SYSOUT=A

Listing (SYSPRINT)

As well as the information listed in the data set defined by the DD statement with the name SYSLOUT certain information

produced by the loader is always stored in the data set defined by the DD statement with the name SYSPRINT. This data set, which must have consecutive organization, holds messages that refer to errors that have occurred during execution of your program, as well as the results produced by

your program. The inforrraticn,that rray appear is described in "Listing Produced by the Loader," later in this chapter. For printed output the following DD statement will suffice:

IISYSPRINT DD SYSOUT=A

EXAMPLES OF LOADER JCL

A sequence of job control language for the loader is shown in Figure 5-19. A PL/I program has been compiled in a job step with the step name PLI: the resultant object rr.odule has been placed in the data set defined by the DD statenent with the narre SYSLIN. Eecause this nedule is to be loaded and executed in the same job as the compile step, this DD statenent can use the backward reference, indicated by the

asterisk, as shown. If the conpile and load-and-go steps were in different jobs, the DD statement would have te specify a perttanent data set, cataloged or

uncataloged.

" The IBM-supplied cataloged procedure PLIXCG includes a DD staterr,ent with the name SYSLIN in both the compile and load-and-go procedure steps: you do net need to specify this statement unless you want to modify it. The IBM-supplied cataloged

procedure PLIXG does not include a DD statement with the narr,e SYSLIN; yeu nust supply one, using the qualified name GO.SYSLIN.

Typical job control language statements for the loader are shown in Figure 5-20.

The example illustrates how to include, in the input strearr, both an object rredule fer input to the loader, and data to be used by your program during executier..

The DO statement with the narre SYSLIN arid the two following unnamed CD statements define three data sets that are te te

concatenated into one data set to be used as input to the loader. The first data set is named OBJMOO and contains an object module. This data set could be the eutput of the optimizing compiler that has just processed your FL/I program. The second data set is named MODLIE(MOC55) containing a load module that haS been given the name M0055 and stored in the library called MOOLIB. The third data set is an object module defined by the CD staterr,ent with the

name IN. This DO statement appears further on and has the asterisk notation that

indicates that the data set defined by this statement follows in the input strean.

The DD statement with the narre SYSLIB and the unnamed 00 statement immediately

//LOAD JOE

EXEC PGM=LOAOER //STEP1

//SYSLIN //SYSLIB //SYSLOUT //SYSPRINT

DD DSN=*.PLI.SYSLIN,DISP=(OLD,OELETE) DO DSN=SYS1.PLIBASE,DISP=SHR

DD SYSOUT=A DD SYSOUT=A

Figure 5-19. Job control language for load-and-go

//LOAO JCB

EXEC PGM=LOAOER //STEP1

//SYSLIN / /

DD DSN=OBJECT,UNIT=SYSSQ,VOL=SER=30104,DISP=(OLD,KEEP) :CD DSN=MODLIBCMOD55),DISP=SHR

/ /

//SYSLIB

/ /

//SYSLOUT //SYSPRINT·

//IN

OD DONAME=IN

CD DSN=SYS1.PLIBASE,DISP=SHR OD DSN=PRIVLIB,DISP=SHR CD SYSOUT=A

OD SYSOUT=A CD

*

(insert here the object module to be loaded)

/ *

//SYSIN DD

*

(insert here the execution dat.a, if any)

/*

Figure 5-20. Object and load modules in load-and-go following i t define two data sets that are

to be concatenated so that they can be searched for unresolved external references by automatic library call. The first data set is the PL/I resident library

(SYS1.PLILIB) and the second is a private library called PRIVLIB.

Dans le document OS PL/I (Page 77-81)