Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DUMMY parameter in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: DUMMY parameter in COBOL
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    Post subject: Re: DUMMY parameter in COBOL
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    Post subject: Re: DUMMY parameter in COBOL
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us