How do I get a look at the SQL that FOCUS generates; I've tried //FSTRACE4 DD SYSOUT=* WITH SET TRACEON=STMTRACE//FSTRACE4 In the exec. . . Thnx bobh ________________________________ From: roberth@xxxxxxxxxxxx [mailto:roberth@xxxxxxxxxxxx] Sent: Wednesday, January 19, 2005 9:32 AM To: 'FOCUS-L@xxxxxxxxxxxxx' Cc: 'FOCUS-L@xxxxxxx' Subject: focus ???? I gotta tell you; sometimes FOCUS drives me nuts... I've been using a piece of boilerplate code for over 4 yrs and Tried to import it to another exec ; BANG Hangs on a -GOTO With (FOC283) IMPROPER USE OF 'GOTO' Here's the code -READ SIOAWK &ZEROES.A9.,&CCYY.A4. -TYPE AMPER CCYY IS &CCYY; -RUN -SET &Y = EDIT(&CCYY, '$$$9') -TYPE AMPER Y IS &Y ; -SET &ODD_EVEN = DECODE &Y(1 ODD 3 ODD 5 ODD 7 ODD 9 ODD ELSE EVEN); -RUN -TYPE ODD_EVEN IS &ODD_EVEN ; -RUN This gives AMPER Y IS 5 ; ERROR AT OR NEAR LINE 21 IN PROCEDURE EXTRACTMFOCEXEC (FOC273) SYNTAX ERROR IN DECODE If I put single quotes around &Y in the DECODE then I get an error about -GOTO in a subsequent statement. . . If I string the DECODE out left-to-right I get!!!!!!!!! ERROR AT OR NEAR LINE 21 IN PROCEDURE EXTRACTMFOCEXEC (FOC271) ODD NUMBER OF DECODE LIST ELEMENTS Go Figure I've always had trouble with DECODE - and FOCUS in General - but this baffles me. I'll swear this is working in Several other execs. If anyone can spot the problem, I will be most grateful; I've spent the entire night trying to figure this out. . . . Bob Hamilton FOCUS DRIVES ME NUTS. . .