(go to: table of contents, index, list of vms_sys, prev: ASCTIM, next: ASCUTC)
ASCTOID - Translate Identifier Name to Identifier
Format:
27-SEP-1998 ZE.
id, attrib = vms_sys.asctoid (name)
Returns:
Arguments:
Examples:
>>> import vms_sys
>>> id_value, id_attribute = vms_sys.asctoid ('SYSTEM')
>>> print 'ID-value=', id_value, 'ID-attribute=', id_attribute
ID-value= 65540 ID-attribute= 0
>>> uic_group = id_value / 65536
>>> uic_member = id_value - (uic_group * 65536)
>>> uic_spec = 'UIC= [' + oct(uic_group)[1:] + ',' + \
... oct(uic_member)[1:] + ']'
>>> print uic_spec
UIC= [1,4]
>>> id_name = 'BATCH'
>>> vms_sys.asctoid (id_name)
(-2147483647, 0)
>>> hex (-2147483647)
'0x80000001'
>>> import os
>>> os.system('WRITE SYS$OUTPUT F$IDENTIFIER("BATCH","NAME_TO_NUMBER")')
-2147483647 <-- output from '$ WRITE'
65537 <-- status from os.system() = RMS$_NORMAL
>>> vms_sys.asctoid ()
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: function requires exactly 1 argument; 0 given
>>> vms_sys.asctoid (None)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: expected read-only buffer, None found
>>> vms_sys.asctoid ('NON_EXIST')
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_sys.error: (8684, '%SYSTEM-F-NOSUCHID, unknown rights identifier')
>>> vms_sys.asctoid ('-')
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_sys.error: (8740, '%SYSTEM-F-IVIDENT, invalid identifier format')
>>>
(go to: table of contents,
index,
list of vms_sys,
prev: ASCTIM,
next: ASCUTC)