ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ DB/C Newsletter ³ ³ January 1993 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Editor's Notes This issue of the newsletter is dedicated to the introduction of DB/C 8.0. This new release has been under development for the last 18 months and has been in beta test mode for five months. It will begin shipping at the end of this month. DB/C 8.0 includes many new features. Some of these features are quite complex. Over the coming months, we plan to use the DB/C Newsletter to explore DB/C 8.0. We will be attending the IDUG conference (see below) January 24th through 26th. We hope to see you there. DNW Subject, Wills & Company Introduces DB/C Release 8.0 The eighth major release of DB/C was announced today by Subject, Wills & Company. This release incorporates support for new hardware environments, portable graphical user interface (GUI) programming features, an end-user oriented report generator, a program generator system, many new DB/C language features, performance improvements, and an ANSI Standard DATABUS compliant compiler. New pricing and the upgrade policy for owners of previous releases of DB/C was also announced. DB/C Release 8.0 is available January 15th for MS-DOS and MS Windows 3.1 in standalone and LAN environments, for the Apple Macintosh, for AIX on IBM RS/6000 computers, for UNIX on 88open compliant computer systems and for UNIX 386 on all 386 ABI compliant computer systems. DB/C Release 8.0 will be available on February 1 for UNIVEL UNIXWARE, for HP UNIX on Hewlett-Packard 9000 computers, and for other UNIX systems. It will be available by May 1 for IBM OS/2 2.1 and for VMS on DEC VAX computers. It will be available for Windows NT on 386/486 systems when Windows NT becomes generally available. Support for new operating environments DB/C 8.0 for MS-DOS takes advantage of the memory and performance available 386 and 486 computers. Coupled with the new support for 8 MB of data area and 8 MB of program area, much larger programs may now be run under MS-DOS. DB/C 8.0 is new on MS Windows 3.1 and on the Apple Macintosh. Both of these versions of DB/C support portable GUI programming, as well as features native to each environment. DB/C 8.0 for OS/2 2.1 is a 32 bit, Presentation Manager application that supports portable GUI programming, as well as features native to OS/2 2.1. The UNIVEL UNIXWARE 386 version of DB/C 8.0 brings new flexibility to the concept of sharing files between workstations running different operating systems. In fact, using Novell Netware, DB/C programs running on MS-DOS workstations, MS Windows workstations, Apple Macintosh workstations, OS/2 2.1 workstations and UNIVEL UNIXWARE workstations may share files transparently. All file and record locking occurs without any source program changes or differences for any version of DB/C 8.0. Portable GUI programming DB/C 8.0 solves a major problem facing the programming profession today - the problem of writing an application for one GUI and then trying to port the application to another GUI. A DB/C 8.0 GUI program will run under MS Windows 3.1, under OS/2 2.1, and under the Apple Macintosh 7.0 or later without recompilation and without recreation of resources. This level of portability does not exist in any other language or development environment available today. This complete portability is accomplished by defining all menus, dialogs, windows, and controls in the source program in an operating system independent manner. This level of portability has been inherent for character mode applications since the inception of DB/C. It has now been extended to include all aspects of programming for GUI environments. ANSI Standard DATABUS compiler STDCMP is a new utility provided with DB/C 8.0. It is an ANSI Standard DATABUS compiler that compiles only Standard DATABUS. Object code produced by STDCMP runs under the same run-time facility, DBC, as object code produced by DBCMP, the DB/C language compiler. By using STDCMP, you can be assured that source programs will be portable to other ANSI Standard DATABUS implementations. The DB/C Report Writer The DB/C Report Writer is an end-user oriented report generator. The report design process and the report generation process were created with ease-of-use as the primary design criteria. The DB/C Report Writer provides both a flexible "ad hoc" retrieval, as well as production quality formatting and processing speed. To design a report, the user chooses the fields to be printed from a list of choices. The user chooses the sort order of the report and the selection criteria in a similar fashion. Other features include calculated fields, breaks between groups of records, subtotals and grand totals, field formatting, multi-file access (with implied links), optimized use of indexes, multi-line fields, and more. Reports created by the DB/C Report Writer may be displayed on the users screen, printed directly to a printer, or spooled to a file for later printing. The Fast Programming source code generator Fast Programming (FP) is an application development tool for use with DB/C. FP considerably shortens the time required to design and implement an application. Because it is an integrated development tool, it helps programmers develop error-free applications much more quickly when compared with traditional screen generators and code libraries. Unlike other programming tools which produce program fragments, FP generates error free, ready-to-compile programs. The major components of FP are the Data Dictionary and the Program Dictionary. Using these components, FP allows programmers to generate data entry programs and file maintenance programs. File definition include files may also be generated for use in custom-written programs. One of the most important features of FP is that programs can be regenerated without losing custom-written modifications. All custom DB/C source code is segregated into separate source modules by means of program exits. These exits allow the custom code to be logically inserted in the program. In this way, a programmer can alter the Program Dictionary and then regenerate the program without loss of modifications. Because of the program exits, there is never a need to modify the generated source programs. The consistent user interface is another advantage of using FP. The user interface is based on the commonly accepted IBM CUA interface. Program control is based on an action bar that contains pull-down menus on the top line of the screen. FP implements dialog boxes, list boxes, pop-up windows, and consistent use of color to create an efficient, modern user interface. DB/C language and run-time enhancements Maximum data area size and maximum program area size have been increased to 8 MB each. Expressions are allowed anywhere in a program that a literal is allowed. For example: RESET CHAR10 to ((J + 1) * K) Support has been added for all ALT, SHIFT and CTRL key combinations. Three new verbs have been added to control and sense the keys that cause KEYIN to terminate. These verbs are: SETENDKEY, GETENDKEY and CLEARENDKEY. The ANSI Standard method of printing to multiple files has been implemented. Spool files are declared with the PFILE verb. SPLOPEN, PRINT and SPLCLOSE can then optionally reference the PFILE to direct the printing to the desired destination. For example: PRINT1 PFILE PRINT2 PFILE SPLOPEN PRINT1, "file1.prt" SPLOPEN PRINT2, "file2.prt" PRINT PRINT1; "This line goes to file1" PRINT PRINT2; "This line goes to file2" SPLCLOSE PRINT1 SPLCLOSE PRINT2 Character and numeric arrays may be initialized by the variable declaration statement. For example: NARRAY NUM 6.2[4], INITIAL 1.25, 1.5, 1.75, 2 CARRAY CHAR 5[3, 2], INITIAL "A1", "A2", "B1", "B2", "C1", "C2" A new keyin-length control code has been added to KEYIN to allow character variables to be keyed into that are larger than the screen area that they consume. The following example shows a KEYIN statement for a 40 character wide variable, but only 30 character positions are used on the screen: CHARVAR CHAR 40 KEYIN *P10:3, *KL=CHARVAR:30 The KEYIN and DISPLAY verbs have been enhanced to allow control of the cursor status and shape. The new control codes are: *CURSOR=*ON *CURSOR=*OFF *CURSOR=*NORM *CURSOR=*BLOCK *CURSOR=*ULINE *CURSOR=*HALF The TRAP operation has been enhanced to allow a trap routine to execute at a specific time in the future. The TIMEOUT trap event causes a trap routine to execute at a specified number of seconds in the future. The TIMESTAMP trap event causes a trap routine to execute at a specific time. For example: N NUM "10" . ten seconds TRAP ROUTINE IF TIMEOUT N STAMP CHAR "1992123123595900" . one second before midnight TRAP NEWYEAR IF TIMESTAMP STAMP An improved method of formatting character and numeric data has been added. The new FORMAT verb and the new *FORMAT control code both cause an edit mask to be applied to a variable. *FORMAT is available in KEYIN, DISPLAY, WRITE and PRINT. Capabilities of format include: Replacement of the $ with a different currency character Replacement of the decimal point by a comma for currency formatting Implicit alignment of the decimal point in the edit mask Additional fill characters The new RECORD and RECORDEND data definition verbs have been added. These verbs allow for record templates to be defined. A record template can be referenced later for definition of different record variables that have the same constituent variables. The following example will create two sets of variables with names A.NAME, A.ADDR, A.CITY, A.STATE, A.ZIP and B.NAME, B.ADDR, B.CITY, B.STATE, B.ZIP: ADDRESS RECORD DEFINITION NAME CHAR 30 ADDR CHAR 20 CITY CHAR 15 STATE CHAR 2 ZIP CHAR 10 RECORDEND A RECORD LIKE ADDRESS B RECORD LIKE ADDRESS Data variables can now be declared anywhere in a program prior to its first use. Additionally, data variables may be local to a routine. The new ENDROUTINE verb defines the end of a routine. The existing ROUTINE and LROUTINE verbs define the start of a routine. Parameters may be declared immediately following the ROUTINE or LROUTINE verb. Routines may be nested and all variables are visible at any nesting level. In the following example X is a variable common to both routines, while the four Y and Z variables are all different variables: X NUM "5" CALL R1 USING X CALL R2 USING X STOP R1 ROUTINE Y Y NUM @ Z NUM "6" DISPLAY X, Y, Z RETURN ENDROUTINE R2 ROUTINE Y Y NUM @ Z NUM "7" DISPLAY X, Y, Z RETURN ENDROUTINE The new MAKEVAR verb allows variables to be dynamically created. The new MAKEGLOBAL verb allows global variables to be dynamically created. The following example creates an unnamed, local use character variable containing 30 characters, and a global numeric variable, named COMPANY: NEWVAR1 CHAR @ NEWVAR2 NUM @ MAKEVAR "C30" INTO NEWVAR1 MAKEGLOBAL "COMPANY:N4" INTO NEWVAR2 The new GETGLOBAL verb allows a program to dynamically reference a global variable. The reference is by name that can be dynamically created. For example: CURRENT NUM @ GETGLOBAL "COMPANY" INTO CURRENT STATESIZE, WINSIZE, SCRNSIZE and TRAPSIZE are new verbs that return the number of characters required for successful completion of STATESAVE, WINSAVE, SCRNSAVE and TRAPSAVE, respectively. Flags can now be included in expressions. For example: IF (A > B OR OVER) DISPLAY "ALL DONE" STOP ENDIF The new verb PLOADMOD allows a module to be permanently loaded. The new verb GETMODULES returns an array that provides a list of all currently loaded modules and instances. The new verb PUTFIRST allows an entry to be stored at the from of a queue. The new verb CLOSEALL closes all open files, devices and resources. The REPOSIT verb has been enhanced to work with AIM access. FPOSIT can be used to capture the current READKG/READKGP position. REPOSIT can now be used to reset the current READKG/READKGP position to any record in the current selection. Access to binary files is available without any special programming or linking. It is accomplished by adding the BINARY option to the FILE, IFILE and AFILE statements. The new COBOL option on FILE, IFILE and AFILE statements allows records to be read and written using implied decimal points. Three new verbs have been added to manipulate address variables. The TESTADR verb tests for the validity of the address stored in an address variable. The CLEARADR verbs stores the null (invalid) address value in an address variable. COMPAREADR compares the addresses stored in two address variables. The new verbs GETLABEL and TESTLABEL are available for enhanced manipulation of LABEL variables. GETLABEL returns the address of an external routine. TESTLABEL tests to see if a LABEL variable contains a valid address. The resize operator (!) used in expressions is new. The operator allows the programmer to control the implied size of the result of numeric or character expression evaluation. In the following example, the values of X and Y are displayed as if they were defined as NUM 7.4 variables: X NUM 5.2 Y CHAR 5 DISPLAY (X ! 7.4) MOVE 7.4 TO X DISPLAY ((NUM Y) ! X) Expressions may now be continued on the next line. The colon signifies that the expression is continued. The CLOCK verb is enhanced with two new operands. CLOCK CMDLINE returns the command line that started execution of the DB/C run-time. CLOCK LICENSE returns the serial number of the DB/C run-time. The DB/C source code debugger has been enhanced. All characters in large character variables may now be viewed. Conditional breakpoints are now available via the break on value command. The goto line number is a new debugger command. Elements of array variables can now be viewed with simple variables as their indexes. Utilities enhancements TDCMP is a utility new in DB/C 8.0. TDCMP is the terminal definition file compiler. It compiles existing terminal definition files and creates .tdf files for use by the DB/C run-time. EXIST is a utility new in DB/C 8.0. It provides a means of testing for the existence of a file. CHAIN has been enhanced with the addition of several new directives including: // OPEN, // READ, // WRITE, // REWRITE and // LOG. SORT, INDEX and the DB/C run-time now allow the collating sequence to be user-specified. In a similar fashion, AIMDEX and DB/C run-time allow the upper/lower case pairs to be user-specified. SORT now allows the unique record sort option which outputs one record for each group of records that have the same keys. AIMDEX, BUILD, INDEX, LIST, REFORMAT and SORT have been enhanced to allow record selection using strings of characters and OR logic. AIMDEX and INDEX have been enhanced to allow re-INDEX or re-AIMDEX of a file by using the command line parameters specified on the original INDEX or AIMDEX command line. The text file editor, EDIT, has several new features. The keystroke recorder concept has been expanded to allow recorded keystrokes to be stored into files and played back from files. Up to 9 files can be edited concurrently. Files can be swapped into the current window with a single keystroke. EDIT has been improved to function efficiently on slow, dumb terminals. Search, translate, window scroll, and tab handling are improved. Performance improvements DB/C programs execute between 5% and 15% faster when compiled with either of the Release 8.0 compilers (DBCMP or STDCMP). The MS-DOS 386 version of SORT, INDEX and AIMDEX may run noticeably faster when compared with the non-386 versions of SORT, INDEX and AIMDEX. On 386DX and 486 computers, the MS-DOS 386 version of the DB/C run-time executes source programs faster than the version 7 DB/C run-time. The amount of improvement depends on many factors. New pricing policy The pricing policy for DB/C has been changed to be based on the version of DB/C in use and on the number of concurrent users. Licenses are available for 1 user, 5 to 45 users in increments of 5 users, 50 to 90 users in increments of 10 users, and 100 and more users in increments of 20 users. This pricing is for users connected to a single computer, or connected to a local area network complex of computers located at a single site, but not to wide area connected systems. The prices are effective immediately. All purchases of DB/C 7.0 after January 1, 1993 will receive free upgrades to DB/C 8.0. IDUG Update The International DATABUS Users Group (IDUG) Conference and Exhibition is scheduled for January 24-26 in Scottsdale, Arizona. The schedule for the conference includes vendor specific conferences on on the 24th, the keynote address on 25th and various break-out sessions and forums on the 25th and 26th. The exhibition will feature booths of various vendors of DATABUS products and services. Subject, Wills & Company will host a DB/C seminar of January 24th from 1:00 pm to 6:00 pm. Planned topics include: DB/C 8.0 introduction and demonstration, a quick tutorial, a question & answer session, and DB/C futures. Subject, Wills & Company will be very involved in the conference and will have a booth at the exhibition. Plan to attend - it is a worthwhile event. For more information contact Tim Jenks at: Phone: (616) 242-0209 FAX: (616) 454-3939 Compuserve: 75360,1734 DB/C Class Schedule The next DB/C class has been postponed. It was previously scheduled to begin February 1, 1993, but as been rescheduled to begin February 22nd. The class is being expanded from three days to four, so the class dates will be February 22-25. As always, it will be held in the Oak Brook, Illinois office of Subject, Wills & Company. For more information, contact Judi Tamkevic at (708) 572-0240.