This specifies output file information.
Two or more output file information options (-output) can be specified. When a standard output is specified for the output file, the file operand and the filesys operand are omitted. In this case, two or more output file information options (-output) cannot be specified.
Format
-output [ file=file-name [ ,file-name ...] [ file= ...] [ filesys=file-system ] ] [ maxfilesize=max-filesize ] [ maxrecnum=max-recordnumber ] [ { include=condition-expression [ ,condition-expression ] [ include= ...] | omit=condition-expression [ ,condition-expression ] [ omit= ...] | case= { condition-expression [ ,condition-expression ] | other } [ case= ...] } ] [ reconst=reconst-definition [ ,reconst-definition ...] [ reconst= ...] ] [ idxflag=index-flag ] [ idxkey=index-key [ ,index-key ...] [ idxkey= ...] ] [ linedlmt=line-delimiter ] [ removeeof ] [ -output ...]
This specifies the output file.
Two or more output files can be specified by delimiting with comma (,). When two or more output files are specified and maxfilesize operand or maxrecnum operand is specified, the data is output after being divided into two or more files according to the specification of maxfilesize operand or maxrecnum operand. When two or more output files are specified and maxfilesize operand or maxrecnum operand is not specified, the data is output after being divided into two or more files as recovery processing for the file system's blowout. The recovery processing for blowing out can be specified for processing the standard file system of the system.
Note
When the record that cannot be output even if all specified output files are used exists, it is an error.
When the number of specified output file is 1, maxfilesize operand and maxrecnum operand cannot be specified.
Format
file=file-name
file-name
This specifies output file path names.
For notes on describing other file-name, refer to file operand of the input file information option (-input).
This specifies the file system of the output file specified in file operand.
Format
filesys=file-system
file-system
This specifies the file system of the output file.
When omitted, the standard file system of the system is assumed to be specified. For information about the file systems that can be specified, refer tofilesys operand of input file information option (-input).
This specifies the maximam file size that can be output to a file.
Format
maxfilesize=max-filesize [ K | M | G ]
max-filesize [ K | M | G ]
This specifies the maximum file size that can be output to a file.
When the size of the file exceeds max-filesize, the data is continuously output to the next output file that is specified in file operand. K, M, and G are units of the maximum file size. K shows unit of kilobyte, M shows Mega-Byte and G shows Giga-Byte. When neither K, M nor G is specified, the unit is byte. When the data is specified at the same time as maxrecnum operand, it is output to the next output file when either one first reaches to the limit. Also, when the file system abnormally terminates before reaching to the limit specified, the data is output to the next output file at the point the file system abnormally terminates. When the standard file system of the system is processed, maxfilesize operand can be specified.
Note
When the number of the output file specified in file operand is 1, maxfilesize operand cannot be specified.
This specifies the maximum number of records that can be output to a file.
Format
maxrecnum=max-recordnumber
max-recordnumber
This specifies the maximum number of records that can be output to a file.
When the number of records exceeds max-recordnumber, it is continuously output to the next output file specified in file operand. When the data is specified at the same time as maxfilesize operand, it is output to the next output file when either one first reaches to the limit. Also, when the file system abnormally terminates before reaching to the limit specified, the data is output to the next output file at the point the file system abnormally terminates.
Note
When the number of the output file specified in file operand is 1, maxrecnum operand cannot be specified.
To use the record selection option for the output file, specify the selection field (selection condition).
The records that meet the condition are to be processed. The include operand is in the exclusive relationship with omit operand and case operand.
Format
include=condition-expression
condition-expression
This specifies the selection field (selection condition).
When you specify two or more condition-expression delimiting with comma (,), it makes the logical product of the selection conditions. When two or more include operands are specified, it makes logical sum of the selection condition. For information about the condition-expression, refer to include operand of input file information option (-input).
To use the record selection option for the output file, specify the selection field (selection condition).
This excludes the records that meet the condition from the object of processing. The omit operand is in the exclusive relationship with include operand and case operand.
Format
omit=condition-expression
condition-expression
This specifies the selection field (selection condition).
When you specify two or more condition-expression delimiting with comma (,), it makes the logical product of the selection conditions. When two or more omit operands are specified, it makes logical sum of the selection condition. For information about the condition-expression, refer to include operand of input file information option (-input).
To use the record selection option for the output file, specify the selection field (selection condition).
The records that meet the condition are to be processed. The case operand is in the exclusive relationship with include operand and omit operand.
Format
case={ condition-expression | other }
condition-expression
This specifies the selection field (selection condition). However, the records that are output in case operand of the output file information option (-output) specified before this description are not to be output.
When you specify two or more condition-expression delimiting with comma (,), it makes the logical product of the selection conditions. When two or more case operands are specified, it makes logical sum of the selection condition. For information about the condition-expression, refer to include operand of input file information option (-input).
other
Specify the fixed string 'other'.
The records that are not output in case operand of the output file information option (-output) specified are to be output.
Example
The specification example of distributing the record according to the condition is as follows.
The selection field outputs the record of less than 100 to sortout1.
The selection field outputs the record from 100 to less than 200 to sortout2.
The selection field outputs the record from 200 to less than 500 to sortout3.
The selection field outputs the record of 500 or more to sortout4.
-output file=sortout1 case=49.4zdl.lt.d100 -output file=sortout2 case=49.4zdl.lt.d200 -output file=sortout3 case=49.4zdl.lt.d500 -output file=sortout4 case=other
To use the record reconstruction option for the output file, specify the reconstruction field.
Format
reconst=reconst-definition
reconst-definition
This specifies the reconstruction field.
Two or more reconst-definition can be specified by delimiting the data by comma (,). For information about the reconst-definition, refer to reconst operand of the input file information option (-input).
This specifies the method for creating the index in the indexed file of COBOL file system.
Format
idxflag=index-flag
index-flag
This selects and specifies from the following. When two or more are specified, specify options continuously.
index-flag | Meaning |
---|---|
c | The index is a compressed key. |
r | The record is a compressed data. |
This specifies index fields in the indexed file of COBOL file system.
It cannot be omitted for the indexed file of COBOL file system.
Format
idxkey=index-key [ ,index-key ...]
index-key
This specifies the main key first, and then the sub-key.
Format of index-key
pos.len typ opt
pos
This specifies the position of the index field in a byte position.
len
This specifies the length of the index field in byte.
typ
This specifies the data format of the index field.
The data formats and the lengths of the index field are shown as follows.
Type | Data format | typ | Length (byte) | Meaning | |
---|---|---|---|---|---|
Character | ASCII code | asc | 1-254 | CHARTYPE of NetCOBOL | |
Unicode UCS-2 form (Note 1) | uc2 | 2-254 | CHARTYPE of NetCOBOL | ||
Big endian | u2b | 2-254 | CHARTYPE of NetCOBOL | ||
Little endian | u2l | 2-254 | CHARTYPE of NetCOBOL | ||
Unicode UTF-32 form (Note 2) | u32 | 4-252 | CHARTYPE of NetCOBOL | ||
Big endian | u3b | 4-252 | CHARTYPE of NetCOBOL | ||
Little endian | u3l | 4-252 | CHARTYPE of NetCOBOL | ||
Unicode UTF-8 form | ut8 | 1-254 | CHARTYPE of NetCOBOL |
NOTES
Byte order follows the specification of the environment variable BSORT_UCS2TYPE.
Byte order follows the specification of the environment variable BSORT_UTF32TYPE.
opt
This specifies the operation of the index field.
The operations that can be specified are shown below.
opt | Meaning |
---|---|
a | It sorts data in ascending order. |
d | It shows duplicate key specification in the index. |
e | It shows the end of segments. (Note) |
NOTE
Always specify 'e' for the final segment.
This specifies record separators in the output files.
It is effective in text files.
Format
linedlmt=line-delimiter
line-delimiter
This specifies the record separators in the output file.
The record separators that can be specified are shown below. When omitting the specification, it is the same as the record separators of the input file.
line-delimiter | Meaning |
---|---|
crlf | CRLF is treated as a record separator. |
cr | CR is treated as a record separator. |
lf | LF is treated as a record separator. |
Information
The record separator in the input file is automatically detected from among the input file.
Note
When two or more record separator exists in the input file, it is not possible to operate normally.
When the output file is a text file, EOF control character is removed.
Format
removeeof