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
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm


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