1

I am doing a SELECT in TCL for UniVerse. I want to see if there are any value marks in a given field. Is there way to represent a value mark character in my TCL SELECT?

I know there are reserved variables in PICK, such as value mark @VM, representing the ASCII 253 character.

I have something like this already:

SELECT SOMEFILE WITH DICT7 = "[SUBSTRING]"

I want something like this using the appropriate reserved word for value marks:

SELECT SOMEFILE WITH DICT7 = "[@VM]"
Jon
  • 1,820
  • 2
  • 19
  • 43

1 Answers1

2

If you just want to test a Field to see if contains any Value Marks, you can do this.

SELECT SOMEFILE WITH EVAL "COUNT(DICT7,@VM)" GT 0
Van Amburg
  • 1,207
  • 9
  • 15
  • EXACTLY what I was looking for! I knew about I-descriptors as part of indexes, but didn't know about EVAL parsing a string as an I-descriptor. This let's me do straight TCL without having to build a dictionary or index. – Jon Mar 04 '20 at 14:49
  • 2
    It should be noted that using EVAL does technically update the dictionary file, but not in a way that you can see with LIST DICT. I believe the compiled I-DESC code lives in there somewhere and I have been told that there are shops where using EVAL is frowned upon for that reason. Personally, I probably overuse it. Gleefully. – Van Amburg Mar 04 '20 at 14:59