Contents | Index |
This chapter describe installation of Python 2.3 on OpenVMS.
Software Version: 2.3
Python 2.3 has a new interface to SYS$ and LIB$ routines, the older one is still present but will not be maintained.
There is also a new API to access RMS indexed files.
The Rdb interface has been enhanced.
1.1 Requirement
1.1.1 OpenVMS
Python 2.3 require VMS 7.3 or newer, and TCPIP 5.3 or newer.
For VMS 7.3, you will have to install patch VMS73_ACRTL-V0200 or higher.
DECC 6.5 is also required.
Some tests have been done using VMS 7.2 and TCPIP 7.1.
It is strongly suggested to install Python 2.3 on an ODS-5 volume,
however some successfull tests on an ODS-2 volume have been done if the
logical PYTHONCASEOK is defined.
1.1.2 OPENSSL
Python 2.3 use OPENSSL, so you have to download and install OPENSSL
from http://www.openssl.org/
1.1.3 Various tools
As the packages are in zip format you need UNZIP.
You will need GUNZIP and VMSTAR to install OPENSSL.
1.2 Download files
File can be download from
$ set file/attrib=(rfm:fix,rat:none,lrl:32256) |
$ @python_install-2_3 disk$tools:[lib] disk$tools:[python-2_3] |
You can, for example add this procedure to your SYSTARTUP_VMS.COM. For example if Python is installed into disk$tools:[Python-2_3]
$ @disk$tools:[Python-2_3.vms]logicals "/system" |
If you have installed Python 2.3 on an ODS-2 volume activate the definition of PYTHONCASEOK into the procedure logicals.com.
Logicals names defined by this procedure:
$ @python_vms:setup |
All functions generate an exception when an error is encountered.
Python do not allow character '$' into indentifier
name, so all '$' character has been replaced by an
underscore '_' character.
2.1 Items List
When a function required an items list as a parameter, it is named
itmlst except when more than one item list is used
(for example creprc) and in very few routine (for example filescan).
The module vms.itemList contains the class itemList
which is used to build an item list (sequence of objects itemList).
itm = itemList ([code] [,value] [,dtype] [,length] [,flags])
code
item code, type is integervalue
item value, type is integer or stringdtype
type of item, values are:
- il_arrayUnsignedLong
- il_arrayUnsignedShort
- il_count1String
- il_noType
- il_signedByte
- il_signedLong
- il_signedLongByValue
- il_signedLongLong
- il_signedWord
- il_string
- il_unsignedByte
- il_unsignedLong
- il_unsignedLongLong
- il_unsignedWord
length
item length, you only need to specified this argument for type array or string.
Default length of string is 1024flags
rfu
2.2 LIB$ routines
The following routines are available from the module
vms.rtl.lib:
All functions has a documentation string, for example:
$ python Python 2.3a0 (#0, Wed Nov 20 15:33:23 2002) [DECC] on OpenVMS Alpha (G_float) Type "help", "copyright", "credits" or "license" for more information. >>> import vms.rtl.lib >>> vms.rtl.lib.delete_logical.__doc__ 'status = delete_logical(logical_name [,table_name])' >>> |
All parameters name can be used as keyword.
$ python Python 2.3a0 (#0, Wed Nov 20 15:33:23 2002) [DECC] on OpenVMS Alpha (G_float) Type "help", "copyright", "credits" or "license" for more information. >>> from vms.psldef import PSL_C_EXEC >>> from vms.rtl.lib import get_logical >>> get_logical.__doc__ 'status, resultant_string max_index = get_logical(logical_name [,table_name] [,index] [,accmod] [,flags])' >>> get_logical('SYS$STARTUP', index=1, accmod=PSL_C_EXEC) (1, 'SYS$MANAGER', 1) >>> |
status = delete_logical (logical_name [,table_name])
logical_name
type: stringtable_name
type: string
status = delete_symbol (symbol_name [,table_type_indicator])
symbol_name
type: stringtable_type_indicator
type: integer
status = do_command (command)
command
type: string
status, symbol _value = find_image_symbol (filename, symbol [,image_name] [,flags])
filename
type: stringsymbol
type: stringimage_name
type: stringflags
type: integer
status = free_ef (event_flag_number)
event_flag_number
type: integer
status, resultant _string = get_command ([prompt_string])
prompt_string
type: string
status, resultant _string = get_common ( )
None
status, event _flag_number = get_ef ( )
None
status, resultant _string max_index = get_logical (logical_name [,table_name] [,index] [,accmod] [,flags])
logical_name
type: stringtable_name
type: stringindex
type: integeraccmod
type: integer, use module vms.psldefflags
type: integer
status, integer _value, resultant_string = getdvi (item_code [, channel], [device_name])
item_code
type: integer, use module vms.dvidefchannel
type: integerdevice_name
type: string
status, process _id, integer_value, resultant_value, resultant_string = getjpi (item_code [, process_id] [,process_name])
item_code
type: integer, use module vms.jpidefprocess_id
type: integerprocess_name
type: string
status, resultant _value, resultant_string = getqui (function_code [,item_code] [,search_number] [,search_name] [,search_flags])
function_code
type: integer, use module vms.quidefitem_code
type: integer, use module vms.quidefsearch_number
type: integersearch_name
type: integersearch_flags
type: integer
status, resultant _value, resultant_string cluster_system_id = getsyi (item_code [,cluster_system_id] [,node_name])
item_code
type: integer, use module vms.syidefcluster_system_id
type: integernode_name
type: string
status, resultant _length = put_common (source_string)
source_string
type: string
status = put_output (message_string)
message_string
type: string
status = reserve_ef (event_flag_number)
event_flag_number
type: integer
status = run_program (program_name)
program_name
type: integer
status [item_list_result] = set_logical (logical_name [,value_string] [,table] [,item_list])
logical_name
type: stringvalue_string
type: stringtable
type: stringitmlst
type: sequence of itemList, use module vms.lnmdef
status [item_list_result] = set_symbol (symbol, value_string [,table_type])
symbol
type: stringvalue_string
type: stringtable_type
type: integer
status, process _id, completion_status = spawn ([command] [,input_file] [,output_file] [,flags] [,process_name] [,event_flag] [,prompt] [,cli] [,table])
command
type: stringinput_file
type: stringoutput_file
type: stringflags
type: integerprocess_name
type: stringevent_flag
type: integerprompt
type: stringcli
type: stringtable
type: string
2.3 SYS$ routines
The following routines are available from the module
vms.starlet:
status = acquire_galaxy_lock (handle [,timeout] [,flags])
handle
type: unsigned long integertimeout
type: unsigned integerflags
type: unsigned integer
status = add_holder (rights_id, rights_holder [,attrib])
rights_id
type: unsigned integerrights_holders
type: unsigned long integerattrib
type: unsigned integer
status, resid = add_ident (name [,id] [,attrib])
name
type: srtingid
type: unsigned integerattrib
type: unsigned integer
status = add_proxy (rem_node, rem_user, local_user [,flags])
rem_node
type: stringrem_user
type: stringlocal_user
type: stringflags
type: unsinged integer
status, wsetlm = adjwsl ([pagecnt])
pagecnt
type: integer
status, phybuf = alloc (devnam [,accmode] [,flags])
devnam
type: stringaccmode
type: unsigned integer, use module vms.psldefflags
type: unsigned integer
status = ascefc (efn, name [,prot] [,perm])
efn
type: unsigned integername
type: stringprot
type: unsigned integerprot
type: unsigned integerperm
type: unsigned integer
status, timbuf = asctim (tim [,cvtflg])
tim
type: long integercvtflg
type: unsigned integer
status, id, attrib = asctoid (name)
name
type: string
status, timbuf = ascutc ([tim] [,cvtflg])
tim
type: long integercvtflg
type: unsigned integer
status, channel = assign (devnam [,acmode] [,mbxnam] [,flags])
devnam
type: stringacmode
type: unsigned integer, use module vms.psldefmbxnam
type: stringflags
type: unsigned integer
status, audsts [,resdic] = audit_eventw ([efn] [,flags] [,itmlst])
efn
type: unsigned integerflags
type: unsigned integer, use module vms.nsadefitmlst
type: sequence of itemList, use module vms.nsadef
Next | Contents | Index |