Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

UPAM - User Primary Access Method

UPAM is the primary, block-oriented access method in BS2000 for random access to disk files. Read or write access to any block of a file is possible at any time.

Tape files may likewise be processed using UPAM (see below).

By way of the BLKCTRL operand in the macros FILE and FCB, the user can select whether a K file or an NK file is to be processed: BLKCTRL=PAMKEY defines a K-PAM file, BLKCTRL=DATA or BLKCTRL=NO specifies an NK-PAM file.

The format of the file created on an NK2 disk depends on how the block size is specified. If the block size is specified as BLKSIZE=(STD,n), and n is even, an NK4-PAM file is created; if n is odd, an NK2-PAM file is created.
An NK4 disk can only be used for an NK4-PAM file (see also the section dealing with access methods in the “Introductory Guide to DMS” [1]).

Multiple 2048-byte standard blocks can be combined to form a single data block (logical block) by specifying BLKSIZE=(STD,n) (with n > 1) in the FCB or FILE macro. In the case of a K-PAM file, each standard block within the logical data block can be addressed in the program.

For an NK-PAM file, it is only possible to address a complete data block from within a program; separate processing of the individual 2048-byte blocks which make up the data block is not possible.

Figure 4: Principles of UPAM operation

Macros for UPAM access methods

Service macros

Macro

Operation

Function

OPEN


open file.

CLOSE


close file.

FCB


define file control block.

EXLST


define error exits.

PAM

CHK

check status of I/O processing.

LOCK

lock a PAM page.

LRD

lock a PAM page and read its contents into main memory.

LRDWT

lock a PAM page, read its contents into main memory and wait for completion of I/O.

RD

read PAM page into main memory.

RDEQU

same as RDWT (see below), but the copy is also updated in the case of files with DRV (Dual Recording by Volume; see (the “DRV” manual [15]).

RDWT

read PAM page into main memory and wait for completion of I/O.

SETL

set file pointer.

SETLPP

change last-page pointer (EOF pointer); this enables files to be reduced in length, i.e. after the CLOSE call has been issued, PAM pages which are no longer required can be released. This operation is not permitted for files which have been opened with SHARUPD=WEAK/YES or OPEN=INPUT. SETLPP is ignored in conjunction with tape files.

SYNC

wait for completion of I/O operation and write the contents of the tape cartridge buffer to tape.

UNLOCK

unlock PAM page.

WRT

write data from main memory to a PAM page.

WRTWT

write data from main memory to a PAM page and wait for completion of I/O.

WRTWU

write from main memory to a PAM page, wait for completion of I/O operation and unlock the PAM page that has been written.

WT

wait for completion of I/O operation.

Macros used for eventing

The ENAEI, DISEI and SOLSIG macros must be used in all types of eventing. For further information on the macros listed below, refer to the “Executive Macros” manual [2].

CHKEI

checks the status of an event item.

CONTXT

enables read or write access to the register set and program counter (the “context”) of an interrupted contingency process or of the basic task.

DISEI

detaches a job from an event item.

DISCO

prevents a contingency definition from controlling contingency processes.

ENACO

allows a contingency definition to control contingency processes.

ENAEI

assigns an event item to a job.

LEVCO

changes the priority level of a contingency process or of the basic task.

RETCO

terminates a contingency process.

SOLSIG

sends a request to an event item.