(go to: table of contents, index, list of VMS objects, prev: vmsobj_xaball, next: vmsobj_xabfhc)
A 'vmsobj_xabdat' object does not have any bitmasks or constants which means
there is no 'vms_xabdatdef' 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_xabdat object within Python.
Examples:
Attributes:
>>> xabdat = pyvms.vmsobj_xabdat ()
>>> type (xabdat)
<type 'vmsobj_xabdat'>
>>>
>>> print xabdat.NXT
None
>>> print xabdat.L_NXT
0
>>>
>>> # this example uses a XABALL
>>> xaball = pyvms.vmsobj_xaball ()
>>> type (xaball)
<type 'vmsobj_xaball'>
>>>
>>>
>>> xabdat.NXT = xaball
>>> xaball
<vmsobj_xaball, XABALL at 0x0021a368>
>>> xabdat.NXT
<vmsobj_xaball, XABALL at 0x0021a368>
>>> hex (xabdat.L_NXT)
'0x21a368'
>>>
>>>
>>> xabdat.NXT = 0
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: must be a XABxxx object or None
>>>
>>> xabdat.L_NXT = 2
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: read-only vmsobj_xabdat attribute
>>>
Creation:
>>> import pyvms
>>> # create a vmsobj_xabdat object
>>>
>>> xabdat = pyvms.vmsobj_xabdat ()
>>> type (xabdat)
<type 'vmsobj_xabdat'>
>>> xabdat
<vmsobj_xabdat, XABDAT at 0x001eaa78>
>>>
>>> # invalid attribute access
>>> xabdat.no_attr = 0
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: non-existing vmsobj_xabdat attribute
>>> xabdat.no_attr
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: no_attr
>>>
Use:
>>> import pyvms
>>>
>>> fab = pyvms.vmsobj_fab()
>>> fab.FNA = 'dcc_vms.com'
>>>
>>> xabdat = pyvms.vmsobj_xabdat()
>>> fab.XAB = xabdat
>>> import vms_sys
>>>
>>> status = vms_sys.open (fab)
>>> print status
65537
>>> vms_sys.getmsg (status)
('%RMS-S-NORMAL, normal successful completion', (0, 0, 0, 0))
>>>
>>> vms_sys.asctim (xabdat.Q_CDT)
'14-MAR-1999 20:01:59.92'
>>> vms_sys.asctim (xabdat.Q_RDT)
'14-MAR-1999 20:02:00.29'
>>>
...
@@