home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!swrinde!emory!emory!not-for-mail
- From: obelix.informix.com!johnl@emory.mathcs.emory.edu (Jonathan Leffler)
- Newsgroups: comp.databases.informix
- Subject: I4GL Modifications: Part 1 of 3
- Date: 22 Jan 1993 23:18:09 -0500
- Organization: Mailing List Gateway
- Lines: 963
- Sender: walt@mathcs.emory.edu
- Distribution: world
- Message-ID: <1jqgu1INN8di@emory.mathcs.emory.edu>
- Reply-To: obelix.informix.com!johnl@emory.mathcs.emory.edu (Jonathan Leffler)
- NNTP-Posting-Host: emory.mathcs.emory.edu
- X-Informix-List-ID: <list.1813>
-
- : "@(#)shar2.c 2.3 92/11/05"
- #!/bin/sh
- # shar: Shell Archiver (v1.22)
- #
- # This is a shell archive.
- # Remove everything above this line and run sh on the resulting file
- # If this archive is complete, you will see this message at the end
- # "All files extracted"
- #
- # Created: Fri Jan 22 19:12:20 1993 by jl at JLSS
- #
- # This is part 1 of a multipart archive
- # do not concatenate these parts, unpack them in order with /bin/sh
- # Files archived in this archive:
- # i4glmods
- #
- if test -r s2_seq_.tmp
- then echo "Must unpack archives in sequence!"
- next=`cat s2_seq_.tmp`; echo "Please unpack part $next next"
- exit 1; fi
- echo "x - i4glmods"
- sed 's/^X//' << 'SHAR_EOF' > i4glmods &&
- X
- X *********************************************
- X ** SUGGESTED MODIFICATIONS TO INFORMIX-4GL **
- X *********************************************
- X
- XDisclaimer:
- X Despite the fact that I work for Informix Software in the UK, this list
- X of suggestions does not have any more substance than you care to give
- X it by materialising it on your screen, or by placing it on paper. It
- X must not be taken as any sort of indication of an official stance by
- X Informix Software.
- X
- XMost of the suggestions in this list have been collated from the recent
- Xdiscussions on comp.databases.informix and the mailing list run by Walt
- XHultgen (walt@rmy.emory.edu); a few have been collected from other sources.
- XI claim no credit for the basic requirements stated below, though the
- Xstatement below is mainly in my own words. If people desparately want to
- Xclaim the idea, please send me an abbreviated version of this document with
- Xthe ideas to which you lay claim suitably annotated. I will try to include
- Xyour claims in any future version of the document. Bear in mind that more
- Xthan one person may have made the same suggestion -- in fact, that is
- Xgenerally the case.
- X
- XThis is a long document. To try and help make it manageable, it is split
- Xinto several sections. The first section is the preamble you're reading
- Xnow. The second section is a brief statement of the features -- one line
- Xindicating what is required for each feature. The items in this section
- Xare rated for plausibility with a letter in the set A-F with A good and F
- Xbad. An A-rated idea generally fits closely with the existing language,
- Xshould be easy to implement, and would be widely used. An F-rated idea
- Xprobably does violence to the spirit of the existing language, would be
- Xhard to implement, and might not be widely used. This scale is completely
- Xsubjective. The third section expands on each of the ideas in the second
- Xsection. Sometimes it proposes chunk of language syntax; this should be
- Xtaken as a suggestion, and you should consider sending in a revised
- Xversion. Whenever you do this, please bear in mind the requirements for
- Xbackwards compatability -- this will frequently disallow what would
- Xotherwise be desirable syntax.
- X
- XNotation: I4GL refers to both Informix-4GL and Informix-4GL RDS. R4GL
- Xmeans I4GL-RDS, and C4GL means (compiled) I4GL when a distinction is
- Xnecessary. ID means Informix-4GL Interactive Debuggger, but no suggestions
- Xhave been received concerning that. ISQL means Informix-SQL but does not
- Xfigure prominently in the discussion. The database engines are OnLine and
- XSE; all of the features discussed here are applicable regardless of which
- Xengine the application uses. A 4GL facility is a high-level, possibly
- Xnon-procedural, construct which is typically to do with screen or database
- Xhandling. A 3GL facility is normally analogous to the features found in an
- Xordinary programming language such as C, C++ or Ada. CDI refers to the
- Xnewsgroup comp.databases.informix and the mailing list.
- X
- XUnderlying assumption: it is assumed that any program which compiles and
- Xruns correctly under C4GL should also compile and run correctly under R4GL,
- Xand vice versa.
- X
- XWHAT SHOULD YOU DO WITH THIS MESSAGE?
- X
- X1: Save it.
- X
- X2: Read it. Contemplate it. Contemplate your navel. Let me know if you
- X find your navel helpful.
- X
- X3: If you disagree with one (or more) of the ideas in this document, send
- X me a message with clear identification of the idea to which you are
- X referring (they all have a number -- see below), and why you think it is
- X all wrong, and what should be done to fix it.
- X
- X4: If your favourite idea is languishing in Class D or E or F, then you
- X probably haven't made it sufficiently clear what you are asking for.
- X Please send revised details to me.
- X
- X5: If you think something is missing, put together a proposal along the
- X same lines as this document, and send it to me.
- X
- X6: Since it is intended to be a discussion document, please also send your
- X idea to the comp.databases.informix for general consideration. I will
- X be pleased to receive non-broadcast mail, but this is for general
- X discussion and as more people consider them, the ideas gradually get
- X improved. In this case, the more minds applied, the better.
- X
- X----------------------------------------------------------------------
- X
- XBRIEF STATEMENT OF IMPROVEMENTS
- X
- XA quick count shows about 120 requests. These have been grouped into
- Xseveral subsets, and each request has been given a number of the form
- XI4GL-axx where "a" is a letter indicating which subset the request has been
- Xgrouped with, and "xx" is a 2-digit number to identify the request in the
- Xsubset. The number of a request does not reflect its status in any way.
- X
- X Engines I4GL-Exx
- X Tools I4GL-Txx
- X 3GL I4GL-Lxx
- X SQL I4GL-Sxx
- X Reports I4GL-Rxx
- X Menus I4GL-Mxx
- X PROMPT I4GL-Pxx
- X Forms I4GL-Fxx
- X Windows I4GL-Wxx
- X INPUT I4GL-Ixx
- X DISPLAY ARRAY I4GL-Dxx
- X INPUT ARRAY I4GL-Axx
- X CONSTRUCT I4GL-Cxx
- X Picklists I4GL-Kxx
- X
- XENGINES
- X
- XThese requests are really requests for changes in the database engines
- X(OnLine and SE), rather than the tools (I4GL, ISQL), even though they arise
- Xout this I4GL discussion. The list of requests here could be substantially
- Xextended if it were not that the focus of the discussion is I4GL.
- X
- XI4GL-E01: Control who can create databases in an OnLine system.
- XI4GL-E02: support for multiple databases with the same name under Online.
- XI4GL-E03: Name of SET EXPLAIN log file set by environment variable.
- XI4GL-E04: Ability to discover name of current database.
- XI4GL-E05: Addition of comments columns to certain system tables.
- XI4GL-E06: Systables should record time when table was last modified.
- X
- XTOOLS
- X
- XThese requests relate to the tools provided with I4GL. It does not address
- Xthe tools which should be provided with the engines.
- X
- XI4GL-T01: Library support for R4GL.
- XI4GL-T02: Upgrade UPSCOL.
- XI4GL-T03: Programmers environment consistent between C4GL and R4GL.
- XI4GL-T04: Programmers environment aware of forms and message files.
- XI4GL-T05: Programmers environment upgraded.
- X
- X3GL FEATURES
- X
- XThese requests relate to basic programming features which are more related
- Xto standard 3GL languages than the 4GL features of I4GL.
- X
- XI4GL-L01: Fix error -4518 properly.
- XI4GL-L02: General dynamic arrays.
- XI4GL-L03: Passing arrays by reference.
- XI4GL-L04: Remove size limits on strings passed to/from functions.
- XI4GL-L05: Proper user-defined types (especially record types).
- XI4GL-L06: Initialised data.
- XI4GL-L07: Record comparison.
- XI4GL-L08: Record assignment when records contain blobs.
- XI4GL-L09: Remove petty syntax restrictions.
- XI4GL-L10: Get key stroke (fgl_getkey).
- XI4GL-L11: Locale support for MONEY.
- XI4GL-L12: 8-bit characters.
- XI4GL-L13: Unicode support.
- XI4GL-L14: Multi-currency support.
- XI4GL-L15: Multiple globals files in a single module.
- XI4GL-L16: Conditional compilation and preprocessor support.
- XI4GL-L17: Access to __FILE__, __LINE__, __FUNCTION__.
- XI4GL-L18: Functions to get components of datetime or interval in integer.
- XI4GL-L19: USER, TIME, TODAY, CURRENT should be usable everywhere.
- XI4GL-L20: Explanation of interaction between TZ and DATETIME.
- XI4GL-L21: Private functions and variables.
- XI4GL-L22: Error return from STARTLOG if failed to open log file.
- XI4GL-L23: Better recording of errors in error log (especially user-id).
- XI4GL-L24: Bottom tested loop: REPEAT <statements> UNTIL <condition>
- XI4GL-L25: Loop-and-a-half: DO <stmts> WHILE <condition> <stmts> END DO
- XI4GL-L26: Allow use of DATE type as index of FOR loop.
- XI4GL-L27: Dynamic key mappings.
- XI4GL-L28: Cursors, windows, forms, attributes, key name variables.
- XI4GL-L29: User-defined symbolic constants.
- XI4GL-L30: Provide full object-orientated support.
- XI4GL-L31: Treat adjacent strings as a single string (as in ANSI C).
- XI4GL-L32: Allow defaults to be declared explicitly as well as implicitly.
- XI4GL-L33: Provide an ELSIF (or ELIF) keyword.
- XI4GL-L34: Format control for exponential notation decimal numbers.
- XI4GL-L35: Call functions by name.
- X
- XSQL FEATURES
- X
- XThese requests relate to modifications in the way SQL statements would be
- Xtreated.
- X
- XI4GL-S01: FOREACH c_cursor USING variablelist-1 INTO variablelist-2.
- XI4GL-S02: Support for recursive algorithms with cursors.
- XI4GL-S03: INPUT CURSOR and DISPLAY CURSOR.
- XI4GL-S04: CREATE TEMP TABLE LIKE.
- XI4GL-S05: UPDATE BY NAME.
- XI4GL-S06: Mismatch between compile-time typing and run-time typing.
- X
- XREPORTS
- X
- XThese requests relate to reports. There are some overlaps with some of the
- Xother sections.
- X
- XI4GL-R01: Dynamically configure size of report.
- XI4GL-R02: Handle multiple word-wrapped fields on one PRINT line of report.
- XI4GL-R03: Report with output to a 4GL window with scrolling capability.
- XI4GL-R04: Multiple concurrent invocations of a single report.
- XI4GL-R05: Control over trailing blank lines and trailing blanks on lines.
- X
- XMENUS
- X
- XI4GL-M01: Vertical menus.
- X
- XPROMPT
- X
- XI4GL-P01: PROMPT should include EXIT PROMPT and CONTINUE PROMPT
- XI4GL-P02: PROMPT should include BEFORE PROMPT and AFTER PROMPT
- XI4GL-P03: PROMPT should provide validation of data.
- XI4GL-P04: PROMPT "Password: " FOR passwd WITHOUT ECHO.
- X
- XFORMS
- X
- XThese requests relate to forms. There is considerable overlap with the
- Xfollowing sections.
- X
- XI4GL-F01: Built-in support for multi-screen forms.
- XI4GL-F02: Support for word-wrapped fields in screen arrays.
- XI4GL-F03: Eliminate the need for [|] markers in forms.
- XI4GL-F04: Vastly improved PICTURE attribute handling.
- XI4GL-F05: Horizontally scrolling char fields.
- XI4GL-F06: 2-dimensional screen arrays.
- XI4GL-F07: Control row-major or column-major ordering for matrixes of fields.
- XI4GL-F08: Dynamically hide screen fields (in forms) completely.
- XI4GL-F09: Alternative control of NEXT FIELD NEXT, NEXT FIELD PREVIOUS.
- XI4GL-F10: Specify "NEXT FIELD fieldname" outside scope of INPUT {ARRAY}.
- XI4GL-F11: Get size of current form.
- XI4GL-F12: Get name of current form.
- XI4GL-F13: Get size of screen array.
- XI4GL-F14: Get field names of screen record or screen array.
- XI4GL-F15: Document support for screen dumps
- XI4GL-F16: Ability to distinguish between a blank and a null field.
- XI4GL-F17: DISPLAY FORM should set display attributes of fields.
- X
- XWINDOWS
- X
- XThese requests relate to windows. There is considerable overlap with the
- Xother sections.
- X
- XI4GL-W01: MENU/PROMPT/COMMENT/ERROR LINE OFF in windows.
- XI4GL-W02: Get size of current window.
- XI4GL-W03: Get name of current window.
- XI4GL-W04: Allow for seamless joins between bordered windows on screen.
- X
- XINPUT
- X
- XThese requests relate to the INPUT statement. There is considerable
- Xoverlap with the DISPLAY ARRAY and INPUT ARRAY sections.
- X
- XI4GL-I01: Dynamic control of display attributes for individual fields.
- XI4GL-I02: Dynamic control of NOENTRY/ENTRY/REQUIRED for individual fields.
- XI4GL-I03: Simpler switch from INPUT to INPUT ARRAY in master/detail screens.
- XI4GL-I04: The help facility should appear in defined window.
- XI4GL-I05: Determine the current value of any OPTION and reuse the value.
- XI4GL-I06: Add field_changed() function
- X
- XDISPLAY ARRAY
- X
- XThese requests relate to the DISPLAY ARRAY statement. There is considerable
- Xoverlap with the INPUT and INPUT ARRAY sections.
- X
- XI4GL-D01: Dynamic control of display attributes for individual fields.
- XI4GL-D02: Positioning of first active row in program array.
- XI4GL-D03: Positioning of first active row in screen array.
- XI4GL-D04: Positioning of current active row in program array.
- XI4GL-D05: Positioning of current active row in screen array.
- XI4GL-D06: HELP clause for DISPLAY ARRAY.
- XI4GL-D07: BEFORE DISPLAY, AFTER DISPLAY clauses.
- XI4GL-D08: BEFORE ROW and AFTER ROW clauses.
- XI4GL-D09: Move faster than row/page at a time through an array.
- XI4GL-D10: Current row highlighted automatically.
- XI4GL-D11: Display a subset of the elements in a program array.
- X
- XINPUT ARRAY
- X
- XThese requests relate to the INPUT ARRAY statement. There is considerable
- Xoverlap with the INPUT and DISPLAY ARRAY sections.
- X
- XI4GL-A01: Ability to have current row highlighted automatically.
- XI4GL-A02: Dynamic control of display attributes for individual fields.
- XI4GL-A03: Dynamic control of NOENTRY/ENTRY/REQUIRED for individual fields.
- XI4GL-A04: Positioning of first active row in program array.
- XI4GL-A05: Positioning of first active row in screen array.
- XI4GL-A06: Positioning of current active row in program array.
- XI4GL-A07: Positioning of current active row in screen array.
- XI4GL-A08: Enable/disable INSERT and DELETE key.
- XI4GL-A09: Dynamic control of effective size of program array.
- XI4GL-A10: Program-controlled INSERT and DELETE operations.
- XI4GL-A11: Program override of user's INSERT and DELETE operations.
- XI4GL-A12: Move faster than row/page at a time through an array.
- XI4GL-A13: Display a subset of the elements in a program array.
- XI4GL-A14: Duplicate suppression during input.
- XI4GL-A15: Allow cursor out of all-blank row.
- XI4GL-A16: Better control of rows changed during INPUT ARRAY WITHOUT DEFAULTS.
- X
- XCONSTRUCT
- X
- XI4GL-C01: Re-instate AUTONEXT in CONSTRUCT.
- XI4GL-C02: Fix get_fldbuf so it returns and restores all of a condition.
- X
- XPICKLISTS
- X
- XPicklists are related to, but different from, DISPLAY ARRAY statements.
- X
- XI4GL-K01: Provide picklists.
- X
- X----------------------------------------------------------------------
- X
- XEquivalent features:
- X
- XSome of the requests are equivalent to each other. They are either
- Xdirectly equivalent because they are verbatim copies of a request which
- Xalso appears in another context, or they are indirectly equivalent because
- Xwhen one of the group is implemented, the other should be implemented at
- Xthe same time. This list is not necessarily complete.
- X
- XSet 1: I4GL-A02 I4GL-D01 I4GL-I01
- XSet 2: I4GL-A03 I4GL-I02
- XSet 3: I4GL-A04 I4GL-A05 I4GL-A06 I4GL-A07 I4GL-D02 I4GL-D03 I4GL-D04 I4GL-D05
- XSet 4: I4GL-A12 I4GL-D09
- XSet 5: I4GL-A13 I4GL-D11
- XSet 6: I4GL-L02 I4GL-L03
- XSet 7: I4GL-L11 I4GL-L14
- XSet 8: I4GL-L12 I4GL-L13
- X
- XPlausibility ratings:
- X
- XClass A: I4GL-A04 I4GL-A05 I4GL-A06 I4GL-A07 I4GL-A08 I4GL-A09 I4GL-A10
- X I4GL-A11 I4GL-A13 I4GL-C02 I4GL-D02 I4GL-D03 I4GL-D04 I4GL-D05 I4GL-D10
- X I4GL-D11 I4GL-E03 I4GL-F02 I4GL-F13 I4GL-F15 I4GL-L01 I4GL-L03
- X I4GL-L06 I4GL-L09 I4GL-L10 I4GL-L15 I4GL-L19 I4GL-L20 I4GL-L26
- X I4GL-L29 I4GL-L31 I4GL-L33 I4GL-P01 I4GL-P02 I4GL-P03 I4GL-P04
- X I4GL-R01 I4GL-R02 I4GL-S01 I4GL-T03 I4GL-T04 I4GL-W01
- XClass B: I4GL-A01 I4GL-A02 I4GL-A03 I4GL-D01 I4GL-D06 I4GL-D07 I4GL-D08
- X I4GL-E04 I4GL-E05 I4GL-E06 I4GL-F04 I4GL-F09 I4GL-F10 I4GL-I01
- X I4GL-I02 I4GL-K01 I4GL-L04 I4GL-L05 I4GL-L07 I4GL-L18 I4GL-L21
- X I4GL-L22 I4GL-L23 I4GL-L24 I4GL-L30 I4GL-L32 I4GL-S02 I4GL-T01
- X I4GL-T02 I4GL-W02 I4GL-W03
- XClass C: I4GL-A12 I4GL-A15 I4GL-E01 I4GL-F01 I4GL-F05 I4GL-F07 I4GL-F08
- X I4GL-F17 I4GL-I05 I4GL-I06 I4GL-L02 I4GL-L11 I4GL-L12 I4GL-L13
- X I4GL-L14 I4GL-L16 I4GL-L17 I4GL-L25 I4GL-L27 I4GL-L28 I4GL-L34
- X I4GL-R05 I4GL-T04 I4GL-W04
- XClass D: I4GL-A14 I4GL-E02 I4GL-F03 I4GL-I04 I4GL-L08 I4GL-R03 I4GL-L35
- XClass E: I4GL-D09 I4GL-F11 I4GL-F12 I4GL-F14 I4GL-M01 I4GL-S03 I4GL-S04
- X I4GL-S05 I4GL-S04
- XClass F: I4GL-A16 I4GL-C01 I4GL-F06 I4GL-I03 I4GL-R04 I4GL-S06 I4GL-F16
- X
- X----------------------------------------------------------------------
- X
- X *************************
- X ** DETAILED DISCUSSION **
- X *************************
- X
- XENGINES
- X
- XI4GL-E01:
- X At the moment, anybody can create their own database in an OnLine
- X system, and can use arbitrary amounts of disk space for their tables by
- X specifying suitable initial extent sizes. Informix OnLine system
- X administrators should be able to control who can create databases in an
- X OnLine system. This is so they can ensure that that valuable disk
- X resources are not consumed. The control should extend to allowing an
- X individual to create tables in some DBspaces. Similar control should
- X be available for blobspaces (and optical partitions). The default
- X control should be as lax as it is now to allow for backwards
- X compatability.
- X
- X I4GL-E01 was rated in class C because although it is quite important,
- X it is not easy to see how the permissions would be properly controlled.
- X
- XI4GL-E02:
- X With SE, it is possible to have multiple databases all with the same
- X name but located in different directories. The same suite of programs
- X can be used to manipulate any of the databases simply by setting the
- X DBPATH environment variable. This setup is particularly common for
- X accounting systems where there are multiple legal companies run by one
- X parent company on one computer system. With OnLine, you can only have
- X one database with a given name in any one instance of OnLine. The
- X direct analogue of the SE scenario would be to have multiple OnLine
- X systems, each with a different tbconfig file. However, the resources
- X required for this are very large. It is ludicrous to think of using
- X ths technique for a 20-company machine! The only available alternative
- X is to modify the programs so that they take a database name either as a
- X parameter or from an environment variable and open the correct
- X database. This leaves a minor problem when compiling I4GL programs --
- X a database is needed for the non-procedural database statement. Unless
- X the MAIN program is compiled in a file without a non-procedural
- X database statement in it, some database will be opened automatically on
- X startup and then closed before the correct database is opened after
- X all.
- X
- X I4GL-E02 was rated in class D because there is neither an easy solution
- X nor any urgent need to implement one.
- X
- XI4GL-E03:
- X At the moment, the output from SET EXPLAIN ON goes into a file with a
- X fixed name "sqexplain.out". If several users are debugging in the same
- X directory at once, the traces of their programs gets interleaved,
- X making it unnecessarily difficult to track what was happening. The
- X simplest improvement would be to allow the name of the SET EXPLAIN log
- X file to be set by an environment variable. It would be helpful if it
- X each entry was given a timestamp and a user name as well.
- X
- X I4GL-E03 was rated in class A because there is an easy solution and it
- X is needed.
- X
- XI4GL-E04:
- X It is not possible to determine the name of the current database by
- X making enquiries from within the program. With OnLine, it would not be
- X very difficult to provide a dummy entry in Systables which defined the
- X name of the database (like the version entry and the MODE ANSI entry).
- X This would be more difficult to do satisfactorily in SE because the
- X database can be renamed by simply moving the database directory. If
- X the operating system supports symbolic links, then the database can
- X actually be known by multiple different names simultaneously! However,
- X when the database was created, the name could be entered, and if a
- X RENAME DATABASE command was provided (the subject of a completely
- X separate FR), it would update the entry in Systables.
- X
- X I4GL-E04 was rated in class B because there is a fairly easy solution
- X though it involves another minor modification to the semantics of the
- X system catalogue.
- X
- XI4GL-E05:
- X It should be possible to record in the system catalogue the reason why
- X a table, column or index exists by adding a comment. DB2 supports this
- X via the COMMENT command. Informix could support it by adding a
- X comments column to certain system tables. The minimum set includes
- X Systables, Syscolumns, Sysindexes. You can argue whether Systriggers
- X and Sysconstraints need extra comments, since the decoded constraint
- X and trigger is usually reasonably clear. Sysprocedures already has a
- X sort of comment facility, but it should be made uniform with the
- X facilities for the other comments. Maybe it should be handled by a
- X Syscomments table which has a serial column as primary key, and the
- X other tables can store a cross-reference to an entry in the Syscomments
- X table. This has the merit of avoiding VARCHAR fields in the main
- X system catalogue, and also of avoiding a frequently unused, long CHAR
- X column in the catalogues.
- X
- X I4GL-E05 was rated in class B because there is a fairly easy solution
- X though it involves another minor modification to the semantics of the
- X system catalogue.
- X
- XI4GL-E06:
- X The column Systables.Created records the date when the table was
- X created or last altered. It would be helpful if Systables recorded the
- X time when it was changed as well as the date, so that it would be
- X possible to tell whether software needs to be recompiled because of a
- X change in a table since it was last compiled. If the software was last
- X compiled on the same day as the table was modified, it is not possible
- X to tell whether it was compiled before or after the change. The
- X timestamp could either be a DATETIME (self-consistent) or a Unix
- X timestamp (an INTEGER quantity) and more readily comparable with the
- X timestamps on a file.
- X
- X I4GL-E06 was reated in class B because it would be easy to do and
- X useful.
- X
- X----------------------------------------------------------------------
- X
- XTOOLS
- X
- XI4GL-T01:
- X C4GL can make use of the libraries provided by the C compiling system
- X on the machine where development takes place. Libraries are
- X fundamental to good working practices on a large project (or on
- X multiple projects) as they allow code to be reused. R4GL code cannot
- X be placed in libraries because there is no linker facility which
- X understands libraries. This should be provided.
- X
- X There are several design considerations to take into account. For
- X example, should the library containing the R4GL object files have the
- X same structure as the system archive or should it be proprietary to
- X Informix? If it uses the system archive command, then all the
- X different archive formats have to be understood (and there are at least
- X 4 possible formats to consider). However, if the system archive format
- X is used, the system MAKE program could then also be used to maintain
- X the archives since it would understand the archive format too. If a
- X custom Informix format was provided, then Informix would also need to
- X provide a version of MAKE which would understand both the Informix
- X archive format and the system archive format. So, it seems clear that
- X the system archive format should be used.
- X
- X Using the system archive means the Infomrix will have to write a
- X program analogous to RANLIB. RANLIB periodically made its way into and
- X out of AT&T Unix, and is still a feature of BSD Unix. RANLIB adds an
- X archive file to the front of the archive which identifies the symbols
- X defined in the archive, and the offset within the archive of the
- X archive file header for the object file defining the symbol. It is
- X reasonable to require that any given archive either contains R4GL
- X object files or C4GL (and C, ...) object files and not a mixture of the
- X two. If this is not done, then both RANLIB and the Informix equivalent
- X program will try to place their symbol file at the start of the
- X archive, and each of them would break down after the other had been run
- X (unless some very careful design was used to ensure that this was not a
- X problem!). Additionally, both programs would have to be run on the
- X archive within a short enough space of time for both of them to
- X consider that their symbol tables were fully up to date. That probably
- X means during the same second, which is not feasible in general.
- X
- X The symbol file is used by the linker to determine what files are to be
- X selected from the library. The linker program should emulate the
- X standard C loader command, taking options to indicate the output file,
- X the object files to be linked unconditionally, and the libraries to be
- X searched for other undefined symbols. Note that, unlike the loader for
- X a C program, the R4GL linker cannot complain about undefined symbols (by
- X default) because many of them are defined by the interpreter itself,
- X including some user-defined symbols (and such gems as STATUS, SQLCA).
- X
- X I4GL-T01 was rated in class B because the need for such support is
- X urgent, and because the technology required to support it is not
- X singularly complex.
- X
- XI4GL-T02:
- X Version 4.00 of UPSCOL displayed tables with the owner of the table as
- X a prefix if you did not own the table. Version 4.10 of UPSCOL ignores
- X the owner of the table. However, since you can have two tables with
- X the same name but different owners in a mode ANSI database, this is not
- X a complete solution to the problem. Actually, UPSCOL 4.10.UC3 doesn't
- X work on a mode ANSI database at all -- it can't even create the
- X validation and attribute tables. UPSCOL needs serious attention,
- X because it is potentially a very useful program, but it remains
- X seriously flawed. It would also be nice if you could use it to add
- X comments about the purpose of tables and columns in the absence of
- X I4GL-E05.
- X
- X I4GL-T02 was rated in class B because the basic technology already
- X exists but is not really usable because UPSCOL was never properly
- X upgraded from version 1.10.03X.
- X
- XI4GL-T03:
- X With version 4.00 of R4GL, somebody made an important improvement to
- X the R4GL programmers environment so that you could specify the globals
- X files which were used by a program. This is very necessary if you are
- X going to use the facilities of Syspgm4gl, but the addition was only
- X half thought about. You cannot specify that a given source file uses a
- X particular globals file. And the same change was not made to the C4GL
- X programmers environment. This means that you cannot use Syspgm4gl to
- X compile the same program under both R4GL and C4GL and get working
- X executables out of both programs! And you can't create two separate
- X program entries with the program in the same directory because the
- X extension for the executable is not stored in the database. Ugghh!
- X
- X I4GL-T03 was rated in class A because the incompatability between the
- X two versions is unforgivable.
- X
- XI4GL-T04:
- X Neither programmers environment is aware of forms or message files, but
- X a complete program does depend on having both of those available. The
- X programmers environment should be upgraded to support these. While the
- X Syspgm4gl system is being upgraded, it should support version control
- X software (preferably both SCCS and RCS).
- X
- X I4GL-T04 was rated in class A because the existing facility is fine as
- X far as it goes, but it doesn't really help on big projects.
- X
- XI4GL-T05:
- X Since there can only be one Syspgm4gl database in an OnLine system,
- X neither programmers environment really supports working on multiple
- X projects. For example, the pathnames typically have to be hard-coded
- X and absolute; this makes creating a private version of the program
- X under a different directory into a major exercise as there is no
- X facility for duplicating a program. Likewise, moving a project around
- X is a pain too, but in reality, people develop software on MachineA at
- X their office and install the software on MachineB at the customers
- X site, and the location of the two sets of software is seldom in the
- X same place, so if the customer is going to take over the maintenance of
- X the software, all sorts of changes have to be made. To fix this
- X requires a major analysis of the database and the way it is likely to
- X be used.
- X
- X There are other problems with the database too. For example, there is
- X no table which identifies programs. Programs are identified by a
- X composite key consisting of the program name (10 bytes) and the program
- X path (40 bytes); this 50-byte key is used throughout the rest of the
- X database. A program table should be created which has a serial column
- X that is used in the other tables to identify the program.
- X
- X Maybe it would be better if instead of upgrading the development
- X environment (beyond making the C4GL and R4GL versions compatible), the
- X effort was spent on providing sets of rules for use with MAKE and
- X guidelines on how to use that instead.
- X
- X I4GL-T05 was rated in class C because the existing facility is fine as
- X far as it goes, but it doesn't really help with multiple projects when
- X there can only be one program database in a given OnLine system.
- X
- X----------------------------------------------------------------------
- X
- X3GL
- X
- XI4GL-L01:
- X This is one of a couple of bug fixes which are called out explicitly.
- X Error -4518 is "Out of temporary string space" or words to that effect.
- X This happens because (a) when strings are returned from a function,
- X they are limited to no more than 512 bytes each, (b) each returned
- X string is copied into the temporary string space, (c) the temporary
- X string space is not all released after every function returns, and (d)
- X the system only allows for up to 10 chunks of memory, each no more than
- X 512 bytes long. This makes it fairly easy to write code which runs out
- X of temporary string space, especially in 4.10 R4GL (which broke working
- X 4.00 C4GL code!). This problem must be completely resolved by the next
- X release of I4GL.
- X
- X I4GL-L01 was rated in class A because it is a bug which breaks previously
- X working code.
- X
- XI4GL-L02:
- X There are languages (though neither C nor C++ are among them) which
- X allow arrays to be sized dynamically. That means, in particular, that
- X you can call a function with an integer argument N, and the value of N
- X will be used to declare local arrays of dimension N. There are a few
- X occasions when this would be useful in I4GL.
- X
- X There are other languages (including C and C++) which allow you to
- X allocate new arrays dynamically. To supply this facility in I4GL would
- X require some modifications to the language to supply some support for
- X pointer types as it is very difficult to supply the functionality
- X without using pointers.
- X
- X I4GL-L02 was rated in class C because it would be very useful but does
- X not fit easily into the current model of I4GL.
- X
- XI4GL-L03:
- X Arrays should be made into first class variables; you should be able to
- X pass (by reference) arrays into functions. Not being able to do this
- X makes it very difficult to write some sorts of code. In particular,
- X library functions cannot work on user supplied arrays, so things like
- X generic sorting routines (even for one type of record) simply cannot be
- X written in I4GL.
- X
- X One of the biggest manually produced source files (as opposed produced
- X by a code generator) I've seen was a single file because it operated on
- X a single array. Because of the limitations on the number of globals
- X files in a single module (I4GL-L15), another globals file could not be
- X used to hide the information properly. So a single file was the only
- X solution, but it was ugly!
- X
- X I4GL-L03 was rated in class A because it would make a lot of programs very
- X much easier to code.
- X
- XI4GL-L04:
- X At the moment, there is a limit of 512 bytes on the size of the string
- X which can be passed into a function, or returned from a function.
- X Strictly, this is partly a documentation issue, because you can
- X actually pass an arbitrarily large character string into a function.
- X But, as discussed under I4GL-L01, you cannot pass arbitrarily large
- X strings back from a function. This is a considerable nuisance when the
- X program needs a function to build an arbitrarily complex query and return
- X the query string back again, and in other circumstances too. This problem
- X could be alleviated by passing a large character string into a function by
- X reference (so the called function could write directly on the space where
- X the calling function wants the answer, instead of having to copy it on to
- X the temporary string space stack and then copying it back off again).
- X
- X I4GL-L04 was rated in class B because it would make a lot of programs a
- X lot easier to write.
- X
- XI4GL-L05:
- X I4GL does not provide support for renaming types. This means that if
- X you ever have to build a record out spare parts, and you need both an
- X array of this type and a few single record variables, you have to be
- X very careful about how you edit either the declaration of the array or
- X the declaration of the singel variables. The only reliable way of
- X defining a record of the required type is to define a special view in the
- X database which contains no data but which has the correct structure
- X type, and then to define variables as shown below. This is doubly true
- X if the definitions are actually in two separate source files.
- X
- X DEFINE
- X arr1 ARRAY[30] OF RECORD LIKE Special_view.*,
- X var1 LIKE Special_view.*,
- X var2 LIKE Special_view.*
- X
- X I4GL should provide a full scale type defining mechanism. There are
- X enough languages to choose from when you do this (Pascal, C, Algol,
- X Ada, C++, ...) and it would certainly be nice to have some of the
- X object-orientated features of C++ added at the same time (I4GL-L30).
- X
- X I4GL-L05 was rated in class B because it would make a lot of programs
- X very much easier to write.
- X
- XI4GL-L06:
- X Most languages (including, for pity's sake, BASIC) manage to provide a
- X way of initializing variables without writing out screens full of
- X assignment statements which take up space in both the source and the
- X object files, not to mention in the main memory of the machine, and
- X which take time to execute when a better defined language would provide
- X the initialisation essentially for free. Both local variables and
- X external variables should be initializable.
- X
- X I4GL-L06 was rated in class A because it would make a lot of programs
- X so much easier to write and maintain.
- X
- XI4GL-L07:
- X Record assignments are supported (though see I4GL-L08); it would be
- X useful to be able to compare two records. Doing the job properly
- X manually is a pain, especially if you have to worry about nulls. Some
- X language support for this is long overdue.
- X
- X I4GL-L07 was rated in class B because it is relatively hard to do
- X properly, even though it would make many programs easier to write and
- X maintain.
- X
- XI4GL-L08:
- X There are a variety of restrictions on what can be done with records
- X containing blobs. One of the most irritating is that you cannot do
- X record assignment when a record contains blobs. To get around this, it
- X is customary to make the record holding blobs as small as possible so
- X that when an assignment is made, the manual copying of the other
- X components is either unnecessary or as limited as possible. It is not
- X clear what the correct semantics of copying blobs should be, especially
- X if the blobs are large, which is one of the main reasons why it is not
- X supported.
- X
- X I4GL-L08 was rated in class D because it is hard to define a sensible
- X set of semantics for the operator.
- X
- XI4GL-L09:
- X I4GL should allow any expression to be used anywhere. In C, you don't
- X have to worry about whether you can use the result of a function call
- X added to a subscripted variable as the index into an array -- of course
- X you can. Unfortunately, there are all sorts of petty restrictions on
- X what sorts of expression can be used where in I4GL. You cannot use a
- X subscripted variable as a subscript: array[pointer_array[i]] is not
- X allowed. You cannot use the result of a function call in a DISPLAY
- X statement: DISPLAY function_call() is not allowed. There is inadequate
- X distinction between the comma as a string concatenation operator and as
- X a list separator. (It should be better when I4GL supports the "||"
- X string concatenation operator which is part of Version 5.00 SQL.)
- X There are places where you can use a literal but not a variable; one of
- X the irritating ones is that the numbers indicating that the substring
- X to be returned in a SELECT statement cannot be variables (not even "?"
- X place markers) -- they have to be written directly into the text of the
- X SQL statement.
- X
- X I4GL-L09 was rated in class A because it is such a nuisance having to
- X remember where which particular forms of expression are permissible.
- X
- XI4GL-L10:
- X I4GL version 4.10 provided two useful functions, fgl_lastkey() and
- X fgl_keyval() which help a lot with identifying what on earth is going
- X on. However, when one wants to provide a vertical menu (amongst other
- X occasions), it would be very helpful to be able to get a single
- X character at a time. However, PROMPT FOR CHAR is no help because it
- X moves the cursor around the screen unpleasantly. Using INPUT on a
- X single character AUTONEXT field is no help because fgl_lastkey()
- X returns the value 2018 which stands for AUTONEXT. The existing DISPLAY
- X ARRAY is not flexible enough to do the required job (and probably
- X shouldn't be made to do it, though the upgraded version described below
- X would make life a lot easier than the current version does). So, I4GL
- X should provide a bolt-hole function fgl_getkey() which reads a
- X character and whose result can be interpreted using fgl_keyval().
- X
- X I4GL-L10 was rated in class A because it is trivial to provide it and
- X would make life so much easier for writing programs.
- X
- XI4GL-L11:
- X ANSI C defines routines setlocale() and localeconv() which provide
- X tremendously detailed information about how money values (in
- X particular) should be formatted for a particular locale. There is not,
- X regrettably, any standard routine which formats a numeric quantity
- X using those rules, though there is a de facto standard in "The Standard
- X C Library" by P J Plauger. However, I4GL is used in many international
- X locations, and should should be able to provide a mechanism for
- X handling formatting according to locale. See also I4GL-L14.
- X
- X I4GL-L11 was rated in class C because it can be provided by diligent I4GL
- X programmers, but it takes considerable effort.
- X
- XI4GL-L12:
- X One request in CDI was specifically for 8-bit character support,
- X especially in ISQL forms, which has been translated to I4GL for the
- X purposes of this exercise, though it is desirable that ISQL forms (and
- X reports) should give the same support. This is presumably to enable
- X 8-bit characters to be entered at a terminal and displayed, and stored
- X in the database and retrieved, and so on. See also I4GL-L13.
- X
- X I4GL-L12 was rated in class C because it is something which is likely
- X to happen anyway as the engines develop support for national languages
- X and so on. It is possible that I4GL-L12 should really be rated
- X in class A.
- X
- XI4GL-L13:
- X The new 16-bit Unicode character set (and possibly the 32-bit character
- X set, whatever it is called) should ideally be supported. However, it
- X is far from clear what this really means, so some research is required
- X before this can be implemented.
- X
- X I4GL-L13 was rated in class C because it is not clear what it entails.
- X Maybe it should really be rated in class D or E.
- X
- XI4GL-L14:
- X I4GL provides the environment variable DBMONEY, but there is no provision
- X in the language for handling multiple currencies. Maybe the best way of
- X handling this is via the locale mechanism of I4GL-L11, or maybe some other
- X mechanism is appropriate. Some sort of support is necessary.
- X
- X I4GL-L14 was rated in class C because it is something which can be coded
- X around, but it would be better if there was some proper support for it.
- X
- XI4GL-L15:
- X At the moment, any source file can only contain one statement of the
- X form: GLOBALS "file.4gl". This always was a remarkably silly
- X restriction as there is next door to no cost in allowing zero or more
- X such statements compared with the cost of allowing zero or one such
- X statements. The processing for the second and subsequent such
- X statements is identical to the processing for the first. And being
- X able to have multiple globals files would allow far better control over
- X the scope of globals, since each globals file would only define closely
- X related variables, and each source file which needed to use those
- X variables would only know about the variables it really needed to know
- X about. In general, it would vastly improve the quality of the software
- X which could be produced. (See also I4GL-L16, I4GL-L17.)
- X
- X I4GL-L15 was rated in class A because it is trivial to implement and
- X would make an improvement out of all proportion to the difficulty of
- X implementation.
- X
- XI4GL-L16:
- X I4GL sorely lacks any facility analogous to the C preprocessor. The
- X language should provide support for including header files which
- X contain definitions of types (I4GL-L05) and constants (I4GL-L29), or
- X conditional compilation.
- X
- X The C preprocessor is not really appropriate for use because its
- X comment conventions are different from I4GL (which already has 3
- X comment conventions, so a fourth, C compatible one is not a good idea),
- X and because it use an I4GL comment convention to indicate the
- X statements of interest to itself. Additionally, I4GL does not provide
- X support for identifying the line number in the original source file, so
- X the error message relating to line 3254 in the preprocessed source may
- X easily actually refer to line 456 in the unpreprocessed file
- X (I4GL-L17).
- X
- X An equivalent phase should be provided by the I4GL compilers, with
- X similar facilities.
- X
- X I4GL-L16 was rated in class C because it would take a certain amount of
- X implementation, but it would be very helpful.
- X
- XI4GL-L17:
- X The WHENEVER ERROR CALL function facility is not very helpful because
- X it is not possible to pass any information to the function, and that
- X includes any indication of where the error occurred. Admittedly, the
- X error is logged if you have an error log open (but see I4GL-L22,
- X I4GL-L23), and it is difficult to write the error handling code so it
- X reacts sensibly to the location, but then calling an error logging
- X function is not all that helpful because you probably have to set some
- X module or global variable to indicate that an error occurred, and then
- X check as if you had used WHENEVER ERROR CONTINUE, and since you can't
- X tell where the error occurred, you cannot log you error messages any
- X better. It would be helpful if a function called by WHENEVER ERROR
- X CALL was at least given the line number and file name (corresponding to
- X __LINE__ and __FILE__ in the C preprocessor) of the statement which
- X triggered the error, and the function name (__FUNCTION__?) would often
- X be helpful (if only because function names change less often than line
- X numbers in files, so different reactions could occur depending on which
- X function triggered the error). This could be done without change of
- X syntax since the existing error handling functions would simply ignore
- X the arguments which were provided, but new functions could use them
- X immediately.
- X
- X I4GL-L17 was rated in class C because it should be implemented as part
- X of implementing I4GL-L16, and I4GL-L16 was rated as class C.
- X
- XI4GL-L18:
- X There is not at present any mechanism for determining the hours part of
- X an interval. To do so, you have to convert the interval to just the
- X hours part, format that into a string, and convert the string into an
- X integer, which is a lot of unnecessary work. Similar comments apply to
- X all the other components of both interval and datetime values. With
- X intervals, it would also be helpful on occasion if there was a way of
- X converting an interval of type DAY TO FRACTION into the total number of
- X seconds, minutes, hours or days, where the result would be a decimal
- X value with an appropriate precision and scale. It is not clear whether
- X corresponding functions can be defined sensibly for datetime values.
- X These functions should also be made available to the ESQL languages.
- X
- X I4GL-L18 was rated in class B because it should not be very hard to do
- X and would improve the usabilty of datetime and interval types.
- X
- XI4GL-L19:
- X Early versions of I4GL allowed magic words like USER, TIME, TODAY and
- X CURRENT to be used in certain restricted contexts; TIME only in a
- X report, USER in a SQL statement, TODAY and CURRENT in most places.
- X Both USER and TIME should be usable anywhere. The other word in this
- X general category is SITENAME or DBSITENAME (synonyms); it is not clear
- X whether this should be allowed outside an SQL statement, but there is
- X no obvious reason why not, and it would provide uniform behaviour.
- X
- X I4GL-L19 was rated in class A because it should be easy to fix.
- X
- XI4GL-L20:
- X There is some interaction between the environment variable TZ and the
- X DATETIME value, because the US developers will not have develpoed
- X DATETIME working on GMT and here in GMT territory, the value of CURRENT
- X is normally correct. In 4.00, the interaction was not simple (it
- X didn't seem to change when you changed TZ), but 5.00 seems to use TZ.
- X This should be documented.
- X
- X I4GL-L20 was rated in class A because it is a simple change to the
- X documentation.
- X
- XI4GL-L21:
- X C provides static functions so that a file can control its external
- X interface. I4GL does not, but it should. While on the subject of
- X private objects, I4GL could also usefully provide the equivalent of
- X staic variables in C functions.
- X
- X I4GL-L21 was rated in class B because it should be easy to implement.
- X
- XI4GL-L22:
- X The function STARTLOG does not give any indication that it failed to
- X open the error log file. This means that when you go to use the log
- X file, your program stops out of control with an error about cannot
- X write to log file. To fix this, an alternative function is required
- X with a revised interface since trying to return a value where none is
- X expected will cause trouble in R4GL even if C4GL will survive. (See
- X also I4GL-L23.)
- X
- X I4GL-L22 was rated in class B because it is easy to fix.
- X
- XI4GL-L23:
- X The standard logged error message looks like:
- X
- X Date: 21/01/1993 Time: 15:57:41
- X Program error at "rrr.4gl", line number 7.
- X FORMS statement error number -1110.
- X Form file not found
- X
- X It would frequently be helpful if at the very least the user ID and
- X possibly the terminal id and/or process id were also recorded, because
- X it is usually the case that there are multiple users who are running
- X the program at the same time, and it can be difficult to determine
- X which user it was that had a particular problem. Other information
- X which would also be useful is the value of ARG_VAL(0), because
- X sometimes different programs use a common log file. A revised format
- X could look like the example below. The date has a timezone appended so
- X that if a user in California is using a database in the UK by remotely
- X logging into a machine in the UK, their local time is recorded (if they
- X have bothered to set TZ). It avoids the problem of the log file
- SHAR_EOF
- echo "End of part 1"
- echo "File i4glmods is continued in part 2"
- echo "2" > s2_seq_.tmp
- exit 0
-