Updated: 11 December 1998 |
OpenVMS Programming Interfaces: Calling a System
Routine
Previous | Contents | Index |
Table B-10 lists the OpenVMS data types and their corresponding PL/I data type declarations.
OpenVMS Data Types | PL/I Declarations |
---|---|
access_bit_names |
1 ACCESS_BIT_NAMES(32),
2 LENGTH FIXED BINARY(15), 2 DTYPE FIXED BINARY(7) INITIAL((32)DSC$K_DTYPE_T), 2 CLASS FIXED BINARY(7) INITIAL((32)DSC$K_CLASS_S), 2 CHAR_PTR POINTER; 1 |
The length of the LENGTH field in each element of the array should correspond to the length of a string of characters pointed to by the CHAR_PTR field. The constants DSC$K_CLASS_S and DSC$K_DTYPE_T can be used by including the module $DSCDEF from PLI$STARLET. | |
access_mode |
FIXED BINARY(7)
(The constants for this type---PSL$C_KERNEL, PSL$C_EXEC, PSL$C_SUPER, PSL$C_USER---are declared in module $PSLDEF in PLI$STARLET.) |
address | POINTER |
address_range | (2) POINTER 1 |
arg_list |
1 ARG_LIST BASED,
2 ARGCOUNT FIXED BINARY(31), 2 ARGUMENT (X REFER (ARGCOUNT)) POINTER; 1 |
If the arguments are passed by value, you may need to change the type of the ARGUMENT field of the structure. Alternatively, you can use the POSINT, INT, or UNSPEC built-in functions and pseudovariables to access the data. X should be an expression with a value in the range 0 to 255 when the structure is allocated. | |
ast_procedure | PROCEDURE or ENTRY 2 |
boolean | BIT ALIGNED 1 |
byte_signed | FIXED BINARY(7) |
byte_unsigned | FIXED BINARY(7) 3 |
channel | FIXED BINARY(15) |
char_string | CHARACTER( n) 4 |
complex_number | (2) FLOAT BINARY( n) (See floating_point for values of n.) |
cond_value | See STS$VALUE in module $STSDEF in PLI$STARLET. 1 |
context | FIXED BINARY(31) |
date_time | BIT(64) ALIGNED 5,6 |
device_name | CHARACTER( n) 4 |
ef_cluster_name | CHARACTER( n) 4 |
ef_number | FIXED BINARY(31) |
exit_handler_block |
1 EXIT_HANDLER_BLOCK BASED,
2 FORWARD_LINK POINTER, 2 HANDLER POINTER, 2 ARGCOUNT FIXED BINARY(31), 2 ARGUMENT ( n REFER (ARGCOUNT)) POINTER; 1 (Replace n with an expression that yields a value between 0 and 255 when the structure is allocated.) |
fab | See module $FABDEF in PLI$STARLET. |
file_protection | BIT(16) ALIGNED 1 |
floating_point |
FLOAT BINARY(
n)
The values for n are as follows: 1 <= n <= 24 --- F_floating 25 <= n <= 53 --- D_floating 25 <= n <= 53 --- G_floating (with /G_FLOAT) 54 <= n <= 113 --- H_floating |
function_code | BIT(32) ALIGNED |
identifier | POINTER |
++invo_context_blk | %INCLUDE LIBICB |
++invo_handle | FIXED BINARY(31) |
io_status_block |
Because the format for I/O status blocks differs with the system
service, you can vary the definitions accordingly. Some of the common
formats are as follows:
1 IOSB_SYS$GETSYI,
1 IOSB_TTDRIVER_A,
1 IOSB_TTDRIVER_B,
|
item_list_2 |
1 ITEM_LIST_2,
2 ITEM(SIZE), 3 COMPONENT_LENGTH FIXED BINARY(15), 3 ITEM_CODE FIXED BINARY(15), 3 COMPONENT_ADDRESS POINTER, 2 TERMINATOR FIXED BINARY(31) INITIAL(0); 1 (Replace SIZE with the number of items you want.) |
item_list_3 |
1 ITEM_LIST_3,
2 ITEM(SIZE), 3 BUFFER_LENGTH FIXED BINARY(15), 3 ITEM_CODE FIXED BINARY(15), 3 BUFFER_ADDRESS POINTER, 3 RETURN_LENGTH POINTER, 2 TERMINATOR FIXED BINARY(31) INITIAL(0); 1 (Replace SIZE with the number of items you want.) |
item_list_pair |
1 ITEM_LIST_PAIR,
2 ITEM(SIZE), 3 ITEM_CODE FIXED BINARY(31), 3 ITEM UNION, 4 INTEGER FIXED BINARY(31), 4 REAL FLOAT BINARY(24), 2 TERMINATOR FIXED BINARY(31) INITIAL(0); 1 (Replace SIZE with the number of items you want.) |
item_quota_list |
1 ITEM_QUOTA_LIST,
2 QUOTA(SIZE), 3 NAME FIXED BINARY(7), 3 VALUE FIXED BINARY(31), 2 TERMINATOR FIXED BINARY(7) INITIAL(PQL$_LISTEND); 1 (Replace SIZE with the number of quota entries you want to use. The constant PQL$_LISTEND can be used by including the module $PQLDEF from PLI$STARLET or by declaring it GLOBALREF FIXED BINARY(31) VALUE.) |
lock_id | FIXED BINARY(31) |
lock_status_block |
1 LOCK_STATUS_BLOCK,
2 STATUS_CODE FIXED BINARY(15), 2 RESERVED FIXED BINARY(15), 2 LOCK_ID FIXED BINARY(31); 1 |
lock_value_block | The declaration of an item of this structure depends on the use of the structure because the OpenVMS operating system does not interpret the value. 1 |
logical_name | CHARACTER( n) 4 |
longword_signed | FIXED BINARY(31) |
longword_unsigned | FIXED BINARY(31) 3 |
mask_byte | BIT(8) ALIGNED |
mask_longword | BIT(32) ALIGNED |
mask_quadword | BIT(64) ALIGNED |
mask_word | BIT(16) ALIGNED |
mechanism_args |
INCLUDE $CHFDEF
Declare mechanism_args like CHF$MECH_ARRAY |
null_arg | Omit the corresponding parameter in the call. For example, FOO(A,,B) would omit the second parameter. |
octaword_signed | BIT(128) ALIGNED 5,6 |
octaword_unsigned | BIT(128) ALIGNED 5,6 |
page_protection | FIXED BINARY(31) (The constants for this type are declared in module $PRTDEF in PLI$STARLET.) |
procedure | PROCEDURE or ENTRY 2 |
process_id | FIXED BINARY(31) |
process_name | CHARACTER( n) 4 |
quadword_signed | BIT(64) ALIGNED 5,6 |
quadword_unsigned | BIT(64) ALIGNED 5,6 |
rights_holder |
1 RIGHTS_HOLDER,
2 RIGHTS_ID FIXED BINARY(31), 2 ACCESS_RIGHTS BIT(32) ALIGNED; 1 |
rights_id | FIXED BINARY(31) |
rab | See module $RABDEF in PLI$STARLET. 1 |
section_id | BIT(64) ALIGNED |
section_name | CHARACTER( n) 4 |
system_access_id | BIT(64) ALIGNED |
time_name | CHARACTER( n) 4 |
transaction_id | BIT(128) ALIGNED 5,6 |
uic | FIXED BINARY(31) |
user_arg | ANY |
varying_arg | ANY with OPTIONS(VARIABLE) on the routine declaration or with OPTIONAL on the parameter declaration. |
vector_byte_signed | ( n) FIXED BINARY(7) 7 |
vector_byte_unsigned | ( n) FIXED BINARY(7) 3,7 |
vector_longword_signed | ( n) FIXED BINARY(31) 7 |
vector_longword_unsigned | ( n) FIXED BINARY(31) 3,7 |
vector_quadword_signed | ( n) BIT(64) ALIGNED 5,6,7 |
vector_quadword_unsigned | ( n) BIT(64) ALIGNED 3,5,6,7 |
vector_word_signed | ( n) FIXED BINARY(15) 7 |
vector_word_unsigned | ( n) FIXED BINARY(15) 3,7 |
word_signed | FIXED BINARY(15) |
word_unsigned | FIXED BINARY(15) 5 |
All system services and many system constants and data structures are declared in PLI$STARLET.TLB. While the current version of PL/I does not support unsigned fixed binary numbers or fixed binary numbers with a precision greater than 31, future versions may support these features. If PL/I is extended to support these types, declarations in PLISTARLET may change to use the new data types where appropriate. |
Table B-11 lists the OpenVMS data types and their corresponding VAX MACRO data type declarations.
OpenVMS Data Type | VAX MACRO Declarations |
---|---|
access_bit_names |
.ASCID /name_for_bit0/
.ASCID /name_for_bit1/ ... .ASCID /name_for_bit31/ |
access_mode | .BYTE PSL$C_ xxxx |
address | .ADDRESSS virtual_address |
address_range | .ADDRESS start_address,end_address |
arg_list | .LONG n_args, arg1, arg2, ... |
ast_procedure | .ADDRESS ast_procedure |
boolean | .LONG 1 or .LONG 0 |
byte_signed | .SIGNED_BYTE byte_value |
byte_unsigned | .BYTE byte_value |
channel | .WORD channel_number |
char_string | .ASCID /string/ |
complex_number | na |
cond_value | .LONG cond_value |
context | .LONG 0 |
date_time | .QUAD date_time |
device_name | .ASCID /ddcu:/ |
ef_cluster_name | .ASCID /ef_cluster_name/ |
ef_number | .LONG ef_number |
exit_handler_block |
.LONG 0
.ADDRESS exit_handler_routine .LONG 1 .ADDRESS status STATUS: .BLKL 1 |
fab | MYFAB: $FAB |
file_protection | .WORD prot_value |
floating_point | .FLOAT, .G_FLOAT, or .H_FLOAT |
function_code | .LONG code_mask |
identifier | .ADDRESSS virtual_address |
++invo_context_blk | $LIBICBDEF |
++invo_handle | .LONG |
io_status_block | .QUAD 0 |
item_list_2 |
.WORD component_length
.WORD item_code .ADDRESS component_address |
item_list_3 |
.WORD buffer_length
.WORD item_code .ADDRESS buffer_address .ADDRESS return_length_address |
item_list_pair |
.LONG item_code
.LONG data |
item_quota_list |
.BYTE PQL$_
xxxx
.LONG value_for_quota .BYTE pql$_listend |
lock_id | .LONG lock_id |
lock_status_block | .QUAD 0 |
lock_value_block | .BLKB 16 |
logical_name | .ASCID /logical_name/ |
longword_signed | .LONG value |
longword_unsigned | .LONG value |
mask_byte | .BYTE mask_byte |
mask_longword | .LONG mask_longword |
mask_quadword | .QUAD mask_quadword |
mask_word | .WORD mask_word |
mechanism_args | MECH_ARGS: $CHFDEF |
null_arg | .LONG 0 |
octaword_signed | na |
octaword_unsigned | .OCTA value |
page_protection | .LONG page_protection |
procedure | .ADDRESS procedure |
process_id | .LONG process_id |
process_name | .ASCID /process_name/ |
quadword_signed | na |
quadword_unsigned | .QUAD value |
rights_holder | .LONG identifier, access_rights_bitmask |
rights_id | .LONG rights_id |
rab | MYRAB: $RAB |
section_id | .LONG sec$k_mat xxx, version_number |
section_name | .ASCID /section_name/ |
system_access_id | .QUAD system_access_id |
time_name | .ASCID /dd-mmm-yyyy:hh:mm:ss.cc/ |
transaction_id | .OCTA value |
uic | .LONG uic |
user_arg | .LONG data |
varying_arg | Depends on the application. |
vector_byte_signed | .SIGNED_BYTE val1,val2, ... val n |
vector_byte_unsigned | .BYTE val1,val2, ... val n |
vector_longword_signed | .LONG val1,val2, ... val n |
vector_longword_unsigned | .LONG val1,val2, ... val n |
vector_quadword_signed | na |
vector_quadword_unsigned | .QUAD val1, val2, ... val n |
vector_word_signed | .SIGNED_WORD val1,val2, ... val n |
vector_word_unsigned | .WORD val1,val2, ... val n |
word_signed | .SIGNED_WORD value |
word_unsigned | .WORD value |
Previous | Next | Contents | Index |
Copyright © Compaq Computer Corporation 1998. All rights reserved. Legal |
5843PRO_012.HTML
|