The #STRTPAG statement initiates a map paging session, and specifies the map paging options in effect for that session. The paging session can contain any number of DML statements, including #MREQ IN and #MREQ OUT; the #STRTPAG statement must precede any of these mapping commands. The map paging session is terminated by an #ENDPAG statement, or by the next #STRTPAG statement if no #ENDPAG statement is coded.
Note: Only one pageable map can be handled by the statements enclosed by a given #STRTPAG/#ENDPAG pair.
Syntax
►►─── #STRTPAG MRB=map-request-block-pointer ─────────────────────────────────► ►─┬──────────────────────────────────────┬───────────────────────────────────► └─ ,PLIST ─┬─ SYSPLIST ◄ ─────────────┬┘ └─ parameter-list-pointer ─┘ ►─┬────────────────────────────────────────────────┬─────────────────────────► └─ ,MRBPGDS= ─┬─ MRBPGDS ◄ ────────────────────┬─┘ └─ paging-request-block-pointer ─┘ ►─┬────────────────────────┬─────────────────────────────────────────────────► └─ ,TYPE= ─┬─ NOWAIT ◄ ─┬┘ ├─ WAIT ─────┤ └─ RETURN ───┘ ►─┬────────────────────────┬─────────────────────────────────────────────────► └─ ,BACKPAG= ─┬─ YES ◄ ─┬┘ └─ NO ────┘ ►─┬────────────────────────┬─────────────────────────────────────────────────► └─ ,FLAG= ─┬─ UPDATE ◄ ─┬┘ └─ BROWSE ───┘ ►─┬─────────────────────┬────────────────────────────────────────────────────►◄ └─ ,AUTO= ─┬─ YES ◄ ─┬┘ └─ NO ────┘
Parameters
Specifies the location of the map request block for the mapping operation, as copied into program variable storage by a previously issued #MRB statement.
Either a register that points to the MRB area or the symbolic name of that area.
The location of the storage area in which the system builds the #STRTPAG parameter list.
(Default); is the symbolic name of the storage area in which the system builds the #STRTPAG parameter list.
Either a register that points to the area or the symbolic name of the area.
Specifies the location of the 16-byte map paging request block.
(Default); is the symbolic name of the area in program variable storage that contains the map paging request block. The map paging request block is copied by a previously issued #MRB statement.
Either a register pointing to the area that contains the map paging request block or the symbolic name of the area.
Specifies the runtime flow of control when the operator presses a control key.
(Default); 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.
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.
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 an #MREQ IN command is issued. In cases where the operator can update data (FLAG=UPDATE), it is recommended that WAIT and RETURN be specified for the session so that data can be retrieved as it is updated.
Specifies whether the terminal operator can display a previous map page.
(Default); specifies that the operator can display previous pages of the map.
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 #MREQ IN statements in the application program before an #MREQ OUT,RESUME=YES command is issued. The previous page of detail occurrences is deleted from the session scratch record when a new map page is displayed.
Note: BACKPAG=NO cannot be assigned if FLAG=UPDATE (discussed below) and TYPE=NOWAIT are specified for the session.
Specifies whether the terminal operator can modify map data fields.
(Default); specifies that the terminal operator can modify variable map fields, subject to restrictions specified for the map either at map definition time or by the statements in the program.
Specifies that the terminal operator can modify only the page and response fields of the map. At runtime, runtime mapping automatically protects all variable fields. The MDTs for variable fields on the map can be set only according to specifications made either in the map definition or by statements in the program.
You can override the automatic mapout of a pageable map's first page. Overriding automatic display of a map's first page allows you to modify the map page and defined messages before the page is displayed. To determine when the first page of the map is built, you test the new map return code. By default, the first page of a pageable map is displayed as soon as the first detail occurrence of the second map page is written to scratch. You determine whether the first page of a pageable map is automatically displayed by using the AUTO parameter.
(Default); enables automatic display of the pageable map's first page.
Disables automatic display of the pageable map's first page. You manually display the page by using a #MREQ statement.
Example
The following example of the #STRTPAG statement initiates a pageable map session with the following map paging options in effect:
#STRTPAG MRB=MRBPROG1,TYPE=WAIT
The following example illustrates usage of the AUTO parameter:
#STRTPAG MRB=EMPMAPPG,AUTO=NO
Status Codes
After completion of a #STRTPAG request, the value in register 15 indicates the outcome of the operation. The following is a list of Register 15 values and the corresponding meaning:
The request has been serviced successfully.
A paging session was already in progress when this #STRTPAG command was received. An implied #ENDPAG statement was processed before this #STRTPAG command was successfully executed.
|
Copyright © 2014 CA.
All rights reserved.
|
|