So I tried a couple of the suggestions above and was unable to have any records returned. I did try a different technique posted and it seemed to work. Not really sure what I was doing wrong the first time around. Here is what my end code ended up being.
-*******************************************************************************************
-*DECODE FILE
-*******************************************************************************************
DEFINE FILE T_SQL_SERVICE
IND/I10 WITH DESCR = IND + 1;
BLANK/A1 WITH DESCR = '';
END
-RUN
TABLE FILE T_SQL_SERVICE
PRINT DESCR
IND
BLANK
ON TABLE HOLD AS TMP_FILE FORMAT FOCUS
END
-RUN
EX -LINES 4 EDAPUT MASTER,blank_mas,CV,FILE
FILENAME=BLANK_MAS, SUFFIX=FIX,$
SEGNAME=BLANK_MAS, $
FIELD=FIELD1 ,ALIAS= ,A1 ,A1 ,$
FILEDEF BLANK_MAS DISK blank_mas.mas (RECFM F LRECL 1
DEFINE FILE BLANK_MAS
CNT/I3 WITH FIELD1 = CNT + 1;
BLANK/A1 WITH FIELD1 = '';
END
-RUN
-* 8 - ORDER OF DUPLICATION
TABLE FILE BLANK_MAS
PRINT
FIELD1 NOPRINT
BLANK
WHERE CNT LE 10
BY BLANK NOPRINT
ON TABLE HOLD AS TMP_MAS1 FORMAT FOCUS INDEX BLANK
END
-RUN
JOIN BLANK IN TMP_FILE TAG T1 TO MULTIPLE BLANK IN TMP_MAS1 TAG T2 AS JJJ
DEFINE FILE TMP_FILE
DSERV/A40 = IF DESCR EQ 'Alarm' AND T2.FOCLIST EQ 1 THEN 'Burglar Alarm' ELSE
IF DESCR EQ 'Alarm' AND T2.FOCLIST EQ 2 THEN 'Fire Alarm' ELSE
IF DESCR EQ 'Alarm' AND T2.FOCLIST EQ 3 THEN 'Fire Alarm, C-UL' ELSE
IF DESCR EQ 'Alarm' AND T2.FOCLIST GT 3 THEN '' ELSE
IF DESCR EQ 'Building Structure/Exterior Walls' AND T2.FOCLIST EQ '1' THEN 'Exterior Walls' ELSE
IF DESCR EQ 'Building Structure/Exterior Walls' AND T2.FOCLIST GT 1 THEN '' ELSE
IF DESCR EQ 'Curbs/Sidewalks' AND T2.FOCLIST EQ 1 THEN 'Curb' ELSE
IF DESCR EQ 'Curbs/Sidewalks' AND T2.FOCLIST EQ 2 THEN 'Sidewalk' ELSE
IF DESCR EQ 'Curbs/Sidewalks' AND T2.FOCLIST GT 2 THEN '' ELSE
IF DESCR EQ 'Detention Pond/Catch Basin' AND T2.FOCLIST EQ 1 THEN 'Catch Basin' ELSE
IF DESCR EQ 'Detention Pond/Catch Basin' AND T2.FOCLIST EQ 2 THEN 'Detention Basin' ELSE
IF DESCR EQ 'Detention Pond/Catch Basin' AND T2.FOCLIST GT 2 THEN '' ELSE
IF DESCR EQ 'Entry Door' AND T2.FOCLIST EQ 1 THEN 'Automatic Door' ELSE
IF DESCR EQ 'Entry Door' AND T2.FOCLIST EQ 2 THEN 'Cart Door' ELSE
IF DESCR EQ 'Entry Door' AND T2.FOCLIST EQ 3 THEN 'Emergency Exit Door' ELSE
IF DESCR EQ 'Entry Door' AND T2.FOCLIST EQ 4 THEN 'Entrance Exit' ELSE
IF DESCR EQ 'Entry Door' AND T2.FOCLIST EQ 5 THEN 'Mall Door' ELSE
IF DESCR EQ 'Entry Door' AND T2.FOCLIST EQ 6 THEN 'Manual Entrance Door' ELSE
IF DESCR EQ 'Entry Door' AND T2.FOCLIST EQ 7 THEN 'Team Member Entrance' ELSE
IF DESCR EQ 'Entry Door' AND T2.FOCLIST GT 7 THEN '' ELSE
IF DESCR EQ 'HVAC' AND T2.FOCLIST EQ 1 THEN 'Air Handler' ELSE
IF DESCR EQ 'HVAC' AND T2.FOCLIST EQ 2 THEN 'Chillers' ELSE
IF DESCR EQ 'HVAC' AND T2.FOCLIST EQ 3 THEN 'Cooling tower' ELSE
IF DESCR EQ 'HVAC' AND T2.FOCLIST EQ 4 THEN 'Exhaust Fan' ELSE
IF DESCR EQ 'HVAC' AND T2.FOCLIST EQ 5 THEN 'Forced Air Furnace' ELSE
IF DESCR EQ 'HVAC' AND T2.FOCLIST EQ 6 THEN 'HVAC' ELSE
IF DESCR EQ 'HVAC' AND T2.FOCLIST EQ 7 THEN 'HVAC Controls' ELSE
IF DESCR EQ 'HVAC' AND T2.FOCLIST EQ 8 THEN 'HVAC Equipment' ELSE
IF DESCR EQ 'HVAC' AND T2.FOCLIST GT 8 THEN '' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 1 THEN 'Beds - Building Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 2 THEN 'Beds - Parking Lot Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 3 THEN 'Building Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 4 THEN 'Grass - Building Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 5 THEN 'Grass - Parking Lot Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 6 THEN 'Parking Lot Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 7 THEN 'Plants - Building Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 8 THEN 'Plants - Parking Lot Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 9 THEN 'Trees - Building Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST EQ 10 THEN 'Trees - Parking Lot Landscape' ELSE
IF DESCR EQ 'Landscaping' AND T2.FOCLIST GT 10 THEN '' ELSE
IF DESCR EQ 'Parking Lot/Drive Aisle' AND T2.FOCLIST EQ 1 THEN 'Crosswalk' ELSE
IF DESCR EQ 'Parking Lot/Drive Aisle' AND T2.FOCLIST EQ 2 THEN 'Fence' ELSE
IF DESCR EQ 'Parking Lot/Drive Aisle' AND T2.FOCLIST EQ 3 THEN 'Fire Hydrant' ELSE
IF DESCR EQ 'Parking Lot/Drive Aisle' AND T2.FOCLIST EQ 4 THEN 'Parking Lot' ELSE
IF DESCR EQ 'Parking Lot/Drive Aisle' AND T2.FOCLIST EQ 5 THEN 'Parking Lot Drive' ELSE
IF DESCR EQ 'Parking Lot/Drive Aisle' AND T2.FOCLIST EQ 6 THEN 'Parking Lot Landscape' ELSE
IF DESCR EQ 'Parking Lot/Drive Aisle' AND T2.FOCLIST EQ 7 THEN 'Parking Stalls' ELSE
IF DESCR EQ 'Parking Lot/Drive Aisle' AND T2.FOCLIST EQ 8 THEN 'Retaining Wall' ELSE
IF DESCR EQ 'Parking Lot/Drive Aisle' AND T2.FOCLIST GT 8 THEN '' ELSE
IF DESCR EQ 'Roof' AND T2.FOCLIST EQ 1 THEN 'Roof System' ELSE
IF DESCR EQ 'Roof' AND T2.FOCLIST GT 1 THEN '' ELSE
IF DESCR EQ 'Signage - Building' AND T2.FOCLIST EQ 1 THEN 'Building Sign' ELSE
IF DESCR EQ 'Signage - Building' AND T2.FOCLIST GT 1 THEN '' ELSE
IF DESCR EQ 'Signage - Directional' AND T2.FOCLIST EQ 1 THEN 'Directional Sign' ELSE
IF DESCR EQ 'Signage - Directional' AND T2.FOCLIST GT 1 THEN '' ELSE
IF DESCR IN ('Signage - Pylon','Signage - Pylon and/or Monument') AND T2.FOCLIST EQ 1 THEN 'Pylon or Monument Sign' ELSE
IF DESCR IN ('Signage - Pylon','Signage - Pylon and/or Monument') AND T2.FOCLIST GT 1 THEN '' ELSE
IF DESCR EQ 'Utilities - Exterior' AND T2.FOCLIST EQ 1 THEN 'Landscape Lighting' ELSE
IF DESCR EQ 'Utilities - Exterior' AND T2.FOCLIST EQ 2 THEN 'Lighting Motion Sensor' ELSE
IF DESCR EQ 'Utilities - Exterior' AND T2.FOCLIST EQ 3 THEN 'Natural Gas Pipe' ELSE
IF DESCR EQ 'Utilities - Exterior' AND T2.FOCLIST EQ 4 THEN 'On site Sewer system' ELSE
IF DESCR EQ 'Utilities - Exterior' AND T2.FOCLIST EQ 5 THEN 'Parking Lot Lighting' ELSE
IF DESCR EQ 'Utilities - Exterior' AND T2.FOCLIST EQ 6 THEN 'Perimeter/Security Lighting' ELSE
IF DESCR EQ 'Utilities - Exterior' AND T2.FOCLIST GT 6 THEN '' ELSE
IF DESCR EQ 'Utilities - Interior' AND T2.FOCLIST EQ 1 THEN 'Backflow prevention' ELSE
IF DESCR EQ 'Utilities - Interior' AND T2.FOCLIST EQ 2 THEN 'Boilers' ELSE
IF DESCR EQ 'Utilities - Interior' AND T2.FOCLIST EQ 3 THEN 'Electrical Panels' ELSE
IF DESCR EQ 'Utilities - Interior' AND T2.FOCLIST GT 3 THEN '' ELSE
DESCR;
END
TABLE FILE TMP_FILE
SUM
DESCR
DSERV
BY DESCR NOPRINT
BY DSERV NOPRINT
WHERE NOT DSERV EQ ''
ON TABLE HOLD AS LISTING FORMAT FOCUS INDEX DESCR
END
-RUN
JOIN
ID IN T_SQL_PROPERTY TO
ID IN T_SQL_SERVICES AS J02
END
JOIN
T_SQL_SERVICES.SERVICE IN T_SQL_PROPERTY TO
SERVICE IN T_SQL_SERVICE AS J03
END
JOIN
T_SQL_SERVICES.REPAIR IN T_SQL_PROPERTY TO
TENANTTYP IN T_SQL_TENANTTY TAG J05 AS J05
END
JOIN
LEFT_OUTER
T_SQL_SERVICE.DESCR IN T_SQL_PROPERTY TO MULTIPLE
DESCR IN LISTING AS J04
END
TABLE FILE T_SQL_PROPERTY
SUM
DSERV AS 'Service'
T_SQL_SERVICE.DESCR
MAX.J05.DESCR AS 'Repairs'
BY PROPID NOPRINT
BY BLDGID NOPRINT
BY ID NOPRINT
BY T_SQL_SERVICE.DESCR NOPRINT
BY DSERV NOPRINT
ON TABLE PCHOLD FORMAT EXL2K
END
This seems to give me the result I am looking for. Not sure if there was a more efficient way of getting the same result. Thanks for your help.
WebFOCUS 8.09
Windows, All Outputs