FMT (Set DBCS Format)

Specify the format of records that contain double-byte character set (DBCS) data.
Usage notes
Z Data Tools considers data as being contained in one or more fields in the input record. This function lets you define where each type of field is located within the record. You can define up to 32 fields in ascending order. They must not overlap, but they need not be contiguous. Specify for each field: start column, end column, type. An asterisk (*) for end column indicates end-of-record. For type, you can specify EB (for EBCDIC format), DB (for DBCS format), or MI (for mixed format).

For all areas you do not define, Z Data Tools creates an EBCDIC field definition.

If you use the FMT function within a batch job, your format definition affects only the current batch job. In any other case, your format definition is saved in the user profile and is available for further Z Data Tools sessions.

The FMT function and the “DBCS capable language” processing option of the SET function work together as follows:
  • The FMT function specifies which data within each record is DBCS.
  • The “DBCS capable language” option of the SET function causes DBCS data to be printed correctly.

For more information about the SET function, see SET (Set Processing Options).

Note: The FMT function has no effect on data printed in TABL or SNGL print format by a print function in advanced-function mode when the language used is a DBCS capable language or when using TSO if the terminal used is DBCS capable. However, when either the language is a non DBCS language or the TSO terminal is not DBCS capable then the DB type can be used to format graphic fields correctly in the output.
RESET specifies that the default (1,*,EB) is to be used. LIST prints a listing of the current FMT setting.
Read syntax diagramSkip visual syntax diagram

        |      .-,-------------------------. |   
        |      V  (1)                      | |   

  1. You can specify up to 32 fields using the FLD keyword.
Lists all the field definitions, whether you defined them explicitly or Z Data Tools used the default.
Resets all field definitions to the default FLD=(1,*,EB).
Defines a new set of fields.
Starting position of a field, in bytes, where 1 represents the start of the record.
Ending position of the field, in bytes. Specify an asterisk (*) for the end of the record.
Type of a field:
DBCS data. The field length must be an even number of characters. Unformatted graphic fields are not treated as DBCS.
Mixed DBCS and EBCDIC data. Data between the shift out character X'0E' and the shift in character X'0F' is treated as DBCS data.
EBCDIC data (the default).

The field definitions must be in ascending order, and must not overlap. Any areas that you do not define are considered EBCDIC data.

You can define up to 32 fields.

For example, the command:
gives you these field definitions:
   FIELD1 (1,9,EB)
   FIELD2 (10,27,MI)
   FIELD3 (28,39,EB)
   FIELD4 (40,59,DB)
   FIELD5 (60,*,EB)
Z Data Tools prints a mask of the record, with a scale to help you to adjust your definition:

The valid double-byte hexadecimal values are X'0000', X'4040', and X'4141' to X'FEFE'. Z Data Tools replaces all other pairs of double-byte characters with X'4040'.

//FMT JOB (acct),'name'  Define DBCS Record Fmt
//SYSIN     DD *
$$FILEM FMT SET,FLD=(10,27,MI),FLD=(40,59,DB)