Previous Topic: SNAP (DC/UCF)Next Topic: STORE RECORD


STARTPAGE (DC/UCF)

The STARTPAGE statement initiates a paging session. It can be followed by any number of DML commands, including MAP IN and MAP OUT commands. The map paging session is terminated by an ENDPAGE command (or by another STARTPAGE command, if one is encountered before an ENDPAGE command).

Note: Only one pageable map can be handled by the statements enclosed by a given STARTPAGE/ENDPAGE pair.

Syntax
►►─── STARTPAGE session (map-name) ───────────────────────────────────────────►

 ►─┬────────────┬─┬──────────────┬─┬────────────┬─┬─────────────────┬─ ; ─────►◄
   ├─ WAIT ─────┤ ├─ BACKPAGE ◄ ─┤ ├─ UPDATE ◄ ─┤ ├─ AUTODISPLAY ◄ ─┤
   ├─ NOWAIT ◄ ─┤ └─ NOBACKPAGE ─┘ └─ BROWSE ───┘ └─ NOAUTODISPLAY ─┘
   └─ RETURN ───┘
Parameters
map-name

Specifies the 1- to 8-character name of a map specified by the DECLARE MAP statement, as described in DML Precompiler-Directive Statements. The STARTPAGE command must precede any commands (such as MAP IN) that specify operations to be performed using the map.

WAIT/NOWAIT/RETURN

Specifies the runtime flow of control when the operator presses a control key.

WAIT

Specifies that runtime mapping automatically handles paging transactions that do not cause data to be updated. Control is passed to the program when the terminal operator presses a control key that requests an update or nonpaging operation.

NOWAIT

Specifies that runtime mapping automatically handles all paging and update transactions. Control is passed to the program only when neither an update nor a paging request is made when the operator presses a control key. NOWAIT is the default.

RETURN

Specifies that runtime mapping does not handle any terminal transactions in the paging session. Control is passed to the program whenever the operator presses a control key.

Runtime mapping does not update program variable storage unless a MAP IN command is issued. In cases where the operator can update data, it is recommended that WAIT or RETURN be specified for the session so that data can be retrieved as it is updated.

BACKPAGE/NOBACKPAGE

Specifies whether the terminal operator can display a previous map page.

BACKPAGE

Specifies that the operator can display previous pages of detail occurrences. BACKPAGE is the default.

NOBACKPAGE

Specifies that the operator cannot display any page of detail occurrences with a page number lower than the current page number. Modifications made on a given page of the map must be requested by MAP IN statements in the application program before a MAP OUT RESUME command is issued. The previous page of detail occurrences is deleted from the session scratch record when a new map page is displayed.

Note: NOBACKPAGE cannot be assigned if UPDATE and NOWAIT are specified for the session.

UPDATE/BROWSE

Specifies whether the terminal operator can modify map data fields.

UPDATE

Specifies that the terminal operator can modify variable map fields, subject to restrictions specified for the map either at map definition time or by statements in the program. UPDATE is the default.

BROWSE

Specifies that the terminal operator can modify only the page field (if any) of the map. The MDTs for variable fields on the map can be set on only according to specifications made either in the map definition or by statements in the program.

AUTODISPLAY/NOAUTODISPLAY

Specifies whether to override the automatic mapout that occurs when the first page of a map is built.

AUTODISPLAY

Enables automatic display of the pageable map's first page. AUTODISPLAY is the default.

NOAUTODISPLAY

Disables automatic display of the pageable map's first page. You display the first page manually by using a MAP OUT RESUME statement.

Example

The following statement initiates a paging session in which the operator can page forward and backward within the pageable map but can make no modifications:

STARTPAGE SESSION (EMPMAPPG)
  NOWAIT BACKPAGE BROWSE;
Status Codes

Upon completion of the STARTPAGE function, the ERROR_STATUS field in the IDMS DC communications block indicates the outcome of the operation:

0000

The request has been serviced successfully.

4604

A paging session was already in progress when this STARTPAGE command was received. An implied ENDPAGE was processed before this STARTPAGE was successfully executed.