vmsobj_xabsum object

(PYVMS LOGO) Python on OpenVMS

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

The vmsobj_xabsum object provides high-level access to an OpenVMS XABSUM (SUMmary 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_XABSUM.C) nor will it explain the use of each field in a XABSUM.

A 'vmsobj_xabsum' object does not have any bitmasks or constants which means there is no 'vms_xabsumdef' module.


Attributes:

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

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 XABSUM. Remember that each XAB contains a "NXT" / "L_NXT" attribute to build a chain of multiple XABs.
>>> xabsum = pyvms.vmsobj_xabsum ()
>>> type (xabsum)
<type 'vmsobj_xabsum'>
>>>
>>> print xabsum.NXT
None
>>> print xabsum.L_NXT
0
>>>
>>> # this example uses a XABALL
>>> xaball = pyvms.vmsobj_xaball ()
>>> type (xaball)
<type 'vmsobj_xaball'>
>>>


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


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


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


Creation:

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

Examples:

>>> import pyvms

>>> # create a vmsobj_xabsum object
>>>
>>> xabsum = pyvms.vmsobj_xabsum ()
>>> type (xabsum)
<type 'vmsobj_xabsum'>
>>> xabsum
<vmsobj_xabsum, XABSUM at 0x00221668>
>>>


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

08-MAR-1999 ZE.