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
 
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

Senior Member


Joined: 14 Mar 2007
Posts: 10478
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: 2504
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

Senior Member


Joined: 14 Mar 2007
Posts: 10478
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 How to delete large data. Mounika Nemani DB2 1 Wed Jun 13, 2018 1:58 pm
No new posts mapping PLI structure to assembler co... Pedro PL/I & Assembler 3 Fri Jun 01, 2018 2:53 am
No new posts Code Coverage and static analysis too... Aditya.Srivastava PL/I & Assembler 2 Fri May 25, 2018 12:48 pm
No new posts Advanced Assembler Language and MVS I... Paul Voyner All Other Mainframe Topics 0 Wed Apr 18, 2018 3:49 pm
No new posts Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm

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