RUNDEF Ratio Generic
   SELECTION %SELECTION
   %UNIVERSE
//    ED.WEIGHT - GIVES BACK CODE

*  %SELECTION Selection File
*  %UNIVERSE Universe Condition
*  %4 Entity counted
*  %5 Entity Output
*  %9 Target count

DEFINE %4.CONDITION
  AS %9
  TYPE INTEGER
  OPTIONS DEFAULT 0
  RANGE 0-1

  
DEFINE %5.CNTNUM
  AS COUNT %4
  FOR %4.CONDITION=1
  TYPE INTEGER
 // WEIGHT ED.WEIGHT
  VARLABEL "Target Population"
  //WEIGHT ED.WEIGHT  - 226
  
DEFINE %5.CNTDENUM
  AS COUNT %4
  TYPE INTEGER
   //WEIGHT ED.WEIGHT
   VARLABEL "Universe Population"


  
DEFINE %5.RATIO
  AS 1000 * ( %5.CNTNUM/%5.CNTDENUM )
  FOR %5.CNTDENUM>0
  TYPE REAL
  VARLABEL "Ratio (per 1000)"


TABLE List
  AS AREALIST
  OF %5,
                  %5.DIST, 
  //%5.LABEL,
                %5.CNTNUM,
                %5.CNTDENUM,
                %5.RATIO 7.2
 // WEIGHT ED.WEIGHT
  OPTION OMITTITLE

