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
 

 

Delete the files using assembler.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
jeyaseelan347
Warnings : 1

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Sat Nov 22, 2008 6:08 pm    Post subject: Delete the files using assembler.
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Sat Nov 22, 2008 6:59 pm    Post subject: Reply to: Delete the files using assembler.
Reply with quote

if the name is the same, what is wrong in using it icon_confused.gif
Back to top
View user's profile Send private message
jeyaseelan347
Warnings : 1

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Sat Nov 22, 2008 10:07 pm    Post subject:
Reply with quote

Names I am getting dynamically from database. Run time only i will come to know the file names.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sat Nov 22, 2008 10:19 pm    Post subject: Re: Delete the files using assembler.
Reply with quote

Why not use IEFBR14, specifying the DSN, with DISP=(OLD,DELETE,DELETE) and disregard the CC?

This seems much simpler....

Bill
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: Sat Nov 22, 2008 11:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Sat Nov 22, 2008 11:12 pm    Post subject: Reply to: Delete the files using assembler.
Reply with quote

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
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Sat Nov 22, 2008 11:41 pm    Post subject: Reply to: Delete the files using assembler.
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Dump analysis of an assembler module monica1 PL/I & Assembler 4 Tue May 09, 2017 10:05 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm


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