vmsobj_xabrdt object

(PYVMS LOGO) Python on OpenVMS

(go to: table of contents, index, list of VMS objects, prev: vmsobj_xabpro, next: vmsobj_xabsum)

The vmsobj_xabrdt object provides high-level access to an OpenVMS XABRDT (Revision Date+Time 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_XABRDT.C) nor will it explain the use of each field in a XABRDT.

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


Attributes:

Most BWLQ,M attributes can be directly read and written as shown in the introduction. Attributes with a 'Q' (quadword - 128-bit datatype) are returned as a signed 'Python long integer'. See GENMAN 'Programming', 'special OpenVMS datatypes' for details.

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


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


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


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


Creation:

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

Examples:

>>> import pyvms

>>> # create a vmsobj_xabrdt object
>>>
>>> xabrdt = pyvms.vmsobj_xabrdt ()
>>> type (xabrdt)
<type 'vmsobj_xabrdt'>
>>> xabrdt
<vmsobj_xabrdt, XABRDT at 0x00221668>
>>>


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

08-MAR-1999 ZE.