Re: from the command line
Posted in 1995
In article <3lfh54$bjm@cssun.mathcs.emory.edu>, johnl@informix.com (Jonathan Leffler) says:
>
>Yes. RTFM ISQL User Guide App I in the 4.x manual set
>and ISQL Ref Man App H in the 6.x manual set.
>
>sperform for forms.
>sacego for reports.
>
>>Hi, I'm kind of new to Informix.
>>Is there a way to run an isql form or report from the command line?
C'mon Johnathan! <-- bad grammar flag set :-)
Just SHOW 'em what you can do:
On the UNIX command-line you can use the 'here document' feature. This is
akin to calling your dog--"HERE Document!". You can whistle too if you like.
Everything between a specific character or word after the '<<' operator is
sucked into the command, in this case the isql command. The '-s' silences
the INFORMIX announcement. The '-' is the slot the ISQL commands will be
sucked into,
$ isql -s database - <<+
select count(*) from systables+
There's a great shell book by Kochan & Wood that talks about this feature,
called "Shell Programming". I'd give you the ISBN but someone borrowed it
and never returned it.
The examples in the book use the '!' character to start and stop the
dialogue, but this can sometimes cause problems on some versions of UNIX.
Use the '+' character and you'll have less problems. You can of course
use a word too, like MY_SQL instead of the '+' character.
If you're using 5.0 or greater, you could theoretically set up a shell
interface to the database, as the ISQL supports strings, but that's
another story.
Enjoy!
\\\\|//
(o o)
==============================---o00--(_)--00o---============================
Tim Schaefer tschaefe@gate.net
The Computer Business Company, Inc. http://www.gate.net/~tschaefe
Coconut Creek, FL, USA DILLIGAF!
INX_UTIL Tool Kit is now shareware
Ub...eh...Now, see, who gets to ask the questions here? --Ross Perot
=============================================================================