Converting 2.2 to 4.0
Posted in 1991
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Greetings to All We are interested in information about problems that others are having in porting INFORMIX 2.2 to 4.0. Below are some of the problems that we have discovered to date: Problem 1: DB Load function doesn't work the same! Discussion: Using a command file that was created and used with a previous release of DBLOAD, we were unable to perform the load. Using the '-s' option of DBLOAD, we received the following error: A FILE statement must be the first statement in the command file. This was an erroneous error, the FILE statement was the first line of the command file. Solution: Although the syntax of the DBLOAD statement is the same in the release 4.0 manuals, we found that using a FILE name undelimited by quotation marks would work, though this is in conflict with the examples in the manual. Problem 2: Clipping of strings causes duplication Discussion: In release 1.10 of 4GL, we commonly constructed MESSAGE and ERROR statements using CHAR variables. We would use the CLIPPED function to eliminate the trailing blanks in these variables and produce a clean MESSAGE or an ERROR statement. When we converted programs using CLIPPED in this manner to release 4.0, we found that instead of eliminating trailing spaces, the resulting string would be doubled. For example, a 20 CHAR variable contains the word 'MANNHEIM'. Using the CLIPPED function and displaying the result with a MESSAGE or an ERROR statement, the following was displayed: MANNHEIMMANNHEIM Solution: We found that creating larger CHAR variable composed of the desired CHAR variables and using the CLIPPED function could be done prior to the MESSAGE or ERROR statement. This variable could then be used in the MESSAGE or ERROR statement without the strange doubling occurring. Problem 3: A view seems to be executed every time it is called. Discussion: We had some difficulty moving a number of reports from release 1.10 of 4GL to release 4.0. Surprisingly the reports would take considerably longer to run under release 4.0 on an AT&T 3B2 than under release 1.10 on a 8 Mhz AT! In these reports, we used a pre-created VIEW to perform an initial select from the desired tables, and then used a CURSOR to select appropriate records from the VIEW to feed the report. Solution: Apparently optimization techniques have been changed under release 4.0. Using the release 4.0 'SET EXPLAIN ON', we observed that each time the VIEW was accessed by the CURSOR, it was recreated. We replaced the VIEW with a TEMP TABLE and found the processing time improved dramatically. In one report, the processing time went from 1:09:00 to 0:02:00. If you have encountered similar problems, or others, please respond. Thanks, Bob Kane P.S. We have just heard that release 5.0 is on the way. Oh no!!! -- Bob Kane Internet: tds-3b2-ug@worms-emh1.army.mil TechDyn Systems Voice: (049) 6241-7206 (Germany) Box 706 Fax: (049) 6241-500154 APO NY 09056