DFHMDF (part 1) >>-+-----+--DFHMDF----------------------------------------------> '-fld-' .-,----------------------------------------------------------------------------. V | >----+--------------------------------------------------------------------------+-+->< +-POS--=--+-number----------------+----------------------------------------+ | '-(--line--,--column--)-' | +-LENGTH--=--number--------------------------------------------------------+ +-JUSTIFY--=--(--+-------+--+--------------+--)----------------------------+ | +-LEFT--+ '-,--+-BLANK-+-' | | '-RIGHT-' '-ZERO--' | +-+-INITIAL--=--'--char-data--'---------+----------------------------------+ | +-XINIT--=--hex-data------------------+ | | | (1) | | | '-GINIT--=--'--DBCS-characters--'-----' | | .-ASKIP--------------. | +-ATTRB--=--(--+--------------------+--+------------------------------+--)-+ | +-PROT---------------+ | .-------------. | | | '-UNPROT--+--------+-' | V | | | | '-,--NUM-' '-,--+-BRT--+----+---------+-+-' | | +-NORM-+ +-,--DET--+ | | '-DRK--' +-,--IC---+ | | '-,--FSET-' | | .-OFF-------. | +-HILIGHT--=--+-----------+------------------------------------------------+ | +-BLINK-----+ | | +-REVERSE---+ | | '-UNDERLINE-' | | .-,-------------. | | V | | +-VALIDN--=--(----+-----------+-+--)---------------------------------------+ | +-MUSTFILL--+ | | +-MUSTENTER-+ | | +-TRIGGER---+ | | '-USEREXIT--' | +-OUTLINE--=--+-BOX-----------------+--------------------------------------+ | | .-,---------. | | | | V | | | | '-(----+-------+-+--)-' | | +-LEFT--+ | | +-RIGHT-+ | | +-OVER--+ | | '-UNDER-' | | .-YES-. | '-TRANSP--=--+-----+-------------------------------------------------------' '-NO--'
DFHMDF (part 2) .-,--------------------------. V | >>-+-----+--DFHMDF----+------------------------+-+------------->< '-fld-' | .-DEFAULT-. | +-COLOR--=--+---------+--+ | '-color---' | | .-BASE-. | +-PS--=--+------+--------+ | '-psid-' | +-GRPNAME--=--group-name-+ +-OCCURS--=--number------+ +-PICIN--=--'--value--'--+ +-PICOUT--=--'--value--'-+ | .-NO--. | +-SOSI--=--+-----+-------+ | '-YES-' | '-CASE--=--MIXED---------'
The DFHMDF macro defines a field within a map defined by the previous DFHMDI macro. A map contains zero or more fields.
“fld” is the name (1–30 characters) of the field. You should, however, refer to your compiler manual to make sure that there are no other restrictions on the length.
For more information about defining field names, see the CICS® Application Programming Guide. If “fld” is omitted, application programs cannot access the field to change its attributes or alter its contents. For an output map, omitting the field name may be appropriate when the INITIAL operand is used to specify the contents of a field. If a field name is specified and the map that includes the field is used in a mapping operation, nonnull data supplied by the user overlays data supplied by initialization (unless default data only is being written).
The performance of input mapping operations is optimized if DFHMDF macros are arranged in numerical order of the POS operand.
You cannot define more than 1023 named fields for a COBOL, C, or PL/I input/output map.
You should ensure that the names of maps, and names of fields within a mapset (or within multiple mapsets that are copied into one application program) are unique. However, a map can have the same name as a mapset.
Before CICS can load a physical map, you must define a physical map using an RDO transaction with the MAPSET attribute.
? > & blank
If ? or >, the field is a selection field; if & or blank, the field is an attention field. (See An Introduction to the IBM 3270 Information Display System for further details about detectable fields.)
A field for which BRT is specified is potentially detectable to the 3270, because of the 3270 attribute character bit assignments, but is not recognized as such by BMS unless DET is also specified.
DET and DRK are mutually exclusive.
If DET is specified for a field on a map with MODE=IN, only one data byte is reserved for each input field. This byte is set to X'00', and remains unchanged if the field is not selected. If the field is selected, the byte is set to X'FF'.
No other data is supplied, even if the field is a selection field and the ENTER key has been pressed.
? > & blank
and DET must be specified in the output map.
Specification of FSET causes the 3270 to treat the field as though it has been modified. On a subsequent read from the terminal, this field is read, whether or not it has been modified. The MDT remains set until the field is rewritten without ATTRB=FSET, or until an output mapping request causes the MDT to be reset.
Either of two sets of defaults may apply when a field to be displayed on a 3270 is being defined but not all parameters are specified. If no ATTRB parameters are specified, ASKIP and NORM are assumed. If any parameter is specified, UNPROT and NORM are assumed for that field unless overridden by a specified parameter.
This option can be overridden by the CURSOR option of the SEND MAP command that causes the write operation.
If data is to be copied from one device to another attached to the same 3270 control unit, the first position (address 0) in the buffer of the device to be copied from must not contain an attribute byte for a protected field. Therefore, when preparing maps for 3270s, ensure that the first map of any page does not contain a protected field starting at position 0.
This should be specified if a field is known to contain lowercase Latin characters but may be displayed on a katakana display. It should not be specified if the field may contain valid katakana characters.
The valid colors are blue, red, pink, green, turquoise, yellow, and neutral.
The COLOR operand is ignored unless the terminal supports color, as indicated by the RDO option COLOR.
The rules for defining group names are the same as for defining field names. See the CICS Application Programming Guide for details.
If this operand is specified, the OCCURS operand cannot be specified.
The fields in a group must follow on; there can be gaps between them, but not other fields from outside the group. A field name must be specified for every field that belongs to the group, and the POS operand must also be specified to ensure that the fields follow each other. All the DFHMDF macros defining the fields of a group must be placed together, and in the correct order (ascending numeric order of the POS value).
For example, the first 20 columns of the first six lines of a map can be defined as a group of six fields, as long as the remaining columns on the first five lines are not defined as fields.
The ATTRB operand specified on the first field of the group applies to all of the fields within the group.
The HILIGHT operand is ignored unless the terminal supports highlighting, as indicated by the RDO TYPETERM option HILIGHT(YES).
? > & blank
should be supplied.
The number of characters that can be specified in the INITIAL operand is restricted to the continuation limitation of the assembler to be used or to the value specified in the LENGTH operand (whichever is the smaller).
Hexadecimal data is written as an even number of hexadecimal digits, for example, XINIT=C1C2. If the number of valid characters is smaller than the field length, the data is padded on the right with blanks. For example, if LENGTH=3, XINIT=C1C2 results in an initial field of 'AB'.
If hexadecimal data is specified that corresponds with line or format control characters, the results are unpredictable. The XINIT operand should therefore be used with care. Only one of GINIT, INITIAL, or XINIT may be specified.
Specified Assumed
LEFT BLANK
RIGHT ZERO
BLANK LEFT
ZERO RIGHT
If JUSTIFY is omitted, but the NUM attribute is specified, RIGHT and ZERO are assumed. If JUSTIFY is omitted, but attributes other than NUM are specified, LEFT and BLANK are assumed.
In general LENGTH can be omitted if PICIN or PICOUT is specified, unless PICOUT defines a COBOL picture containing a currency symbol that will be replaced by a currency sign of length greater than 1. LENGTH is required otherwise. You can specify a length of zero only if you omit the label (field name) from the DFHMDF macro. That is, the field is not part of the application data structure and the application program cannot modify the attributes of the field. You can use a field with zero length to delimit an input field on a map.
The map dimensions specified in the SIZE operand of the DFHMDI macro defining a map can be smaller than the actual page size or screen size defined for the terminal.
If the LENGTH specification in a DFHMDF macro causes the map-defined boundary on the same line to be exceeded, the field on the output screen is continued by wrapping.
OCCURS and GRPNAME are mutually exclusive; that is, OCCURS cannot be used when fields have been defined under a group name. If this operand is omitted, a value of OCCURS=1 is assumed.
However, the validity of the input data is not checked by BMS or the high-level language when the map is used, so any desired checking must be performed by the application program. The length of the data associated with “value” should be the same as that specified in the LENGTH operand if LENGTH is specified. If both PICIN and PICOUT are used, an error message is produced if their calculated lengths do not agree; the shorter of the two lengths is used. If PICIN or PICOUT is not coded for the field definition, a character definition of the field is automatically generated regardless of other operands that are coded, such as ATTRB=NUM.
MAPX DFHMSD TYPE=DSECT,
LANG=COBOL,
MODE=INOUT
MAP DFHMDI LINE=1,COLUMN=1,
SIZE=(1,80)
F1 DFHMDF POS=0,LENGTH=30
F2 DFHMDF POS=40,LENGTH=10,
PICOUT='$$$,$$0.00'
F3 DFHMDF POS=60,LENGTH=6,
PICIN='9999V99',
PICOUT='ZZ9.99'
DFHMSD TYPE=FINAL
01 MAPI.
02 F1L PIC S9(4) COMP.
02 F1A PIC X.
02 FILLER REDEFINES F1A.
03 F1F PIC X.
02 F1I PIC X(30).
02 FILLER PIC X.
02 F2L PIC S9(4) COMP.
02 F2A PIC X.
02 FILLER REDEFINES F2A.
03 F2F PIC X.
02 F2I PIC X(10).
02 FILLER PIC X.
02 F3L PIC S9(4) COMP.
02 F3A PIC X.
02 FILLER REDEFINES F3A.
03 F3F PIC X.
02 F3I PIC 9999V99.
02 FILLER PIC X.
01 MAPO REDEFINES MAPI.
02 FILLER PIC X(3).
02 F1O PIC X(30).
02 FILLER PIC X.
02 FILLER PIC X(3).
02 F2O PIC $$$,$$0.00.
02 FILLER PIC X.
02 FILLER PIC X(3).
02 F3O PIC ZZ9.99.
02 FILLER PIC X.
A P S V X 9 / and (
A B E F G H I K M P R S T V
X Y and Z
1 2 3 6 7 8 9 / + - , . *
$ and (
Refer to the appropriate language reference manual for the correct syntax of the PICTURE attribute.
The default currency picture symbol is the dollar sign ($), which represents the national currency symbol; for example the dollar ($), the pound (£), or the yen (¥).
DECLARE
USPRICE PICTURE '$99.99',
UKPRICE PICTURE '<£>99.99',
EUPRICE PICTURE '<EUR>99.99';
A B E P S V X Z 0 9 , . + - $
CR DB / and (
A B E F G H I K M P R S T V
X Y and Z
1 2 3 6 7 8 9 / + - , . * $
CR DB and (
Refer to the appropriate language reference manual for the correct syntax of the PICTURE attribute.
The default currency picture symbol is the dollar sign ($), which represents the national currency symbol; for example the dollar ($), the pound (£), or the yen (¥).
DECLARE
USPRICE PICTURE '$99.99',
UKPRICE PICTURE '<£>99.99',
EUPRICE PICTURE '<EUR>99.99';
The default currency picture symbol is the dollar sign ($), which represents the national currency symbol; for example the dollar ($), the pound (£), or the yen (¥).
SPECIAL NAMES.
CURRENCY SIGN IS '$' WITH PICTURE SYMBOL '$'.
CURRENCY SIGN IS '£' WITH PICTURE SYMBOL '£'.
CURRENCY SIGN IS 'EUR' WITH PICTURE SYMBOL '#'.
WORKING STORAGE SECTION.
01 USPRICE PIC $99.99.
01 UKPRICE PIC £99.99.
01 ECPRICE PIC #99.99.
LENGTH must be specified when PICOUT
specifies a COBOL picture containing a currency symbol that will be replaced
by a currency sign of length greater than 1.The location of data on the output medium is also dependent on DFHMDI operands.
The first position of a field is reserved for an attribute byte. When supplying data for input mapping from non-3270 devices, the input data must allow space for this attribute byte. Input data must not start in column 1 but may start in column 2.
The POS operand always contains the location of the first position in a field, which is normally the attribute byte when communicating with the 3270. For the second and subsequent fields of a group, the POS operand points to an assumed attribute-byte position, ahead of the start of the data, even though no actual attribute byte is necessary. If the fields follow on immediately from one another, the POS operand should point to the last character position in the previous field in the group.
The PS operand is ignored unless the terminal supports programmed symbols, as indicated by PROGSYMBOLS(YES) on the RDO TYPETERM definition.
The MUSTFILL, MUSTENTER and TRIGGER specifications are valid only for terminals that support the field validation extended attribute, otherwise they are ignored. The USEREXIT specification applies to all 3270 devices.