Jodye,
The following works:
TABLE FILE EMPLOYEE
SUM CURR_SAL ED_HRS
COMPUTE DUMMY1/D12.2M=CURR_SAL/2; AS '50% OF CUR_SAL'
COMPUTE DUMMY2/F6.2=ED_HRS/2; AS '50% OF ED_HRS'
BY BANK_NAME BY DEPARTMENT ACROSS JOB_DESC
ON BANK_NAME SUBTOTAL AVE. CURR_SAL AS 'AVE'
ON BANK_NAME SUBTOTAL AVE. ED_HRS
ON BANK_NAME SUBTOTAL AVE. DUMMY1
ON BANK_NAME SUBTOTAL AVE. DUMMY2
WHERE JOB_DESC EQ 'PROGRAMMER TRAINEE';
ON TABLE NOTOTAL
END
In this, the two computes for DUMMY1 and DUMMY2 have been moved before the ACROSS. Therefore you can use them in the SUBTOTALs. I question why you are using ACROSS in this case. If you are just using a single JOB_DESC, then you do not need to use ACROSS.
That being said, I suspect that you want to go across multiple values and that you just included one JOB_DESC as an example. Is this correct? If so, then the sequence command comes in handy as indicated below:
TABLE FILE EMPLOYEE
SUM COMPUTE DUMMY1/D12.2M=CURR_SAL/2; AS '50% OF CUR_SAL'
COMPUTE DUMMY2/F6.2=ED_HRS/2; AS '50% OF ED_HRS'
BY BANK_NAME
BY DEPARTMENT
SUM CURR_SAL
ED_HRS
BY BANK_NAME
BY DEPARTMENT
ACROSS JOB_DESC AS ''
ON BANK_NAME SUBTOTAL AVE. CURR_SAL AS 'AVE'
ON BANK_NAME SUBTOTAL AVE. ED_HRS
ON BANK_NAME SUBTOTAL AVE. DUMMY1
ON BANK_NAME SUBTOTAL AVE. DUMMY2
WHERE JOB_DESC EQ 'PROGRAMMER TRAINEE';
ON TABLE NOTOTAL
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=BANK_NAME, SEQUENCE=1,$
TYPE=REPORT, COLUMN=DEPARTMENT, SEQUENCE=2,$
TYPE=REPORT, COLUMN=DUMMY1, SEQUENCE=98, $
TYPE=REPORT, COLUMN=DUMMY2, SEQUENCE=99, $
ENDSTYLE
END
Ken
Prod - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE
Dev - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE
Databases: Oracle 10g, SQL Server 2000, DB2.