home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / database / informix / 1573 next >
Encoding:
Internet Message Format  |  1992-07-21  |  2.1 KB

  1. Path: sparky!uunet!gatech!emory!bnr.co.uk
  2. From: A.Heskett@bnr.co.uk (Tony Heskett)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re: A solution to SQL reformatting problem (fwd)
  5. Message-ID: <9213@emory.mathcs.emory.edu>
  6. Date: 21 Jul 92 10:48:08 GMT
  7. Sender: walt@mathcs.emory.edu
  8. Reply-To: A.Heskett@bnr.co.uk (Tony Heskett)
  9. Lines: 52
  10. X-Informix-List-ID: <list.1328>
  11.  
  12.  
  13. Steve Price writes (quoting cauhape@twg.com (Jeff Cauhape x7147))
  14.  
  15. > >    I've found a solution for UNIX systems.
  16.  
  17. Sort of ...
  18.  
  19. /usr/gdc/fcddev 10> stty columns 1000
  20. unknown mode: columns
  21.  
  22. uname -a gives:
  23.  
  24. OSx64 moses 5.0d-900928 0909i Pyramid-9815
  25.  
  26. HP-UX gdc A.08.00 B 9000/855 116104132
  27.  
  28.  
  29. I tried 'setenv COLUMNS 1000; tset -Q' on both boxes, but that
  30. didn't have much effect either (except that the menu's didn't
  31. display right out of isql).
  32.  
  33. > >    It appears that sql looks at the width of the output device as defined
  34. > >by the "columns" variable in the stty data structure when it makes a decision
  35. > >to change format or not. To fool sql into not changing the format, reset the
  36. > >value of columns variable in your current session to be wide enough that
  37. > >sql thinks there's enough room.
  38.  
  39. > >I then reset the columns width to 1000 characters.
  40.  
  41. > >From here I run my sql script and it writes one record per line. Remember to 
  42. > >reset your tty device back when your done.
  43.  
  44. Could you let us know what it *does* work on, please ?   Ta !
  45.  
  46. Suppose it also requires that the script is running on a terminal ?
  47. As in, if I run a cron job, it doesn't get a tty and so I can't stty
  48. the line.
  49.  
  50. > stty 80            # this is not really needed, since shell can not
  51. >             # reset stty values for parent shell
  52.  
  53. This *is* really needed, since this is a line driver thing, not a
  54. shell environment thing.
  55.  
  56. > Steve Price         UNIX: pacbell!pbhyf!rsprice    PHONE: (510)823-1951
  57.  
  58. Nice idea, thanks.  Shame it doesn't work everywhere, though.
  59.  
  60. Cheers - Tony.
  61. _________________________________________________________________________
  62. Tony Heskett                 th@bnr.co.uk       Phone: (+44) 279 402637
  63. BNR, London Road, Harlow, Essex  CM17 9NA       Fax:   (+44) 279 451434
  64.