View previous topic :: View next topic
|
Author |
Message |
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
Hi,
I am using DYNAlloc to create the file using assembler. Its working fine for me. But now I need to delete the file before creating to avoid the duplicate error. Is that possible in assembler? if so please provide me a piece of code. I cant use JCL because file names are dynamically coming from database. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if the name is the same, what is wrong in using it |
|
Back to top |
|
|
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
Names I am getting dynamically from database. Run time only i will come to know the file names. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Why not use IEFBR14, specifying the DSN, with DISP=(OLD,DELETE,DELETE) and disregard the CC?
This seems much simpler....
Bill |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Might i suggest MOD, rather than OLD. If the file does not exist, OLD will cause a jcl error.
However, the iefbr14 route will be a problem if the file names aren't known until the process is already running.
If all possible filenames are known & constant, the iefbr14 could (mod,delete) all of them. . . |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Names I am getting dynamically from database. Run time only i will come to know the file names. |
again I ask what' s wrong whit using the existing allocation ?
if it is a rerun then no problem
but if it is not a rerun whatever approach You might be using
You are in trouble...
poor standards , You might delete a dataset used somewhere else |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
You are already using dynamic allocation. Use that to delete the data set by allocating it DISP=MOD,DELETE and then freeing the ddname. You probably need to add a few other things on the allocation such as a unit and space but maybe not. After you delete the file reallocate it as you need it. |
|
Back to top |
|
|
|