SELECT Failed 3707 Syntax error, expected something like an 'EXCEPT' keyword or an 'UNION' keyword or a 'MINUS' keyword between

Below if the SQL I am trying to get to run. I am receiving the following error message upon execution: SELECT Failed 3707 Syntax error, expected something like an 'EXCEPT' keyword or an 'UNION' keyword or

a 'MINUS' keyword between ')' and the word 'z'

Here is the code:

with dqry_cc ( mop_cd, mop_desc, group_branch_id, ecr_tmz_name ,

stn_stn_id , stn_id, grp_brn_id ) as

(

select

a.mop_cd ,

a.mop_desc,

so.group_branch_id ,

t.ecr_tmz_name,

so.stn_stn_id,

s.stn_id ,

s.grp_brn_id

from

rfs.stn_ops_hierarchies so,

rfs.mthd_of_pymts a,

rfs.stns s,

rfs.tmzs_map t

where

s.stn_id = so.stn_stn_id

and a.mpt_mop_type_code = 'CC'

and S.TMZ = T.TMZS_TMZ

and so.group_id ='01'

and so.region_cd = 'RGN_stl_99'

and so.group_branch_id ='0101'

)

select *

from

(

select

cc.group_branch_id as GpBr,

cc.mop_desc as Descr,

CAST(SYSLIB.ERAC_GMT_TO_LCL(p.pymt_dt, cc.ecr_tmz_name) AS timestamp(6)) as LocalPaydate,

cast(SYSLIB.ERAC_GMT_TO_LCL(p.pymt_dt, cc.ecr_tmz_name) as date) as ph_pymt_dt,