Question re: formatting in ACE, need advice...please :-)
Posted in 1994
I am using Informix ISQL version 4.11. SE 5.01 on a sunsparc 10 I have a file that I want to read into the Informix ace reporter and output the results in a specific format. filename is "areal_asurveys_reclassed.asi" The file looks like this (although the data within the fields will vary, as will the number of rows, depending on the sql results.) 0||1|0-15M|60000.000000 0||1|0-15M|790000.000000 1|launch1 (3736542,367477)|0||1000000.000000 1|launch1 (3736542,367477)|1|0-15M|2170000.000000 2|launch2 (3714025,384687)|0||3170000.000000 3|launch3 (3726542,367477)|0||2930000.000000 3|launch3 (3726542,367477)|1|0-15M|240000.000000 4|launch4 (1234567,123456)|0||9473.777778 lets call these fields: site|name|cat|desc|area I want the output to look like this: COINCIDENCE RESULTS FOR THE DAS Launch Zones | areal_asurveys_reclassed.asi | Acres Category | Category | ------------------------------------------------------------- 1 | 1 | 535.99 ------------------------------------------------------------- 3 | 1 | 59.28 * * * * * * * * * * * * * * * * * * * * * * DATA LAYER INFORMATION Cat Launch Zones 1 launch1 (3736542,367477) 2 launch2 (3714025,384687) 3 launch3 (3726542,367477) 4 launch4 (1234567,123456) Cat areal_asurveys_reclassed.asi 1 0-15M I am having problems with grouping and the variable $FILENAME What I am trying to do is the following: print header "Coincidence Results for the DAS" "Launch zones | $FILENAME | Total" "Category | Category | Acres" "------------------------------------" if site AND cat are > 0 and not null then print site | cat | area*.000247 group by site order by site, cat after this is done I need to print another round of data print header "DATA LAYER Information" "Cat Launch Zones" if site > 0 then on each row for this subgroup print site name order by site NO DUPLICATE SITE after this is done I need to print another round of data print header "Cat" $FILENAME if site AND cat are > 0 then on every row for this subgroup, print: cat desc order by cat NO DUPLICATE CAT done I have written basic ace scripts and have the fundamentals down, but I cannot figure out how to split these subgroups up and print them in separate sections. Has anyone ever attempted to do this and know of a solution ? Also, is it possible to read the filename ($FILENAME) into the ace report, or do I have to create a new ace report for each file ? Also, how do I eliminate duplicate cat and site? Any help would be appreciated. Bonnie weller@zorro.cecer.army.mil