hcreategVALUE = hcreateg(global_name,base_common,size)
Action: Function to create and map a global section .
The function first opens a file with UFO
option
(using HST\_OPEN\_GBL
),
then creates and maps the global section using SYS$CRMPSC
.
Open the file using SYS$SETDFPROT
to set protection loose.
COMMON
to be mapped.
COMMON
in words.
The function value returned is equal to the global section length
(pages) if the procedure was successful or an errorcode <0
if
an error occurred.
HCREATEG$DIR
is a LOGICAL
which, if defined, gives the directory
for the mapping file of the global section.
In this case, the file is not deleted upon closing.
hmapgVALUE = hmapg(global_name,base_common,offset)
Action: Function to dynamically map to an existing global section.
The function maps to the global section using SYS$MGBLSC
,
allocating pages in the p0
region with the sec$m_expreg
option.
COMMON
to be mapped.
BASE\_COMMON
of the mapped
section in words,BASE\_COMMON(OFFSET)
is the first word.
The function value returned is equal to the global section length
(pages) if the procedure was successful or is an errorcode <0
if
an error occurred.
hfreeVALUE = hfree(global_size,base_common,offset)
Action: Function to dynamically delete/unmap global section space
using the service SYS$DELTVA
.
COMMON
.
BASE\_COMMON
of the mapped
section in words,BASE\_COMMON(OFFSET)
is the first word.
The function value returned is equal to the global section length
(pages) if the procedure was successful or is an errorcode <0
if
an error occurred.