IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DUMMY parameter in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
herewego

New User


Joined: 20 Feb 2006
Posts: 14

PostPosted: Wed Feb 22, 2006 4:21 am
Reply with quote

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?
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Feb 22, 2006 4:35 am
Reply with quote

herewego,

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:

Code:

//INFILE DD DUMMY,DSN=C0385SA.TEST.INFILE,DISP=SHR   


This will give you your documentation for the dataset name and still be DUMMY

Dave
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Feb 24, 2006 8:12 am
Reply with quote

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=
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top