• Aucun résultat trouvé

IEBDG EXAMPLE 6

Dans le document MVS/370 Utilities (Page 152-159)

Data Set

IEBDG EXAMPLE 6

previously defined fields.

• END signals the end of a set of utility control statements.

In this example, 10 fields containing user-supplied EBCDIC pictures are used in the construction of output records. After a record is written, each field is rolled or waved, as specified

in the applicable FD statement. Figure 50 shows the contents of the output records at the end of the job step.

FIELD3 FIELD4 FIELD5 FIELD6 FIELD7 FIELDS FIELD9 FIELD10

AA BB B AAA CCCCC DODD C CC DO 0 CCC

128 MVS/370 Utilities

IEBDG EXAMPLE

7

NAME=FIElD3,lENGTH=8,PICTURE=8,'A AA ',ACTION=RO NAME=FIElD4,lENGTH=8,PICTURE=8,' BB B',ACTION=RO NAME=FIElD5,lENGTH=8,PICTURE=8,' AAA ',ACTION=RO NAME=FIElD6,lENGTH=8,PICTURE=8,' CCCCC',ACTION=WV NAME=FIElD7,lENGTH=8,PICTURE=8,' DDDD ',ACTION=WV NAME=FIElD8,lENGTH=8,PICTURE=8,' C CC ',ACTION=WV NAME=FIElD9,lENGTH=8,PICTURE=8,' DD D',ACTION=WV NAME=FIElDIO,lENGTH=8,PICTURE=8,' CCC ',ACTION=WV

END

/*-QUANTITY=300,NAME=(FIElDl,FIElD2,FIElD3, C FIElD4,FIElD5,FIElD6,FIElD7,FIElD8, C FIElD9,FIElD10)

The control statements are discussed below:

• OUTSET DD defines the output sequential data set on a disk previously defined fields.

• END signals the end of a set of utility control statements.

//CREATEIS JOB MSGLEVEL=l 72 //BEGIN EXEC PGM=IEBDG

//TAPEIN DD DCB=(BLKSIZE=aO,LRECL=aO,RECFM=F),

// DISP=(OlD,KEEP),UNIT=d;sk,

// LABEL=(,SL),

// DSNAME=TAPEIT,VOL=SER=MASTER

//DISKOUT DO DCB=(BLKSIZE=270,LRECL=90,RECFM=FB,DSORG=IS, // NTM=2,OPTCD=MY,RKP=0,KEYLEN=10,CYLOFL=1),

// UNIT=d;sk,SPACE=(CYL,1),

// DISP=(NEW,KEEP),

// VOL=SER=111111,DSNAME=CREATIS //SYSPRINT DO SYSOUT=A

//SYSIN DO

*

DSD OUTPUT=(DISKOUT),INPUT=(TAPEIN)

FD NAME=DATAFD,LENGTH=aO,FROMLOC=l, C

STARTLOC=ll,INPUT=TAPEIN

FD NAME=KEYFD,LENGTH=IO,STARTLOC=I,FORMAT=ZD,INDEX=1 CREATE INPUT=TAPEIN,NAME=(KEYFD,DATAFD)

END

/*

The control statements are discussed below:

• TAPEIN DD defines the sequential input data set.

• DISKOUT DO defines the indexed sequential output data set.

• SYSIN DD defines the control data set, which follows in the input stream.

• DSD marks the beginning of a set of utility control statements and refers to the DD statement defining the output data set.

• FD defines a field that will be used in the subsequent construction of output records. The first FD statement in this example defines and locates an aO-byte field of input data. The data is field selected from one of the input logical records and placed at start location 11 of the output logical record. The second FD statement defines and locates the IO-byte key field.

• CREATE constructs a 90-byte output record by referring to the previously defined fields.

• END signals the end of a set of utility control statements.

130 MVS/370 Utilities

IEBEDIT PROGRAM

INPUT AND OUTPUT

RETURN CODES

lEBEDlT is a data set utility used to create an output data set containing a selection of jobs or job steps. At a later time, data sets defined on tape volumes and direct access devices can be used as input streams for job processing.

lEBEDlT creates an output job stream by editing and selectively copying a job stream provided as input. The program can copy:

• An entire job or jobs, including JOB statements and any associated JOBllB or JOBCAT statements, and JES2 or JES3 control statements.

• Selected job steps, including the JOB statement, JES2 or JES3 control statements following the JOB statement, and any associated JOBllB or JOBCAT statements.

All selected JOB statements, JES2 or JES3 control statements, JOBllB or JOBCAT statements, jobs, or job steps are placed in the output data set in the same order as they exist in the input data set. A JES2 or JES3 control statement or a JOBllB or

JOBCAT statement is copied only if it follows a selected JOB statement.

When IEBEDIT encounters a selected job step containing an input record having the characters " .. *" (period, period, asterisk) in columns 1 through 3, the program automaticallY con~erts that record to a termination statement (/* statement) and places it in the output data set.

A "/*nonblank" indicates a JES2 or JES3 control statement.

lEBEDlT uses the following input:

• An input data set, which is a sequential data set consisting of a job stream. The input data set is used as source data in creating an output sequential data set.

• A control data set, which contains utility control

statements that are used to specify the organization of jobs and job steps in the output data set.

lEBEDlT produces the following output:

• An output data set, which is a sequential data set consisting of a resultant job stream.

• A message data set, which is a sequential data set that contains applicable control statements, error messages, if applicable, and, optionally, the output data set.

IEBEDlT returns a code in register 15 to indicate the results of program execution. The return codes and their meanings are listed below.

CONTROL

Codes Meaning

00 (00 hex) Successful completion.

04 (04) An error occurred. The output data set may not be usable as a job stream. Processing continues.

08 (08) An unrecoverable error occurred while attempting to process the input, output, or control data set.

The job step is terminated.

Figure 51. IEBEDIT Return Codes

IEBEDIT is controlled by job control statements and utility control statements. The job control statements are required to execute or invoke the program and to define the data sets used and produced by the program. The utility control statements are used to control the functions of the program.

JOB CONTROL STATEMENTS

Figure 52 shows the job control statements for IEBEDIT.

Statement Use

JOB Initiates the job.

EXEC Specifies the program name (PGM=IEBEDIT) or, if the job control statements reside in a procedure

library, the procedure name.

SVSPRINT DD Defines a sequential message data set. The data set can be written to a system output device, a tape volume, or a direct access volume.

SVSUTl DD Defines a sequential input data set on a card reader, tape volume, or direct access device.

SVSUT2 DD Defines a sequential output data set on a card punch, printer, tape volume, or direct access device.

SVSIN DD Defines the control data set. The data set normally is included in the input stream; however, it can be , defined as a member of a procedure library or as a

sequential data set existing somewhere other than in the input stream.

Figure 52. Job Control Statements for IEBEDIT

Notes to Figure 52:

1. The block size for the SYSPRINT data set must be a multiple of 121. If not, the job step is terminated with a return code of 8. The block size for the SYSIN, SYSUT1, and SYSUT2 data sets must be a multiple of 80. Any blocking factor can be specified for these record sizes.

132 MVS/370 Utilities

2. Any JES2 or JES3 control statement or JOBlIB DD statement that follows a selected JOB statement is automatically copied to the output data set.

JES2 or JES3 control statements preceding the JOB statement are assumed to belong to the previous job. JES2 or JES3 control statements preceding the first JOB statement are included only if a total copy is requested.

JES2 or JES3 control statements within a DD DATA stream are included only if a delimiter other than

"/*"

is coded in the DD DATA card. For a description of coding another

delimiter, see the publication JCl. If another delimiter is not coded, the first two characters of the JES2 or JES3 control statement will act as a delimiter to DD DATA.

UTILITY CONTROL STATEMENT

EDIT Statement

Parameters NOPRINT

IEBEDIT uses only one utility control statement, EDIT.

Continuation requirements for the statement are described in

"Continuing Utility Control Statements" on page 5.

The EDIT statement indicates which step or steps of a specified job in the input data set are to be included in the output data set. Any number of EDIT statements can be included in an

operation, thus including selected jobs 1n the output data set.

EDIT statements must be included in the same order as the input jobs that they represent. If no EDIT statement is present in the control data set, the entire input data set is copied.

The format of the EDIT statement is:

[label] EDIT [START=jobname]

[,TYPE=POSITIONIINCLUDEIEXCLUDE]

[,STEPNAME=(~[,name-name]), ••• ] [, NOPRINT]

APplicable Control

statements Description of Parameters

EDIT NOPRINT

specifies that the message data set is not to include a listing of the output data set.

Default: The resultant output is listed in the message data set.

Parameters START

STEPNAME

Applicable Control statements EDIT

EDIT

134 MVS/370 Utilities

Description of Parameters START=jobname

specifies the name of the input job to which the EDIT statement applies. (Each EDIT statement must apply to a separate job.) If START is specified without TYPE and

STEPNAME, the JOB statement and all job steps for the specified job are included in the output.

Default: If START is omitted and only one EDIT statement is provided, the first job encountered in the input data set is

processed. If START is omitted from an EDIT statement other than the first statement, processing continues with the next JOB statement found in the input data set.

STEPNAME=(name[,name-name]), •••

specifies the first job step to be placed in the output data set when coded with

TYPE=POSITION. Job steps preceding this step are not copied to the output data set.

~ can be specified as a single job step name or a sequential range of names,

separated by a hyphen: name-name. If more than one value is specified for ~, the entire STEPNAME field must be enclosed in parentheses.

When coded with TYPE=INCLUDE or

TYPE=EXCLUDE, STEPNAME specifies the names of job steps that are to be included in or excluded from the operation. For example, STEPNAME=(STEPA,STEPF-STEPL,STEPZ) indicates that job steps STEPA, STEPF through STEPL, and STEPZ are to be included in or excluded from the operation.

Default: If STEPHAME is omitted, the entire input job whose name is specified on the EDIT statement is copied. If no job name is specified, the first job encountered is processed.

Parameters

Dans le document MVS/370 Utilities (Page 152-159)