gtpg2m1hGeneral Macros

DDATA-Terminal Data Field Display

This general macro instruction, with the DPANL macro instruction, is used in application development to declare a data structure used in processing terminal displays. DPANL and DDATA macro instructions (called map statements) that are written by an application programmer must be placed on a map source statement library. Map statements are then included in ECB-controlled source code by using the assembler language COPY instruction. The copied map statements have the effect of declaring symbolic names used in a display data structure, because the DPANL and DDATA instructions expand into a DSECT included in the source code. The DSECT is adjusted and a register is assigned as the result of parameters included in the map statement coding.

The use of map statements is analogous to the use of a data macro instruction. However, map statements do not appear in the source code of ECB-controlled programs. This means that source code does not contain the register assignment of the DSECT generated as the result of copied map statements.

A map statement on the map source library is used in two different ways:

Format




Notes:

  1. relative position

label
A one to four character symbolic name (alphanumeric characters) assigned to this field definition. This symbolic name, if provided, must not appear on any other DDATA statements in this specific application program assembly. If no name is written for this field item, the user will not be able to symbolically reference this field within the assembled program.

Each DDATA item provided with a symbolic reference generates the following DSECT items when the user program is assembled:

Note:
The appended suffixes are 'L' and 'I' for input fields and 'A' and 'O' for output fields.

The original Symbol and the appended suffix yield the generated symbolic field name.

DDATA
These five (5) characters represent the macro name used to define individual fields comprising a format. This must appear in the field statement.

LENGTH=n
This optional keyword denotes the data or text length of an input or output field. The maximum value is LENGTH=255. The default length is 2. When defining the length of either an output or input field, this parameter will exclude the length of the attribute character. Thus, when LENGTH=6 is coded, the following DSECT items are generated for a field defined as output:
          DS   0H
SYMBOLA   DS   CL1
          DS   CL1
SYMBOLO   DS   CLnumber

For fields defined as input, LENGTH=6 generates the following DSECT items:

SYMBOLL   DS   H
SYMBOLI   DS   CL6

JUSTIFY=(LEFT|RIGHT,BLANK|ZERO|NO)
This optional keyword enables the user to specify, for both input and output data fields, whether the actual data is to be left or right justified. In addition, the user may indicate whether the field (input or output) is to be preset with blanks or numeric zeroes. The default value for the first subparameter is RIGHT, and, the default value for the second subparameter is BLANK. When this keyword is omitted, JUSTIFY=(RIGHT,BLANK) is assumed.

CON=constant
This optional keyword provides the capability for the user to define, on output only, any constant data to be displayed on a 3270 CRT terminal or hardcopy device. This Keyword is not valid for 1977 type devices. The maximum number of character positions allowed, including blanks, is 255. When the constant information contains imbedded blanks, the entire field must be enclosed with quotes.
CON='SIGN IN'

When no blanks are included in the data stream, the quotes can be omitted.

CON=PAYROLL

TAB=YES|NO
This optional keyword parameter is only valid for output maps. Printer devices with the mechanical tab feature (1980 Model 24 and 1977 with tab) may have fields positioned at specific locations on output by specifying TAB=YES. The utilization of this particular feature requires that the user manually set the column position on the device prior to referencing this map. If this keyword is omitted, TAB=NO is assumed.

POS
This keyword provides the location of a specific input or output field within a format. For both input and output, this is the location where the attribute character appears; the actual text follows the attribute character. For non-3270 type devices, POS represents the actual location of a field. The user may specify one of three parameters with this keyword; relative position, row-column, or automatic position generation. Once one is selected, it cannot be changed on subsequent DDATA statements.

relative position
The user denotes a location, relative to position 0, of the data. Thus, POS=10 indicates data is to be input or output at the tenth position, relative to zero.

(row,column)
The user denotes a location by specifying a row number and a column number where data is to be input from or output to. Thus, POS=(1,1) represents the position on a 3270 CRT or hardcopy printer of a data field. Both row and column are relative to one, not zero.

AUTO
The Mapping Support Package generates the location and addresses of the field definitions comprising a specific map format. The positioning of the various fields is dependent upon the 'TYPE' parameter. The field classifications (TYPE=) affect their respective locations on both input and output.

The absence of the POS= operand from the DDATA statements will cause a default to the automatic (AUTO) field generation feature.

TYPE
This optional keyword, which is used in conjunction with the AUTO feature of map generation, defines or classifies the nature of a specific field, whether for input or output formats. The following field types have been designated as valid for this keyword. If this keyword is omitted, TYPE=CO is assumed.

T
This designation indicates the defined field is a title or header field for a specific panel. This field will be centered on a single row; the user must insure that the length of this field does not exceed the number of character positions per line for the specified device. This value is only valid for output maps.

FD
The field descriptor definition (FD) positions this field one position past the end of the previous field. A field defined as TYPE=FD will not be split over two lines; if the entire field cannot be contained in the remaining portion of this line, it is positioned at the beginning of the next line. Fields designated as FD should not be included in the MAXFLDS count of the DPANL statement. This value is only valid for output maps.

CO
This designation specifies a field as common output (CO). It is to be used to denote a field that is to appear in an output map only. The field so designated (TYPE=CO) will be positioned two spaces beyond the previous field and extend over as many lines as needed to contain the field.

CI
This designation specifies a field as common input (CI). It denotes a field that is to appear in an input map only. The field positioning is the same as TYPE=CO.

CB
This designates a single field as appearing on both input and output maps. Field positioning is identical to TYPE=CI and TYPE=CO fields.

ATT=SKIP|PROT|UNPROT,NUM,BRITE|DRK|NORM,DET,IC,MOD
This optional Keyword is used to specify the device dependent characteristics and attributes applicable to individual fields. This keyword is valid only for output maps and for 3270 devices. When no parameters are specified, a field is assumed to have the following characteristics:

protected,

alphameric,

displayable at normal intensity,

nonselector pen-detectable and not modified.

The following attributes are valid for output maps only:

DET is valid only for input maps.

REPEAT=number
This optional keyword indicates that the field defined with this DDATA statement is to be repeated on input or output up to a maximum of 255 times. Each repeated field will be positioned in the same column as the previous one, but on the next line (row). When the REPEAT parameter has been specified, no other field may be positioned on the same line (row) as that of the repeated field. In the EXAMPLE section there is an example depicting the field suffixing related to a REPEAT field. This option is not applicable to the 3287 SLU printers. If this keyword is omitted, then REPEAT=0 is assumed and the field will not be repeated.

BELL=YES|NO
This parameter causes an alarm or similar attention device to be sounded at the printer. The BELL code is placed prior to the field text in which it was defined in the output data stream.

The default is BELL=NO.

This parameter is only valid for maps whose definition causes an LU type 1 (SCS) data stream to be formatted. The devices that support this feature are the 3287 Models 1, 2, and 4 SLU devices.

DSECT
This optional keyword is valid only for output maps. This keyword can be used to exclude a field from the map being created.

NO
The field (described by this DDATA macro) will be excluded from the map.

YES
The field will be included in the map.

If this keyword is omitted, DSECT=YES is assumed.

Entry Requirements

DDATA statements and their associated DPANL statements are placed by the user on a symbolic map library under the unique 1-4 character map name used on the DPANL statement. The user references a specific map definition in his program by issuing a COPY 'mapname' statement in the source code.

Return Conditions

None.

Programming Considerations

The DDATA macro may be used on any I-stream.

Examples

None.