OAUG Meeting - 13 February 1996 This meeting was well attended - extra chairs were needed! Terry Litchfield started by explaining the decisions taken at the committee meeting held in January. In brief these were: continue the user group - despite the general demise of DOS products there is still interest in making the most of software such as OA4. Also there are many topics of general interest to members, including reviews of new software. change to bi-monthly meeting and newsletter (even months of February, April, June, August, October & December). This will relieve the workload on committee and allow us to maintain quality. no change to annual subscription (the last increase was in 1989!) consideration of the Group running an Internet Web page for questions & answer, news and e-mail. Questions & Answers Image Management (OA Vision) Why don't some PCX pictures display? There are several different formats of PCX file. OA Vision is fussy about which ones it uses. Refer to the OA4 manual for more information. Windowbase allows you to imbed objects such as pictures in screen forms and print forms. This is only available under Windows. Windows NT Will OA4 network version work under Windows NT? Probably! It depends whether Windows NT has a suitable Netbios emulator. It probably does since it is supposed to be able to run DOS applications. Note that you need to install the Netbios version of OA4, not the Netware version. Changing database structure in a runtime environment How do you increase the size of a database field when the client has a runtime version of OA4? This does create a problem because data will be lost if you simply replace the DF/IF/MF/SMK files. The technique is to create a database with the required structure but nil records and a different filename (e.g. an X prefix). Then write some programmer code to append the data from the old database to the new one. Issue this as a compiled COD file and link it to the runtime environment. Run the program. Finally delete the old database files and rename the new one. This process can be automated through clever use of macros. "Print to screen" can lock up a network Theo Poulos advises against printing database reports to the screen when in a network. Whenever a PMK is used the records associated with it (which can include joined files) are "locked" to prevent the data changing. If a person prints to screen but forgets to press or when the display is paused then other users won't be able to access the records. SQL "Matches" slows down retrievals Theo also advises that the use of the MATCH command in SQL Queries can slow things down. Where possible use range checking. For example FROM CLIENTS WHERE COMPANY MATCHES 'M*' can be replaced by FROM CLIENTS WHERE COMPANY IN ('M':'M|') The | character is about the lowest printable character in the ASCII table therefore it will ensure that names starting with 'Mz' are included. You can use the 'exclusive' range of the form ('M':'N'> to achieve the same result but the above example is easier under Programmer. Clarion Demonstration Owen Brunker and Andrew MacPherson from Datapac gave an excellent demonstration of Clarion for Windows. This is a "Rapid Application Development" system which can access several types of database structures. It is a very impressive package and would allow developers to create powerful Windows database applications and distribute runtime copies (simply as EXE files) for no extra charge. The enclosed article gives some more details. Open Access users should, however, note the following limitations: It will not read and write to native OA databases. You must first convert your data to dBase3 format. In general SQL queries are not supported. The language and wizards use a different method of creating views. This might not be as flexible as SQL. The demonstration of a default, built-in application generator was very good and would impress an MS Access user. In hindsight, however, the same could be achieved in OA4 Programmer with the following lines of code: ok = TRUE WHILE ok PUT DO CLEAR SCREEN MENU :EMPLOYEES: VIEW vb = FROM employees :POLICIES: VIEW vb = FROM policies :K_UNDO: ok = FALSE END MENU IF ok USE vb BROWSE vb USE vb END END IF END WHILE It would be great if Windowbase had the same procedural language and Windows control capabilities as Clarion! Tips & Tricks Displaying age in screen masks If you have a date of birth field (e.g. DOB) in a database you can display the current age of a person when their record is displayed in a screen form. Add an AGE number field to the database and make it DEPENDENT according to the following formula: DOB<>'00-00-0000'|(sysdate-dob)/365.25 - 0.5|0 The 0.5 is important otherwise it will round-up ages within 6 months of the birthday. With OA4 you are not prompted to "save changes" if only the dependent field has changed so it is an efficient way to quickly view records but you must press to save the change to the age field. 8-Digit Phone Numbers What a nightmare! There is no logic to the changes so an automated program seems out of the question. The following SQL will retrieve potential candidates for change: FROM cardspi WHERE businessp MATCHES '9*' ! Sydney number 99XXXXXX OR businessp MATCHES '03 *' ! Melbourne numbers 03 9XXXXXXX OR businessp MATCHES '07 *' ! Brisbane numbers 07 3XXXXXXX This example assumes a Sydney base. Use to view and change each record and to save the changes. Logging time spent playing games If you are lucky enough to have Novell DOS 7 you can easily create a batch file to log the time your children spend playing computer games. rem DOOM.BAT echo off echo Loading DOOM! echo Start DOOM %day_of_week% %day%-%month%-%year% %hour%:%minute% %am_pm% >> c:\doomlog.txt c:\games\doom echo End DOOM %hour%:%minutes %am_pm% >> c:\doomlog.txt type c:\doomlog.txt Note that this append lines to the file doomlog.txt. You can then view the file with OA note pad. In theory you could even process it using OA programmer. It won't work with MS DOS. Creating an ASCII file with a list of files containing certain text Again you will need Novell DOS 7 for this tip. Previously Lindy Kidman has mentioned the use of the FIND command, available in Novell DOS 7. To create a DOS file with a list of files use the following command: FIND /F "text" c:\oadata\*.txt >> c:\oadata\found.txt This searches for the characters "text" in all *.txt files in the c:\oadata\directory and appends the output to the file c:\oadata\found.txt. Note that the /F option confines output to the file name. If you leave it out the lines containing the text will also be included in the output. Type FIND /? at the DOS prompt for more information. Tabs for multi-page screen masks If you have database screen forms with multiple pages you can create the impression of page tabs (contents) at the top of each page by using the DRAWS c-call (see the OA4 manual for use of this C-call). On the top of each page create graphics which appear to be tabs, as shown in the attached example. Not as fancy as Excel spreadsheets or the Clarion demonstration but still useful to users.