home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!wupost!zaphod.mps.ohio-state.edu!rpi!newsserver.pixel.kodak.com!laidbak!tellab5!vpnet!serveme!gagme!jnf
- From: jnf@gagme (Joel N. Fischoff)
- Subject: FOXPRO 2 - HELP - REDIRECTING "?" OUTPUT TO FILE
- Message-ID: <1992Aug14.190427.10979@serveme.chi.il.us>
- Sender: usenet@serveme.chi.il.us
- Organization: GAGME - Public Access UNIX of Chicago, Illinois, USA, Earth
- X-Newsreader: Tin 1.1 PL4
- Date: Fri, 14 Aug 1992 19:04:27 GMT
- Lines: 33
-
-
- Dan Sullivan writes:
- >I need to redirect the output from the question mark command (eg. ? recno(),
- >? "I NEED HELP!!!!") to a text file. The command SET DEVICE TO FILE
- ><FILE NAME> only redirects output produced by the @...SAY command.
- >Other commands such as DISPLAY have their own parameters to redirect
- >output to a file. Nobody seems to know how to redirect the output of "?"
- >to a text file. Any ideas would be greatly appreciated.
-
- Actually, this is fairly easy to do and has been as far
- back as I can remember. Try something like this:
-
- SET ALTERNATE TO <filespec>
- SET ALTERNATE ON
- ? "I NEED HELP!!!!"
- SET ALTERNATE OFF
- SET ALTERNATE TO
-
- The two "SET ALTERNATE TO" commands open and close the
- output file respectively, while the SET ALTERNATE ON/OFF
- restricts which data actually gets written to the file.
- All output from a ? gets written to the ALTERNATE file if
- ALTERNATE is set to ON. Note that this command is the
- exact opposite of SET DEVICE, as @.... commands will not
- be written to the file.
-
-
- Hope this helps,
-
- Joel N. Fischoff
- jnf@gagme.chi.il.us
- Systems Programmer/Analyst
- Center For Clinical Research
-