Re: ACE Report [?]
Posted in 1997
Topics: SQL Development & Query Writing, Server Administration, Migration, Import/Export & Data Conversion
Nick Nobbe wrote:
>
> On 17 Jun 1997, Max wrote:
>
> > I realize that ACE reports aren't terribly sexy, but I DO have to work
> > with one. To that effect, would someone be so kind as to help me here?
> >
> > I need to prompt a user for a tablename. That tablename needs to be
> > passed to the select statement.
> >
> > If someone can offer guidance in this regard, I'd appreciate it a great
> > deal.
> >
> Max,
> Not in ace, which has to be compiled with an existing table name in
> the select statement. Ace wants to see a real table name in its runtime,
> arc module. (I think.) Also, if the table name were determined only at
> run time, how do you select from specific columns unless you select (*)?
You are quite right. This has always been the case in ALL Informix
products. It makes sense, as you say, to need the table layout at
compile time. Even SELECT * wouldn't work, because it would be expanded
to the full column list in order to allocate storage.
> I'm sure others in the group will come up with ingenious solutions,
> but this may help for starters.
Both Nick and David are spot on with their replies.
> A few solutions:
>
> 1. dynamically create the ace program from user input and then compile
> and run it (by far the hardest to do);
>
> 2. use a shell script to call dbaccess or isql to write an unload file
> whose format is predetermined, then call a compiled ace program to
> read the unload file and reformat it;
But let me just point out that this option only came out in version
4.0 or 4.1. So it depends on how old we are talking. ;-)
> 3. same as 2 but instead use awk or other utilities to re-format the
> unload/ascii output file,
>
> 4. hardcode all possible reports, have the user select the report in
> question, and run it via shellscript.
Cheers,
--
Mark.
+------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| The Informix FAQ is at http://www.iiug.org |
|mailto:marks@west.co.za +-----------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work, force it! |
|Fax: +27 11 803 2189 |If it breaks, it needed replacing anyway!|
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+-----------------------------------------+