herewego New User Joined: 20 Feb 2006 Posts: 14
We used to code DUMMY parameter in the JCL to ignore the file defined in the COBOL program.
What should be coded in the COBOL program to ignore the datatset in the JCL.
//INFILE DD DSN=C0385SA.TEST.INFILE,DISP=SHR - We change this one as
//INFILE DD DUMMY
But I want to have the dataset name be specified in the JCL as such and the COBOL Program has to be changed. What will you code in the COBOL program?
DavidatK Active Member Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
I don't understand what you intend to accomplish by doing this?
If the DD statement will always be coded and you want to run the program but not do the physical read/write, I think I?d simply comment out the read/write statement. If it?s a read you need to set your End-Of-File indicator.
I personally think this is a dangerous practice.
How about specifying the dummy as:
//INFILE DD DUMMY,DSN=C0385SA.TEST.INFILE,DISP=SHR
This will give you your documentation for the dataset name and still be DUMMY
mmwife Super Moderator Joined: 30 May 2003 Posts: 1592
If you might want to dummy the file sometimes and define it others, you can code a symbolic for the dummy clause.
Here's how you'd do in a proc:
//proc1 proc dmmy='dummy,'
//iffyfile dd &dmmy.dsn=a.b.realfile,dip=shr
In this case dummy is the default annd will prevail when you exec the proc with //s1 exec proc1.
To use the real file exec: //s1 exec proc1,dmmy=
All times are GMT + 6 Hours