SCRNLIST

Enable your program to use multiple screens and generate
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
  • Procedural code to receive each specified screen
  • Screen records in the Working-Storage or Linkage Sections

AMB generates SCRNLIST when you specify multiple I/O screens for a program in the Project Explorer.

Targets:

  • CICS
  • DLG
  • IMS DC

CICS

Syntax:
[TP-]SCRNLIST screenname1 [... screenname12]
... [MAPSET(mapsetname)]
... [LINKAGE]
... [REDEFINE|NOREDEF]

General Rule:
  1. You can generate multiple-map mapsets from the Actions menu in the Project Explorer on the AppMaster Builder desktop.
  2. See All Formats for additional rules.
Parameters:

screenname

The name of a screen.

MAPSETmapsetname)

Mapset containing the screen(s) received by the program; must be a literal (maximum 7 characters).

LINKAGE

Generate every screen record in the Linkage Section instead of in Working-Storage.

REDEFINE

Default. Screen records redefine each other.

NOREDEF

Screen records do not redefine each other. Ignored when coded with LINKAGE.

Examples:
Generate screen records SCRA and SCRB, that redefine each other, in Working-Storage. Both screens are in mapset SCRASET.
SCRNLIST SCRA SCRB MAPSET(SCRASET)
Generate a screen record in the Linkage Section for screen SCRA.
SCRNLIST SCRA MAPSET(SCRASET) LINKAGE
Generate screen records that do not redefine each other.
SCRNLIST SCRA SCRB NOREDEF

DLG

Syntax: for Format 1
[TP-]SCRNLIST screenname1[(LK)] [... 
screenname40[(LK)]]
Syntax: for Format 2
[TP-]SCRNLIST screenname1[ ... screenname40]
... [LINKAGE]
General Rules:
  1. See All Formats for rules.
Parameters:

screenname

The name of a screen.

LINKAGE

Generate every screen record in the Linkage Section instead of in Working-Storage.

Examples:
Generate screen records SCRA and SCRB in Working-Storage
SCRNLIST SCRA SCRB
Generate screen record SCRA in Working-Storage, and screen record SCRB in the Linkage Section
SCRNLIST SCRA SCRB(LK)

IMS DC

Syntax: for Format 1
[TP-]SCRNLIST screenname1 [...screenname40]
Syntax: for Format 2
[TP-]SCRNLIST screenname1 [... screenname40]
General Rules:
  1. Label each screen in the Screen Painter. A labeled screen contains eight extra bytes (appended to the MID) that contain the screen name. NTRY logic determines which screen named in SCRNLIST was received, moves the data to the appropriate screen record description in Working-Storage, and performs any specified field editing.
  2. Screens separated with a slash (/) instead of a space redefine each other in Working-Storage, limiting the size of Working-Storage.
  3. A maximum of 30 screens can be listed in the Project Explorer (and thus appear in the automatically-generated TP-SCRNLIST).
  4. You can write rules to customize SCRNLIST processing for some or all screens in the screen list, using a AMB-supplied predefined rule name. AMB executes the rules at locations immediately before and after the following AMB-generated paragraphs.
    AMB Paragraph Paragraph Function

    APS-CHK-SCRN-RECEIVED-PARA

    Checks which screen was received

    APS-screenname-RECEIVED-PARA

    Receives the screen

    APS-SCRNLIST-EDIT-PARA

    Determines which screen has field edits

    APS-screenname-INP-EDIT-PARA

    Processes screen field edits

    Define the rules using these predefined rule name formats:

    $TP-PRE-CHK-SCRN-RECEIVED$TP-POST-CHK-SCRN-RECEIVED
    $TP-PRE-screenname-RECEIVED
    $TP-POST-screenname-RECEIVED
    $TP-PRE-SCRNLIST-EDIT
    $TP-POST-SCRNLIST-EDIT
    $TP-PRE-screenname-INP-EDIT
    $TP-POST-screenname-INP-EDIT
    
  5. See All Formats for additional rules.
Parameters:

screenname

The name of a screen.

Example:
Code logic that receives either SCREENA, SCREENB, or SCREENC, and always sends SCREENC as the output screen
IF TP-SCREENA-RECEIVED
    SCREENC-FIELD-1 = SCREENA-FIELD-X
    SCREENC-FIELD-2 = SCREENA-FIELD-Y
    SCREENC-FIELD-3 = SCREENA-FIELD-Z
          .
          .
IF TP-SCREENB-RECEIVED
    SCREENC-FIELD-1 = SCREENB-FIELD-XX
    SCREENC-FIELD-2 = SCREENB-FIELD-YY
    SCREENC-FIELD-3 = SCREENB-FIELD-ZZ
Code logic where, during a single execution, the program can receive either SCREENA or SCREENB. Let SCREENA and SCREENB redefine each other; keep SCREENC separate (not involved in the redefinition in the SCRNLIST call) in order to prevent any improper overlaying (and thus destruction) of data fields.
SCRNLIST SCREENA/SCREENB SCREENC

All Formats

General Rules:
  1. Code the SCRNLIST call to override the AMB-generated TP-SCRNLIST.
  2. Code SCRNLIST only once, before NTRY, and do not code a screen name with NTRY.
  3. AMB generates 88-level flags indicating the received screen:
    TP-SCRN-RECEIVED               PIC X(08)
        88  TP-screenname-RECEIVED VALUE 'screenname'.