Re: 4GL Core Dump
Posted in 1991
Quoting Scott O'Connell, Spectrum Data Services, Carlsbad, CA: > A little over a year ago I upgraded my 4GL, SQL and SE database development > products to 4.00.UE1. The software was running under SCO Xenix 2.3.2. > Right after doing that I wrote a program from scratch using the programmers > environment of 4GL. I did a MODULE, NEW, typed about 100 lines of code, > saved, COMPILE, RUNABLE. The compile started but almost immediately stopped > with "Press Return to Continue". > I lost my source and Informix dumped core. I re-typed everything and tried > it again with the same results. I then called Informix tech support who > said there was no way it could be their problem (I had heard this many > times before and wasn't surprised). > I looked closely at the source and found a typo (forgot an underscore or > something) saved, recompiled and it WORKED! It was something in my source > code that caused Informix to bomb on the first compiler pass. I called > tech support told them how I could reproduce it and was told they'd look > into the problem. > Soon after that phone call I learned that the company I worked for had been > sold and there would be no new development other than the conversion program > to the new machine. I wrote that program without any problems. > I just purchased the software from the old company and am currently starting > another project. I have already written 3 or 4 programs without incident. I > was just bitten by the same bug of a year ago. This time I narrowed it down > to ANY variable ending with "_no", as in p_foxlic.hm_phone_no. I changed > the name to p_foxlic.hmphone and everything worked fine. I continued to > build on this program and the problem is happening again. This time I can't > find out what the heck is causing the problem. > [questions deleted] I can tell you that I had a similiar problem using 4GL 1.10 a year ago. At that time, Tech Support told me it wasn't their problem, and as I learned after following their suggestions, it *wasn't* Informix's problem! As stated in the User Guide for 4GL version 4.00, page 3-7, "Variable names can be from 1 to 18 characters long. You must make the first 8 characters unique since INFORMIX-4GL regards only the first 8 characters as significant." The next sentence sheds even more light on the problem: "If you have the INFORMIX-4GL C Compiler Version, some compilers and linkers treat only the first 7 characters of global variables as significant." The problem I had was a module that wouldn't compile. The reason it wouldn't compile was because I had several variables with names that were identical in their first 8 characters. Informix Tech Support told me that it was caused by my system's C compiler. After looking in my system's documentation on the compiler, I discovered that I had to make my variable names unique in their first 8 characters. Since that time, I never bother to make variables longer than 8 characters. Yes, the 4GL compiler will let you make them up to 18 chars long, but it's just too much effort to coin long names that are consistently unique in their first 8 characters. Looking at the example names you gave above, notice their lengths: p_foxlic.hm_phone_no p_foxlic.hmphone 12345678... 1234567 I doubt that your compiling problem has anything whatsoever to do with names that end in "_no" or in multiples of 4 (as another List member suggested). (BTW, my system is a Unisys (Sperry) 5000/80 running AT&T Unix version V.3.2) To be on the safe side, I suggest these two things: (1) Limit your variable names to the lengths that your system's C compiler allows. (2) Have fun coining short variable names. Bye for Now, =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= John Baker USAISC - Lex Phone: (606) 293-3644 or 293-3743 Lexington - Blue Grass Army Depot DSN: 745-3644 or 745-3743 Lexington, KY 40511-5109 E-mail: jbaker@lexington-emh2.army.mil =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=