Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us