home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / 6135 < prev    next >
Encoding:
Text File  |  1992-08-15  |  1.6 KB  |  45 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!wupost!zaphod.mps.ohio-state.edu!rpi!newsserver.pixel.kodak.com!laidbak!tellab5!vpnet!serveme!gagme!jnf
  3. From: jnf@gagme (Joel N. Fischoff)
  4. Subject: FOXPRO 2 - HELP - REDIRECTING "?" OUTPUT TO FILE
  5. Message-ID: <1992Aug14.190427.10979@serveme.chi.il.us>
  6. Sender: usenet@serveme.chi.il.us
  7. Organization: GAGME - Public Access UNIX of Chicago, Illinois, USA, Earth
  8. X-Newsreader: Tin 1.1 PL4
  9. Date: Fri, 14 Aug 1992 19:04:27 GMT
  10. Lines: 33
  11.  
  12.  
  13. Dan Sullivan writes:
  14. >I need to redirect the output from the question mark command (eg. ? recno(),
  15. >? "I NEED HELP!!!!") to a text file.  The command SET DEVICE TO FILE 
  16. ><FILE NAME> only redirects output produced by the @...SAY command.
  17. >Other commands such as DISPLAY have their own parameters to redirect 
  18. >output to a file.  Nobody seems to know how to redirect the output of "?"
  19. >to a text file.  Any ideas would be greatly appreciated.
  20.  
  21.     Actually, this is fairly easy to do and has been as far
  22.     back as I can remember.  Try something like this:
  23.  
  24.         SET ALTERNATE TO <filespec>
  25.         SET ALTERNATE ON
  26.         ? "I NEED HELP!!!!"
  27.         SET ALTERNATE OFF
  28.         SET ALTERNATE TO
  29.  
  30.     The two "SET ALTERNATE TO" commands open and close the
  31.     output file respectively, while the SET ALTERNATE ON/OFF
  32.     restricts which data actually gets written to the file.
  33.     All output from a ? gets written to the ALTERNATE file if
  34.     ALTERNATE is set to ON.  Note that this command is the
  35.     exact opposite of SET DEVICE, as @.... commands will not
  36.     be written to the file.
  37.  
  38.  
  39.                 Hope this helps,
  40.  
  41.                     Joel N. Fischoff
  42.                     jnf@gagme.chi.il.us
  43.                     Systems Programmer/Analyst
  44.                     Center For Clinical Research
  45.