0% found this document useful (0 votes)
31 views

Ibm Mainframes: Cobol Training Class-13

This document provides instructions for running JCL to execute a COBOL program that writes to a file. It includes the JCL code to run the WRITEPS program, specify the library, output files, and defines the EMPDD file with the DSN, space allocation, and DCB parameters. It also explains how DDNAME is used to link the logical file name in the program to the physical file name, and defines common disposition, location, and DCB parameters for defining and writing files.

Uploaded by

ravikiran_8p
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Ibm Mainframes: Cobol Training Class-13

This document provides instructions for running JCL to execute a COBOL program that writes to a file. It includes the JCL code to run the WRITEPS program, specify the library, output files, and defines the EMPDD file with the DSN, space allocation, and DCB parameters. It also explains how DDNAME is used to link the logical file name in the program to the physical file name, and defines common disposition, location, and DCB parameters for defining and writing files.

Uploaded by

ravikiran_8p
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
You are on page 1/ 8

IBM MAINFRAMES

COBOL TRAINING CLASS-13

Run JCL for FILE programs


//FSS197EX JOB 285,'TEAM',NOTIFY=&SYSUID
//STEP1 EXEC PGM= WRITEPS
//STEPLIB DD DSN= FSS197.COBOL.LOAD, DISP= SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//EMPDD DD
//

DSN= FSS197.COBOL.EMPPS,DISP= (NEW,CATLG,CATLG),

//

SPACE=(TRK,(1,1),RLSE),UNIT=SYSDA,VOL=SER=S7SYS1,

//

DCB=(DSORG=PS,LRECL=36,BLKSIZE=0,RECFM=FB)

//

DDNAME LINK
EMPDD IS THE DD-NAME that was used in the SELECT STATEMENT
with-in the application program
We use this DDNAME here in JCL to link our logical file name
which we used in the program with the physical name of
the file.
//EMPDD DD

DSN=FSS197.COBOL.EMPPS

The physical file can be created either by option 3.2 from


ISPF option or with in the execution JCL dynamically.

Disposition

Disposition is used to specify

File status
Action on successful termination
Action on abnormal termination

Syntax

DISP=(STATUS, SUECCESSFULL, ABNORMAL)

STATUS : NEW OLD SHR MOD


ACTION

CATLG,UNCATLG,DELETE,PASS,KEEP

Disposition Parameter

NEW is used to specified if the file is created newly

Old the file is existing but locked for update

Ex DISP=(NEW,CATLG,DELETE)
DISP=(OLD,CATLG,CATLG)

Shr the file is existing and can be shared with other


programs
Mod is used when trying to extending the file

Parameters to specify File Location

To save the dataset we need to specify location in the DASD

VOLUME=SER= VOL-NAME
UNIT=SYSDA/SYSALLDA
SPACE=(TRACK,(PQ,SQ,DB),RLSE)

Primary quantity: Primary memory space


Secondary quantity : Secondary memory space
Directory block : Used only if we want to create PDS

DCB PARAMETER

SYNTAX

DCB=(DSORG=PS/PO,LRECL=36,RECFM=FB,BLKSIZE=0)

DSORG: DATA SET ORGANIZATION specifies weather its a


PDS(PO) or PS (PS)

LRECL : logical record length the value is the exact length that our
record length is.

RECFM = FB/VB fixed block or variable block


BLKSIZE this option helps to fetch more records at a time as a block
instead of one record at a time. The maximum blocking value is 0

Thank You

You might also like