Application Development 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: 

clearing file contents.

Former Member
0 Kudos

Hi experts,

I'm inserting the records into a file present in the appilcation server. Now i want to clear those file contents before inserting the records for the next time. what is the statement used to clear the file contents?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

just use "OPEN DATASET dset FOR OUTPUT".

sap will help you clear contents auto.

you can use "OPEN DATASET dset FOR APPENDING" to append current file.

2 REPLIES 2

Former Member
0 Kudos

just use "OPEN DATASET dset FOR OUTPUT".

sap will help you clear contents auto.

you can use "OPEN DATASET dset FOR APPENDING" to append current file.

Former Member
0 Kudos

OPEN DATASET FNAME FOR OUTPUT .

If the file does not already exist, it is created automatically. If it does already exist, but is closed, its contents are overwritten. If the file exists and is already open (for read or write access, or for appending), the position is reset to the beginning of the file.