Format Information Registration command

Program interface

CALL library name/UTLDTOF PARM(['LIB=library name'] 
   'F=filename' ['CSTMFILE=filename'] ['FMTID=fmtid'] ['R'] 
   ['G'] ['OUTPUT=filename'] ['EXIT' CL variable name])

Explanation of parameters

LIB=Library name

Library name in which HULFT is installed ("HULFT" by default)

Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.

F=filename

File name to load FFD (Mandatory)

Specify this parameter in the format of Library name/File name.

Note

DDS cannot be read directly.

CSTMFILE=filename

Custom file name (Optional)

Specify this parameter in the format of Library name/File name(Member name). You can make user-defined conversion rules by specifying the custom file. For details on custom file, refer to Defining field types in the custom file.

If omitted, HULFT applies default conversion rules to process data.

FMTID=fmtid

Format ID to be registered (Optional)

Specify this parameter as a string of alphanumeric characters (and "_" if desired) that is within 50 bytes starting with an alphabet.

If omitted, HULFT registers the first 10 bytes of a record format name as the format ID.

R

Replacement (Optional)

If omitted, an error occurs when an identical Format ID exists.

G

Control of error messages that the Format Information Registration command outputs (Optional)

When omitted, HULFT displays error messages.

OUTPUT=filename

Destination of the error messages that the Format Information Registration command outputs (Optional)

Specify this parameter in the format of Library name/File name(Member name).

When omitted, error messages are not output.

The number of log records that a log file can retain is unlimited.

EXIT CL variable name

Specifies to receive the error code output by the Command Execution Log List Display command and specifies the CL variable name to set the error code value (Optional)

The CL variable name must be immediately after the EXIT tag.

HULFT sets an error code to the CL variable only if the command ends unsuccessfully.

When omitted, an error code is not set.

Command interface

UTLDTOF FFDFILE( ) CSTMFILE( ) CSTMMBR( ) FMTID( ) REPLACE( ) 
   LIBRARY( ) MSG( ) FILE( ) MBR( )

Explanation of parameters

FFDFILE

Library name and file name of the file in which FFD is registered (Mandatory)

Specify this parameter in the format of Library name/File name.

Specify these names as an alphanumeric character string of 10 bytes or less starting with an alphabet, respectively.

CSTMFILE

Library name and file name of the custom file (Optional)

Specify this parameter in the format of Library name/File name.

Specify these names as an alphanumeric character string of 10 bytes or less starting with an alphabet, respectively.

You can make user-defined conversion rules by specifying the custom file. For details on custom file, refer to Defining field types in the custom file.

If omitted, HULFT applies default conversion rules to process data.

CSTMMBR

Member name of the custom file ("*FILE" by default)

Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.

FMTID

Format ID to be registered (Optional)

Specify this parameter as a string of alphanumeric characters (and "_" if desired) that is within 50 bytes starting with an alphabet.

If omitted, HULFT registers the first 10 bytes of a record format name as the format ID.

REPLACE

Replacement ("*NO" by default)

*NO :

Give an error when the specified ID already exists.

*YES :

Replace existing ID with new one when the specified ID already exists.

LIBRARY

Library name in which HULFT is installed ("HULFT" by default)

Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.

MSG

Control of error messages ("*YES" by default)

*NO :

Suppress error messages.

*YES :

Show error messages.

FILE

Name of the library and the file to which error messages are output (Optional)

Specify this parameter in the format of Library name/File name.

Specify these names as an alphanumeric character string of 10 bytes or less starting with an alphabet, respectively.

When omitted, error messages are not output. The number of log records that a log file can retain is unlimited.

MBR

Member name of the file to which error messages are output ("*FILE" by default)

Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.

Defining field types in the custom file

The default value for each field type is shown in Table 6.2 .

Table 6.2 Conversion rules

FFD Field Type

A

B

E

O

F

G

J

P

S

others

HULFT Field Type

X

B

M

M

F

N

M

P

S

I

= Remarks =
  • HULFT applies the byte count that each FFD field exclusively uses in memory area to the size of a corresponding field. An error occurs if the field size applied by HULFT is not applicable to the Field Type in the Format Information of HULFT.

  • An error occurs if field in variable length is used.

  • The Field Name that is defined in FFD is assigned to the corresponding field names in the Format Information, respectively.

If a FFD field type does not match any of field types of the Format Information, by default HULFT regards the field as type "I" and registers the value in a record of the Format Information. You can register field types of your choice by creating a custom file to define the conversion pattern between the fields.

  • Example of Definition in Custom File

    *FFD definition = HULFT definition

     

    A = X

    B = B

    E = M

    O = M

    F = F

    G = N

    P = P

= Remarks =
  • Describe the field type of FFD on the left hand side of an equal sign (=), and define a corresponding Field Type in the Format Information of HULFT on the right hand side, respectively.

  • Lines starting with "*" are comments. Lines starting with 0x7B are also comments.

    However, the character represented by 0x7B varies depending on the code set.

    In the code sets for Japanese, 0x7B represents "#".

  • If you define the Field Type of HULFT that does not exist, HULFT gives an error.

  • If a duplicate field type of FFD exists in a custom file, HULFT considers that the value defined first is valid.

  • If the field type of FFD is not defined in the custom file, HULFT uses the default value.

  • If no field type is placed before or after an equal sign (=), or if no equal sign (=) is contained in the line, HULFT raises an error.