Re: Re[2]: I4GL Error - no number - lock table
Posted in 1995
OK -- the problem is clear to me now. The syspgm4gl database should not be logged for the version of I4GL you are using. You need to get an upgrade. Old versions of the i4gl program do not handle logged syspgm4gl databases or MODE ANSI syspgm4gl databases at all. The version 4.13.UD1/6.01.UD1 and later versions do; I think 4.12.UE1/6.00.UE1 and later versions do too, but I haven't double checked. Your quick fix is to change the log mode on the syspgm4gl database -- if I4GL had created it, it would be unlogged, not with buffered logging. Also, with the revised version, you can set the PROGRAM_DESIGN_DBS environment variable to point to the database containing the syspgm4gl tables -- I4GL will create the tables if necessary. Obviously, syspgm4gl is the default if the environment variable is not set. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }Date: Thu, 6 Jul 1995 12:16:45 -0500 }From: DONALD_BOOTHBY_at_ISDLAN@ima.isd.state.in.us (DONALD BOOTHBY) }Subject: Re[2]: I4GL Error - no number - lock table }To: informix-list@rmy.emory.edu, johnl@informix.com (Jonathan Leffler) } }Thanks for the quick answer Jonathan. However, I do not understand }the answer, so I may not be asking the question right. } }Here are the exact steps to create the problem: from the $ prompt, I }type> i4gl. Then, I type P for program, N for new, and "convert" for }the program name. I then try to hit 4 for 4GL, O for Other, or L for }library. At this point, I get the "Lock table can only be used within }a transaction" message at the bottom of my screen. } }The only thing in convert.4gl is a comment line. (We've also tried to }put some real code in, to no apparent avail.) I don't understand why }it fails when trying to create a new program. We aren't compiling it }or trying to execute anything yet. } }Other data: The 6.00 database uses buffered logging. The syspgm4gl has owner: }sap753 in dbspace: rootdbs on: 04/24/95 log status: B }An "ls con*" gives convert.4gl and convert.o. } }I don't have an SE engine. And all databases use buffered logging with the }exception of the rootdbs which is U and cannot be changed. } }Thanks for any assistance, }...don } }______________________________ Reply Separator _________________________________ }Subject: Re: I4GL Error - no number - lock table }Date: 7/6/95 10:42 a } }It is error -524; see also errors -255 and -327. } }I'd guess that the 4.11 database is unlogged and SE, and the 6.00 database }is OnLine and logged. With a logged database, you can only issue LOCK }TABLE statements within the scope of a transaction, and you cannot issue }UNLOCK TABLE statements. COMMIT WORK release all locks and closes all }non-HOLD cursors. With an unlogged database, you have to manually issue }UNLOCK TABLE statements, and of course BEGIN WORK and friends do not work. } }You have to design programs carefully if they are to run unchanged in both }logged and unlogged environments. You have to be even more careful if they }are to work with both unlogged databases and MODE ANSI databases. And only }with extreme difficulty can they be made to have the same error recovery }characteristics under logged and unlogged databases. In fact, I'd suspect }that the error recovery characteristics cannot be identical and that you }could, with care, prove it. You have to consider transaction logging }carefully when designing database programs. } }Yours, }Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> } }>Date: Wed, 5 Jul 1995 14:57:39 -0500 }>From: DONALD_BOOTHBY_at_ISDLAN@ima.isd.state.in.us (DONALD BOOTHBY) }>X-Informix-List-Id: <list.6812> }> }>The message appears: "Lock table can only be used within a }>transaction" when I'm trying to create a new program, or trying to }>modify an existing program in I-4GL 4.11 for Informix 6.00.UE1. }> }<<Clipped>> }> }>donald_boothby_at_isdlan@ima.isd.state.in.us }>State of Indiana - Information Services Division }>Indianapolis, IN 46204