Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

OPEN modes

INPUT

read blocks from an existing file.

OUTIN

create a new file and, if required, read blocks from this file.

INOUT

read blocks from an existing file and, if required, add and/or exchange blocks.

PAM operations and OPEN modes

PAM macro functions

OPEN mode
INPUT

OPEN mode
OUTIN

OPEN mode INOUT

RD, RDWT, RDEQU, LRD, LRDWT

X

X

X

WRT, WRTWT, WRTWU

-

X

X

WT, CHK, SYNC

X

X

X

LOCK, UNLOCK, SETL

X

X

X

SETLPP

-

X

X

Multiuser operation

A UPAM file can be created and processed with the UPAM, FASTPAM (see "FASTPAM - Fast Primary Access Method") or DIV (see "DIV - Data In Virtual") access methods. FASTPAM and DIV can, however, only process UPAM files with the attribute BLKCTRL=NO.

Authorization for parallel file processing is dependent on the FCB operand open values specified for SHARUPD, MODE, LOCKENV and LOCVIEW (the FCB OPEN operand corresponds to the MODE operand of macros DIV and FPAMSRV).

The allowed parallel opens are shown in the following table:

Compatibility matrix with UPAM-OPEN




USER B

USER B

USER B

USER B

USER B

USER B

USER B

USER B

USER B


SHARUPD=


*YES

*YES

*YES

*NO

*NO

*NO

*WEAK

*WEAK

*WEAK



OPEN
mode

I
N
P
U
T

I
N
O
U
T

O
U
T
I
N

I
N
P
U
T

I
N
O
U
T

O
U
T
I
N

I
N
P
U
T

I
N
O
U
T

O
U
T
I
N



U
S
E
R

A

*YES

INPUT
INOUT
OUTIN

X
O
O

O
O
O


X



X
X
X



*NO

INPUT
INOUT
OUTIN

X



X



X
X
X



*WEAK

INPUT
INOUT
OUTIN

X

X


X

X


X
X
X

X


Table 6: UPAM: Permissible SHARUPD/OPEN combinations

X: OPEN permitted

O: OPEN permitted only

    • if the same block-oriented access method is used by all (either UPAM/FASTPAM or DIV)

    • and the same value is used by all for the LOCKENV operand
      (either LOCKENV=*HOST or LOCKENV=*XCS)

    • and all are running on the same host or, with LOCKENV=*XCS, in an XCS network

Read operations with SHARUPD=*WEAK may have opened a file simultaneously with any write operation.

Exception:
Read operations with DIV-SHARUPD=*WEAK which specified LOCVIEW=*NONE with OPEN possess the same compatibility as read operations with UPAM/FASTPAM-SHARUPD=*WEAK.

  • Openers with DIV-SHARUPD=*YES are not compatible with openers with UPAM/FASTPAM-SHARUPD=*YES.

  • Read operations are always compatible with each other (regardless of access method, SHARUPD specification, LOCKENV specification and host).

  • Illegal combinations lead to an OPEN error.

  • An attempt to open a tape file with SHARUPD=YES or WEAK also leads to an OPEN error.

  • If the block size of a tape file without PAM key is not a multiple of 2048, any attempt to open it with FCBTYPE=PAM is also rejected by UPAM with an OPEN error.

  • SHARUPD=*YES:
    The file size is checked whenever the allocator is called. If this check indicates a file size >= 32 GB and the attribute LARGE_FILE=*FORBIDDEN is set in the associated FCB then processing is canceled.
    In this case, UPAM issues the return code X'000009AD' (FILE SIZE GREATER 32 GIGABYTES IS NOT ALLOWED).

UPAM formats

UPAM works block-oriented, the basic processing unit is the 2-Kbyte standard block for K-PAM files and the logical block for NK-PAM files, its size being determined by the BLKSIZE operand in the FCB or FILE macro. UPAM is able to read or output up to 16 2 KB standard blocks at the same time (LEN=(STD,n) or LEN=n*2048 (n <= 16)).

The following point applies to K-PAM files:

If the value specified for the LEN operand in the PAM macro is not an integer multiple of 2048, it is rounded up to the next higher integer multiple of 2048. In the case of a write operation, the remainder of the last PAM page to be written in the file is undefined. If this write operation took place at the end of the file and this file is then closed, the position of the last valid byte on this PAM page is stored in the catalog entry's last-byte pointer (see "Prerequisite for using the last-byte pointer"). For a read operation, the remainder of the last PAM page to be read is not passed to the buffer.

The following point applies to NK-PAM files:

If the value specified for the LEN operand in the PAM macro is not an integer multiple of the size of a logical block, it is rounded up to the next higher integer multiple of the logical block size. In the case of a write operation, the remainder of the logical block in the file is undefined. If this write operation took place at the end of the file and this file is then closed, the position of the last valid byte of the last logical block is stored in the catalog entry's last-byte pointer (see "Prerequisite for using the last-byte pointer"). For a read operation, the remainder of the last logical block to be read is not passed to the buffer and the remainder of the buffer contents is undefined.

Prerequisite for using the last-byte pointer

Prerequisite for the usage of the last-byte pointers for PAM files on public space is the setting of the LBP_REQUIRED indicator in the file control block (FCB) for OPEN. LBP_REQUIRED makes the LBP in the FCP accessible during OPEN and saves the updated value in the catalog entry during CLOSE.

With PAM node files, a last-byte pointer is always supplied, irrespective of the LBP_REQUIRED flag. However, it is to be noted that the LBP in the CE may be outdated, as the file might have been changed by another system. Therefore, the current valid last-byte pointer is identified and made accessible to the application in the file control block (FCB) during OPEN.

Example

The operands WRT and LEN=5000 are specified in a PAM call for a file with BLKCTRL=NO and BLKSIZE=(STD,2). 5000 bytes are transferred from the buffer, and the remainder (up to the next higher integer multiple of the logical block size (8192 bytes)) is undefined.