RE: Four easy ones
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Transactions, Locking & Isolation
I think you've gotten alot of answers on the other questions so I will only give my input on your fourth question. What we do is create global variables for program name, module and function then use a library function that is the called function in the "WHENEVER ERROR CALL". We set the variables at the beginning of each program, module and function so that when the error occurs our variables are set and can be used in the library function to send this information to an errlog file. I would not set a variable for the line number, however if the function is large you might set another variable indicating what action was taking place, (i.e. add, update, delete), when the error occured. Hope this helps, Eva Ferguson }---------- }From: rrela@dc.uba.ar[SMTP:rrela@dc.uba.ar] }Sent: Tuesday, November 05, 1996 3:23 AM }To: informix-list@rmy.emory.edu }Subject: Four easy ones } }Before I start asking, let me tell you I'm working on I4GL V4.1 under }AIX. } }FIRST, }I'd like to show some debug messages while running my I4GL programs. }I mean having a window or something with messages of mine scrolling up }where }I can read information about program flow and other stuff (like }"verbose" }option on some software) } }Am I clear? } }I tried having a window allways opened and make it current when I'd like }to }read my messages, but then I can't hide it 'cause I don't know how to }"send }it back". } }SECOND, }Is there a way to write functions with variable amount of parameters in }I4GL }4.1? } }Example } DEFINE message CHAR(20), totalPrice SMALLINT } } LET message="Some trash..." } CALL PrintAllThisStuff(message, "Hello world!", totalPrice) } CALL PrintAllThisStuff("Blah, blah") } CALL PrintAllThisStuff("OOPS! We've got ", status, " error, }babe.") } }THIRD, }Given } } BEGIN WORK } LOCK TABLE mytable IN EXCLUSIVE MODE } ... } COMMIT WORK } }Does the last statement shown above unlock mytable? } }FOURTH. }Can I get the current line, current module (current function, am I }asking }too much?) that was executing when a run-time error was ocurred? }I need this to be shown by a function (WHENEVER ERROR CALL). }Does I4GL include such debug information into the .4go or .4gi? } }Thanks. }--- }Rad. (Ramiro Rela) }