vmsobj_xabpro object

(PYVMS LOGO) Python on OpenVMS

(go to: table of contents, index, list of VMS objects, prev: vmsobj_xabkey, next: vmsobj_xabrdt)

The vmsobj_xabpro object provides high-level access to an OpenVMS XABPRO (PROtection XAB (eXtended Attribute Block)) data structure. You DO need access to the 'OpenVMS Record Management Services Reference Manual'! The PYVMS documentation will neither list all possible attributes (although you can find them by looking into the file VMSOBJ_XABPRO.C) nor will it explain the use of each field in a XABPRO.

The 'vms_xabprodef' module contains constants and bitmasks that apply to an OpenVMS XABPRO.


Attributes:

Most BWLQ,M attributes can be directly read and written as shown in the introduction. Exceptions are noted below:

ACLBUF
Read/write access to the ACL BUFfer. Input can be a Python string or a vmsobj___membuf object. As strings are immutable, their data is internally copied to a vmsobj___membuf object.

A read operation results in a new Python string.

Note that ACLs contain binary information.

L_ACLBUF
Read-only access to the memory address of the ACL BUFfer.

W_ACLLEN
Read-only access to the ACL length. After an assignment operation to the "ACLBUF" attribute this value is the same as "W_ACLSIZ", however "W_ACLLEN" is overwritten by a RMS Open or Display function.

W_ACLSIZ
Read-only access to the buffer size. This is valid for an assignment operation to the "ACLBUF" attribute.

L_ACLCTX
Read/write access to the ACL context field that is used for ACE (Access Control list Entry) processing. This field is set to 0 for an assignment operation to the "ACLBUF" attribute!

MTACC
Read/write access to "XAB$B_MTACC" using single character I/O.

NXT
Read/write access for a(nother) vmsobj_xabXXX object. The readonly attribute "L_NXT" returns the memory address of the OpenVMS XAB that was connected to the XABPRO. Remember that each XAB contains a "NXT" / "L_NXT" attribute to build a chain of multiple XABs.
>>> xabpro = pyvms.vmsobj_xabpro ()
>>> type (xabpro)
<type 'vmsobj_xabpro'>
>>>
>>> print xabpro.NXT
None
>>> print xabpro.L_NXT
0
>>>
>>> # this example uses a XABALL
>>> xaball = pyvms.vmsobj_xaball ()
>>> type (xaball)
<type 'vmsobj_xaball'>
>>>


>>> xabpro.NXT = xaball
>>> xaball
<vmsobj_xaball, XABALL at 0x00221568>
>>> xabpro.NXT
<vmsobj_xaball, XABALL at 0x00221568>
>>> hex (xabpro.L_NXT)
'0x221568'
>>>


>>> xabpro.NXT = None
>>> print xabpro.NXT
None
>>> xabpro.L_NXT
0
>>>


>>> xabpro.NXT = 0
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: must be a XABxxx object or None
>>>
>>> xabpro.L_NXT = 2
Traceback (innermost last):
  File "<stdin>", line 1, in ?
AttributeError: read-only vmsobj_xabpro attribute
>>>


Creation:

For now the 'pyvms' module contains a function to explicitly create a vmsobj_xabpro object within Python.

Examples:

>>> import pyvms

>>> # create a vmsobj_xabpro object
>>>
>>> xabpro = pyvms.vmsobj_xabpro ()
>>> type (xabpro)
<type 'vmsobj_xabpro'>
>>> xabpro
<vmsobj_xabpro, XABPRO at 0x00221668>
>>>


>>> # invalid attribute access
>>> xabpro.no_attr = 0
Traceback (innermost last):
  File "<stdin>", line 1, in ?
AttributeError: non-existing vmsobj_xabpro attribute
>>> xabpro.no_attr
Traceback (innermost last):
  File "<stdin>", line 1, in ?
AttributeError: no_attr
>>>
... @@
(go to: table of contents, index, list of VMS objects, prev: vmsobj_xabkey, next: vmsobj_xabrdt)

08-MAR-1999 ZE.