FMT (Set DBCS Format)
- Purpose
- Specify the format of records that contain double-byte character set (DBCS) data.
- Usage notes
- File Manager 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, File Manager 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 File Manager 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. - Options
- RESET specifies that the default (1,*,EB) is to be used. LIST prints a listing of the current FMT setting.
- LIST
- Lists all the field definitions, whether you defined them explicitly or File Manager used the default.
- RESET
- Resets all field definitions to the default FLD=(1,*,EB).
- SET
- Defines a new set of fields.
- start
- Starting position of a field, in bytes, where 1 represents the start of the record.
- end
- Ending position of the field, in bytes. Specify an asterisk (*) for the end of the record.
- type
- Type of a field:
- DB
- DBCS data. The field length must be an even number of characters. Unformatted graphic fields are not treated as DBCS.
- MI
- 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.
- EB
- 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:
FMT,SET,FLD=(10,27,MI),FLD=(40,59,DB)
gives
you these field definitions: FIELD1 (1,9,EB)
FIELD2 (10,27,MI)
FIELD3 (28,39,EB)
FIELD4 (40,59,DB)
FIELD5 (60,*,EB)
File Manager prints a mask of the record, with a scale to help
you to adjust your definition:
EEEEEEEEEMMMMMMMMMMMMMMMMMMEEEEEEEEEEEEDBDBDBDBDBDBDBDBDBDBE*
1...5...10....5...20....5...30....5...40....5...50....5...60.
The valid double-byte hexadecimal values are X'0000', X'4040', and X'4141' to X'FEFE'. File Manager replaces all other pairs of double-byte characters with X'4040'.
//FMT JOB (acct),'name' Define DBCS Record Fmt
//FILEMGR EXEC PGM=FILEMGR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
$$FILEM FMT SET,FLD=(10,27,MI),FLD=(40,59,DB)
$$FILEM EOJ
/*