Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!elroy!hacgate!ashtate!dbase!awd From: awd@dbase.UUCP (Alastair Dallas) Newsgroups: comp.databases Subject: Re: Writing formatted output to file in dBase III+ Summary: You need dBASE IV Message-ID: <5@dbase.UUCP> Date: 29 Jan 89 01:28:34 GMT References: <403@systime.UUCP> <626@dsacg1.UUCP> Organization: Ashton Tate Devlopment Center Glendale, Calif. Lines: 32 In article <626@dsacg1.UUCP>, nfs0294@dsacg1.UUCP (Glendell R. Midkiff) writes: > From article <403@systime.UUCP>, by staylor@systime.UUCP (Simon Taylor): > > Does anyone know how to redirect formatted output generated using @x,y SAY > > under dBase III+ rather than to the screen or printer? > > > I'm not sure if all this is supported by DBASE III+, but in CLIPPER you > can use the SET ALTERNATE or SET PRINTER TO and when done > close the file by using SET ALTERNATE TO, SET ALTERNATE OFF. To do this in dBASE, you need dBASE IV. You need the SET DEVICE TO FILE command so that you can easily support a prompt like Report to S)creen, P)rinter, or F)ile which end-users are coming to expect. The dBASE syntax is the same for each choice: SET DEVICE TO SCREEN SET DEVICE TO PRINTER SET DEVICE TO FILE You can report to a file in dBASE III+, but only by using the '?' command rather than the '@..SAY' commands, which is admittedly quite awkward. By the way, dBASE IV also provides SET PRINTER TO FILE, but because it has installable printer drivers, you can optionally include format information in the file for use with a specific printer later. /alastair/