(go to: table of contents, index, list of VMS objects, prev: vmsobj_fab, next: vmsobj_lksb)
A programmer can create multiple, independend vmsobj_iosb objects and use
them in parallel.
For now the 'pyvms' module contains a function to
explicitly create a vmsobj_iosb object within Python. Note that interface
routines (e.g. vms_sys.getjpiw) can
implicitly create a vmsobj_iosb object!
The routine that allocates a new OpenVMS IOSB does automatically zero its
contents.
Examples:
Attributes:
Creation:
>>> import pyvms
>>> # create a zero-filled iosb
>>>
>>> iosb = pyvms.vmsobj_iosb ()
>>> type (iosb)
<type 'vmsobj_iosb'>
>>> iosb
<vmsobj_iosb, IOSB at 0x00218530>
>>>
>>> iosb.b0
0
>>> iosb.w1
0
>>> iosb.l1
0
>>> iosb.q
0L
>>> iosb.b
(0, 0, 0, 0, 0, 0, 0, 0)
>>> iosb.l
(0, 0)
>>>
>>> iosb.b0 = 1
>>> iosb.w1 = 0x34
>>> iosb.l1 = 0xabcdef
>>>
>>> hex (iosb.b0)
'0x1'
>>> hex (iosb.b1)
'0x0'
>>> hex (iosb.b2)
'0x34'
>>> hex (iosb.b3)
'0x0'
>>> hex (iosb.b4)
'0xef'
>>> hex (iosb.b5)
'0xcd'
>>> hex (iosb.b6)
'0xab'
>>> hex (iosb.b7)
'0x0'
>>> hex (iosb.w0)
'0x1'
>>> hex (iosb.w1)
'0x34'
>>> hex (iosb.w2)
'0xcdef'
>>> hex (iosb.w3)
'0xab'
>>> hex (iosb.l0)
'0x340001'
>>> hex (iosb.l1)
'0xabcdef'
>>> hex (iosb.q )
'0xABCDEF00340001L'
>>>
>>> iosb.b
(1, 0, 52, 0, 239, 205, 171, 0)
>>> iosb.w
(1, 52, 52719, 171)
>>> iosb.l
(3407873, 11259375)
>>> iosb.q
48358647401807873L
>>>
>>> iosb.b0 = 'X'
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: vms__cvt_py2bin(): data of item must be integer
>>>
>>> iosb.no_attr = 0
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: non-existing vmsobj_iosb attribute
>>>
>>> iosb.no_attr
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: no_attr
>>>
...
@@