Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

deleting dataset

Former Member
0 Likes
903

Hi all,

I have opened a dataset that was already existing(created by me), deleted it. is it necessary to close this dataset now?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
856

Hi,

DELETE DATASET FNAME will delete the existing file which you have OPEN earlie, so there is no use of writing

CLOSE DATSET.

Please give point if it is helpul for you

Thanks,

Pramod

Hi all,

I have opened a dataset that was already existing(created by me), deleted it. is it necessary to close this dataset now?

5 REPLIES 5
Read only

abdul_hakim
Active Contributor
0 Likes
856

Once you have deleted then don't need to close it which is meaningless..

Abdul

Read only

Former Member
0 Likes
856

Hi vishal,

1. Not required.

2. U can also directly delete (without opening)

3.

data : fname(150) type c.

fname = '/usr/sap/trans/LEGAL.TXT'.

OPEN DATASET FNAME ENCODING DEFAULT FOR INPUT IN TEXT MODE.

delete dataset fname.

regards,

amit m.

Read only

Former Member
0 Likes
857

Hi,

DELETE DATASET FNAME will delete the existing file which you have OPEN earlie, so there is no use of writing

CLOSE DATSET.

Please give point if it is helpul for you

Thanks,

Pramod

Read only

abdul_hakim
Active Contributor
0 Likes
856

Hi Vishal.

For your info:DELETE DATASET not only delete the file contents but it will delete the entire file from the memory ie.file won't be no longer available for READ.

Abdul

Read only

Former Member
0 Likes
856

If you try to close it, it may give error.

because there is no dataset exists.

So no need to close the dataset.

Regards

vijay