Previous Topic: #MRBNext Topic: @SSCTRL


#MAPBIND

For each map request block used by a program, a #MAPBIND request specifies the MRB location and initializes the fields of the MRB. #MAPBIND statements can be global or record-specific:

A program typically issues a global #MAPBIND statement for each map, followed by #MAPBIND statements for each map record used by the program. The program can alter the storage address for a map record at any time by issuing another #MAPBIND statement for that record.

After the initial global bind, all records are considered unbound; map operations that use those records will not have any effect on storage. After binding a record to a storage address, subsequent map operations will use that address to access the record. To unbind a record, issue a record-specific #MAPBIND statement and specify a null (0) bind location using the RECADDR parameter.

All global and record-specific #MAPBIND statements for a map can be copied automatically into the program with the @COPY IDMS statement, discussed earlier in this chapter.

Syntax

►►─── #MRB MAPNAME=map-name ──────────────────────────────────────────────────►

 ►─── ,FIELDS=field-count ────────────────────────────────────────────────────►

 ►─── ,RECORDS=record-count ──────────────────────────────────────────────────►◄

Parameters

MRB=

Initializes the MRB associated with the named map.

map-name

Specifies the 1- to 8-character name of an existing map.

RECNAME=record-name

Is the 1- to 32-character name of a record used by the map.

RECADDR=

Requests that the named record be unbound or specifies the storage address to which the record will be bound.

0

(Default); specifies that the named record is to be unbound.

record-address

Specifies a register that contains either the address of the area or the symbolic name of a user-defined field containing the address of the area. Subsequent I/O operations will use the specified area of storage for any operations dealing with the record.