Joined File Split command

The files that are joined and then transferred can be split and output into separate files. When the command outputs the data into files, HULFT carries out Code Conversion for the joined file based on the information specified at the time the files were joined and on the parameters that are specified.

Format of command

utlbreak -infile filename [-codeset {0|a-i|v-x}] [-shift c|s] [-r] [-b] 
        {[-seqnbr number [-outfile filename]...] 
        |[-tgtfile filename [-outfile filename]...] 
        |[-from number] [-to number] [-dir directory]}

Explanation of the parameters

-infile filename

Specify the joined file name (Mandatory)

Specify the file name as an alphanumeric character string within 256 bytes.

Both relative and full path formats are valid.

-codeset

Specify the EBCDIC Set (Optional)

0:

Autoconfiguration

a:

Katakana (EBCDIC Katakana)

b:

Lower Case (EBCDIC Lower Case)

c:

ASCII (EBCDIC-ASCII)

d:

ASPEN (EBCDIC-ASPEN)

e:

Japan (Latin) for IBM

f:

Japan (Latin) Extended for IBM

g:

NEC Katakana

h:

Japan (Katakana) Extended for IBM

i:

Simplified Chinese Extended

v:

User Table 1

w:

User Table 2

x:

User Table 3

Omitting this field sets '0' (Autoconfiguration).

-shift

Specify how HULFT handles shift codes when carrying out Code Conversion (Optional)

c:

Remove shift codes

s:

Convert shift codes into space codes (ASCII:0x20)

When you omit this parameter, HULFT applies 'c.'

-r

Specify override of the output destination file (Optional)

If omitted, an error occurs when a file with the same name as the split target file name already exists.

-b

Specify whether to output messages when HULFT splits the file (Optional)

If omitted, a message appears each time splitting is complete.

-seqnbr number -outfile filename

Parameter to split the joined file according to the specified sequence numbers in the joined file (Optional)

Specify a number within the range from '1' to '9999' in '-seqnbr.'

Specify the output file name in '-outfile' as an alphanumeric character string within 256 bytes.

If you omit '-outfile,' HULFT automatically generates an output file name based on the name of the joined file. For details, refer to Naming conventions for output files.

You can repeat the specification up to a maximum of 10 times.

-tgtfile filename -outfile filename

Parameter to split the file according to the file names specified in the joined file (Optional)

Specify the file name in '-tgtfile' as a character string within 256 bytes.

Specify the output file name in '-outfile' as an alphanumeric character string within 256 bytes.

If you omit '-outfile,' HULFT automatically generates an output file name based on the name of the joined file. For details, refer to Naming conventions for output files.

You can repeat the specification up to a maximum of 10 times. For '-tgtfile,' specify the file name that appears when the contents of the joined file is displayed. For details, refer to Joined File Display command.

-from number -to number

Parameter to split the file by specifying a range of sequence numbers that are in the joined file (Optional)

Specify a value from '1' to '9999.'

When you omit '-from,' all the numbers up to the number specified in '-to' become targets.

When you omit '-to,' all the numbers from the number specified in '-from' become targets.

HULFT automatically generates an output file name based on the name of the joined file. For details, refer to Naming conventions for output files.

-dir directory

Specify the directory in which to generate the split files (Optional)

Specify the name as an alphanumeric character string within 256 bytes.

If you omit this parameter, HULFT splits the file in the directory where the joined file is stored.

When you specify the parameter '-outfile,' the specification overrides the specification of '-dir.'

Note

  • You cannot specify '-seqnbr' or '-tgtfile' at the same time as '-from -to.'

  • Use '-outfile' in combination with either '-seqnbr' or '-tgtfile.'

    When you specify '-from -to,' you cannot use '-outfile.'

  • Be sure to specify '-seqnbr,' '-tgtfile,' or '-from -to'

  • When you omit the parameter "-codeset" or when you specify "0" (Autoconfiguration), the setting value for the EBCDIC Set that is used in the code conversion during the split processing is determined as follows.

    Table 6.1 Setting value that is automatically determined for the EBCDIC Set

    Code Set for Transfer of Host on Splitting Side

    Code Set for Transfer of Host on Joining Side

    UTF-8

    SHIFT-JIS

    EUC-JP

    GB18030

    IBM
    Kanji

    JEF

    IBM Simplified
    Chinese

    SHIFT-JIS

    -

    -

    -

    F

    A

    EUC-JP

    -

    -

    -

    F

    A

    UTF-8

    -

    -

    -

    -

    F

    A

    I

    GB18030

    -

    -

    I

    -

    :

    The setting value of the EBCDIC Set is not used in code conversion during the processing for splitting a joined file.

    Blank

    :

    For these combinations, code conversion cannot be executed during the splitting of a joined file.

    A

    :

    EBCDIC Katakana

    F

    :

    Japan (Latin) Extended for IBM

    I

    :

    Simplified Chinese Extended

    For details on Code Set for Transfer (cs4trnsfr) in the System Environment Settings for which the code set of the splitting host is registered, refer to the following:

    HULFT10 for Linux/AIX Administration Manual : Code Conversion Settings

    For details on Code Set for Transfer (KCODETYPE) in which the code set of the joining host is registered, refer to Host Information.

  • If the name of the joined file contains multi-byte codes, an error occurs when HULFT splits the file.

  • When the joined file contains a file with a file name that contains multi-byte codes, be sure to specify an output file name (-outfile) when you split the file.

  • You cannot use the Joined File Split command for networked files that are used in HULFT10 Enterprise grade environments.

Remarks

  • If you specify '-dir,' HULFT creates output files in the specified directory.

    If you omit '-dir,' HULFT creates the split files in the directory where the joined file is stored.

  • You can repeat the specification of -seqnbr or -tgtfile 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 split during the processing, you cannot recover the deleted data.

Naming conventions for output files

If you omit the output file name when you split a joined file, HULFT generates the output file name according to the machine type where the joined file was created, as shown below:

  • Case where the machine type that creates the joined file is UNIX/Linux

    Input File Name When Joined File Is Created

    Output File Name

    /test1/test2/test3.txt

    test3.txt

    ../test1/test2/TEST3.txt

    TEST3.txt

    test1.txt

    test1.txt

  • Case where the machine type that creates the joined file is Windows

    Input File Name When Joined File Is Created

    Output File Name

    c:\test1\test2\test3.txt

    test3.txt

    ..\test1\test2\TEST3.txt

    TEST3.txt

    test1.txt

    test1.txt

  • Case where the machine type that creates the joined file is IBMi

    Input File Name When Joined File Is Created

    Output File Name

    MYLIB/TXT(TEST)

    TEST.TXT

    Note

    HULFT applies the above conversion rules if the part used in the file names or extensions meets the following condition:

    • The part must be in the format of library name/file (member name) and each is specified as a string within 10 bytes

    If the names do not conform to the above conversion rules, a 4-digit sequential number is added to the names of the input files.

    <input file name>.<sequence number>

    For example, if the input file name is 'test.join' and the naming does not conform to the rules while you are splitting the fifth file, the file name is 'test.join.0005.'

  • Case where the machine type that creates the joined file is Mainframe

    File Organization

    Joined File Name

    Output File Name

    Sequential Organization file

    TEST1.TEST2.TEST3.TXT

    TEST1.TEST2.TEST3.TXT

    Partitioned Organization file

    TEST1.TEST2.TXT(TEST3)

    TEST1.TEST2.TEST3.TXT

    Note

    HULFT applies the above conversion rules if the part used in the file names or extensions meets the following condition:

    • The parts must be 44 bytes or less (for sequential file) or 54 bytes or less (for partitioned file). In addition, the dataset name is in a format in which the character strings are separated with a period every eight bytes, namely '<within eight bytes>.<within eight bytes>.<within eight bytes>.....'

    If the names do not conform to the above conversion rules, a 4-digit sequential number is added to the names of the input files.

    <joined file name>.<sequence number>

    For example, if the input file name is 'test.join' and the name of the fifth file that is split does not conform to the conversion rules, the file name becomes 'test.join.0005.'

Example

  • Specification using sequence numbers

    utlbreak -infile /hulft/data/join01.dat -seqnbr 1 -outfile break01.dat    
                 -seqnbr 3 -outfile break03.dat    
    utlbreak -infile /hulft/data/join01.dat -r -seqnbr 1 -seqnbr 3     
                 -dir /hulft/data/out
    

  • Specification using file names

    utlbreak -infile /hulft/data/join01.dat -tgtfile /home/hulft/test1.txt     
                 -outfile break01.dat    
    utlbreak -infile /hulft/data/join01.dat -r -tgtfile test1.txt    
                 -tgtfile test2.txt -dir /hulft/data/out
    

  • Specification using range of sequence numbers

    utlbreak -infile /hulft/data/join01.dat -r -from 1 -to 10     
                 -dir /hulft/data/out