Multiple File Join command

HULFT joins multiple files into a single file. You can add data to existing joined files or to joined files created with other machines on other platforms.

Format of command

utljoin -infile filename {b|t|f formatID|m multiformatID} 
       -outfile filename {-n|-r|-m}

Explanation of the parameters

-infile filename

Specify the input file name (Mandatory)

Specify a character string within 256 bytes. Both relative and full path formats are valid.

Multiple files can be specified by using an asterisk (*).

By using an asterisk (*), you can specify a prefix match or a suffix match (example: ABC*).

In this case, the length of each file name that is specified with an asterisk (*) must be 256 bytes or less.

b|t|f|m

File type (Mandatory)

b:

Binary data

t:

Text data

f:

Format data

m:

Multi Format data

formatID | multiformatID

Specify the format ID of the Format Information or the multi format ID of the Multi Format Information (Optional)

Specify a string of alphanumeric characters (and "_" if desired) that is within 50 bytes.

If 'f' or 'm' is specified for the file type, this parameter cannot be omitted.

-outfile filename

Specify the output file name (Mandatory)

Specify an output file name (joined file name) within 256 bytes.

-n|-r|-m

Creation mode (Mandatory)

Parameter to specify the creation mode of the joined file.

-n (New Creation):

Return an error if the specified file already exists.

-r (Replace):

If the specified file already exists, HULFT replaces the existing file. If the specified file does not exist, HULFT creates a new file.

-m (Append):

If the specified file already exists, HULFT appends data to the file. If the specified file does not exist, HULFT creates a new file.

If '-m' (Append) is specified, an error occurs if the existing files are not joined files.

Note

  • If you join a file that contains Japanese in its file name, you cannot use the file name as it is if you split the joined file on a platform other than Windows.

  • For details on the restrictions on the record size for each file type when you specify '-infile,' and the restrictions on the file size when you specify '-outfile,' refer to the following:

    HULFT10 for Windows Administration Manual : Send files and Receive files

  • Do not specify the same path for -infile and -outfile. Although an error does not occur even if you specify the same path, we provide no guarantee about its behavior.

  • When you transfer a joined file with HULFT, specify 'BINARY' (B) for Transfer Type (TRANSTYPE) in the Send Management Information.

  • You cannot use the Multiple File Join command for networked files that are used in HULFT10 Server grade environments.

Remarks

  • You can repeat the specification of '-infile filename {b|t|f formatID |m multi formatID}' up to a maximum of 10 times.

  • If "Unrecoverable Mode" (1) is specified for Transfer-Related File Deletion Mode (trnsfr_file_del) in the System Environment Settings, and you need to delete data that was joined during the processing, you cannot recover the deleted data.

Example

  • When you join 'file01.dat,' whose Format Information is named 'format01,' and 'file02.dat,' whose format information is named 'format02,' to created a new file, 'join01.dat'

    utljoin -infile file01.dat f format01 -infile file02.dat f format02 
             -outfile join01.dat -n
    

  • When you join all the text-type files whose names end with .txt that are located in the D:\home\hulft folder to create the file 'join02.dat' using Replace mode

    utljoin -infile "D:\home\hulft\*.txt" t -outfile join02.dat -r

  • When you join all the files that are located in the D:\home\hulft\data folder into a multi format-type file whose Multi Format ID is 'mformat01' and create the file 'join03.dat' using Append mode

    utljoin -infile "D:\home\hulft\data\*" m mformat01 -outfile join03.dat -m