This document describes purpose and usage of a Natural global buffer pool (GBP) under the operating system z/OS.
The section covers the following topics:
The Natural global buffer pool is a segment of storage assigned from the z/OS extended common system area (ECSA) above 16 MB (or from CSA storage below, if requested), used by Natural to load and execute Natural programs.
Using a global buffer pool, multiple Natural sessions under different TP monitors (multiple copies of CICS, TSO, IMS TM, etc.) and/or in multiple batch sessions share the same area - thus requiring less storage than would be required for a local buffer pool in each environment.
The following prerequisites must be met if you want to use a global buffer pool:
The module NATGBPvr
must have been linked
into an Authorized Program Facility (APF) library; see the corresponding step
in Installing Natural on
z/OS in the Installation for z/OS
documentation.
The global buffer pool must have been started; see the corresponding step in Installing Natural on z/OS in the Installation for z/OS documentation.
The global buffer pool is operated using the program
NATGBPvr
which must be executed from within an
Authorized Program Facility (APF) library.
The following topics are covered below:
Note:
In the following document, vrs or
vr represents the relevant version of the product. For
information on product versions, see Version in the Glossary.
If the z/OS parameter ALLOWUSERKEYCSA(YES)
has explicitly been specified
in SYS1.PARMLIB(DIAGxx)
, a Natural global buffer
pool is allocated in user key, so that Natural sessions accessing a global buffer pool
have write permission for that buffer pool.
If ALLOWUSERKEYCSA(NO)
is in effect, a Natural global buffer pool is
allocated in system key; therefore, Natural sessions accessing a global buffer pool do
not have any write permission for that buffer pool. These Natural sessions call the
Authorized Services Manager (ASM) to perform all buffer pool functions. As a
consequence, installation of the ASM is mandatory. The ASM is not only called to load a
Natural object into the buffer pool but also to maintain the use count of a Natural
object if the execution of this Natural object is started or terminated. The calls to
the Authorized Services Manager will increase Natural’s resource consumption. The
overhead is hard to predict and depends on the application profile (ratio of program
calls to program execution time).
The functions provided by the operating program
NATGBPvr
are activated in that they are
specified in a parameter card (PARM
=),
read from a file (see below),
or supplied by the MODIFY
operator command.
NATGBPvr
expects the first command in the
parameter field (PARM
=) of the EXEC
statement.
You may enter:
one of these functions
or a reference to an input file with
CF=dd-name
, where
dd-name
represents a DD name defined in
the JCL. Only "card image" files are supported, that is,
RECFM=F,LRECL=80
, and only the first 72 bytes of the input record are
honored. Every record included from the input file represents a command. Blank
records or records prefixed with an asterisk (*) are ignored. A file is processed
until End-Of-File (EOF). Example: PARM='CF=SYSIN1'
If the parameter field is not supplied or blank, the commands will be read from file
SYSIN
by default.
It is only possible to enter one function at a time at the console or one function per line using the command file, otherwise an error message will be returned.
Each command received, from the parameter card, from file input or from operator console input is shown on the operator console.
To start the program NATGBPvr
, either start a
started task or submit a job, which executes
NATGBPvr
.
Important:
To ensure that the global buffer pool is retained after a system failure, the
global buffer pool should be started automatically during machine IPL.
After all commands are processed, the program
NATGBPvr
terminates, unless
RESIDENT=Y
was
specified
or a buffer pool with a cache was created.
NATGBPvr
will return one of the following
condition codes:
Condition Code | Explanation |
---|---|
0
|
All functions executed successfully. |
20
|
An error has occurred; see the message log for details.
See also the
|
The global buffer pool parameter module NATGBPRM
is used to set global
processing options which apply to all functions and buffer pools. The global buffer pool
parameter module is delivered in source and object form with all defaults set.
The following parameter is available:
This parameter enables or disables the lower/mixed case support for the global buffer pool messages.
UCTRAN=NO |
Lower/mixed case support is fully enabled.
This is the default value. |
UCTRAN=YES |
All global buffer pool messages are issued in upper case. |
The following functions are available:
Note:
If no function is specified, CREATE
is assumed when the profile parameter BPNAME
is specified, otherwise NOP
is
assumed.
This function prints a list of the available syntax commands and, where applicable, the default values of the function parameters.
This function adds cache storage to an existing global buffer pool.
This function creates a global buffer pool with the specified parameters.
This function removes the cache storage of a global buffer pool without shutting down the buffer pool itself.
Note:
A data space Cache can only be deleted by the task which owns it. An "above the bar"
memory object Cache can be deleted by any task.
The global buffer pool is shut down and the storage area, including buffer pool and cache storage, is released.
If there are no active objects in the buffer pool, FSHUT
is
executed immediately.
If there are still active objects in the buffer pool, this will be indicated to the
operator. Depending on the setting of the parameter CONFIRM
, the
operator is asked for a confirmation or FSHUT
is executed
immediately.
This function shows all global parameter settings, that is, parameters which do not only apply to the statement for which they have been specified.
In addition, the storage key of the global buffer pool(s) is shown.
This function lists all global buffer pool caches currently owned by the job.
This function code can be used to set global parameters. It does not perform any buffer pool operation.
With the REFRESH
command it is possible to re-initialize an
already active buffer pool. As no storage allocation takes place, the buffer pool size
and location (above or below 16 MB) remain unchanged. However, it is possible to change
the text-block size (see NATBUFFER
parameter).
You should use this function only if the Current Use Count (see Fields for Buffer Pool Objects in SYSBPM Directory Information) is equal to zero (see warning below) or if the buffer pool has been destroyed.
Warning: If you re-initialize the buffer pool while Natural objects are being executed by active sessions in this buffer pool, the results of the active sessions are unpredictable and Natural may even abend. |
Displays all buffer pools currently existing.
The GBP operating program is terminated. This termination does not affect any active global buffer pool.
Displays all Zaps applied to the global buffer pool operating program.
The functions of the Natural GBP operating program can be controlled with the aid of parameters. These parameters can be specified in any sequence. They can be abbreviated so that they are still unique.
Note:
If you like to start multiple global buffer pools with an associated cache, you are
recommended to use a single job or (under z/OS only) a single started task and to supply
the different CREATE
commands in an input data set. See
Example 4 in the
section Natural Global Buffer Pool under z/OS.
The following parameters are available:
BPNAME
- Name of Global Buffer
PoolBPLIST
- Name of Preload ListBPCSIZE
- Buffer Pool Cache
SizeC64
- Type
of Buffer Pool Cache StorageCC
- Count Condition
CodeCONFIRM
- FSHUT
ConfirmationIDLE
- Wait Time before CheckMETHOD
- Search Algorithm for Allocating
Space in Buffer PoolNATBUFFER
- Buffer Size, Mode, Text Block
SizeRESIDENT
- Behavior after Function
ExecutionSUBSID
- Natural Subsystem IDTYPE
- Type of Buffer PoolBPNAME=value
is required (except for the
TERMINATE
function). It specifies the name of the global
buffer pool to be created.
Value | Explanation |
---|---|
8 bytes | The name of the global buffer pool.
Note: |
* | For the functions DELCACHE and FSHUT , you may supply a value of
"*".
|
BPLIST=value
specifies the name of the preload
list.
Value | Explanation |
---|---|
8 bytes | The name of the preload list.
Note: |
BPCSIZE=value
specifies the amount of storage
used to allocate a Buffer Pool Cache.
Value | Explanation |
---|---|
100 - 2097148 |
When sub parameter C64=N , this value
is the amount of allocated storage (in KB) for a data space for the buffer pool
cache. The specified value is rounded to the next 4KB boundary.
|
100 - 58720256 (max 57344MB) |
When sub parameter C64=Y , this value
is the amount of allocated storage (in KB) for an "above the bar" memory object
for the buffer pool cache. The specified value is rounded to the next 1MB
boundary.
|
Notes:
BPCSIZE
parameter is omitted (or set to zero), the
buffer pool is not supplied with a cache.
TYPE=NAT
.
C64
decides whether the cache is created
in the data space or in the "above the bar" 64 bit common memory.
C64=value
determines the type of storage for
the buffer pool cache. The following values are possible:
Value | Explanation |
---|---|
Y
|
The storage for the buffer pool cache will be an "above the bar" memory object (in 64-bit memory). |
N |
The storage for the buffer pool cache will be a data space. This is the default value. |
Note:
This parameter is applicable only if BPCSIZE
is
provided.
CC=value
determines whether a condition code is
ignored when returned by a command executed by the global buffer pool manager.
Value | Explanation |
---|---|
Y |
The condition code returned after command execution is
counted for the condition code of the
NATGBPvr job.
This is the default value. |
N |
The condition code returned after command execution is
ignored.
This may lead to a job response code of zero although the command execution failed. |
Note:
This parameter is valid for all commands.
Example of Command Execution:
The global buffer pool NATGBP1
is stopped and restarted with the following
command sequence:
FSHUT BPN=NATGBP1,S=NAT92,CONFIRM=N,CC=N CREATE BPN=NATGBP1,S=NAT92,N=(1024),M=S,BPC=4096,I=60
The FSHUT
command usually returns a condition code of 20 when it executes
and the buffer pool is not active. However, with CC=N
set, any condition
code is ignored. In this case, a job response code greater than zero is only returned if
the following CREATE
command fails.
CONFIRM=value
controls the FSHUT
behavior if there are still active objects in the buffer pool.
Value | Explanation |
---|---|
Y |
A confirmation for the FSHUT function is
required from the operator. The operator can decide to abort or to force the
FSHUT function.
This is the default value. |
N |
FSHUT is forced without interaction with the
operator.
|
Note:
This parameter is only valid for the FSHUT
command it has been specified with, that is, CONFIRM
has to be specified
with each FSHUT
parameter, and it does not apply to subsequent
FSHUT
commands.
IDLE=value
is ignored when the task does not
own a buffer pool cache.
Value | Explanation |
---|---|
Numeric | The number of seconds to elapse before the GBP operating
program checks for each buffer pool cache if its associated buffer pool is still
active; if not, that buffer pool cache is released; when the last buffer pool
cache owned by the task has been released, the task terminates, unless RESIDENT=Y has been specified.
|
60 |
This is the default value. |
Notes:
IDLE
is a "global" parameter. Once specified,
IDLE
will also apply to subsequent commands, without your
having to specify it again.
IDLE
time value against the job's timeout value: the
specified IDLE
time value internally may reduce
IDLE
to prevent timeout abends (S322).
METHOD=value
controls which algorithm is to be
used for allocating storage in the Natural buffer pool.
Value | Explanation |
---|---|
N |
Indicates that the next available unused or free space is
to be used.
The search for the next available space is done from a pointer to directory entries which moves in a wrap-around fashion. This method may be used in combination with a buffer pool cache. This is the default value. |
S |
Indicates that a selection process is to be used for
allocating storage.
The selection process consists of browsing the whole buffer pool directory and comparing different entries in order to find a most suitable entry. This method was formerly known as algorithm 1+2. |
Note:
This parameter is only valid for the CREATE
function. If you want to change the allocation method,
restart the buffer pool.
NATBUFFER=(size,mode,tsize)
specifies the size and the mode of the buffer pool, and the text block size.
Syntax | Value | Explanation |
---|---|---|
NATBUFFER=(size,mode,tsize)
|
size |
is the amount of storage (in KB) to be allocated. The pool size can also be specified in units of MB, by specifying 10M for 10 MB. For the Natural buffer pool (
For the other buffer pools:
The specified amount of storage is always rounded up to a multiple of 4 KB. Next to the storage specified by size, one page (4 KB) of write protected storage will be allocated for administrative purposes. |
mode |
determines if the global buffer pool is to be allocated above or below 16 MB. Possible values are: |
|
tsize |
determines the text block size (in KB). Possible values are: |
|
size, mode and tsize have to be specified in the sequence shown above. |
Note:
If NATBUFFER
is not specified, the default values will be
used. See also Examples of NATBUFFER Specifications.
RESIDENT=value
specifies the behavior of the
GBP operating program after the specified function has been executed. The following
values are possible:
Value | Explanation |
---|---|
Y
|
The GBP operating program will remain active after executing the specified
function and await further commands. Once specified, RESIDENT=Y
will also apply to subsequent commands, without your having to specify it again.
(To stop the GBP operating program, you use the TERMINATE function.)
|
N |
The GBP operating program will terminate after executing the specified
function, if no further command is available. If the task owns a buffer pool
cache, RESIDENT=N is ignored and the task is not
terminated.
|
A |
The GBP operating program automatically decides how to behave after having
processed all commands. It will terminate if
In other words: If no buffer pool cache is owned by the task,
This is the default setting. |
Note:RESIDENT
is a "global" parameter. Once
specified, RESIDENT
will also apply to subsequent commands until
explicitly specified/overwritten.
SUBSID=value
specifies the ID of the Natural
subsystem.
Value | Explanation |
---|---|
4 bytes | The 4-byte ID of the Natural subsystem.
Once specified,
The default value is |
NATv |
This is the default value. v is the
first digit of the current Natural version.
|
Notes:
SUBSID
is a "global" parameter, that is, once
specified, SUBSID
will also apply to subsequent commands until
explicitly specified/overwritten.
DELCACHE
, FSHUT
and SHOWBP
, you may supply
SUBSID=
"*"
to process a given buffer pool, regardless of the subsystem. Alternatively, you may
supply BPNAME="*"
to process all
buffer pools from all subsystems. In this case, the FSHUT
function will prompt for an additional confirmation,
regardless of the value of the CONFIRM
sub parameter.
TYPE=value
specifies the type of the buffer
pool. Possible values are:
Value | Explanation |
---|---|
NAT
|
Natural buffer pool (this is the default). |
SORT |
Sort buffer pool. |
EDIT |
Editor buffer pool. |
MON |
Monitor buffer pool. |
RNM |
Review Natural Monitor buffer pool. |
The following examples refer to the NATBUFFER
parameter which is used to set buffer size,
mode and text block size, the parameter name being abbreviated (N
).
Example 1: To allocate a global buffer pool above 16 MB, with a size of 1 MB and a text block size of 1 KB, you specify:
N=(1000,,1)
or
N=(1M,,1)
Example 2: To allocate a global buffer pool above 16 MB, with a size of 10 MB and a text block size of 4 KB, you specify:
N=(10000)
or
N=(10M)
Example 3: To allocate a global buffer pool above 16 MB, with a size of 256 KB and a text block size of 4 KB, you specify:
N=(,,)
This is equivalent to omitting the NATBUFFER
parameter altogether, as it causes the
default values to apply.
The following examples show sample batch jobs for creating and terminating a global buffer pool.
In the following examples, the notation vrs or vr represents the relevant product version. For information on product versions, see Version in the Glossary.
//GBPSTART JOB //* //* Starts a global buffer pool with the name NATvrGBP, a size of 1 MB and //* a text block size of 4 KB. The global buffer pool is allocated above 16 MB. //* The subsystem used is NATv. //* After the allocation, the job GBPSTART terminates. //* //STEP EXEC PGM=NATGBPvr,PARM='BPN=NATvrGBP,N=(1M)' //SETPLIB DD DISP=SHR,DSN=USER.APF.LINKLIB
//GBPRES JOB //* //* Starts a global buffer pool with the name GBP, a default size of //* 100 KB and a text block size of 1 KB. The global buffer pool is allocated //* below 16 MB. The subsystem used is SAGS. //* After the allocation, the job GBPRES will wait for further commands. //* Further commands may be entered using the MODIFY operator command: //* F GBPRES,command-string //* //STEP EXEC PGM=NATGBPvr,PARM='BPN=GBP,N=(,BL,1),S=SAGS,R=Y'
//GBPSTOP //* //* Stops the global buffer pool GPB if it contains no active objects. If it //* does contain active objects, the operator console will prompt for a reply. //* Depending on the reply, the shutdown will be forced (Y) or aborted (N). //* The subsystem used is NATv. //* //STEP EXEC PGM=NATGBPvr,PARM='FSHUT,BPN=GPB'
//GBPSTRT2 //* Read commands from SYSIN1: //* //* Start two global buffer pools (subsystem ID Nvrs) with names //* NATGBP1 - size=1024KB and a cache with size 2048KB, and //* NATGBP2 - size=2048KB without cache. //* Display all buffer pools of subsystem ID Nvrs. //* //* Note: The job does not terminate by itself, but stays resident and waits //* for operator commands because it owns the data space allocated for //* buffer pool NATGBP1. //* //* To shut down the buffer pools, send the operator command MODIFY with //* parameter CF=SYSIN2 to execute the corresponding FSHUTs. //* //STEP EXEC PGM=NATGBPvr,PARM='CF=SYSIN1' //SYSIN1 DD * CREATE,BPN=NATGBP1,S=Nvrs,N=(1M),BPC=2M CREATE,BPN=NATGBP2,S=Nvrs,N=(2M) SHOWBP S=Nvrs //SYSIN2 DD * FSHUT,BPN=NATGBP1,S=Nvrs FSHUT,BPN=NATGBP2,S=Nvrs SHOWBP S=Nvrs //*
The module NATGBPTX
is delivered in source form. It contains all error
messages in English in mixed case. The messages can be translated into other languages as
required. In this case, the "new"
NATGBPTX
source module has to be assembled and the module
NATGBPvr
has to be relinked.
To issue the global buffer pool messages including their variable parts in upper case,
the global buffer pool parameter module NATGBPRM
has to be assembled with the
UCTRAN
parameter set to YES
, and the module
NATGBPvr
has to be relinked.
To relink the module NATGBPvr
, use the following
JCL:
//SYSLIN DD * SETCODE AC(1) SETOPT PARM(REUS=RENT) INCLUDE NATLIB(NATGBPMG) INCLUDE SMALIB(NATGBPRM) INCLUDE SMALIB(NATGBPTX) INCLUDE NATLIB(NATBPMGR) NAME NATGBPvr(R) /*
Refer to Natural Global Buffer Pool Manager Messages in the Natural Messages and Codes documentation