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 all IDs, a prefix match, or a suffix match. When you use an asterisk (*), enclose the string that contains the asterisk with double quotation marks (") (example: "ABC*").

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

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) as an alphanumeric character string 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

  • 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 section shown below.

  • 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.

    HULFT10 for Linux/AIX Administration Manual : Send files and Receive files

  • When you transfer a joined file with HULFT, specify 'B' (BINARY) 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 Enterprise grade environments.

  • "d" (ASPEN) and "g" (NEC Katakana) of EBCDIC Set (CODESET) are not recommended. If you join files that use "d" (ASPEN) and "g" (NEC Katakana), these files may not split when future versions are used.

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 create a new file, 'join01.dat'

    If you use the following settings, you cannot recover the joined file that is deleted after an unsuccessful end.

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

    utljoin -infile "/home/hulft/*.txt" t -outfile join02.dat -r

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

    utljoin -infile "/home/hulft/data/*" m mformat01 -outfile join03.dat -m