• No se han encontrado resultados

INSTREAM anEAM and d CATACATALLOGEOGED PROD PROCEDUCEDURESRES

1. Introduction 1. Introduction 2. Instream Procedure 2. Instream Procedure 3. Cataloged procedure 3. Cataloged procedure

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

In JCL, We have an

In JCL, We have an important concept reusability in the form ofimportant concept reusability in the form of

Instream and Cataloged procedures, Often, in

Instream and Cataloged procedures, Often, in work environmentswork environments

users can utilized same JCL. Using

users can utilized same JCL. Using instream / cataloged proceduresinstream / cataloged procedures

we can reuse the jcl code which was stored in another data set, in

we can reuse the jcl code which was stored in another data set, in

our data set.

our data set.

Synta

Syntax fx for Executing or Executing procprocedure -edure -->->

EXEC [PROC=]procedure-name

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

INSTREAM PROCEDURE

INSTREAM PROCEDURE

 A JCL Procedure

 A JCL Procedure is a pre-written is a pre-written segment of code, segment of code, that you canthat you can

include in your JOB. You code instream data set within the job and

include in your JOB. You code instream data set within the job and

use it in that job as many times as you want.

use it in that job as many times as you want.

 An Instream Proce

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

 -- InstrInstream proceeam procedure shodure should be defined , before anuld be defined , before any EXECy EXEC

statement defined

statement defined

 -- InstrInstream proceeam procedure stadure startes witrtes with PROC and ends with PENDh PROC and ends with PEND

statements

statements

 -- InstrInstream proceeam procedure is execudure is executed when we main jcl calledted when we main jcl called..

 -The maximum number of instream procedures you can in any -The maximum number of instream procedures you can in any job isjob is

15

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

CATA

CATALOGED PROCEDLOGED PROCEDURE:URE:

Pre-written segment of code (which is stored as an

Pre-written segment of code (which is stored as an member ofmember of

PDS), which you can use as many times you want in any job in

PDS), which you can use as many times you want in any job in thethe

system. IBM supplies a utility program called IEBUPDTE; this

system. IBM supplies a utility program called IEBUPDTE; this

program places cataloged procedures into partitioned data

program places cataloged procedures into partitioned data sets.sets.

These procedures are placed inside a system library called

These procedures are placed inside a system library called

SYS1.PROCLIB. Developing Cataloge Procedure

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

SYMBOLIC PARAMETER

SYMBOLIC PARAMETER

Usually, the same JCL can

Usually, the same JCL can be used by different programmers tobe used by different programmers to

implement common tasks, such as the opening, reading, and writing

implement common tasks, such as the opening, reading, and writing

of data sets. In those

of data sets. In those cases , we can use cases , we can use symbolic parameters.symbolic parameters.

Using symbolic parameters we can pass value to

Using symbolic parameters we can pass value to a parameter whicha parameter which

is used in

is used in procedure. A symbolic parameter on a DD statement isprocedure. A symbolic parameter on a DD statement is

coded the parameter preceded by an ampersand.

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

SYMBOLIC PARAMETER

SYMBOLIC PARAMETER

 Procedure which is using symbolic parameterProcedure which is using symbolic parameter

/ ///MMYYPPRROOCC PPRROOCC / ///MMYYSSTTEEPP EEXXEECC PPGGMM==CCOOBBPPRROOGG //INFILE DD DSN=&DOC..TEST.LIB,DISP=SHR //INFILE DD DSN=&DOC..TEST.LIB,DISP=SHR / ///OOUUTTFFIILLEE DDDD DDSSNN==&&DDOOCC....TTEESSTT..OOUUTT,, // DISP=(NEW,KEEP,DELETE), // DISP=(NEW,KEEP,DELETE), // UNIT=SYSDA, // UNIT=SYSDA, // SPACE=(CYL,(&SPACE)) // SPACE=(CYL,(&SPACE))

The invoking EXEC statement

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

GD

GDG (GG (Generatioeneration n DaData Grota Groupup))

  INTRODUCTIONINTRODUCTION   CREATION OF GDGCREATION OF GDG   USING GDGUSING GDG 

  ALTERING GDG  ALTERING GDG DEFINITIONDEFINITION 

 DELETING GDGDELETING GDG 

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

INTRODUCTION INTRODUCTION G Geenneerraattiioonn DDaattaa GGrroouuppss oorr GGDDGGss aarree aa ggrroouupp ooff ddaattaa sseettss wwhhiicchh ar aree rerelalatetedd toto eaeachch ototheherr chchrorononolologigicacallllyy anandd fufuncnctitiononalallyly.. T Thheessee rreellaatteedd DDaattaa SSeettss sshhaarree aa uunniiqquuee DDaattaa SSeett NNaammee.. E Evveerryy GGDDGG ddaattaa sseett hhaass aa GGeenneerraattiioonn nnuummbbeerr aanndd VVeerrssiioonn nnuummbbeer r  a assssiiggnneedd ttoo eeaacchh ddaattaa ssetet..

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

'MYLIB.LIB.TEST.G0001V00'

'MYLIB.LIB.TEST.G0001V00'

'MYLIB.LIB.TEST.G0002V00'

'MYLIB.LIB.TEST.G0002V00'

'MYLI

'MYLIB.LIBB.LIB.TES.TEST.G00T.G0003V00' <--03V00' <-- CurrenCurrent t VersiVersionon

Generation Number -> GaaaaVnn aaaa is between 0000 to 9999

Generation Number -> GaaaaVnn aaaa is between 0000 to 9999

nn is between 00 to 99 In JCL,

nn is between 00 to 99 In JCL,

we refer current version with 0

we refer current version with 0 ( Ex. MYLIB.LIB.TEST(0) )( Ex. MYLIB.LIB.TEST(0) )

new version going to create with

new version going to create with +1 ( Ex. MYLIB.LIB.TEST(+1) )+1 ( Ex. MYLIB.LIB.TEST(+1) )

older versions , refer with -

older versions , refer with -1 -2 -3 etc.... ( 1 -2 -3 etc.... ( Ex. MYLIB.LIB.TEST(-1) )Ex. MYLIB.LIB.TEST(-1) )

<-

J

JOB OB COCONTNTROROL L LLAANGNGUAGEUAGE

EXAMPLE JCL FOR CREATION GDG

EXAMPLE JCL FOR CREATION GDG

//MYJOB JOB (W234),‘KUNAL'

//MYJOB JOB (W234),‘KUNAL'

//STEP1 EXEC PGM=IDCAMS

//STEP1 EXEC PGM=IDCAMS

//SYSIN DD *

//SYSIN DD *

DEFINE

DEFINE GDG(NAME(MYLIB.LIGDG(NAME(MYLIB.LIB.TEST)-B.TEST)-

LIMIT(10) LIMIT(10) – – NOEMPTY NOEMPTY – – SCRATCH) SCRATCH) /* /* // //

Documento similar