CONSTRUCT bytes
Posted in 1992
How many bytes does the Construct clause (version 4.0) require for the variable that will hold the selection criteria ("char-variable" in the syntax below)? CONSTRUCT char-variable ON column-list FROM field-list I'm using CONSTRUCT on just one field of a screen form. The screen field is char(4) and its corresponding table column is char(1). The "char-variable" I am using to hold the entered parameters is char(80) in length. I ran the program and tried several different combinations of search parameters. I received error #1132 "The destination string of the CONSTRUCT statement is not large enough." in the situations listed below. Granted no one would normally enter 21 or more pipe symbols or the combination of letters & pipes that I tried, but I used these combinations in an effort to determine just how many bytes CONSTRUCT needs. This is because earlier, I defined my "char-variable" field to be char(12), and when I entered A|B|C on the screen form, I got error #1132. Surely twelve bytes would be enough to hold A|B|C, but CONSTRUCT says otherwise!!! - - - Values Entered - - - - - - Results - - - I. Letters ABCABCABCABCABCABCABCABCABC Worked OK with a total of exactly 70 chars. ABCABCABCABCABCABCABCABCABCA Gave error #1132 with 71 or more characters. II. Letters & Pipes A|B|C|A|B|C|A|B|C|A|B|C|A OK with a total of 33 characters. A|B|C|A|B|C|A|B|C|A|B|C| Gave error #1132 with 34 or more characters. III. Pipes ||||||||||||||||||||| OK with exactly 21 pipe symbols. |||||||||||||||||||||| Gave error #1132 with 22 or more pipes. Remember: The char-variable that I'm using with CONSTRUCT is defined in my 4GL program to be char(80) in length. So the question is why can't I enter up to 80 characters????? And why are there differences between entering just letters vs pipes??? How many bytes do pipes take up? --- John =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= John Baker, USAISC - Lex, Lexington - Blue Grass Army Depot, Lexington, KY (jbaker@lexington-emh2.army.mil) Phone: (606) 293-3644, 293-3743 DSN: 745- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=