Previous Topic: MAP INNext Topic: STARTPAGE


MAP OUT

The MAP OUT statement is used to create or modify detail occurrences for a pageable map or to request that a map page be transmitted to the terminal screen. After completion of a MAP OUT function, the ERROR-STATUS field of the CA IDMS/DC communications block indicates the outcome of a pageable-map operation using the following error messages:

Message

Description

4664

There is no current detail occurrence to be updated (MAP OUT DETAIL CURRENT only). No action is taken.

4668

The amount of storage defined for pageable maps at system generation is insufficient. No action is taken. This and subsequent MAP OUT DETAIL commands are ignored.

4672

No detail occurrence, footer, or header fields exist to be mapped out by a MAPOUT RESUME command.

4676

The first screen page has been transmitted to the terminal.

Syntax

►►─── MAP OUT (map-name) ─┬──────────┬────────────────────────────────────────►
                          ├─ WAIT ◄ ─┤
                          └─ NOWAIT ─┘

 ►──┬───────────────────────┬─────────────────────────────────────────────────►
    ├─ io-specification ────┤
    └─ no-io-specification ─┘

 ►─┬──────────────────────────────────────────────┬─ ; ───────────────────────►◄
   └─┬─ DETAIL ──┬───────────┬─┬──────────────┬─┬─┘
     │           ├─ NEW ◄ ───┤ └─ KEY (key) ──┘ │
     │           └─ CURRENT ─┘                  │
     └─ RESUME ─┬────────────────────────────┬──┘
                └─ PAGE ─┬─ CURRENT ◄ ─────┬─┘
                         ├─ NEXT ──────────┤
                         ├─ PRIOR ─────────┤
                         ├─ LAST ──────────┤
                         ├─ FIRST ─────────┤
                         └─ (page-number) ─┘
►►─┬──────────────────────────────────────────────────────────────────────────►─
   └ IO ◄ ─┬────────────────────────────────────────────────────────────┬─────
           └ OUTPUT ─┬────────────────────────────────────────────────┬─┘
                     └ DATA ─┬─ YES ───────┬─┬─────────┬─┬──────────┬─┘
                             ├─ NO ────────┤ └ NEWPAGE ┘ └ LITERALS ┘
                             ├─ ERASE ─────┤
                             └─ ATTRibute ─┘

─►───────────────────────────────────────────────────────────────────┬────────►◄
  ─┬───────────────────────────────────────────────────────────────┬─┘
   └─ MESSAGE (message-text) ─┬─ TO (end-message-data-location) ─┬─┘
                              └─ LENGTH (message-data-length) ───┘
►►─┬──────────────────────────────────────────────────────────────────────────►─
   └─ NOIO DATASTREAM INTO (mapped-data-location) ────────────────────────────

─►────────────────────────────────────────────────────────────────────────────►─
  ─┬─ TO (end-mapped-data-location) ─┬────────────────────────────────────────
   └─ MAX LENGTH (max-data-length) ──┘

─►───────────────────────────────────────────────┬────────────────────────────►◄
  ─┬───────────────────────────────────────────┬─┘
   └─ RETURN LENGTH INTO (data-actual-length) ─┘
DETAIL

Specifies that the MAP OUT command is to create or modify a detail occurrence for a pageable map, and optionally associates a numeric key value with the occurrence:

NEW/CURRENT

Specifies whether the detail is to be created or modified:

KEY IS key-v (optional)

Specifies a value associated with the created or modified detail occurrence. The value is not displayed on the terminal screen. Key-v is the name of a variable data field that contains the key of a database record associated with the detail occurrence.

The specified value is stored as a 4-byte value. When the KEY IS parameter is used with a MAP OUT DETAIL CURRENT command, the specified value replaces the value (if any) previously associated with the detail occurrence.

RESUME PAGE IS

Specifies that a page of detail occurrences is mapped out to the terminal from the session scratch record. Detail occurrences in the scratch record are divided into pages at runtime based on the number of detail occurrences that can fit on the screen at one time.

The page of occurrences displayed is determined by the PAGE IS clause: