Can anyone think of a real-world use for the field/value/subvalue positions of a SAVING Field in a select list?
An apparent UniVerse implementation decision results with BY clauses leaving only the ID or SAVING value in the select list, and BY.EXP adding value, field, and subvalue (record.idVvalueSfieldVsubvalue as documented in the keyword section for BY.EXP in the User Reference).
During the sorting phase of BY and BY.EXP, the information serves a purpose. After sorting, I do not believe it serves any purpose.
So, is there a real-world use for the field/value/subvalue positions of a SAVING Field in a select list?
The SAVING value becomes the record ID of a subsequent SELECT or LIST. The SAVING Field would need to be an ID of file where a field/value/subvalue position holds some correspondence with a next BY.EXP and the original file and SELECT.
The record:
>ed MV1 19A
4 lines long.
----: ^
Up-arrow display mode = enabled
Top.
----: p
0001: 9^2538 (9 v 8)
0002: 7^2536^2535 (7 v 6 v 5)
0003: 24^25323^25222^25221 (24 v 23 s 22 s 21)
0004: 34^25233^25232^25231 (34 s 33 s 32 s 31)
Bottom at line 4.
The BY clause:
>SSELECT MV1 BY F2 SAVING F2 '19A'
3 record(s) selected to SELECT list #0.
>>SAVE.LIST mark
3 record(s) SAVEd to SELECT list "mark".
>EDIT.LIST mark
3 lines long.
----: p
0001: 7
0002: 6
0003: 5
Bottom at line 3.
----:
It is interesting to note that in this instance, BY will sort records by the field, but the SAVING occurs after sequencing and just splits out the multivalued elements found.
The BY.EXP clause
>sselect MV1 BY.EXP F2 SAVING F2 '19A'
3 record(s) selected to SELECT list #0.
>>save.list mark
3 record(s) SAVEd to SELECT list "mark".
>edit.list mark
3 lines long.
Up-arrow display mode = enabled
0003: 7^2531^2522^2530
----: p
0001: 5^2533^2522^2530 (5 v 3 s 2 v 0)
0002: 6^2532^2522^2530 (6 v 2 s 2 v 0)
0003: 7^2531^2522^2530 (7 v 1 s 2 v 0)
Bottom at line 3.
----:
------------------------------
Mark A Baldridge
Principal Consultant
Thought Mirror
Nacogdoches, Texas United States
------------------------------