IBM OSJCL: - PowerPoint PPT Presentation

1 / 63
About This Presentation
Title:

IBM OSJCL:

Description:

12. IBM OS/JCL: DD Statements //TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) ... 10 EMP-LAST PIC X(25). 10 EMP-FIRST PIC X(25). 10 EMP-MIDDLE PIC X. ... – PowerPoint PPT presentation

Number of Views:121
Avg rating:3.0/5.0
Slides: 64
Provided by: wsda
Category:
Tags: ibm | osjcl | pic

less

Transcript and Presenter's Notes

Title: IBM OSJCL:


1
12
  • IBM OS/JCL
  • DD Statements

2
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP)
  • The DD Statement
  • Defines a data set to the operating system.
  • Notifies the operating system that a data set is
    to be either accessed or created.
  • Identifies the device requirements of the data
    set
  • Type of I/O unit required.
  • Specific volumes to be mounted on the unit.


3
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP)
  • The DD Statement
  • Further defines characteristics of the data set
  • The length of each record
  • The format of the record
  • Whether the data set already exists or is to be
    created during the job step.
  • Specifies what is to be done with the data set
    when the job completes.

4
  • Tape DD Statement

5
  • //TPEIN DD UNITTAPE,DSNPR.FLE, //
    DISP(OLD,KEEP,KEEP)
  • DDNAME - one to eight alphanumeric
    characters. The first character must be
    alphabetic.
  • The DDNAME comes from the External
    Reference name in the SELECT Clause of the
    ENVIRONMENT DIVISION of a COBOL program.

6
INPUT-OUTPUT SECTION. FILE-CONTROL.
SELECT CARD-FILE ASSIGN UR-2540R-S-CARDIN.
SELECT PRINT-FILE ASSIGN
UR-3203-S-PRTFLE. SELECT TAPE-IN ASSIGN
UT-3420-S-TPEIN. SELECT TAPE-OUT ASSIGN
UT-3420-S-TPEOUT. SELECT DISK-IN ASSIGN
DA-3375-S-DSKIN. SELECT DISK-OUT ASSIGN
DA-3375-S-DSKOUT. DATA DIVISION. 01
CARD-FILE. 05 EMP-NO PIC X(5)
05 EMP-NAME. 10
EMP-LAST PIC X(25). 10
EMP-FIRST PIC X(25). 10
EMP-MIDDLE PIC X.


7
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP)
  • DD Operation - Data Definition





8
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP)
  • UNIT - Identifies the data set as a tape file





9
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP)
  • DSN (DSNAME)
  • Data Set Name
  • Identifies the name of the file as recorded in
    the header label when the file was created.





10
Fig. 12.4 The UNIT parameter specifies a
physical device.
11
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP),
    // VOLSER2992
  • DISP - Identifies the status of the data set
  • Subparameter 1 - at the beginning of the job
    step
  • Subparameter 2 - If the job step terminates
    normally
  • Subparameter 3 - If the job step terminates
    abnormally.



12
Fig. 12.6 The disposition (DISP) parameter
specifies the files status.
13
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP),
    // VOLSER2992
  • DISP - Identifies the status of the data set
  • Subparameter 1 - at the beginning of the job
    step



14
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP)

    NEW,DELETE,DELETE
    SHR , PASS,CATLG
    ,CATLG,UNCATLG

    ,UNCATLG,
  • OLD - The data set was created in an
    earlier job or job step.
  • NEW - The data set is being created in
    the current job step.


15
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP),
    // VOLSER2992
  • DISP - Identifies the status of the data set
  • Subparameter 2 - If the job step terminates
    normally



16
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP)

    NEW,DELETE,DELETE
    SHR , PASS,CATLG
    ,CATLG,UNCATLG

    ,UNCATLG,
  • KEEP - The data set is to be saved for
    future use.
  • DELETE - The data set is scratched.
  • PASS - The data set will remain
    mounted.
  • CATLG - The data set cataloged to the Tape
    Library.
  • UNCATLG - The data set is uncataloged from the
    Tape Library.


17
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP),
    // VOLSER2992
  • DISP - Identifies the status of the data set
  • Subparameter 3 - If the job step terminates
    abnormally.



18
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP)

    NEW,DELETE,DELETE
    SHR , PASS,CATLG
    ,CATLG,UNCATLG

    ,UNCATLG,
  • KEEP - The data set is to be saved for
    future use.
  • DELETE - The data set is scratched.
  • CATLG - The data set cataloged to the Tape
    Library.
  • UNCATLG - The data set is uncataloged from the
    Tape Library.


19
  • Common sense dictates //TPEIN DD
    UNITTAPE,DSNPR.FLE,//
    DISP(OLD,KEEP,KEEP)

20
  • Common sense dictates //TPEIN DD
    UNITTAPE,DSNPR.FLE,//
    DISP(NEW,CATLG,DELETE)

21
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP
    ), //
    VOLSER2992


    21

22
  • //TPEIN DD UNITTAPE,DSNPR.FLE,
  • // DISP(OLD,KEEP,KEEP),
  • // DCB(RECFMFB,LRECL300
    ,BLKSIZE600)
  • DCB Parameter - supplies data set
    characteristics to be included
    in the data control block.
  • RECFM Record Format
  • LRECL Logical Record Length
  • BLKSIZE Block Size


    22

23
Fig. 12.5 The DCB parameter. The DSORG, MACRF,
and DDNAME must be coded in the program DCB.
24
Disk DD Statement
25
  • //DISKIN DD UNITDISK,DSNPR.FLE,
    SYSDA



26
  • //DISKIN DD UNITDISK,DSNPR.FLE,
    SYSDA
  • UNIT - Identifies the data set as a disk file



27
  • //DISKIN DD UNITDISK,DSNPR.FLE,
    SYSDA PR.FLE
  • DSN (DSNAME)
  • Data Set Name
  • Identifies the name of the file as recorded in
    the header label when the file was created.
  • used to indicate a temporary data set



28
Fig. 12.7 The SPACE parameter.
29
  • //DISKOUT DD UNITDISK,DSNPR.FLE,
    SYSDA
  • // SPACE(TRK,(10,10),RLSE,CO
    NTIG), CYL,
    BLKSIZE,
  • // DISP(NEW,CATLG,DELETE)
  • Type of space allocation
  • Primary Allocation
  • Secondary Allocation
  • Release Any Unused Space
  • All Space Must Be Contiguous



30
  • //DISKIN DD UNITDISK,DSNPR.FLE,
    // DISP(OLD,KEEP,KEEP)

    NEW,DELETE,DELETE
    SHR , PASS,CATLG
    ,CATLG,UNCATLG

    ,UNCATLG,
  • OLD - The data set was created in an
    earlier job or job step.
  • NEW - The data set is being created in
    the current job step.
  • SHR - The input data set will be
    shared by another job.

31
  • //SYSIN DD
  • Allows a file to be inputted via the systems
    default input device.
  • The asterisk indicates that the data follows
    this DD statement.


    31

32
  • //SYSOUT DD SYSOUTA
  • Allows a file to be outputted to the systems
    default output device.
  • Normally implies printer output.
  • The value of SYSOUT is dependent upon your
    installation.


    32

33
  • //DISKIN DD DUMMY
  • Allows a file to be ignored, or dummyed out.
    This process will be allowed as long as the
    logic of the program will allow the file to
    be dummyed out.


    33

34
  • //DISKIN DD UNITDISK,DSNPR.FLE,
  • //
    DISP(OLD,KEEP,KEEP),


    34

35
  • CONCATENATING DATA SETS
  • // INDATA DD DSNCURORDR,UNITTAPE, //
    VOLSERK90221, //
    DISP(OLD,KEEP,KEEP)
    // DD DSNPREVORDR,UNITAFFINDA
    TA, //
    VOLSER14552,DISP(OLD,KEEP,KEEP) //
    DD DSNINV,UNITAFFINDATA, //
    VOLSER866221,DISP(OLD,KEEP,KE
    EP)



36
Data Control Block Table
  • As the Job Stream JCL is checked, the information
    in the DD statements is used to create an entry
    for the data sets in the DCB Table.
  • Once the DCB Table is completed, the JCL is then
    checked for accuracy and validity.
  • If any errors are discovered, they are documented
    on the JCL Listing (MSGLEVEL parameter) and the
    job is not run.

37
Backward References
  • Using the DCB Table entries, Backward References
    (Refer Backs) can take place.

38
Backward References
  • //OSJCL JOB (OSJCL,04/03/98),M. R.
    IZZO, // CLASS
    T,MSGLEVEL(1,1), //
    MSGCLASS A //STEP1 EXEC PGMCALC
    //DD1 DD UNITTAPE,DSNFILE1,
    //
    DISP(OLD,KEEP,KEEP) //DD2 DD
    UNITTAPE,DSNFILE2, //
    DISP(OLD,KEEP,KEEP) //DD3 DD
    UNITTAPE,DSNFILE3, //
    DISP(NEW,PASS,DELETE)


    38

39
  • //REPORT DD SYSOUTA
  • //SYSUDUMP DD SYSOUTJ //CRDIN
    DD Card Input
    / //STEP2 EXEC
    PGMCALC2 //DD4 DD
    UNITTAPE,DSN.STEP1.DD3, //
    DISP(OLD,KEEP,KEEP)
    //REPORT2 DD SYSOUTA //SYSUDUMP DD
    SYSOUTJ //



40
DCB Table

41
DCB Table

42
DCB Table

43
DCB Table

44
DCB Table

45
Compiler Return Codes
  • Level W - Warning - Return Code 4
  • Level C - Condition - Return Code 8
  • Level E - Errors - Return Code 12
  • Level F - Fatal - Return Code 16


    45

46
Compile, Link, Execute
  • //OSJCL JOB (OSJCL,04/03/98),M.R.I
    ZZO,//
    CLASST,MSGLEVEL(1,1),//
    MSGCLASSA//COB EXEC
    PGMIKFCBL00,PARMLOAD//SYSPRINT DD
    SYSOUTA//SYSUT1 DD UNITSYSDA,//
    SPACE(460,(700,100))
    //SYSUT2 DD UNITSYSDA,//
    SPACE(460,(700,100))


    46

47
  • //SYSUT3 DD UNITSYSDA,//
    SPACE(460,(700,100))//SYSUT4 DD
    UNITSYSDA,//
    SPACE(460,(700,100))//SYSLIN DD
    DSNAMELOADSET,//
    DISP(MOD,PASS,DELETE),//
    UNITSYSDA,SPACE(80,(500,100))//SYSIN
    DD Source Input/


    47

48
  • //LKED EXEC PGMIEWL, //
    PARM(LIST,XREF,LET), //
    COND(5,LT,COB)
    //SYSLIN DD DSNLOADSET, //
    DISP(OLD,DELETE,KEEP)
    //SYSLMOD DD DSNGOSET(GO), //
    DISP(NEW,PASS,DELETE), //
    UNITSYSDA, //
    SPACE(1024,(50,20,1))
    //SYSUT1 DD UNITSYSDA, //
    SPACE(1028,(50,20))
    //SYSPRINT DD SYSOUTA


    48

49
  • //GO EXEC PGM.LKED.SYSLMOD, //
    COND((5,LT,COB),(5,LT,LKED))
    //TPEIN DD UNITTAPE,DSNPR.FLE, //
    DISP(OLD,KEEP,KEEP), //
    DCB(RECFMFB,LRECL150), //
    DCB(BLKSIZE300), //
    VOLSER00978 //TPEOUT DD
    UNITTAPE,DSNPR.FLE, //
    DISP(NEW,CATLG,DELETE), //
    DCB(RECFMFB,LRECL150), //
    DCB(BLKSIZE300)


    49

50
  • //DSKIN DD UNITDISK,DSNPR.TRANS,
    //
    DISP(OLD,KEEP,KEEP), //
    DCB(RECFMFB,LRECL200), //
    DCB(BLKSIZE400) //DSKOUT
    DD UNITDISK,DSNED.PR.TRANS, //
    DISP(NEW,CATLG,DELETE), //
    SPACE(TRK,(10,5),RLSE
    ) //PRT DD SYSOUTA
    //SYSUDUMP DD SYSOUTA //CRDIN DD
    Card Input / //


    50

51
Fig. 12.1 One data control block is coded for
each file accessed by a program.
52
Fig. 12.2 The linkage editor adds an access
method to the load module.
53
Fig. 12.3 The link to a specific physical device
is established at OPEN time.
54
Magnetic Disk Parameters
  • UNIT
  • DCB
  • DISP
  • DSNAME
  • VOLUME
  • SPACE

55
Fig. 12.8 Some examples.
56
Fig. 12.8 Some Examples
57
Magnetic Tape Parameters
  • UNIT
  • DCB
  • DISP
  • DSNAME
  • VOLUME
  • LABEL

58
System Input and Output
  • Spooling -- slower devices
  • System input device
  • //SYSIN DD
  • System output device
  • //SYSOUT DD SYSOUTA

59
Fig. 12.9 The DDNAME can be qualified if it is
part of a catalogued procedure.
60
Fig. 12.10 Code the library member name as part
of the DDNAME.
61
Fig. 12.11 A complete set of JCL to support an
assemble, link edit, and go job.
62
Fig. 12.11 Continued
63
Fig. 12.11 Continued
Write a Comment
User Comments (0)
About PowerShow.com