4GL: Turn off cursor name mangling.
Posted in 1997
HELP! My memory needs a kick! Q1: What is the name of the environment variable that turns off cursor name mangling in 4GL? Q2: DOes this need to be set at compile time or at run time? Now, for the more patient in the Informix community, some explanation is in order: I am using UPDATE WHERE CURRENT OF <cursor_name> in a prepared statement, thus: let scratch # Statement to retrieve the text = "select long_desc", # blob for the current function " from gplibdoc", " where funcname = ?", " for update" prepare lock_lib_desc_stmt from scratch declare lock_lib_desc_curs cursor for lock_lib_desc_stmt let scratch = "update gplibdoc", " set long_desc = ?", " where current of lock_lib_desc_curs" prepare upd_lib_desc_stmt from scratch (The fact that this is a blob I'm updating is incidental; I recall it happening with a non-blob update as well.) Note that the name of the FOR UPDATE cursor (lock_lib_desc_curs)is hard-coded into the second PREPAREd statement. Eventually I hit the execute code: execute upd_lib_desc_stmt # hit it! using rp_libdoc_ldesc I get error -507: The cursor name in the "where current of" clause does not exist. Huhh???? Ah, yes! 4GL automatically does "cursor name mangling". I have a vague idea why 4GL does this but the point is, there is a way to turn off the feature. This involves an environment variable: NOGLOB or some variation on that name. BTW, NOGLOB is NOT the variable; I just tried compiling with it set to "1". I can't recall the name of the env variable and it does not seem to be documented; the guide to SQL (Syntax, p 1-239, 1-621) glosses over it, using esql (which does no cursor name mangling), evading the issue entirely. Anyone remember the name of that &^%$#! environment variable? Thanks. -- -- Jake (Lost in thought and won't ask for directions) . . _..-'( )`-.._ ./'. '||\\\\. }\\_/{ .//||` .`\\. ./'.|'.'||||\\\\|.. )o o( ..|//||||`.`|.`\\. ./'..|'.|| |||||\\`````` \\,@,/ ''''''/||||| ||.`|..`\\. ./'.||'.|||| ||||||||||||. ||| .|||||||||||| ||||.`||.`\\. /'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\\ '.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.` '.||| ||||||||| |/' ``\\||`` | ''||/'' `\\| ||||||||| |||.` |/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\| V V V }' `\\ /' `{ V V V \\ \\ \\ V / / / +-----------------------------------------------------------+ | Impeccable Logic: A thought process which successfully | | resists chicken bites | +-----------------------------------------------------------+