<?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: Vms DCL Code in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232621#M44281</link>
    <description>&lt;!--!*#--&gt;It would help if you had showed us how the input is being aquired in teh first place.&lt;BR /&gt;Command line argument? From terminal?&lt;BR /&gt;&lt;BR /&gt;Here is an example of a value checking read loop:&lt;BR /&gt;&lt;BR /&gt;$MIN_DAYS = 31&lt;BR /&gt;$MAX_DAYS = 365&lt;BR /&gt;$read_days_loop:&lt;BR /&gt;$READ/END=done/PROMPT="Enter # of Days &amp;gt; " SYS$COMMAND days&lt;BR /&gt;$IF F$TYPE(days).NES."INTEGER" -&lt;BR /&gt;     .OR. days.LT.MIN_DAYS -&lt;BR /&gt;     .OR. days.GT.MAX_DAYS&lt;BR /&gt;$THEN&lt;BR /&gt;$ WRITE SYS$OUTPUT "Please enter a NUMBER from ''MIN_DAYS' to ''MAX_DAYS'"&lt;BR /&gt;$ GOTO read_days_loop&lt;BR /&gt;$ENDIF&lt;BR /&gt;$&lt;BR /&gt;$  WRITE SYS$OUTPUT "Processing ''days' days."&lt;BR /&gt;$  GOTO read_days_loop&lt;BR /&gt;$&lt;BR /&gt;$done:&lt;BR /&gt;$ WRITE SYS$OUTPUT "Bye now."&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Sun, 13 Jul 2008 15:43:57 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2008-07-13T15:43:57Z</dc:date>
    <item>
      <title>Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232619#M44279</link>
      <description>I have a com file that prompts user to put in # of day to generate a speicific report. The problem is when a user puts in 500 days the code loops. &lt;BR /&gt;&lt;BR /&gt;Ex.  Enter # of Days &amp;gt; &lt;BR /&gt;&lt;BR /&gt;How can I limit the number of days requested to a maximum value of 31 or 365 or whatever.&lt;BR /&gt;&lt;BR /&gt;What would the DCL code be for this?</description>
      <pubDate>Sun, 13 Jul 2008 13:30:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232619#M44279</guid>
      <dc:creator>Steve ward_3</dc:creator>
      <dc:date>2008-07-13T13:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232620#M44280</link>
      <description>&lt;!--!*#--&gt;&amp;gt; The problem is when a user puts in 500&lt;BR /&gt;&amp;gt; days the code loops. &lt;BR /&gt;&lt;BR /&gt;What code?  I see no code.  Perhaps someone&lt;BR /&gt;with psychic powers greater than mine could&lt;BR /&gt;tell you why "the code loops".&lt;BR /&gt;&lt;BR /&gt;    HELP IF</description>
      <pubDate>Sun, 13 Jul 2008 15:37:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232620#M44280</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-07-13T15:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232621#M44281</link>
      <description>&lt;!--!*#--&gt;It would help if you had showed us how the input is being aquired in teh first place.&lt;BR /&gt;Command line argument? From terminal?&lt;BR /&gt;&lt;BR /&gt;Here is an example of a value checking read loop:&lt;BR /&gt;&lt;BR /&gt;$MIN_DAYS = 31&lt;BR /&gt;$MAX_DAYS = 365&lt;BR /&gt;$read_days_loop:&lt;BR /&gt;$READ/END=done/PROMPT="Enter # of Days &amp;gt; " SYS$COMMAND days&lt;BR /&gt;$IF F$TYPE(days).NES."INTEGER" -&lt;BR /&gt;     .OR. days.LT.MIN_DAYS -&lt;BR /&gt;     .OR. days.GT.MAX_DAYS&lt;BR /&gt;$THEN&lt;BR /&gt;$ WRITE SYS$OUTPUT "Please enter a NUMBER from ''MIN_DAYS' to ''MAX_DAYS'"&lt;BR /&gt;$ GOTO read_days_loop&lt;BR /&gt;$ENDIF&lt;BR /&gt;$&lt;BR /&gt;$  WRITE SYS$OUTPUT "Processing ''days' days."&lt;BR /&gt;$  GOTO read_days_loop&lt;BR /&gt;$&lt;BR /&gt;$done:&lt;BR /&gt;$ WRITE SYS$OUTPUT "Bye now."&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 13 Jul 2008 15:43:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232621#M44281</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-07-13T15:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232622#M44282</link>
      <description>&lt;BR /&gt;You might consider the book, "Writing Real Programs in DCL."  &lt;A href="http://www.alibris.com/search/books/qwork/8739673/used/Writing%20Real%20Programs%20in%20DCL" target="_blank"&gt;http://www.alibris.com/search/books/qwork/8739673/used/Writing%20Real%20Programs%20in%20DCL&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Although out of print, it can still be found.  &lt;BR /&gt;&lt;BR /&gt;Andy</description>
      <pubDate>Sun, 13 Jul 2008 19:43:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232622#M44282</guid>
      <dc:creator>Andy Bustamante</dc:creator>
      <dc:date>2008-07-13T19:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232623#M44283</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;There are two questions here.&lt;BR /&gt;&lt;BR /&gt;First, the syntax of an IF statement in DCL. This is covered in the "DCL Dictionary", in the standard documentation library, available on the HP OpenVMS www site at &lt;A href="http://www.hp.com/go/openvms" target="_blank"&gt;http://www.hp.com/go/openvms&lt;/A&gt; , and is documented in the online HELP text.&lt;BR /&gt;&lt;BR /&gt;The short answer to that question is something along the lines of:&lt;BR /&gt;&lt;BR /&gt;$ IF  (days .ge. 500) then $ xxx&lt;BR /&gt;&lt;BR /&gt;There are several variants that may be appropriate, depending on what is written in the command file already.&lt;BR /&gt;&lt;BR /&gt;There is a second question, namely, WHY is the command file failing? Also, "At what point does the command file fail?". This, IMHO, is a more serious problem. Generally, I recommend careful investigation of this type of question, as it often uncovers far more serious problems.&lt;BR /&gt;&lt;BR /&gt;I hope that the above is helpful.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Sun, 13 Jul 2008 19:56:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232623#M44283</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2008-07-13T19:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232624#M44284</link>
      <description>Here is the code</description>
      <pubDate>Mon, 14 Jul 2008 04:05:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232624#M44284</guid>
      <dc:creator>Steve ward_3</dc:creator>
      <dc:date>2008-07-14T04:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232625#M44285</link>
      <description>&lt;!--!*#--&gt;(Simple solution)&lt;BR /&gt;After the line:&lt;BR /&gt;&lt;BR /&gt;$ if f$type(date) .nes. "INTEGER" then goto detail&lt;BR /&gt;&lt;BR /&gt;insert a line:&lt;BR /&gt;$ if date .gt. &lt;MAX&gt; then goto detail&lt;BR /&gt;&lt;BR /&gt;...where &lt;MAX&gt; is the desired maximum days&lt;/MAX&gt;&lt;/MAX&gt;</description>
      <pubDate>Mon, 14 Jul 2008 06:24:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232625#M44285</guid>
      <dc:creator>Barry Alford</dc:creator>
      <dc:date>2008-07-14T06:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232626#M44286</link>
      <description>Having replaced the search instructions by a search in a dummy file, I have tested your procedure with no loop occuring. &lt;BR /&gt;&lt;BR /&gt;Maybe you could "set verify" your code and attach the output of the run ?&lt;BR /&gt;&lt;BR /&gt;Jean-Francois</description>
      <pubDate>Mon, 14 Jul 2008 06:38:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232626#M44286</guid>
      <dc:creator>jf Marchal</dc:creator>
      <dc:date>2008-07-14T06:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232627#M44287</link>
      <description>It's when you enter a number bigger than 9999 that it will go wrong.&lt;BR /&gt;&lt;BR /&gt;f$cvtime("-''date'-00",...&lt;BR /&gt;will display errors for values bigger than 9999 and this will look like it's looping on an error.&lt;BR /&gt;&lt;BR /&gt;fwiw&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Mon, 14 Jul 2008 07:58:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232627#M44287</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2008-07-14T07:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232628#M44288</link>
      <description>(Simple solution)&lt;BR /&gt;After the line:&lt;BR /&gt;&lt;BR /&gt;$ if f$type(date) .nes. "INTEGER" then goto detail&lt;BR /&gt;&lt;BR /&gt;insert a line:&lt;BR /&gt;$ if date .gt. &lt;MAX&gt; then goto detail&lt;BR /&gt;&lt;BR /&gt;...where &lt;MAX&gt; is the desired maximum days&lt;BR /&gt;&lt;BR /&gt;Yes, When I put in 31 days for the max and type in 32 it just hangs there? Shouldn't it just exit or prompt me to put in the right # of days again? &lt;BR /&gt;&lt;/MAX&gt;&lt;/MAX&gt;</description>
      <pubDate>Mon, 14 Jul 2008 14:10:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232628#M44288</guid>
      <dc:creator>Steve ward_3</dc:creator>
      <dc:date>2008-07-14T14:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232629#M44289</link>
      <description>I would also test the miniumum. f$cvt("--1-00") is also a valid syntax.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Mon, 14 Jul 2008 14:16:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232629#M44289</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2008-07-14T14:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232630#M44290</link>
      <description>And as I read your code, it should prompt you again (Enter # of Days&amp;gt;").&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Mon, 14 Jul 2008 14:26:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232630#M44290</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2008-07-14T14:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232631#M44291</link>
      <description>&amp;gt;&amp;gt; Shouldn't it just exit or prompt me to put in the right # of days again?&lt;BR /&gt;&lt;BR /&gt;Yes, if you made the edit correctly, then it should.&lt;BR /&gt;See my early example how to use a single IF with OR clause if desired.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; it just hangs there&lt;BR /&gt;&lt;BR /&gt;Are you sure? Dcl scripts do not 'just sit there'.&lt;BR /&gt;Check at least with control-T or SET VERIFY&lt;BR /&gt;(control-Y, $set verify, $continue).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please note MANY inefficiencies and oddities in the script.&lt;BR /&gt;&lt;BR /&gt;imho that "f$cvtime("-''date'-00"&lt;BR /&gt;is better written withotu the "00". That just confuses.&lt;BR /&gt;&lt;BR /&gt;Instead of worrying about spaces in the dates before the 10'th you may want to search using ... /MATCH=AND "Start: ", " ''thedate'"&lt;BR /&gt;&lt;BR /&gt;IF you are going to unconditionally append the search out to a file, then why not have search put it there directly?&lt;BR /&gt;Instead of&lt;BR /&gt;&lt;BR /&gt;$create 'outf'&lt;BR /&gt;$loop:&lt;BR /&gt;$sea/out=x.tmp&lt;BR /&gt;$appen x.tmp 'outf'&lt;BR /&gt;:&lt;BR /&gt;$if .not.done then goto loop&lt;BR /&gt;&lt;BR /&gt;use:&lt;BR /&gt;&lt;BR /&gt;$create 'outf'&lt;BR /&gt;$open/append outf 'outf'&lt;BR /&gt;$loop:&lt;BR /&gt;$sea/out=outf&lt;BR /&gt;:&lt;BR /&gt;$if .not.done then goto loop&lt;BR /&gt;$close outf&lt;BR /&gt;&lt;BR /&gt;But most importantly... don't loop through the file over and over!&lt;BR /&gt;You might want to open it with DCL, or an other language, check each record. If it has "Start:", then check the date.&lt;BR /&gt;&lt;BR /&gt;Personally I would use perl.&lt;BR /&gt;I'll stick in an example, because the date handling might be tricky for a first time.&lt;BR /&gt;&lt;BR /&gt;Usage:&lt;BR /&gt;&lt;BR /&gt;$perl date-filter.pl stats_dir:autostat.dat 123 &amp;gt; 'outf'&lt;BR /&gt;&lt;BR /&gt;#---- date-filter.pl ----&lt;BR /&gt;use strict;&lt;BR /&gt;use Time::Local;&lt;BR /&gt;&lt;BR /&gt;my $file = shift or die "Please provide file to search";&lt;BR /&gt;my $days = shift or die "Please provide a number of daqys to look for";&lt;BR /&gt;my ($sec,$min,$hour,$mday,$mon,$year) = localtime();&lt;BR /&gt;my $cutoff = timelocal(0,0,0,$mday,$mon,$year) - $days*86400;&lt;BR /&gt;&lt;BR /&gt;open FILE, "&amp;lt;$file"  or die "Could not open search file $file\n$!";&lt;BR /&gt;while (&lt;FILE&gt;) {&lt;BR /&gt;  if (/(\d+)-(\w+)-(\d+)/) {&lt;BR /&gt;     my $n = index("   JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC", $2)/3;&lt;BR /&gt;     print if $cutoff &amp;lt; timelocal(0,0,0,$1,$n-1,$3-1900);&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;#-------------------------------&lt;BR /&gt;&lt;BR /&gt;Enjoy,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;/FILE&gt;</description>
      <pubDate>Mon, 14 Jul 2008 14:35:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232631#M44291</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-07-14T14:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232632#M44292</link>
      <description>&lt;!--!*#--&gt;Without checking what else your code does, I cannot fully answer why it hangs for you. On my V8.3 machine the following trivial mod of your code works as expected.&lt;BR /&gt;$ maxdays = 365&lt;BR /&gt;$detail:                                                                                                                           &lt;BR /&gt;$ read/prompt="ENTER # OF DAYS (up to ''maxdays') &amp;gt; " sys$command date&lt;BR /&gt;$ if f$type(date) .nes. "INTEGER" then goto detail&lt;BR /&gt;$ if date .gt. maxdays then goto detail&lt;BR /&gt;&lt;BR /&gt;You need to replicate this at 'Summary:', but other than that I cannot see why you have any problem with the code.</description>
      <pubDate>Mon, 14 Jul 2008 14:47:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232632#M44292</guid>
      <dc:creator>John Travell</dc:creator>
      <dc:date>2008-07-14T14:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232633#M44293</link>
      <description>Darn, Hein's response was not there when I started to reply... Pass on mine, Hein did a much better job...&lt;BR /&gt;JT:</description>
      <pubDate>Mon, 14 Jul 2008 14:49:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232633#M44293</guid>
      <dc:creator>John Travell</dc:creator>
      <dc:date>2008-07-14T14:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Vms DCL Code</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232634#M44294</link>
      <description>[[[Yes, When I put in 31 days for the max and type in 32 it just hangs there? Shouldn't it just exit or prompt me to put in the right # of days again?]]]&lt;BR /&gt;&lt;BR /&gt;Well, only if you coded the DCL to do that, actually. &lt;BR /&gt;&lt;BR /&gt;DCL does what you tell it to do, within its various limits.  DCL is certainly arcane, but it's also among the company of most other languages in lacking any sort of magical DWIM (do what I mean) powers.  You gotta code it, or it just won't happen.&lt;BR /&gt;&lt;BR /&gt;Now to see what is happening here with your hang, use the verification mechanism; straight SET VERIFY and invoke, or use something akin to:&lt;BR /&gt;&lt;BR /&gt;$ oldvfy = f$verify(f$trnnm("BACKUP_DEBUG"))&lt;BR /&gt;[stuff]&lt;BR /&gt;$common_exit:&lt;BR /&gt;$ vfy = f$verify(oldvfy)&lt;BR /&gt;$ exit&lt;BR /&gt;&lt;BR /&gt;to allow you to selectively enable debug with a logical name.  Then see what's wedging.&lt;BR /&gt;&lt;BR /&gt;Based on a quick look, that DCL code is laced with design errors and with some subtle restrictions.  It's easy for filenames to collide, for instance.&lt;BR /&gt;&lt;BR /&gt;As has been stated, the processing of the input string is best updated.  I'd probably swap from:&lt;BR /&gt;&lt;BR /&gt;$detail:&lt;BR /&gt;$ read/prompt="ENTER # OF DAYS &amp;gt; " sys$command date&lt;BR /&gt;$ if f$type(date) .nes. "INTEGER" then goto detail&lt;BR /&gt;&lt;BR /&gt;over to -- and note I changed "date" to "days" here, which will require changes downstream -- the following:&lt;BR /&gt;&lt;BR /&gt;$detail:&lt;BR /&gt;$ read/prompt="ENTER # OF DAYS &amp;gt; " sys$command days&lt;BR /&gt;$ days = f$integer(days)&lt;BR /&gt;$ if (days .le. 0) .or. (days .gt. 365) then goto detail&lt;BR /&gt;&lt;BR /&gt;This:&lt;BR /&gt;&lt;BR /&gt;$ search prod_admin:backup.log,backup.sav;*&lt;BR /&gt;&lt;BR /&gt;looks broken.  Searching the binary saveset?  Really?&lt;BR /&gt;&lt;BR /&gt;This: &lt;BR /&gt;&lt;BR /&gt;/output=addm0700_backup_save.tmp&lt;BR /&gt;&lt;BR /&gt;can collide.&lt;BR /&gt;&lt;BR /&gt;This:&lt;BR /&gt;&lt;BR /&gt;$ if f$search("''addm0700*.tmp;'") .nes. "" then purge/nolog 'addm0700*.tmp;';*&lt;BR /&gt;$ if f$search("''addm0700*.tmp;'") .nes. "" then delete/nolog 'addm0700*.tmp;';*&lt;BR /&gt;&lt;BR /&gt;looks broken&lt;BR /&gt;&lt;BR /&gt;I'd probably put the days prompt code in a subroutine, since it looks common.)&lt;BR /&gt;&lt;BR /&gt;This: &lt;BR /&gt;&lt;BR /&gt;$ Set proc/priv=all &lt;BR /&gt;&lt;BR /&gt;implies this is some sort of a menu.  And f$setprv() is more common.  And enabling all privileges at the top of the DCL is just asking for something (else) to get corrupted or deleted.   (The good news for those so included: unless that login thing is marked CAPTIVE, full privileges are easily available.)&lt;BR /&gt;&lt;BR /&gt;And I'd add an /ERROR and/or /END_OF_FILE on the READ, to allow a graceful path out if something on the input messes up.  Or if the user uses ^Z to try to punt the operation.&lt;BR /&gt;&lt;BR /&gt;I'm not at all certain if my DCL book is in or out of print.  It seems to wink in and out of publication status; AFAIK, it's still available as a demand-print book.&lt;BR /&gt;&lt;BR /&gt;Stephen Hoffman&lt;BR /&gt;HoffmanLabs LLC</description>
      <pubDate>Mon, 14 Jul 2008 15:04:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-dcl-code/m-p/4232634#M44294</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-07-14T15:04:06Z</dc:date>
    </item>
  </channel>
</rss>

