setvalueset function
Posted: June 11th, 2012, 5:54 pm
Does the setvalueset function in its Format 2 form:
setvalueset(item-name | @alpha_expr, numeric-array | alpha-array, alpha-array);
work in batch edit applications?
In the following, F2 is a field that has one value set containing the single value 0. The following code fails:
PROC GLOBAL
array codes(4);
array alpha(10) labels(4);
PROC F2
preproc
codes(0) = 1;
codes(1) = 2;
codes(2) = 3;
codes(3) = notappl; { mark end of array }
labels(0) = "Value 1";
labels(1) = "Value 2";
labels(2) = "Value 3";
setvalueset(F2, codes, labels);
$ = 2;
errmsg("invalueset(%d)=%d", $, invalueset($));
The output is invalueset(2)=0, which is surely incorrect.
Has anyone else had this problem? Can setvalueset be used in this way in a batch application? If not, is there a workaround?
Thanks,
Beckles
setvalueset(item-name | @alpha_expr, numeric-array | alpha-array, alpha-array);
work in batch edit applications?
In the following, F2 is a field that has one value set containing the single value 0. The following code fails:
PROC GLOBAL
array codes(4);
array alpha(10) labels(4);
PROC F2
preproc
codes(0) = 1;
codes(1) = 2;
codes(2) = 3;
codes(3) = notappl; { mark end of array }
labels(0) = "Value 1";
labels(1) = "Value 2";
labels(2) = "Value 3";
setvalueset(F2, codes, labels);
$ = 2;
errmsg("invalueset(%d)=%d", $, invalueset($));
The output is invalueset(2)=0, which is surely incorrect.
Has anyone else had this problem? Can setvalueset be used in this way in a batch application? If not, is there a workaround?
Thanks,
Beckles