vmsobj_xaball object

(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of VMS objects, prev: vmsobj_rab, next: vmsobj_xabdat)

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

The 'vms_xaballdef' module contains constants and bitmasks that apply to an OpenVMS XABALL.


Attributes:

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

W_RFI
The Related File Identifier is read / written as a 3-item tuple of 16-bit integers. Individual access to each 16-bit value is possible via the attributes "W_RFI0", "W_RFI2" and "W_RFI4".

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 XABALL. Remember that each XAB contains a "NXT" / "L_NXT" attribute to build a chain of multiple XABs.
>>> xaball = pyvms.vmsobj_xaball ()
>>> type (xaball)
<type 'vmsobj_xaball'>
>>>
>>> print xaball.NXT
None
>>> print xaball.L_NXT
0
>>>
>>> # this example uses a XABDAT
>>> xabdat = pyvms.vmsobj_xabdat ()
>>> type (xabdat)
<type 'vmsobj_xabdat'>
>>>
>>>
>>> xaball.NXT = xabdat
>>> xabdat
<vmsobj_xabdat, XABDAT at 0x001ea898>
>>> xaball.NXT
<vmsobj_xabdat, XABDAT at 0x001ea898>
>>> hex (xaball.L_NXT)
'0x1ea898'
>>>
>>>
>>> xaball.NXT = 0
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: must be a vmsobj_xabXXX object or None
>>>
>>> xaball.L_NXT = 2
Traceback (innermost last):
  File "<stdin>", line 1, in ?
AttributeError: read-only vmsobj_xaball attribute
>>>


Creation:

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

Examples:

>>> import pyvms

>>> # create a vmsobj_xaball object
>>>
>>> xaball = pyvms.vmsobj_xaball ()
>>> type (xaball)
<type 'vmsobj_xaball'>
>>> xaball
<vmsobj_xaball, XABALL at 0x0021a628>
>>>


>>> # invalid attribute access
>>> xaball.no_attr = 0
Traceback (innermost last):
  File "<stdin>", line 1, in ?
AttributeError: non-existing vmsobj_xaball attribute
>>> xaball.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_rab, next: vmsobj_xabdat)

13-FEB-1999 ZE.