Re: Questions on ace reports.
Posted in 1998
Peter Lancashire wrote in message <35F80AE8.68DF@bayer.co.uk>... >Rajesh_Kapur@spartanstores.com wrote: >> >> A couple of questions on ace reports. >> - Is it possible to pass parameters to ace reports while running it using >> sacego? > >Yes, like this: > >sacego -d mydatabase filename param1 param2 ... > >In the ace report do this: > >DEFINE > PARAM[1] p1 CHAR(8) > PARAM[2] p2 SMALLINT > ... >END > >Then use variables p1 and p2 as you would any others. Another little trick is if you use the shelll to run your ace that passes the parameters from stdin. We use this to allow ace's for automated or user input. sacego filename <<xxENDxx param1 param2 xxENDxx We use a single generic script that can handle up to 9 parameters instead of coding the actual line. Something like this #!/bin/sh ACE="$1" shift sacego $ACE <<xxENDxx $1 $2 $3 $4 $5 $6 $7 $8 $9 xxENDxx >> - Can ace reports inquire on environment variables set at the shell level? > >No. You would need to use a C function compiled into a custom sacego. >But, you could use the above technique like this: > >sacego -d mydatabase filename $ENV1 $ENV2 ... > >DEFINE > PARAM[1] env1 CHAR(8) > PARAM[2] env2 SMALLINT > ... >END > >> >> Thanks!!! >> Rajesh Kapur > >-- >Peter Lancashire >Information Systems Specialist, Bayer plc >Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK >Tel: +44-1635-562258, Fax: +44-1635-562281 >--- >If all else fails, read the instructions AND the release notes. >All opinions are my own and not those of Bayer plc. >My Internet plumbing does not allow me to mail and post news together. >Sorry. >--- >Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/ S.W. wilcoxon@pioneerplanet.infi.net