How about
DEFINE FILE TABLE1
TYPE1/I5 = IF TYP-IND EQ '1' THEN 1 ELSE 0;
TYPE2/I5 = IF TYP-IND EQ '2' THEN 1 ELSE 0;
TYPE3/I5 = IF TYP-IND EQ '3' THEN 1 ELSE 0;
TYPE4/I5 = IF TYP-IND EQ '4' THEN 1 ELSE 0;
END
TABLE FILE TABLE1
SUM TYPE1 TYPE2 TYPE3 TYPE4
BY EFF-DATE AS "WEEK ENDING"
etc
You may have to do some DEFINE with the EFF-DATE to control the SORT.
HTH
Putting the Received column on the end would be the difficult part. For this, the easiest solution would be to create a field for each type as jimster had pointed out.
If recieved could be before the across columns then you would just need to join the tables together.
The syntax for the join command is
JOIN keyfld [AND keyfld2 ...] IN hosttable TO [ALL] keyfld [AND keyfld2] IN childtable [AS joinname]
END
The "ALL" keyword would be used if you need a 1-n relationship.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.