CREATE MACRO FAILED ')' and ')'

DATABASE DB2;

CREATE MACRO CL_LINE_DENIAL ( CL_PAID_DATE_ID BIGINT) AS (SELECTSV.CL_ID,SV.V_LINE,mem.MED_ID,mem.FIRST_NAME,mem.LAST_NAME,CASE WHEN prov.INST_NAME IS NULL THEN TRIM(prov.PRAC_FIRST_NAME)||' '||TRIM(prov.PRAC_LAST_NAME) ELSE prov.INST_NAME END AS PROV_NAME,A.NPI AS PROV_NPI,A.IRS_ID AS PROV_TIN,A.IRS_NAME AS PAY_TO_NAME,

A.CLA_HAT_CODE,A.CLA_HAT_DESC,A.PARTICIPATING_PROV_IND,A.MEDICAID_ID AS PROV_MEDICAID_ID,SV.PRIMARY_DIAG_CODE,SV.PROC_CODE_1,dpm1.PROC_MODIFIER_CODE AS PROC_MOD_CODE_1,dpm1.PROC_MODIFIER_DESC AS PROC_MOD_DESC_1,SV.PROC_CODE_2,pos.PLACE_OF_SERV_CODE AS POS_CODE,SV.SERVICE_START_DATE_ID,SV.SERVICE_END_DATE_ID,

RCVDATE.DATE_DATE as CL_RCVD_DATE,SV.CLEAN_DATE_ID AS CL_CLEAN_DATE,SV.BILLED_AMT,SV.ALWD_PROV_AMT,CASEwhen ASR.RPTING_GROUP_CODE = 'INFO' then 'PAY'when SV.CL_PAID_DATE_ID = -2 then 'PEND'else ASR.RPTING_GROUP_CODEend AS REPORTING_GROUP_CODE,CASEwhen (ASR.RPTING_GROUP_CODE = 'PEND' OR SV.CL_PAID_DATE_ID = -2) then 0when ASR.RPTING_GROUP_CODE = 'DENY' then 0else SV.PAID_AMTend as PAID_AMT,SV.INTEREST_AMT,SV.CL_PAID_DATE_ID,ASR.ADJDCTN_STATUS_REASON_CODE AS ADJDCTN_CLS_STATUS_REASON_CODE,ASR.ADJDCTN_STATUS_REASON_DESC AS ADJDCTN_STATUS_REASON_DESC,ads.ADJDCTN_STATUS_CODE AS ADJDCTN_STATUS_CODE,ads.ADJDCTN_STATUS_DESC AS ADJDCTN_STATUS_DESC,asr1.ADJDCTN_STATUS_REASON_CODE AS CLS_STATUS_REASON_CODE_1,asr1.ADJDCTN_STATUS_REASON_DESC AS STATUS_REASON_DESC_CODE_1_DESC1