If a sequence of 1 or more field definitions is repeated n times, it can be coded once with a repetition factor by enclosing the sequence in single quotes and preceding it with a 2-digit number, n, where 02<n<99. For example:
02'ZRF2,03'PDF4,C1F25''.
is an abbreviated form of
ZRF2,PDF4,C1F25,PDF4,C1F25,PDF4,C1F25, ZRF2,PDF4,C1F25,PDF4,C1F25,PDF4,C1F25.
Repetition groups can be completely, but not partially, contained in conditional groups and conversely. Thus:
...(...03'...)...' and 03'...(...'...)
are syntactical errors.
The symbol VS can be used instead of the 2-digit repetition factor to indicate that the value used is specified in a previous type V definition. VS is useful when the actual number of times that a field or a series of fields occurs within the record is variable and is contained in a separate field. For example, an invoice file consisting of variable-length records has a variably occurring series of 3 fields:
A separate field in the record contains a value indicating the number of line items represented in the record. This field is 2 bytes in length and is zoned decimal format. The following is coded to define these fields:
...,VZ2,...,VS'C1F20,PDF4,PDF7' etc.
|
Field |
Description |
|---|---|
|
VZ2 |
The field containing the actual number of occurrences |
|
VS |
The Variable Symbol reference used to refer to the value (contained in the previously defined V-type field) which contains the actual number of occurrences |
The characters enclosed in single quotes represent the line item fields.
| Copyright © 2012 CA. All rights reserved. |
|