<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Writing a dcl script to delete files in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813584#M77223</link>
    <description>There are some procedures floating around for &lt;BR /&gt;reverse deletion of large number of files.&lt;BR /&gt;I attach mine to give you an idea.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
    <pubDate>Wed, 28 Jun 2006 23:51:54 GMT</pubDate>
    <dc:creator>Karl Rohwedder</dc:creator>
    <dc:date>2006-06-28T23:51:54Z</dc:date>
    <item>
      <title>Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813575#M77214</link>
      <description>We have backed up all the files and will no longer require these large files to be on the sites. &lt;BR /&gt;&lt;BR /&gt;I would like to delete all the  TEAM_*_ALL.*;*  all the LAWSUIT_CALIF_EXT*.DAT;*  and all the LANE_CALIF_EXT*.DAT;* files across all sites’in the PROD_RMS directories.&lt;BR /&gt;&lt;BR /&gt;Can someone write up a simple script for this, I would appreciate it!&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jun 2006 14:20:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813575#M77214</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-06-27T14:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813576#M77215</link>
      <description>&lt;!--!*#--&gt;Presuming your Prod_RMS directories are at the top level of your disks (adjust accordingly if not):&lt;BR /&gt;&lt;BR /&gt;$ loop:&lt;BR /&gt;$ disk = f$device(,"disk")&lt;BR /&gt;$ if disk .nes. "" then if f$getdvi(disk,"Mnt")&lt;BR /&gt;$  then&lt;BR /&gt;$   delete 'disk'[Prod_RMS...]team_*_all.*;*&lt;BR /&gt;$   delete 'disk'[Prod_RMS...]lawsuit_calif_ext*.dat;*&lt;BR /&gt;$   delete 'disk'[Prod_RMS...]lane_calif_ext*.dat;*&lt;BR /&gt;$   goto loop&lt;BR /&gt;$  endif</description>
      <pubDate>Tue, 27 Jun 2006 15:16:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813576#M77215</guid>
      <dc:creator>Aaron Sakovich</dc:creator>
      <dc:date>2006-06-27T15:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813577#M77216</link>
      <description>Milse, Aaron,&lt;BR /&gt;&lt;BR /&gt;&lt;QUOTE&gt;&lt;BR /&gt;$ loop:&lt;BR /&gt;$ disk = f$device(,"disk")&lt;BR /&gt;$ if disk .nes. "" then if f$getdvi(disk,"Mnt")&lt;BR /&gt;$  then&lt;BR /&gt;$   delete 'disk'[Prod_RMS...]team_*_all.*;*&lt;BR /&gt;$   delete 'disk'[Prod_RMS...]lawsuit_calif_ext*.dat;*&lt;BR /&gt;$   delete 'disk'[Prod_RMS...]lane_calif_ext*.dat;*&lt;BR /&gt;$   goto loop&lt;BR /&gt;$  endif&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;If this sctipt would encounter a foreign mounted disk, a shadow set member, a CD drive, a write-locked drive, ..., you would finish without doing all disks.&lt;BR /&gt;&lt;BR /&gt;I suggest a slight modification.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ loop:&lt;BR /&gt;$ disk = f$device(,"disk")&lt;BR /&gt;$ if disk .nes. ""&lt;BR /&gt;$  then&lt;BR /&gt;$    if f$getdvi(disk,"Mnt")&lt;BR /&gt;$    then&lt;BR /&gt;$    set noon  !  proceed if DELETE impossible for any reason&lt;BR /&gt;$   delete 'disk'[Prod_RMS...]team_*_all.*;*&lt;BR /&gt;$   set noon   !  set again (undone at first fai;, but then this one also likely to fail    &lt;BR /&gt;$   delete 'disk'[Prod_RMS...]lawsuit_calif_ext*.dat;*&lt;BR /&gt;$   set noon&lt;BR /&gt;$   delete 'disk'[Prod_RMS...]lane_calif_ext*.dat;*&lt;BR /&gt;$   goto loop ! seek next disk&lt;BR /&gt;$  endif&lt;BR /&gt;$  endif &lt;BR /&gt;&lt;BR /&gt;Instead of SET NOON in a decent procedure I would test the various statusses a disk could be in that would lead to error, but this looks like a one-timer, and then the quick-and-dirty is the cheaper solution.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Tue, 27 Jun 2006 15:32:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813577#M77216</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2006-06-27T15:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813578#M77217</link>
      <description>Actually, &lt;BR /&gt;&lt;BR /&gt;On all nodes if I do dir prod_rms:TEAM_*_ALL.*;* &lt;BR /&gt;&lt;BR /&gt;Now the prod_rms is a log pointing to the actual device where prod_rms directory is located. The files are there. &lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jun 2006 15:32:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813578#M77217</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-06-27T15:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813579#M77218</link>
      <description>oh, a logical?  then it's really trivial...&lt;BR /&gt;&lt;BR /&gt;$ Set NoOn&lt;BR /&gt;$ Delete Prod_RMS:team_*_all.*;*&lt;BR /&gt;$ Delete Prod_RMS:Lawsuit_Calif_Ext*.dat;*&lt;BR /&gt;$ Delete Prod_RMS:Lane_Calif_ext*.dat;*&lt;BR /&gt;&lt;BR /&gt;I don't think I'd even call that a script... ;^)</description>
      <pubDate>Tue, 27 Jun 2006 15:37:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813579#M77218</guid>
      <dc:creator>Aaron Sakovich</dc:creator>
      <dc:date>2006-06-27T15:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813580#M77219</link>
      <description>That's what I thought Thanks everyone!&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jun 2006 15:40:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813580#M77219</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-06-27T15:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813581#M77220</link>
      <description>The file names indicate potentially sensitive data.&lt;BR /&gt;&lt;BR /&gt;Perhaps a "$ delete/erase"  is in order. &lt;BR /&gt;&lt;BR /&gt;From vms help&lt;BR /&gt;&lt;BR /&gt;DELETE&lt;BR /&gt;&lt;BR /&gt;  file&lt;BR /&gt;&lt;BR /&gt;    /ERASE&lt;BR /&gt;&lt;BR /&gt;          /ERASE&lt;BR /&gt;          /NOERASE (default)&lt;BR /&gt;&lt;BR /&gt;       When you delete a file, the area in which the file was stored is&lt;BR /&gt;       returned to the system for future use. The data that was stored&lt;BR /&gt;       in that location still exists in the system until new data is&lt;BR /&gt;       written over it. When you specify the /ERASE qualifier, the&lt;BR /&gt;       storage location is overwritten with a system specified pattern&lt;BR /&gt;       so that the data no longer exists.&lt;BR /&gt;     &lt;BR /&gt;&lt;BR /&gt;Also does the disk have highwater marking enabled ?&lt;BR /&gt;&lt;BR /&gt;SET&lt;BR /&gt;&lt;BR /&gt;  VOLUME&lt;BR /&gt;&lt;BR /&gt;    /HIGHWATER_MARKING&lt;BR /&gt;&lt;BR /&gt;          /HIGHWATER_MARKING&lt;BR /&gt;          /NOHIGHWATER_MARKING&lt;BR /&gt;&lt;BR /&gt;       Determines whether the file highwater mark (FHM) volume attribute&lt;BR /&gt;       is set. The FHM attribute guarantees that a user cannot read data&lt;BR /&gt;       that was not written by the user. Applies to Files-11 On-Disk&lt;BR /&gt;       Structure Level 2 (ODS-2) and 5 (ODS-5) volumes only.&lt;BR /&gt;     &lt;BR /&gt;&lt;BR /&gt;Why mention this ? DFU has a facility to "UNDELETE" files. We deal with sensitive data and when we delete the files, they are deleted and stay deleted !&lt;BR /&gt;&lt;BR /&gt;my aus 0.02</description>
      <pubDate>Tue, 27 Jun 2006 17:54:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813581#M77220</guid>
      <dc:creator>Thomas Ritter</dc:creator>
      <dc:date>2006-06-27T17:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813582#M77221</link>
      <description>I would also suggest am image backup of the files prior to deleting.  Also keep a log file of all of the files removed.  Just in case.</description>
      <pubDate>Wed, 28 Jun 2006 14:54:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813582#M77221</guid>
      <dc:creator>Peter Zeiszler</dc:creator>
      <dc:date>2006-06-28T14:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813583#M77222</link>
      <description>How many files are there in total ? &lt;BR /&gt;If a lot, it may well be worth writing a script to delete them in reverse order. &lt;BR /&gt;When VMS deletes a file it shuffles all of the alphabetically higher directory entries down. This makes for a fast read of the directory next time round, but if the directory file itself is large the shuffle can take a while, and is repeated for every file deleted.&lt;BR /&gt;Doing the deletes in reverse order reduces (or even eliminates) that shuffling as there are fewer, if any, directory entries above the deleted file to shuffle.</description>
      <pubDate>Wed, 28 Jun 2006 14:54:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813583#M77222</guid>
      <dc:creator>John Travell</dc:creator>
      <dc:date>2006-06-28T14:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a dcl script to delete files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813584#M77223</link>
      <description>There are some procedures floating around for &lt;BR /&gt;reverse deletion of large number of files.&lt;BR /&gt;I attach mine to give you an idea.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Wed, 28 Jun 2006 23:51:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/writing-a-dcl-script-to-delete-files/m-p/3813584#M77223</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2006-06-28T23:51:54Z</dc:date>
    </item>
  </channel>
</rss>

