Previous Topic: MAP AUTOPANEL Statement SyntaxNext Topic: MFLD Statement Syntax


Examples

The following are the examples of the MAP AUTOPANEL statement:

Example 1

Adding a Map Occurrence

The following sample MAP AUTOPANEL statement adds a map occurrence named MEALS:

ADD MAP MEALS VERSION IS 2 AUTOPANEL DEVICES=(24X80) USING RECORDS MEALS-REC VERSION 1 NOEDIT.

The MEALS-REC schema record is used by the sample map occurrence. Automatic editing is disabled by the NOEDIT specification. A panel occurrence is generated automatically for the MEALS map occurrence and given the name MEALS-AUTOPANEL.

Example 2

Modifying a Map Occurrence

The following sample MAP AUTOPANEL statement modifies the map occurrence established in the previous example:

MOD MAP MEALS VERSION IS 2 AUTOPANEL DEVICES=(24X80) USING RECORDS MEALS-REC VERSION 1 EDIT ON ERROR INCORRECT ATTRIBUTES (BRIGHT) CORRECT ATTRIBUTES (DISPLAY).

Automatic editing is enabled by the EDIT clause. Attributes for the redisplay of incorrect and correct fields are added to the map. The related MEALS-AUTOPANEL panel is also modified by this sample statement unless the panel has been used as the basis for other map occurrences.

Example 3

Positioning a Map on a Device

The following sample MAP AUTOPANEL statement defines a map occurrence that can be displayed on two different devices at runtime:

ADD MAP SEATS AUTOPANEL DEVICES=(12X40,24X80) USING RECORDS PASS-REC VERSION 1 ORIGIN FOR 12X40 IS 5,5 ORIGIN FOR 24X80 IS 10,20.

The upper left-hand corner of the runtime SEATS map is positioned at row 5, column 5 on 12X40 devices. The upper left-hand corner of the runtime map is at row 10, column 20 on 24X80 devices. For more information about the placement of maps on different devices, see "Positioning Maps on Different Devices”.

Example 4

Deleting a Map Occurrence

The following sample MAP AUTOPANEL statement deletes the MEALS map occurrence version 2 and simultaneously deletes any map field occurrences that belong to the map:

DEL MAP MEALS VERSION IS 2.

The related MEALS-AUTOPANEL panel occurrence and its panel field occurrences are deleted from the data dictionary by this sample statement unless the panel has been used as the basis for other map occurrences.