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

using same file in multiple DD's


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2358
Location: Israel

PostPosted: Thu Jun 14, 2007 5:36 pm
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: Canada

PostPosted: Thu Jun 14, 2007 5:36 pm
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
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: Canada

PostPosted: Thu Jun 14, 2007 6:48 pm
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

Moderator Emeritus


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

PostPosted: Thu Jun 14, 2007 11:41 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top