Article 147898 of comp.os.vms:

In article <9EF755C26B2@wulf.datastream.com>, "Richard Dickens" <rdickens@datastream.com> writes...
>Help,
> 
>I'm trying to read the RMS attributes ACE of a file using the routine below.
 :
>/* Routine to check if file stats are enabled for a specified file. */

To check for stats enabled, I suggest you use the RMS provide statistics
item code through an XABITM. Granted, this is not the easiest XAB to use!
This is complicated by insufficient data structure support in VAX C.

I have an example in my RMS_STATS program on the VMS FREEWARE CD from which
I'll include the relevant lines from that:

#include rms
#ifndef XABITM
struct XABITM { char xab$b_cod, xab$b_bln, fill1[2],
	 *xab$l_nxt, *xab$l_itemlist, xab$b_mode, fill2[19] ;} ;
#define XAB$_STAT_ENABLE 64
#define XAB$C_ITM 36
#define XAB$C_ITMLEN 32
#endif
 :
typedef struct { short len, cod; void *address; int *retlen; } item;

    struct FAB fab;
    struct XABITM itm;
    int	    statistics;
    item    statistics_items[] = { sizeof (int), XAB$_STAT_ENABLE, 
				&statistics, 0, 0, 0, 0, 0 };

    fab = cc$rms_fab;
    fab.fab$l_xab = (char *) &itm;
    :
    itm.xab$b_bln = XAB$C_ITMLEN;   /* no template available ?! */
    itm.xab$b_cod = XAB$C_ITM;
    itm.xab$l_itemlist = (char *) &statistics_items;
    itm.xab$b_mode = 1  /* XAB$K_SENSEMODE */;
    itm.xab$l_nxt = 0;

	statistics = 0;
	status=sys$open(fab);

	if (statistics) ....

Hope this helps,		+--------------------------------------+
Hein van den Heuvel, Digital.	| All opinions expressed are mine, and |
  "Makers of VMS and other	| may not reflect those of my employer |
   fine Operating Systems."	+--------------------------------------+


