Re: Code Errors - Scripts for import them !!!
Posted in 2000
alejandrodelu@my-deja.com wrote: > Jonathan: > I want the code errors in my tables in my database, for access them from > my app. I want to have the errors in personal tables and work with them! OK; I understand. My answer really doesn't change. > The error codes, actally are in csql.iem archive, but i want export the > errors and import them into my tables. > > ie. create table my_infx_errors (code_error int, isam_error int, > message char(255)) > > I've set de informix variables in client, but this is not my problem > my problem is: > How can i get this errors code? for later import this in my personal > tables!!! > > Do you understand me? Yes. I think the listiem program is what you need -- the IIUG archives have it. You'll probably use the -l option to get the messages listed one per line. You will need to check whether piping the output through: sed -e 's/: /|/' -e 's/\\\\[nt]/ /g' leaves you with a loadadble file. There'd only be a problem if a pipe symbol appears in the text of some message. The first expression maps the colon-space separating the number from the message into a pipe; the second converts any embedded newline or tab escape sequences (placed there by listiem -l) with a blank. Don't forget that the largest messages (not error messages) are of the order of 8 kB total, but messages this large probably do not occur in in csql.iem. You will probably want to ignore them. You might decide to ignore all non-error messages (positive numbers). There is, however, one positive numbered error message, somewhere around 25770 in value, related to connection problems. I'm not aware of any other message file decompiler, which isn't to say that there are no others. -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"