Focal Point
COLUMN Names

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6731088331

July 26, 2005, 04:13 PM
slfmr
COLUMN Names
I am having a problem with my column names printing out right all the time. Sometimes they print fine, others they will print the name in the actual define. For example:

DEFINE FILE MYFILE
BEN_GROUP/A20 = IF ......
END;

TABLE FILE MYFILE
SUM
MAX.BEN_GROUP AS 'Benefit Group'
END

What I get in the output is the field name called:
MAX.BEN_GROUP

And I don't know why this is happening. Can anyone help?

Thank you.
July 26, 2005, 04:29 PM
susannah
SET ASNAMES = ON
DEFINE FILE MYFILE
BEN_GROUP/A20 = IF ......
END;
TABLE FILE MYFILE
SUM
MAX.BEN_GROUP AS 'Benefit Group'
END
July 26, 2005, 05:24 PM
slfmr
GREAT thank you, that seemed to work!
July 26, 2005, 05:29 PM
mgrackin
SET ASNAMES affects the name of fields in a HOLD file. This should not be affecting the actual display of the AS name when showing the results of the request. Are you creating a HOLD files?
July 26, 2005, 05:46 PM
slfmr
No I am not creating a Hold File at this point, and that code only worked for so long and then all of a sudden the titles were back. This is my code:
-**My Output fields say MAX.OUT_BENG, etc...


SQL SQLMSS SET DEFAULT_CONNECTION PIW_DEV
SQL SQLMSS
SELECT QUEST_ID, ANSWER_ID, ANSWER
FROM T_ANSWER
WHERE QUEST IN (329,872,330,331,332,820,333,334,337);
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS HOLDREM
END

DEFINE FILE HOLDREM
OUT_BENG/A2000 = IF QUEST EQ 329 THEN ANSWER ELSE ' ';
OUT_BENN/A2000 = IF QUEST EQ 872 THEN ANSWER ELSE ' ';
OUT_KITC/A2000 = IF QUEST EQ 330 THEN ANSWER ELSE ' ';
OUT_KITN/A2000 = IF QUEST EQ 331 THEN ANSWER ELSE ' ';
OUT_KITT/A2000 = IF QUEST EQ 332 THEN ANSWER ELSE ' ';
OUT_FORM/A2000 = IF QUEST EQ 820 THEN ANSWER ELSE ' ';
OUT_TRIG/A2000 = IF QUEST EQ 333 THEN ANSWER ELSE ' ';
OUT_MAIL/A2000 = IF QUEST EQ 334 THEN ANSWER ELSE ' ';
OUT_COMM/A2000 = IF QUEST EQ 337 THEN ANSWER ELSE ' ';
END

TABLE FILE HOLDREM
SUM
MAX.OUT_BENG AS 'Benefit,Group'
MAX.OUT_BENN AS 'Benefit,Group,Notes'
MAX.OUT_KITC AS 'Kit,Code'
MAX.OUT_KITN AS 'Kit,Name'
MAX.OUT_KITT AS 'Kit,Type'
MAX.OUT_FORM AS 'Include,Form'
MAX.OUT_TRIG AS 'Trigger,Timing'
MAX.OUT_MAIL AS 'Mail,Timing'
MAX.OUT_COMM AS 'Comments'
BY ANSWER_ID NOPRINT
END

Would it have anything to do with the commas in my titles? I need them to wrap because they are too long.
July 26, 2005, 06:41 PM
mgrackin
Hmm. Interesting. I can't seem to duplicate the problem with WebFOCUS 7.1 on Win2k using the CAR file. What version of FOCUS/WebFOCUS are you using and on what platform?

Does anyone else find it strange that the SET ASNAMES = ON solved a problem with displaying AS names on a report?
July 26, 2005, 06:48 PM
slfmr
Well it looked like it solved it, but then the problem seemed to reappear... so in actuality the problem wasn't resolved. Does that makes sense? Because originally the column titles used to come out right only some of the time, and wrong the other times. I don't know why this would happen either.

I am using WF 533.
July 26, 2005, 09:13 PM
susannah
yep, agreed, strange indeed, Mickey, yet sometimes it works (even tho it should have no effect ) on a report when that report comes out of a long dense fex. I always try it first when i have a screwup...and the su goes away. absolute mystery.
July 26, 2005, 10:19 PM
dwf
Not to twist the knife, Susannah, but I'd think, given recent events, that you'd be just a tad wary of accruing a collection of programs that use code that isn't supposed to work. And, slfmr, you might wary of that yourself, lest IBI decides in some future release to plug the hole that lets this work, leaving you with one or a billion programs that no longer work.
July 27, 2005, 06:12 PM
slfmr
Thanks for all your help. We currently have someone looking into this mystery.