•
o start is the offset in bytes of the field starting from 1
o length is the length in byes of the field
o type is a two letters code indicating the format of the data. Allowed codes are:
o order is a one letter code indicating the ordering of the field in the output file. Allowed codes are:
o filename is name of the file: it will be searched according to the rules specified for the isCOBOL framework
o filetype is a two letters code indicating the format of the file. Allowed codes are:
o r-length is the length in bytes of the record
o r-max-len is the maximum length in bytes of the record
o k-start is the offset in bytes of the key, starting from 1
o k-length is the length in bytes of the key
o key-type is a code indicating the key type. Allowed codes are:
Note - The primary key must be specified before any other key.If filetype is not specified then ORG=sq is implied.Note - the KEY instruction must be specified only when indexed files are involved.
o Format-clause has the following syntax:
Where type is a two letters code indicating the format of the data, as specified in the FIELDS instruction.
o Cond-clause has the following syntax:
Where left-value is the combination of start, length and type with the same format and meaning as for the FIELDS instruction except that a further type 'ss' can be used: in such a case a substring search is performed, as explained below.comp-op is one of the following two letters codes:
right-value can be eitherlog-op is one of the following codes:
When the 'ss' type is used in a left-value then the following restrictions apply:
• comp-op must be either 'eq' or 'ne';
• right-value must be a constant string.In such a case a substring search is performed: if left-value is bigger in size than right-value then the record is checked for an occurrence of what specified in right-value, otherwise if right-value is bigger in size than left-value then an occurrence of the content of the record is searched in the string specified as right-value.
Constant strings within the instructions can be enclosed in quote or double quote: in order to use the quotes in a string you must double them: for example if you want to process a file named my'file you can use one of the following expressions:
The input file idxfile is an indexed file with a primary key with 2 segments and an alternate key with duplicates. Its record length is 40 bytes and it is fixed.The output file output.txt is a line sequential file.
Content of sort.cmd:
| Copyright (c) 2017 Veryant |
| Contact us |
|
Please share your comments on this manual or on any Veryant product documentation with the email button at the top left |