<?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: Ask prompts in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889191#M79820</link>
    <description>&lt;BR /&gt;Prompting for the date is easy enough, convertign that to a real date is easy enough alsocheck out:&lt;BR /&gt;$HELP LEXI F$CVTIME&lt;BR /&gt;$help dcl_tips date_time combination&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;$ show time&lt;BR /&gt;  30-OCT-2006 11:36:03&lt;BR /&gt;$ write sys$output f$cvt("today -30-","absolute")&lt;BR /&gt;30-SEP-2006 00:00:00.00&lt;BR /&gt;&lt;BR /&gt;however... SEARCH will only look for exact strings and will not understand 'since'.&lt;BR /&gt;&lt;BR /&gt;Please explain in even more detail the exact problm you are tryign to solve and perhaps attach a text file with a sample of the backup log and what you would want to find in there with a given input selection.&lt;BR /&gt;&lt;BR /&gt;You may need to DCL or PERL script to read each record, extract a date and compare.&lt;BR /&gt;&lt;BR /&gt;Hope this helps some,&lt;BR /&gt;Hein van den Heuvel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 30 Oct 2006 12:38:56 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2006-10-30T12:38:56Z</dc:date>
    <item>
      <title>Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889189#M79818</link>
      <description>How would I write up a procedure to have it ask for the Current day, 30 days or 60 days. &lt;BR /&gt;&lt;BR /&gt;I want to be able to list backups logs with the current day , 30 days or 60 days listings? &lt;BR /&gt;&lt;BR /&gt;Help!&lt;BR /&gt;So if I would choose option [C] for current I would only get 1 file for [30] 30 files for [60] 60 files. This is what I have so far?&lt;BR /&gt; &lt;BR /&gt; $  read/prompt="[C]urrent, [30]days or [60]days " sys$command type&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;searchprod_admin:backup.log,backup.sav;* " ''thedate'",started/nowarn/noh^&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Oct 2006 12:04:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889189#M79818</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-10-30T12:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889190#M79819</link>
      <description>Miles,&lt;BR /&gt;&lt;BR /&gt;don't know if I got it right, but you seem to have a logfile BACKUP.LOG, which contains started messages for each backup.&lt;BR /&gt;&lt;BR /&gt;To search for specific dates, you should construct the variable THEDATE, e.g. if TYPE = 30:&lt;BR /&gt;$ THEDATE = F$CVTIME("TODAY-''type'-0","ABSOLUTE","DATE")&lt;BR /&gt;You may then search with&lt;BR /&gt;$ SEARCH BACKUP.LOG "started","''THEDATE'" /Match=and/Remaining&lt;BR /&gt;which shows you all entries since the specified date.&lt;BR /&gt;&lt;BR /&gt;To list the savesets you may use the DIRECTORY command together with /SINCE and /BEFORE.&lt;BR /&gt;&lt;BR /&gt;Btw: I would not use a variable named TYPE, because that may conflict with the DCL verb TYPE.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Mon, 30 Oct 2006 12:38:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889190#M79819</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2006-10-30T12:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889191#M79820</link>
      <description>&lt;BR /&gt;Prompting for the date is easy enough, convertign that to a real date is easy enough alsocheck out:&lt;BR /&gt;$HELP LEXI F$CVTIME&lt;BR /&gt;$help dcl_tips date_time combination&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;$ show time&lt;BR /&gt;  30-OCT-2006 11:36:03&lt;BR /&gt;$ write sys$output f$cvt("today -30-","absolute")&lt;BR /&gt;30-SEP-2006 00:00:00.00&lt;BR /&gt;&lt;BR /&gt;however... SEARCH will only look for exact strings and will not understand 'since'.&lt;BR /&gt;&lt;BR /&gt;Please explain in even more detail the exact problm you are tryign to solve and perhaps attach a text file with a sample of the backup log and what you would want to find in there with a given input selection.&lt;BR /&gt;&lt;BR /&gt;You may need to DCL or PERL script to read each record, extract a date and compare.&lt;BR /&gt;&lt;BR /&gt;Hope this helps some,&lt;BR /&gt;Hein van den Heuvel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Oct 2006 12:38:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889191#M79820</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-10-30T12:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889192#M79821</link>
      <description>Well what I want to do is this? &lt;BR /&gt;&lt;BR /&gt;Have it ask first [D}etail or [S]ummary&lt;BR /&gt;If detail , I want to pull the backup info &lt;BR /&gt;from the backup.log and backup.sav;* files in prod_admin: &lt;BR /&gt;&lt;BR /&gt;If summary, I want to pull it from Stats_dir:autodtat*.* files &lt;BR /&gt;&lt;BR /&gt;Then I want it to ask for [C]urrent, 30day or 60 day. This is how many days from today they want to see the backup times for. I also want to give the Admin an Option of seeing it on the screen or printing it. &lt;BR /&gt;&lt;BR /&gt;Thanks!!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Oct 2006 12:56:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889192#M79821</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-10-30T12:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889193#M79822</link>
      <description>Miles,&lt;BR /&gt;&lt;BR /&gt;something along these lines:&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;Read_ds:&lt;BR /&gt;$ read sys$command DS /prompt="Detail or Summary?"&lt;BR /&gt;$ ds = f$extract(0,1,f$edit(Ds,"upcase,trim"))&lt;BR /&gt;$ If ds .eqs. "D" then goto detail&lt;BR /&gt;$ if ds .eqs. "S" then goto summary&lt;BR /&gt;$ Write sys$output " D or S !"&lt;BR /&gt;$ goto read_ds&lt;BR /&gt;.&lt;BR /&gt;. (similar for C_30_60)&lt;BR /&gt;. (similar for Screen_or_Print)&lt;BR /&gt;. &lt;BR /&gt;$ if C_30_60 .eqs. "C" then C_30_60 = 0&lt;BR /&gt;$ refdat = f$cvtim("today-''C_30_60'-,"absolute","date")&lt;BR /&gt;$&lt;BR /&gt;.&lt;BR /&gt;. processing from which enviroonment..&lt;BR /&gt;.&lt;BR /&gt;$ if screen_or_print  .eqs. "S" &lt;BR /&gt;$ then&lt;BR /&gt;$  type/page/sin='refdat' &lt;CHOSEN_FILE_SPEC&gt;&lt;BR /&gt;$ else&lt;BR /&gt;$ print /since ='refdat' .....&lt;BR /&gt;$ endif&lt;BR /&gt;&lt;BR /&gt;You will have to do the formatting to your liking, and maybe add some more error handling, but this would be the general idea.&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&lt;BR /&gt;&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$detail:  &lt;BR /&gt;&lt;/CHOSEN_FILE_SPEC&gt;</description>
      <pubDate>Mon, 30 Oct 2006 13:58:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889193#M79822</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2006-10-30T13:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889194#M79823</link>
      <description>Great! &lt;BR /&gt;&lt;BR /&gt;Thanks so much!!!!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Oct 2006 14:37:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889194#M79823</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-10-30T14:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889195#M79824</link>
      <description>I have attached a com file with it's output. I want it to do the same thing but given the options in my previous email!&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Oct 2006 14:52:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889195#M79824</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-10-30T14:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889196#M79825</link>
      <description>Can someopne please loog at my attached com file. There seems to be an error with the time?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Oct 2006 17:09:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889196#M79825</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-10-30T17:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889197#M79826</link>
      <description>Hmm, it seems you still have 'miles' to go!&lt;BR /&gt;Onfortunately you did not share enough information to exactly help you.&lt;BR /&gt;Specifically... where does the 'date' symbol come from (@DCL_SCREEN?) and what does it look like ($SHOW SYMB date)? Can it be changed?&lt;BR /&gt;&lt;BR /&gt;The exact syntax for a combined date string is very critical and a little trick. be sure to experiment a lot with command recall and "$write sys$output f$cvtime(....".&lt;BR /&gt;&lt;BR /&gt;You probably meant to write :&lt;BR /&gt;thedate=f$cvtime("''date' -00-","absolute","DATE")&lt;BR /&gt;Slightly more clear (IMHO) would be:&lt;BR /&gt;&lt;BR /&gt;thedate=f$cvtime(date+ " -00-","absolute","DATE") &lt;BR /&gt;&lt;BR /&gt;Now that menu option 2 and 3...&lt;BR /&gt;&lt;BR /&gt;Is that going to set a range and then return to the menu. So the range will be called for example 'range'. Then the time code should probably look like:&lt;BR /&gt;&lt;BR /&gt;thedate=f$cvtime("''date' -''range'-","absolute","DATE")&lt;BR /&gt;&lt;BR /&gt;And you really should only assign 'thedate' in the common code, before the D/S split.&lt;BR /&gt;&lt;BR /&gt;A more complete, but untested script, might look like:&lt;BR /&gt;&lt;BR /&gt;:&lt;BR /&gt;$OPTION_0:                                   $EXIT                                        $OPTION_1:&lt;BR /&gt;$thedate=f$cvtime("''date' -''range'-","absolute","DATE") ! Unassigned range = 0&lt;BR /&gt;$   PUT "''SCR_L10'''SCR_BOLD'NOTE: choose D 0R S!''SCR_OFF'"&lt;BR /&gt;:&lt;BR /&gt;$ Write sys$output " D or S !"     &lt;BR /&gt;$goto option_1                            &lt;BR /&gt;$ detail:                                      :&lt;BR /&gt;summary:&lt;BR /&gt;:&lt;BR /&gt;$goto main_begin&lt;BR /&gt;$&lt;BR /&gt;$OPTION_2:                   &lt;BR /&gt;$read /prompt = "How many days old? " range&lt;BR /&gt;$! Validate range here&lt;BR /&gt;$goto option_1&lt;BR /&gt;$&lt;BR /&gt;OPTION_3:                                    $read /prompt = "Which date" target-date&lt;BR /&gt;$! Validate target-date here&lt;BR /&gt;$date = target-date&lt;BR /&gt;$goto option_1&lt;BR /&gt;&lt;BR /&gt;Good luck learning DCL!&lt;BR /&gt;Regards,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Oct 2006 19:22:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889197#M79826</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-10-30T19:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889198#M79827</link>
      <description>Miles,&lt;BR /&gt;&lt;BR /&gt;When you say Current, 30, or 60 days, are you expecting just a single day's dispaly?  Or do you need all of the last 30 or 60 days?  If you need all days, you will have to set up a loop within the procedure where you create date symbols for "-30","-29","-28", etc. (either a symbol for each date concatenated in the search string, or multiple searches one day at a time).&lt;BR /&gt;&lt;BR /&gt;Allan&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Oct 2006 00:15:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889198#M79827</guid>
      <dc:creator>Allan Bowman</dc:creator>
      <dc:date>2006-10-31T00:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889199#M79828</link>
      <description>Miles, another example attached that handles different input formats, verification, timeout, etc, etc. It's fully documented within the command file.&lt;BR /&gt;&lt;BR /&gt;The usage would be :-&lt;BR /&gt;&lt;BR /&gt;$ ASKYESNO == "@location:ASKYESNO.COM"&lt;BR /&gt;$ ASKYESNO "Please enter the date range 'C', '30' or '60'" "" "" 2 "C#30#60" "UPCASE"&lt;BR /&gt;Please enter the date range 'C', '30' or '60' &amp;gt; 55&lt;BR /&gt;%AYN-E-INVINPUT, Your input was invalid. Please try again&lt;BR /&gt;Please enter the date range 'C', '30' or '60' &amp;gt; 60&lt;BR /&gt;&lt;BR /&gt;Robert.&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Oct 2006 04:18:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889199#M79828</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2006-10-31T04:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889200#M79829</link>
      <description>Oops!</description>
      <pubDate>Tue, 31 Oct 2006 04:45:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889200#M79829</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2006-10-31T04:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889201#M79830</link>
      <description>I have attached teh logfiles that I will be searching? &lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Oct 2006 11:29:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889201#M79830</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-10-31T11:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889202#M79831</link>
      <description>This is what I have wriiten so far. I have attached a file that shows the com file, the results. I know I need to put a few more steps in there to produce the results I am looking for. I would hope that someone may modify my script to do just that. &lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Nov 2006 13:44:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889202#M79831</guid>
      <dc:creator>vmsserbo</dc:creator>
      <dc:date>2006-11-02T13:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Ask prompts</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889203#M79832</link>
      <description>Miles,&lt;BR /&gt;&lt;BR /&gt;instead of my bersion of this, let me give just my comments.&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                                         &lt;BR /&gt;$   NODE = F$GETSYI("NODENAME")                                 &lt;BR /&gt;$   IF F$GETSYI("CLUSTER_MEMBER") THEN NODE=F$EXTRACT(0,5,NODE)  &lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;What is your intention here? Nodenames can be up to 6 chars, but if you only want to use the 1st 5, then you achieve your goal. Otherwise, f$edit(node,"trim") will do better.&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;$   SET PROC/PRIV=ALL &lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;I DETEST that, I really HATE it!. &lt;BR /&gt;I am of the opinion that privileges in VMS carry the wrong name. That name should be "RISK".&lt;BR /&gt;At the very least, the "ALL" should be removed from DCL systax, to have you/us take the trouble to enumerate all needed privs.&lt;BR /&gt;Find out what is needed, and enable ONLY those!&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;.OR. (OPTION_NUM .GT. MAX_OPT)&lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;Where does "max_opt" come from?&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;thedate=f$cvtime(date+ " -00-","absolute&lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;Syntax error. Replace with ("today+00-", ...&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;$       open/append outfile backup_save.tmp                                     &lt;BR /&gt;$       close outfile     &lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;Please explain? As such this performs nothing. Maybe you still intend to add some activity, but until that...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But, all in all, things are growing!&lt;BR /&gt;Remember, HELP is always just a keyboard away. It would have told you some of the above much quicker!&lt;BR /&gt;&lt;BR /&gt;Don't give up!&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>Thu, 02 Nov 2006 15:43:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ask-prompts/m-p/3889203#M79832</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2006-11-02T15:43:30Z</dc:date>
    </item>
  </channel>
</rss>

