HP3000-L Archives

June 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Vance <[log in to unmask]>
Reply To:
Jeff Vance <[log in to unmask]>
Date:
Sat, 7 Jun 1997 13:23:09 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
I lost this posting but here is an example that works.

I named my command file "tz":

parm entry=main
# script that parses out the timezone from SHOWCLOCK output
if '!entry' = 'main' then
   errclear
   continue
   showclock  >./shclktmp
   if hpcierr = 0 then
      xeq !hpfile entry=doit <./shclktmp
      deletevar _tz_@
   endif
   return

else
   # 'doit' entry:
   # $stdin comes from showclock command redirected from ./shclktmp file
   # discard 1st three records.  The actual TZ display consists of 2
   # records: the number of hours, followed by the description
   input _tz_rec
   input _tz_rec
   input _tz_rec
   input _tz_rec
   setvar _tz_rec ltrim(rht(setvar(_tz_rec,_tz_rec+input()), &
                            -(pos(":",_tz_rec)+1)))
   # now _tz_rec contains the TZ portion :showclock output
   echo !_tz_rec
   return
endif



Jeff Vance, CSY

--

ATOM RSS1 RSS2