• Aucun résultat trouvé

The DD Statement

Dans le document IBM System/360 Operating System: (Page 74-80)

---The DD Statement

~here mu~t be a DD statement for each data set used in your job step.

DlJ statements follow the FXEC statement that marks the beginning of the

iOb ~3tep. You can include a maximum of 255 DD statements in each job step.

The main functions of the DD statements are to describe the characteristics of data sets and to indicate their location. These functions allow you a great deal of freedom in writing your proqram.

For e~ample, if you are writing a proqram to process paid bills, you do not have to indicate in your program the size of the input records, or the type of device in which they are located. You can postpone these definitions until you run the program when you must write the DD

statement for the input data sets. You can debug your prograrr" and then run i t several times with different DL statements for the input record

~dta set. In that way you can determine which recoro size is ~ost

efficiently processed, whether the input should come from a card reader or a magnetic tape unit. All your program needs to know to refer to the data set is the name of the DD statement (ddname) that describes the data set. Each time you execute the proqram you can use the DD

statement to describe a different data set as long as the ddname re~ains

constant. (Refer to "Section 3: Data Management" in the publication IBM System/360 Operating system: Concep~s and Facilities for a summary of the data management concepts you must know before reading this

chapter on the DD statement.)

You can, however, define data set characteristics within your program so that you will not have to specify those characteristics that remain constant each time you use a data set. The number and type of data set cnaracteristics you can specify in your program rather than in the DL statement depends on the language you are using for writing your

program. For example, the assembler language allows you to specify more data set characteristics in your program than the FOHTRAN languaqe.

rtowever, regardless of the facilities of the lanquage you are using, you should only specify those requirements essential to processing in your prografl1 and leave the rest for the DD statement. This gives you more flexibility in writing the program and places fewer restrictions on any future changes you may have to make to the program.

All job steps in your job (except those steps that use a cataloged procedure) require DD statements because every program must have either an input data set, or an output data set, and, in many cases, work data sets in order to operate. The names of the DD statements required for .IBM-supplied programs, such as compilers and utilities, are predefined and you must code their parameters according to the rules stated in the punlications associated with the programs. (A summary of JCL statements for compilers, linkage editors, and loader appears in Part II of this publication.)

Only you can determine the DD statements required for your own program. In general, you will need one DD statement for each data set defined with:

• A data set numner if you are using ALGOL.

• A DCB macro instruction if you are using the assembler.

~ An FD entry if you are using COBOL.

• A data set reference number if you are using FORTRAN.

~ Tne TITLE option or file name if you are using PL/l.

You will need more than one DU statement for ~ach data set in the two following cases:

1. Definition and retrieval of index s~quential (ISM~) data sets way require up to three DD statements.

2. Several input data sets, each defined by a differ~nt DD statement, may be read as if they were a single data set throuqh. the techniClue of concatenation.

In both cases, only the first DD statement is qiven a ddnarre.

If the iob step uses a catalogea procedure, you can use a DD statement either to override parameters in a DD statement in the procedure, or simply, to add a new DD statement to the procedure. In both cases, the modification remains in effect only for the duration of the job step, i t does not change the procedure permanently.

A DD statement must contain the term DD in its operatiop field.

Al though all parameters in the DD statement's operanu, tield are optional, a blank operand field is invalid, except when you are

overriding DD statements defining concatenated data sets in ~ catalogeu procedure. (See "Overriding, Adding and~ullifying Fara~eters on a DD statement" in Part III of this publication.

The parameters in the operand field allow you to specify five types of optional information:

1. Data set information.

2. Location of the data set.

3. Size of the data set.

4. Data attributes.

5. Special processing 0i?tions.

Table ~ shows the parameters used for each type of information and their functions.

As you can see, not all parameters are needed to define a data set.

In fact, some combinations of parameters cannot be used in the sarre DD statement.

Tne valid combination of DO statement parameters allow you to perform the following functions:

1. Create a data set:

a. on unit record devices (card punch or printer) b. on system output devices

c. on magnetic tape

d. on direct access devices 2. Retrieve an existing data set:

a. from unit record devices (card reader or paper tape reader) b. from input stream

c. passed data set (from magnetic tape on direct access) d. cataloged data set (from magnetic tape or direct access) e. kept data set (from magnetic tape on direct access) 3. Extend an existing data set:

74

a. passed data set (from magnetic tape OI' direct access) h. cataloged data set (from magnetic tape or direct access) c. kept data set (from magnetic tape or direct access)

4. Define special data sets:

a. private libraries b. dump data sets c. checkpoint data set

5. Postpone definition of a data set

This chapter describes the ddname and the para.meters needed for each of the above functions. The sections that describe each of the

functions are self-contained. For example, the section on how to create a data set on magnetic tape contains full descriptions of all the

parameters (and their appropriate subparameters) needed for this function. Self-contained sections eliminate ambiguity in the use of parameters, but lead to some repetition in the text. E'or thi s rea son, a summary of the DD statement is given in A;;>pendix D. 'Tnis appendix shows tne correct formats of the parameters for each of the functions without textual descriptions.

Note: Some devices, such as graphics devices, are not discussed in this manual. For information on how to specify IEM devices not described in this manual, refer to IB~ System/360 Cperatinq System: Job Control Language Reference.

Table 5. DD statement Paran,eters (Part 1 of 2)

L ___________ L _________ L ______________________ L ___ L ____ _________________ J

76

Table 5. DD statement Parameters (Part 2 of 2)

r---T---T---T---T---~

I Type I Parameter I Function I P/K I COIrments I

~---+---+---+---+---~

special ISEP IRequests that the datal K 10nly one of these I processing I I set be assigned a I Iparameters can be I Options I Iseparate channel fr<E I lused in a DD state- I

I I the ones assigned to I Iment. I

I I earlier data sets. I I I

~---+---+---~ I

IAFF IRequests the same I K I I

I

Iseparation require- I I I

I

Iments as a previous DDI I I

I I statement that used I I I

I Ithe SEP parameter. I I I

~---+---+---+---~

I DUMMY I Indicates that I/O I P

I

I

I loperations are to be I I I

I Ibypassed for this datal I I

I Iset. Commonly used I I I

I Iwhile debugging a I I I

I I program. I I I

~---+---.---+---+---~

IDDNAME IPostpones the defini- I K lIn systems with PCP, I I Ition of a data set. I lall other parameters I I IUseful in cataloged I Imust be omitted. In I I I procedures. I I systems with MFT or I

I I I IMVT, the DCB subpa- I

I I I Irameters BLKSIZE and I

I I I IBUFNO may be coded. I

~---+---.---+---+---~

IUCS IRequests a particular

I

K

I

I

I I chain in a 1403 print-I I I

I ler with the universal I I I

I Icharacter set feature. I

I

I

t---+---·---+---+---~

10UTLIM ISpecifies a limit for I K IThe OUTLIM parameter I I Ithe number of logical I lis ignored unless I I Irecords included in I ISYSOUT is coded in I I Ithe output data set l i t h e operand field of I I Ibeing routed through l i t h e same DD state- I I Ithe output stream. I Iment. For systems I

I I I Iwith MFT or MVT only. I

t---~---~---~---~---

________________

J

I Legend: P = positional Parameter I

I K = Keyword Parameter I

L ______________________________________________________________________ J

Dans le document IBM System/360 Operating System: (Page 74-80)