INTELLIGENT WORK FORUMS FOR COMPUTER PROFESSIONALS
Come Join Us!
Are you a Computer / IT professional? Join Tek-Tips now!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
Favorite Forums
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site

(Download This Button Today!)
Feedback
"...Over the past year I have found your site to be EXCELLENT. Never have I been able to find so many answers to such vast problems and it is an excellent service..."
Geography
Where in the world do Tek-Tips members come from?
|
Computer Associates: Openingres FAQ
|
Coding Examples
|
Sample Embedded QUEL #1
Posted: 15 Jun 06
|
Here's a bit of code that might help some non-DBAs ( developers and technical users) get started with embedded QUEL, especially if starting from scratch.
CODE/* Example by Sean aka TimeTraveler */ /* NY/CT Music Events: */ /* send blank msg to museworks- */ /* subscribe _at_ yahoogroups.com */ /* or visit museworksentertainment.com */
#include <stdio.h> #include <stdlib.h> /* needed for getenv() */
#include "/path/to/eqldefs.h" #include "/path/to/local_eqsqlca.h" #include "/path/to/ingres_def.h"
## static char *DBSDBN; /* env var 'dbserver::dbname' */ ## float mx; ## float av;
int main() { DBSDBN = getenv("DBSDBN");
## INGRES DBSDBN
## RANGE OF r IS racers
## RETRIEVE ( ## mx=max(r.mph), ## av=avg(r.mph) ## )
printf("+--------+--------+\n"); printf("|MPH |\n"); printf("+--------+--------+\n"); printf("|Max |Avg |\n"); printf("|%8.2f|%8.2f|\n",mx,av); printf("+--------+--------+\n\n");
## EXIT
return(0); }
/* Compile instructions: * #!/bin/ksh * # vars - Obviously compile args vill vary. * # Check before use. * opts="-L/usr/Binaries/Libs/lib -lingfns" * opts="${opts} -L/opt/ingres/lib" * opts="${opts} -lsocket -lnsl -lelf -laio" * opts="${opts} -lingres -ldl -lrt" * opts="${opts} -L/path/to/EPN/lib/ -lm" * a=`basename $1 | sed 's/\..*$//'` * # main compile program * /bin/rm -f ${a} ${a}.o * eqc -o.hh -d -ferr_${a}.c ${a}.eql * gcc -I. -I/opt/ingres/files -g -Wall -c err_${a}.c * /bin/mv -f err_${a}.o ${a}.o * gcc -o ${a} ${a}.o ${opts} */
Enjoy,
|
Back to Computer Associates: Openingres FAQ Index
Back to Computer Associates: Openingres Forum |
|
 |
|
Join Tek-Tips® Today!
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Talk To Other Members
- Notification Of Responses To Questions
- Favorite Forums One Click Access
- Keyword Search Of All Posts, And More...
Register now while it's still free!
Already a member? Close this window and log in.
Join Us Close