|
On Tue, 30 Mar 2004 craigs@xxxxxxxxx wrote: > Anyone know of a command or a good way to clear an IFS file? I probably > need to open(), read(), close() but I am not sure how to clear. DEL > deletes the file but I want to keep the file empty. Maybe something > similar to CLRPFM. The best way I know of is to use DEL and then recreate. > Any thoughts? Anyone have some good examples of updating an IFS file > similar to the RPG update, write, delete, etc? If you can use the QSH commands there is a simple way: rm testfile; touch testfile This will delete a file called testfile and then recreate it empty. Another thing you could do is this: echo "" > testfile This is nice because it doesn't change permissions/ownerships of the file the way the first possibly could. The downside is that you will have a newline character in the file, so it isn't completely empty. I like the first way. James Rich Zvpebfbsg vf abg gur nafjre. Zvpebfbsg vf gur dhrfgvba. AB (be Yvahk) vf gur nafjre. -- Gnxra sebz n .fvtangher sebz fbzrbar sebz gur HX, fbhepr haxabja
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.