This is a very simple task and I got off track by trying to follow the FOCUS=20 Manual pp 9-80 to 9-82 ; Here's the deal; there is a file w/ ssn, fund, bal , h ; if fund is in a list of funds noted by ddname gs then I want to create a new fld based on Values of h. My question now is if I use take =3D DECODE FUND(GS ELSE 1); FROM THE MANUAL IS take supposed to be 0/1 or is it the value of fund. In one place the Manual leads me to believe one way; the next sentence the other. Can anyone Shine some light - even a glimmer - at the end of the tunnel? Thnx bobh -----Original Message----- From: focus-l-bounce@xxxxxxxxxxxxx [mailto:focus-l-bounce@xxxxxxxxxxxxx] On Behalf Of Mickey Grackin Sent: Wednesday, May 05, 2004 7:50 AM To: focus-l@xxxxxxxxxxxxx Subject: [focus-l] Re: TRUNCATION Bobh, You are trying to set COL1 equal to either O_B or '0'. The first problem I see is that you have quotes around the zero. That makes FOCUS expect an Alpha format field on the left hand side of the expression, so remove the quotes. Second, what is the format of O_B? If that's and Alpha field you can't assign it to COL1 with a format of P6. I'm not sure why FOCUS says there is a FORMAT ERROR IN DECODE. It could be that FOCUS just doesn't like the way you are embedding it into the IF statement. Just some observations. Mickey Grackin (301) 975-8417 -----Original Message----- From: focus-l-bounce@xxxxxxxxxxxxx [mailto:focus-l-bounce@xxxxxxxxxxxxx] On Behalf Of Hamilton, Robert Sent: Tuesday, May 04, 2004 5:38 PM To: focus-l@xxxxxxxxxxxxx Subject: [focus-l] Re: TRUNCATION Thnx, Ron Then I get for this COL1/P6 =3D3D IF ((DECODE FUND(GS ELSE 'X') NE 'X' ) AND ( HOUSING EQ '1' OR '2' ) ) THEN O_B ELSE '0'; I get this COL1/P6 =3D3D IF ((DECODE FUND(GS ELSE 'X') NE 'X' ) ERROR AT OR NEAR LINE 54 IN PROCEDURE ADHO0503FOCEXEC FOC272) FORMAT ERROR IN DECODE OR FILE ELEMENT: X AND ( HOUSING EQ '1' OR '2' ) ) THEN O_B ELSE '0'; GS points to a file with a list of funds but if I make col1 /a001 Then no error. ????? bobh -- Binary/unsupported file stripped by Ecartis -- -- Type: application/ms-tnef -- File: winmail.dat