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 session 
map-name
 ─┬────────────┬──────────────────────────────►                                   ├─ WAIT ─────┤                                   ├─ NOWAIT ◄ ─┤                                   └─ RETURN ───┘  ►─┬──────────────┬─┬────────────┬─┬─────────────────┬─ . ────────────────────►◄    ├─ BACKPAGE ◄ ─┤ ├─ UPDATE ◄ ─┤ ├─ AUTODISPLAY ◄ ─┤    └─ NOBACKPAGE ─┘ └─ BROWSE ───┘ └─ NOAUTODISPLAY ─┘
Parameters
  • map-name
    Specifies the pageable map to use.
    • WAIT
      Specifies 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.
    • NOWAIT
      Specifies 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.
    • RETURN
      Specifies 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.
  • BACKPAGE
    Lets the operator display previous pages of detail occurrences. This value is the default.
  • NOBACKPAGE
    Does 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.
  • UPDATE
    Lets 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.
  • BROWSE
    Lets 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.
  • AUTODISPLAY
    Enables automatic display of the first page of the pageable map. This value is the default.
  • NOAUTODISPLAY
    Disables 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 Session
    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.
  • Overriding Automatic Display
    The 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.