CHAPTER - 7 Special DD Statements
1. DUMMY
DSN=NULLFILE
2. Concatenating Data sets
3. Passing data to cobol program using - SYSIN DD *
4. SYSOUT
5. SYSUDUMP
6. SYSADUMP
1. DUMMY or DSN=NULLFILE
Some times we need to testing of program, without using actual datasets.
Then we can use DUMMY or DSN=NULLFILE.
If we use DUMMY, operating system simulates the presence of a file. When
you reading Operating system sends end of file request to program.
Example JCL --> //MYJOB JOB (W345),'KRISHNA REDDY'
//STEP1 EXEC PGM=COBPROG
//INFILE DD DUMMY
2. CONCATENATING DATA SETS
In JCL , we can concatenate different files by giving their name one after
another. All data sets concated must be of the same type. For example,
partitioned data sets can be concatenated only with partitioned data sets.
Example JCL --> //MYJOB JOB (W345),'KRISHNA REDDY'
//STEP1 EXEC PGM=COBPROG
//INFILE DD DSN=TEST.GLOB.FILE1
// DSN=TEST.GLOB.FILE2
// DSN=TEST.GLOB.FILE3
In program , we will read it as an single file. concatination of three
files done by operating system.3. PASS DATA TO COBOL PROGRAM USING - SYSIN DD *
This is the one of the way of passing data to program. There are two
syntax's to pass data.
Syntax1 -> //MYJOB JOB (W234),'RAMESH'
//STEP1 EXEC PGM=COBPROG
//SYSIN DD *
/*
Syntax2 -> //MYJOB JOB (E345),'KRISHNA REDDY'
//STEP1 EXEC PGM=COBPROG
//SYSIN DD DATA
/* Image
4. SYSOUT The SYSOUT parameter is used to send the output which is generated during job execution. Syntax -> //ddname DD SYSOUT=class EXAMPLE JCL -> //MYJOB JOB (R456),'KRISHNA REDDY' //STEP1 EXEC PGM=COBPROG //INFILE DD SYSOUT=A In this example, COBPROG is executed and all generated outputs are directed to class ( here it is letter A)
Prev Page Next Page