Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 4: JCL DD Statement


SPECIAL DD PARAMETER/STATEMENTS

SYSIN (*) – Input Stream Data

SYSIN is not a parameter, it is the ddname assigned to input data stream. In stream data can be passed to the program using this ddname. Using ACCEPT statement, these records can be read from COBOL program.

Syntax 1:-

//SYSIN DD * <data follows> /*

Syntax 2:-

//SYSIN DD DATA <data follows> /*

Both above syntax statements produce same results

Example:-

//DEPTJOB JOB A123,’STEVE’ //STEP1 EXEC PGM=PROG1 //DATA1 DD DSN=DEPT1.EMP1.DATA1, // DISP=(NEW,CATLG),UNIT=3390, // SPACE=(TRK,700,RLSE,MXIG) //SYSIN DD * EMP-RECORD1 EMP-RECORD2 /*

In Above example, when program PROG1 executes and when system encounters the asterisk in the DD statement, it will wait for input. Input is supplied at this point. When there is no further input need to be passed, a /* is entered to mark the end of the input data set.






© copyright mainframebug.com
Privacy Policy