|
Have an data structure FV to hold column details for a given table loaded
using SQL FETCH including a column data_type defined as a varchar(8).
RowsFetched contains the number of columns defined. I would like to verify
that all the data_types defined agree to a list of values ('NUMERIC' or
'CHAR'). Tried a code snippet looks something like this:
isValid = '1';
FOR i=1 TO RowsFetched;
IF NOT FV(i).data_type IN %list('NUMERIC' :'CHAR');
isValid = '0';
ENDIF;
ENDFOR;
Compile fails with RNF7421, to wit:
"Operands are not compatible with the type of operator.
Cause . . . . . : Operands must be of class character, graphic, or UCS-2
for character operations; numeric for arithmetic operations; and indicator
for logical and relational operations. In a comparison operation, both
operands must have the same data type. The specification is ignored."
Obviously I can convert the IN to a compound logical comparison to make
the program work.
What I'd like to learn is what data type is being assigned to the %list
expression terms. I can't seem to make the terms compatible. Or is the
problem using an element of the data structure as one of the terms? Or is
it something else altogether?
Any thoughts welcome
Jack
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.