HP3000-L Archives

June 2001, Week 4

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:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Thu, 28 Jun 2001 19:07:31 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (35 lines)
> !   IF NOT ![FINFO("../!ZIPGROUP","EXISTS")]

This can simplified as:
  !   if not finfo("../!zipgroup","exists") then
or
  !   if not finfo("../"+zipgroup,"exists") then ...


The above test tells you if a file named "../!ZIPGROUP" exists or
not.  Presumably this is an MPE group, but it is a relative pathname
and thus is dependent on the CWD.  I prefer to use absolute pathnames
for testing for the existence of an MPE group, e.g.:
    if finfo("/!HPACCOUNT/!ZIPGROUP","exists") then ...

Still, this only tests if a file of that name exists.  This "file"
could be a group, a directory, or an ordinary file.  Of course knowing
that a file of that doesn't exist allows you to create a group.  I would
still have a CONTINUE and test if NEWGROUP worked, since there is a window
where the group could be created by someone else.

A more complete test for existence of an MPE group is:
   continue
   listfile /ACCT/GROUP,6;seleq=[object=GROUP] >$null
   if hpcierr = -929 then
      ## no object of that name exists...
   elseif hpcierr = -190 then
      ## object exists, but is not a group...
   ...

FWIW,
 Jeff Vance, CSY

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2