Subject: | |
From: | |
Reply To: | VANCE,JEFF (HP-Cupertino,ex1) |
Date: | Thu, 28 Jun 2001 19:07:31 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> ! 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 *
|
|
|