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
 

 

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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm


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