(go to: table of contents, index, list of VMS objects, prev: vmsobj_xabpro, next: vmsobj_xabsum)
A 'vmsobj_xabrdt' object does not have any bitmasks or constants which means
there is no 'vms_xabrdtdef' module.
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:
For now the 'pyvms' module contains a function to
explicitly create a vmsobj_xabrdt object within Python.
Examples:
Attributes:
>>> 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:
>>> 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
>>>
...
@@