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
 
using same file in multiple DD's

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nankrish

New User


Joined: 11 Nov 2005
Posts: 26

PostPosted: Thu Jun 14, 2007 5:27 pm    Post subject: using same file in multiple DD's
Reply with quote

Hi,

In a program if there are three output files created, is it possible to use the same file for all the three outputs files in the JCL.

All the files are opened in output mode already and it cannot modified to other modes.

When i tried giving (mod,ctlg,delete) for the all the files, i'm getting error as duplicate dataset in the second DD name.

Is there any other way to achieve this?

Thanks,
Ramesh
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Jun 14, 2007 5:36 pm    Post subject:
Reply with quote

You can add an IEBGENER or SORT step.

O.
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu Jun 14, 2007 5:36 pm    Post subject: Re: using same file in multiple DD's
Reply with quote

Ramesh,
You are using in the program logically three seperate files ,so in the job you have to specify three seperate files.you cannot use same file.If you want only one file then use a sort merge after this step or change your logic to have only one output file.

But Still,What is your exact requirement?Is it just for knowledge or for requirement?
Back to top
View user's profile Send private message
nankrish

New User


Joined: 11 Nov 2005
Posts: 26

PostPosted: Thu Jun 14, 2007 5:56 pm    Post subject:
Reply with quote

hi,

my requirement is to download these files to the server. Since all the files are of same layout the user wants to download them as a single file in the server.
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu Jun 14, 2007 6:48 pm    Post subject: Re: using same file in multiple DD's
Reply with quote

How many files you want to download?

You can use MOD parameter but when using that download(i think it is FTP),download each file in seperate step in the PROC,i.e single output file but seperate input files.

Hope this helps.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 14, 2007 11:41 pm    Post subject:
Reply with quote

Hello,

I'd suggest you create 3 files and then run SORT or IEBGENER to combine them into one file for the download.

If the program is writing to all 3 concurrently, the output would be interleaved and possibly quite confusing.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm

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