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

Global Moderator


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

Global Moderator


Joined: 14 Mar 2007
Posts: 10373
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 Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts NDM 300 files from mainframe to linux shreya19 All Other Mainframe Topics 2 Thu Oct 26, 2017 11:40 am

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