Calling the PATHCOPY function
An additional feature of PATHCOPY interprets partial path specifications that do not end in an explicit repetition as an instruction to automatically iterate.
For example, the input and output paths do not end in target repetitions. The output message contains iterated components. PATHCOPY automatically moves all the repetitions of the partial path from the input message to the output message.
In another example, the output partial path does not target an explicit repetition. The output message contains iterated components. PATHCOPY fills all the datum locations in all iterations of the partial path in the output message with the input datum.
Example message
This message is used for the remainder of the examples:
MESSAGE 1
.
.
0(0).GT1(0).00405(0) : >154<
0(0).GT1(0).00406(0) : >155^^^i676-<
0(0).GT1(0).00407(0) : >j677-=-=-=-^k678-=-=-=-^l6<
0(0).GT1(1).00405(0) : >172<
0(0).GT1(1).00406(0) : >173^^^F698-<
0(0).GT1(1).00407(0) : >G699-=-=-=-^H700-=-=-=-^I7<
0(0).GT1(2).00405(0) : >190<
0(0).GT1(2).00406(0) : >191^^^c720-<
0(0).GT1(2).00407(0) : >d721-=-=-=-^e722-=-=-=-^f7<
0(0).GT1(3).00405(0) : >208<
0(0).GT1(3).00406(0) : >209^^^z742-<
0(0).GT1(3).00407(0) : >A743-=-=-=-^B744-=-=-=-^C7<
0(0).GT1(4).00405(0) : >226<
0(0).GT1(4).00406(0) : >227^^^W764-<
0(0).GT1(4).00407(0) : >X765-=-=-=-^Y766-=-=-=-^Z7<
.
.
.
Example 1: PATHCOPY from 0(0).GT1(0) to 2(0).GT1(0)
MESSAGE 1
.
.
2(0).GT1(0) : >|154|155^^^i676-|j677-=-=-=-^k678-=-=-=-^l6<
.
.
.
Example 2: PATHCOPY from 0(0).GT1(0) to 2(0).GT1
MESSAGE 1
[0:TEST] Illegal pathcopy from "0(0).GT1(0)" (segment) to "2(0).GT1" (segment with automatic iteration).
This fails because there is a hierarchy level mismatch: the source specifies Segment. The destination specifies Segment with Automatic Iteration.
Example 3: PATHCOPY from 0(0).GT1 to 2(0).GT1(0)
MESSAGE 1
[0:TEST] Illegal pathcopy from "0(0).GT1" (segment with automatic iteration) to "2(0).GT1(0)" (segment).
This fails because there is a hierarchy level mismatch: the source specifies Segment. The destination specifies Segment with Automatic Iteration.
Example 4: PATHCOPY from 0(0).GT1 to 2(0).GT1
MESSAGE 1
.
.
2(0).GT1(0) : >|154|155^^^i676-|j677-=-=-=-^k678-=-=-=-^l6<
2(0).GT1(1) : >|172|173^^^F698-|G699-=-=-=-^H700-=-=-=-^I7<
2(0).GT1(2) : >|190|191^^^c720-|d721-=-=-=-^e722-=-=-=-^f7<
2(0).GT1(3) : >|208|209^^^z742-|A743-=-=-=-^B744-=-=-=-^C7<
2(0).GT1(4) : >|226|227^^^W764-|X765-=-=-=-^Y766-=-=-=-^Z7<
Example 5: PATHCOPY from 0(0).GT1 to 2(0)
MESSAGE 1
.
.
2(0).GT1(0) : >|154|155^^^i676-|j677-=-=-=-^k678-=-=-=-^l6<
2(0).GT1(1) : >|172|173^^^F698-|G699-=-=-=-^H700-=-=-=-^I7<
2(0).GT1(2) : >|190|191^^^c720-|d721-=-=-=-^e722-=-=-=-^f7<
2(0).GT1(3) : >|208|209^^^z742-|A743-=-=-=-^B744-=-=-=-^C7<
2(0).GT1(4) : >|226|227^^^W764-|X765-=-=-=-^Y766-=-=-=-^Z7<
- Same as 0(0).GT1 to 2(0).GT1
Example 6: PATHCOPY from 0(0).GT1(0).#3(0) to 2(0).GT1(0).#3(0)
MESSAGE 1
.
.
2(0).GT1(0) : >|||j677-=-=-=-^k678-=-=-=-^l6<
There is inter-version conversion for 0(0).GT1(0).00405(0) (#1). The engine looks for the correct index of field 00405 under GT1 in the destination version.
Example 7: PATHCOPY from 0(0).GT1(0).#3 to 2(0).GT1(0).#3(0)
[0:TEST] Illegal pathcopy from "0(0).GT1(0).00407" (field with automatic iteration) to "2(0).GT1(0).00407(0)" (field).
.
.
This fails because there is a hierarchy level mismatch: the source specifies Field with Automatic Iteration. The destination specifies Field.
Example 8: PATHCOPY from 0(0).GT1(0).#1 to 2(0).GT1(0).#1
MESSAGE 1
.
.
2(0).GT1(0) : >|154<
- Same as 0(0).GT1(0).#1 to 2(0).GT1(0)
No inter-version conversion for 0(0).GT1(0).00405(0) (#1).