ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ DB/C Newsletter ³ ³ May 1993 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Editor's Notes The Public Review period for ANSI Standard DATABUS ends this month. There have been several comments formally received by CBEMA, the organization that provides the oversight of the ANSI Standard DATABUS committee, X3J15. Responses to these comments will be drafted in the June 1993 meeting of X3J15. If there are no unforeseen delays, DATABUS should be formally approved as an ANSI Standard by the end of 1993. We will keep you updated. Several issues have arisen because of changes in DB/C 8.0 for conformance with ANSI Standard DATABUS. Our second article in this month's newsletter is about some of these changes. It was quite enjoyable for me to meet with many customers of DB/C during my recent trip through eight countries in Europe. Some of the applications for which DB/C is being used were unusual and very interesting. It was also very gratifying for me to see the many libraries of User-Defined Verbs that people are creating. This particular feature of DB/C is a tremendous asset that other programming languages and 4GL environments do not possess. We will be talking at length about User-Defined Verbs and libraries in future newsletters. During my trip through Europe, there were several discussions about the future of DB/C. One of the near-term features that we plan to add to DB/C is portability between GUI and non-GUI environments. The first article in this month's newsletter is a summary of those plans. Communications about and in support of DB/C is a topic that has been discussed several times. On various occasions, I have asked about interest in moving the DB/C bulletin board to Compuserve. We are considering all options, including using the Internet as the communications medium. What are your feelings about either of these or any other options? We would appreciate any Tips or suggestions for topics you would like discussed in future newsletters. Also, if you are proud of your application (which I am sure you all are!), why not spend an hour writing about it so we can publish it in the DB/C In Use column in the next Newsletter. DNW Non-GUI to GUI Portability DB/C is an extremely portable application development environment. The fact that .DBC files, .TXT files and .ISI files have always been portable has been very beneficial to DB/C customers and end-users. With the advent of the programming features for GUI program development, the philosophy of portability was continued, but only within the group of GUI environments. Portability between the GUI and non-GUI worlds was not addressed. (There actually is portability now, but it is accomplished by causing the GUI environment to act like a non-GUI environment). The next release of DB/C will include a library of User-Defined Verbs that provide the screen, keyboard and mouse interface functionality needed to write actual production systems. This addresses the portability issue between GUI and non-GUI worlds by allowing the programmer to create systems without considering which environment the program will actually run in. The programmer writes programs using the new library of User-Defined Verbs. At run-time, these User-Defined verbs ascertain which environment (GUI or non-GUI) is being used and operate accordingly. One of these portable User-Defined Verbs is named DIALOGBOX. Here is its verb syntax definition: DIALOGBOX verb HORZ=nvarlit, VERT=nvarlit, WIDTH=nvarlit, LENGTH=nvarlit: H=nvarlit, V=nvarlit, POS=nvarlit:nvarlit: TEXT=cvarlit, CTEXT=cvarlit, FIELD=var: BUTTONGROUP, ENDBUTTONGROUP, BUTTON=var:cvarlit: BOXTABS=narray1: LISTBOX=nvarlit:nvarlit:carray1:nvarlit:nvar: DROPBOX=nvarlit:nvarlit:carray1:nvarlit:nvar: YESNO, YESNOCANCEL, CONTINUE: PUSHBUTTONPOS=nvarlit:nvarlit, PUSHBUTTONWIDTH=nvarlit: PUSHBUTTON=cvarlit: DEFPUSHBUTTON=cvarlit: ESCPUSHBUTTON=cvarlit: ROUTINE=label: PUSHBUTTONRESULT=nvar HORZ, VERT, WIDTH and LENGTH specify the size and position of the dialog box. H, V and POS specify the position of a control (except for push buttons) inside of the dialog box. Each of these parameters is specified in units that are character-size units. One horizontal unit is one character wide and one vertical unit is one character tall. Both units include the space between characters. TEXT defines text data. CTEXT defines text data that is centered in the dialog box. FIELD defines an edit field (also called a data entry field). BUTTONGROUP, ENDBUTTONGROUP and BUTTON define buttons and radio buttons. LISTBOX defines a list box. DROPBOX defines a drop box. BOXTABS applies to LISTBOX and DROPBOX and specifies the tab positions in each line of the following list and drop boxes. PUSHBUTTONPOS and PUSHBUTTONWIDTH define the position and width of the next push button. If these are not specified, push buttons are evenly spaced at the bottom of the dialog box. PUSHBUTTON, DEFPUSHBUTTON and ESCPUSHBUTTON specify push buttons. YESNO, YESNOCANCEL and CONTINUE are special parameters that cause specific push button combinations to be included, without having to use PUSHBUTTON, DEFPUSHBUTTON or ESCPUSHBUTTON. ROUTINE is the function that is called as a result of a push button being pushed. If there is no ROUTINE after a PUSHBUTTON parameter, then pushing the button causes the dialog box to go away and the number of the push button is returned in the variable specified by the PUSHBUTTONRESULT parameter. Note that the positions and sizes are specified in character units, not screen or pixel units. This makes the application portable, regardless of the size and resolution of the GUI display screen. Other User-Defined Verbs will handle the menu bar and will also handle all screen keyin and display. We expect to have the library of these verbs available by the end of summer (northern hemisphere) 1993. Beta testing will begin earlier. Problems Created by DB/C 8.0 Changes for ANSI DATABUS DB/C 8.0 was first shipped in February of 1993. It had undergone 8 months of beta testing by more than 30 customers. During this testing, many problems were discovered and fixed, but there is one class of changes that was not discovered and communicated well enough. This class is those changes that were made so that DB/C would conform with ANSI Standard DATABUS. The creation of STDCMP made the impact of the ANSI Standard on existing DB/C smaller. There are a few places in the language where DB/C and Standard DATABUS differ in syntax. A good example is as follows: CALL FUNCTION1 WITH THIS, WE CONTINUE PROCESSING In ANSI Standard DATABUS, this statement calls FUNCTION1. In DB/C, the keyword WITH causes the compiler to think that THIS and WE are variables (note the comma between them). If THIS or WE are not declared as data variables, the compiler will produce the error "Undefined variable". This class of changes from DB/C to ANSI Standard DATABUS was handled by creating the ANSI Standard DATABUS compiler, STDCMP. This compiler compiles ONLY ANSI Standard DATABUS. The other differences between DB/C 7.0 and Standard DATABUS were harder to deal with. Many of the differences are very minor and should not effect many (if any) programs. Others will have some effect. In many of these cases, we have added DBC_ run-time options to make DB/C work the way that it worked in DB/C 7.0. Here is a list of these differences: 1. A few of the error numbers changed to conform with the Standard error numbering. Impact: Minimal. Solution: Change or remove any dependencies on error numbers. 2. When READ returns OVER, the character variables in the list are blanked and the form pointers are set to zero. Before DB/C 8.0, form pointers were set to zero, but the characters contained in the variables were not changed. Impact: Moderate, particularly for a programming style that allowed data outside of the form pointer to length pointer range. Programs that depend on this may operate incorrectly. Solution: Change programs not to use data in that manner. 3. A KEYIN statement blank fills the positions in a character variable that are after the length pointer. Impact: Minimal. Solution: Same as for item 2. 4. An attempt to WRITE with a list longer than specified in the FIX= or VAR= parameter on the FILE, IFILE or AFILE statement will now cause an I 716 error to occur. Impact: Nuisance, because programs that depended on this feature of DB/C 7.0 will now get an error. Solutions: Change the program or set the DBC_WTTRUNC=ON run-time option to make DB/C work as before. 5. An attempt to UPDATE with a list shorter than the record being updated will now cause blanks to be written into all character positions after the last character in the list. Impact: Minor or major, depending on programming standards and style. Solutions: Change the program logic, or add a semicolon to the end the UPDATE statement, or set the DBC_UPDTFILL=OLD run-time option. 6. The ANSI Standard changed DATABUS to remove several verbs from the list of verbs that count for FILEPI counter decrementing. Specifically, the following verbs do not count as FILEPI counter verbs: GOTO, BRANCH, IF, ELSE, ENDIF, LOOP, WHILE, UNTIL, REPEAT, CONTINUE, BREAK, CALL, PERFORM, RETURN, NORETURN, CHAIN, STOP and PAUSE. Impact: Minor, because the only problem that can occur is that an E 504 error (attempt to execute a FILEPI while another FILEPI is still active) may inadvertently occur. Solutions: Change your programs to reflect the new count or set the DBC_FILEPI=NOERR run-time option. 7. The COMPARE instruction always sets the OVER flag. In DB/C 7.0, the flag settings were the same as for SUBTRACT. Impact: Very few programs used this feature, but the impact is major on those that did. Solution: Change your programs. 8. On DIVIDE by zero, the OVER flag is always set. Impact: Minimal. Solution: Change your programs. 9. The %IFDEF and %IFNDEF (alias #IFDEF, #IFNDEF) conditional compilation statements no longer recognize GOTO labels or label variables. This is because these verbs were added to Standard DATABUS in this manner. Impact: Moderate. Solution: Change your programs to use %IFLABEL and %IFNLABEL for GOTO labels and label variables. 10. *ALLOFF and *HOFF no longer performs the action of *COLOROFF. Impact: Moderate. Solutions: Change your programs or set the DBC_HOFF=OLD run-time option. 11. The *RESETSW, *SETSWLR, *SETSWTB, *SETSWALL display control codes set the cursor position to 1:1. In DB/C 7.0, the cursor position was not changed. Impact: Minimal. Solution: Change your programs. 12. The impact of AND, OR and NOT in expressions is changed to conform to Standard DATABUS. Impact: Probably none, but potentially large, depending on programming style. Solution: Change your programs. DB/C Class Schedule The next DB/C class is scheduled for June 7-10, 1993. 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.