Status Word
Posted in 2013
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi everyone, Did anybody here use the word "status" for table name, columns name or anything else? I just did it, and tried to use a 4GL application to access those object (in this case, table name status). I did define my variables "like" table structure and the -1213 error. Is there a rule to "not use" the status word usig 4GL? Thanks a lot, André Luiz Rufino
STATUS is a keyword in 4gl, similar to SQLCA.SQLCODE. I'm surprised it didn't give you a syntax error when you tried to compile it, let alone run the program. --EEM > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of > André Luiz Rufino > Sent: Wednesday, August 07, 2013 8:57 AM > To: ids@iiug.org > Subject: Status Word [31070] > > Hi everyone, > Did anybody here use the word "status" for table name, columns name or > anything else? I just did it, and tried to use a 4GL application to > access those object (in this case, table name status). I did define my > variables "like" table structure and the -1213 error. > Is there a rule to "not use" the status word usig 4GL? > Thanks a lot, > André Luiz Rufino > > > *********************************************************************** > ******** > Forum Note: Use "Reply" to post a response in the discussion forum.
Well, I created the table before I tried to access the data. Now it is clear. Thanks a lot... > To: ids@iiug.org > From: Everett.Mills@nationalbeef.com > Subject: RE: Status Word [31072] > Date: Wed, 7 Aug 2013 10:09:10 -0400 > > STATUS is a keyword in 4gl, similar to SQLCA.SQLCODE. I'm surprised it didn't > give you a syntax error when you tried to compile it, let alone run the > program. > > --EEM > > > -----Original Message----- > > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of > > André Luiz Rufino > > Sent: Wednesday, August 07, 2013 8:57 AM > > To: ids@iiug.org > > Subject: Status Word [31070] > > > > Hi everyone, > > Did anybody here use the word "status" for table name, columns name or > > anything else? I just did it, and tried to use a 4GL application to > > access those object (in this case, table name status). I did define my > > variables "like" table structure and the -1213 error. > > Is there a rule to "not use" the status word usig 4GL? > > Thanks a lot, > > André Luiz Rufino > > > > > > *********************************************************************** > > ******** > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >
There is a 4GL built-in global variable STATUS which maps the contents of sqlca.sqcode, the SQL level error code, so you have effectively made your table invisible to 4GL code. There is a workaround, not pretty but it should do the trick. Always refer to the status table as "owner".status or <database>:status. That will avoid confusing the 4GL compiler and prevent it from replacing the reference to 'status' with the contents of the global variable (usually 0 at the points where a tablename would be appropriate). Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Wed, Aug 7, 2013 at 9:56 AM, André Luiz Rufino <andre_rufino@msn.com>wrote: > Hi everyone, > Did anybody here use the word "status" for table name, columns name or > anything else? I just did it, and tried to use a 4GL application to access > those object (in this case, table name status). I did define my variables > "like" table structure and the -1213 error. > Is there a rule to "not use" the status word usig 4GL? > Thanks a lot, > André Luiz Rufino > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001a11c3694290939d04e35cfaec
Another workaround would be to name it in Spanish, "estatus" :)