it would appear that text attachments are allowed, but it might be to
everyone's benefit to note that even so, said text gets mangled (by mime?
see all those "=3D"s?). Cut-n-paste applied to pure-text email works great,
gets your script through clean. FWIW, here's my edition of Jeff's (thanks
Jeff!) script (which still breaks for me, but I'm working on it):
(YODA/VMS/KTP)/lq chkudc
PARM [log in to unmask], entry=main
option list
setvar hpmsgfence 0
# Version A.01 by Jeff Vance CSY, recd at GGB on 20020311 KTP
# This script determines the logon UDCs for each user in "useracct". Logon
# UDCs can occur at the user, account and system levels. This script also
# reports which UDC files are cataloged by "useracct".
#
# The "useracct" parameter can be wildcarded for both user and acct names.
#
if '!entry' = 'main' then
setvar _cu_ua ups("!useracct")
setvar _cu_levels "USER ACCT SYSTEM"
# qualify user.acct
if pos('.',_cu_ua) = 0 then
setvar _cu_ua _cu_ua + "." + hpaccount
endif
# see if user.acct exists
setvar hpcierr 0
continue
listuser !_cu_ua;format=brief >chkudclu
if hpcierr <> 0 then
print chkudclu
escape
endif
# write header
echo UserName FileName Level LogonCmd
echo ----------------- -------------------------- ------
----------------
# process the output of the above :listuser command
xeq !hpfile !_cu_ua entry=read_listuser <chkudclu
#deletevar _cu_@
return
elseif '!entry' = 'read_listuser' then
# input redirected from the output of :listuser;format=brief
#
setvar _cu_eof_lu finfo(hpstdin,'eof')
# read each record in input file
while setvar(_cu_eof_lu,_cu_eof_lu-1) >= 0 do
# read the user.acct name
setvar _cu_ua rtrim(input())
# show the UDCs cataloged for this user.acct
setvar hpcierr 0
continue
showcatalog user=!_cu_ua >chkudcsc
if hpcierr <> 0 then
print chkudcsc
escape
endif
# process the showcatalog output for this user.acct
xeq !hpfile !_cu_ua entry=read_showcat <chkudcsc
echo
endwhile
return
elseif '!entry' = 'read_showcat' then
# Input has been redirected from the output of :showcatalog user=usr.acct
#
# :showcatalog output always ends in a blank(empty) record.
#
setvar _cu_indx 0
while setvar(_cu_indx,_cu_indx+1) <= 3 do
setvar _cu_lev word(_cu_levels,,_cu_indx)
setvar _cu_logon_seen false
setvar _cu_first true
# skip the header record
input _cu_f
# now process all UDC files at this level
while setvar(_cu_f,ltrim(rtrim(input()))) <> "" do
if lft(_cu_f,3) <> "NO " then
# at least 1 UDC file is cataloged at this level
# delete trailing nul in filename, thanks to :showcatalog
setvar _cu_f setvar(_cu_ftmp,lft(_cu_f,len(_cu_f)-1))
setvar _cu_logon_name ""
if not _cu_logon_seen then
# prepare to read this UDC file looking for 1st option logon
udc
# verify that user has read access to udc file
setvar hpcierr 0
setvar _cu_haveR false
continue
listfile !_cu_f,4 >chkudclf
if hpcierr = 0 then
# verify read access
print chkudclf;start=-1 >chkudcR
# read in the last record: "FOR USER.ACCT: bla, blah,
blaah"
input _cu_rec <chkudcR
setvar _cu_haveR (pos('READ',word(_cu_rec,":",-1)) > = 0)
endif
if _cu_haveR then
# get the lockword, if any
setvar _cu_lkwd ""
setvar hpcierr 0
setvar hpmsgfence 2
continue
setvar _cu_lkwd finfo(_cu_f,'lockword')
setvar hpmsgfence 0
if hpcierr = 0 and _cu_lkwd <> "" then
# add lockword to qualified MPE filename
setvar _cu_ftmp word(_cu_f,'.')+"/" &
+ _cu_lkwd + ="." + &
xword(_cu_f,'.')
elseif hpcierr <> 0 then
# can't get lockword, but there might not be a
lockword!
setvar hpcierr 0
continue
print !_cu_f;end=1 >$null
endif
# look for first logon UDC in this file
if hpcierr = 0 then
xeq !hpfile _cu_logon_seen entry=read_UDC_file
!_cu_ftmp
else
setvar _cu_logon_name "(no access)"
endif
endif
endif
# write username, filename, level and logon UDC name (if any)
echo !_cu_ua ![rpt(" ",17-len(_cu_ua))] !_cu_f &
![rpt(" ",26-len(_cu_f))] !_cu_lev &
![rpt(" ",6-len(_cu_lev))] !_cu_logon_name
if _cu_first then
# only display user.acct name once per user
setvar _cu_first false
setvar _cu_ua ""
endif
endif
endwhile
endwhile
return
elseif '!entry' = 'read_UDC_file' then
# Input redirected to a UDC file. Parm-1 is the name of the variable to
# indicating if an OPTION LOGON UDC command is present in this UDC file.
setvar _cu_eof_f finfo(hpstdin,'eof')
while setvar(_cu_eof_f,_cu_eof_f-1) >= 0 do
# read the UDC command and parm line(s)
setvar _cu_rec ups(ltrim(rtrim(input())))
# concatenate input records
while rht(_cu_rec,1) = '&' do
setvar _cu_eof_f _cu_eof_f - 1
setvar _cu_rec _cu_rec + ups(ltrim(rtrim(input())))
endwhile
# save the UDC command name and read next record
# (there are no UDC options on the command line)
setvar _cu_cmd, word(_cu_rec)
# read the rest of this UDC looking for OPTION LOGON
while setvar(_cu_eof_f,_cu_eof_f-1) >= 0 &
and lft(_cu_rec,1) <> ='*' do
setvar _cu_rec ups(ltrim(rtrim(input())))
# concatenate input records
while rht(_cu_rec,1) = '&' do
setvar _cu_eof_f _cu_eof_f - 1
setvar _cu_rec _cu_rec + ups(ltrim(rtrim(input())))
endwhile
if word(_cu_rec) = "OPTION" and &
pos('LOGON',_cu_rec) > 0 and &
pos('NOLOGON',_cu_rec) = 0
setvar !useracct true
setvar _cu_logon_name _cu_cmd
return
endif
endwhile
endwhile
return
endif
> -----Original Message-----
> From: Donna Garverick [mailto:[log in to unmask]]
> Sent: Monday, March 11, 2002 9:22 AM
> To: [log in to unmask]
> Subject: Re: SHOWCATALOG
>
>
> "VANCE,JEFF (HP-Cupertino,ex1)" wrote:
>
> > attached is a text (.txt) file
>
> not critizing what jeff did at all....but i thought raven was
> supposed to
> strip all attachements. has something changed? - d
>
> --
> Donna Garverick Sr. System Programmer
> 925-210-6631 [log in to unmask]
>
> >>>MY opinions, not Longs Drug Stores'<<<
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|