STARTPAGE (COBOL)
The STARTPAGE statement initiates a paging session. You can follow this statement with any number of DML commands, including MAP IN and MAP OUT. The map paging session is terminated by an ENDPAGE command (or by another STARTPAGE that occurs before an ENDPAGE).
idmscu
The STARTPAGE statement initiates a paging session. You can follow this statement with any number of DML commands, including MAP IN and MAP OUT. The map paging session is terminated by an ENDPAGE command (or by another STARTPAGE that occurs before an ENDPAGE).
The statements within a STARTPAGE/ENDPAGE pair can process only
one
pageable map.Syntax
►►─── STARTPAGE sessionmap-name─┬────────────┬──────────────────────────────► ├─ WAIT ─────┤ ├─ NOWAIT ◄ ─┤ └─ RETURN ───┘ ►─┬──────────────┬─┬────────────┬─┬─────────────────┬─ . ────────────────────►◄ ├─ BACKPAGE ◄ ─┤ ├─ UPDATE ◄ ─┤ ├─ AUTODISPLAY ◄ ─┤ └─ NOBACKPAGE ─┘ └─ BROWSE ───┘ └─ NOAUTODISPLAY ─┘
Parameters
- map-nameSpecifies the pageable map to use.
- WAITSpecifies that runtime mapping automatically handles paging transactions that do not update data. If the user presses a control key that requests an update or nonpaging operation, control passes to the program.
- NOWAITSpecifies that runtime mapping automatically handles all paging and update transactions. This value is the default.Control passes to the program only when neither an update nor paging request is made when the operator presses a control key.
- RETURNSpecifies that runtime mapping does not handle any terminal transactions in the paging session. Control passes to the program whenever the operator presses a control key.Runtime mapping updates program variable storage only when a MAP IN command is issued. In cases where the operator can update data, we recommend specifying WAIT or RETURN for the session so that data can be retrieved as it is updated.
- BACKPAGELets the operator display previous pages of detail occurrences. This value is the default.
- NOBACKPAGEDoes not let the operator display any page of detail occurrences with a page number lower than the current page number. Modifications that are 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.NOBACKPAGE cannot be assigned when UPDATE and NOWAIT are specified for the session.
- UPDATELets the user modify variable map fields, subject to the restrictions that were specified for the map at map definition time or by statements in the program. This value is the default.
- BROWSELets the user modify only the page and response fields (if any) of the map. The MDTs for variable fields on the map can be set on only according to specifications that were made in the map definition or by statements in the program.
- AUTODISPLAYEnables automatic display of the first page of the pageable map. This value is the default.
- NOAUTODISPLAYDisables automatic display of the first page of the pageable map. Manually display the page by using a MAP OUT RESUME statement.
Examples
The following examples illustrate the use of the STARTPAGE statement.
- Initiating a Paging SessionThe 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.
- Overriding Automatic DisplayThe following statement overrides automatic display for the first page of pageable map EMPMAPPG:STARTPAGE SESSION EMPMAPPG NOAUTODISPLAY.
Status Codes
After completion of the STARTPAGE function, the ERROR-STATUS field in the IDMS-DC communications block indicates the outcome:
Status code
| Meaning
|
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 executed successfully. |