Example of how to create a row that is the quotient between two rows using division
Attached is a spec DIVISIONBETWEENROWS.SPXthat shows how to use the Mentor ~Cleaner block to create a row in the table that is the quotient of two other rows in the table. This example uses division but any arithmetic operation could be used.
You will need to create a DB file and set the duplicate setting to at least Warn. If you don’t do this you will get errors when it tries to store the table back in the DB file with the original name it was created with. You should not have to make any changes to your banner definition.
When you write the Row definition for the table you will need to create all the rows that will be used in the calculation, whether or not they will be printed on this table or not. You can use the Suppress option on any stub to keep it from appearing on the final table.
>PurgeSame~IN Divisionbetweenrows.Dat,ASCII=20>Createdb Divisionbetweenrows, Dup=Warn>Printfile Divisionbetweenrows~SpecFile Divisionbetweenrows~Set AutoTab TableDropMode=1~DefTabset= Ban1:Edit=: -ColTna Swid=25 Cwid=8}Stub_Preface=:Total[Suppress] No Answer }Banner=: