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
--