-* File com_rule_lookup.fex
SET HOLDLIST = PRINTONLY
DEFINE FILE LITDES
DSPTEXT/A50=TRTP ||'-' || TDES;
END
TABLE FILE LITDES
PRINT
DSPTEXT
BY TRTP
WHERE APID EQ 'B';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
END
The result of DB2 field TRTP should be "CI" or "CI ", not "CIÿÿ"
HuaThis message has been edited. Last edited by: Hua,
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
March 16, 2009, 01:23 PM
Francis Mariani
Hua,
I'm not sure why this is happening, have you tried to comment out the PCHOLD to see if the data is retrieved correctly?
Also, you could code the request like this, no define:
SET HOLDLIST = PRINTONLY
TABLE FILE LITDES
PRINT
COMPUTE DSPTEXT/A50=TRTP ||'-' || TDES;
BY TRTP
WHERE APID EQ 'B';
ON TABLE PCHOLD FORMAT XML
END
By the way, should it be PCHOLD or HOLD?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
March 16, 2009, 10:28 PM
susannah
Francesco, the PC hold makes this a dropdown list for a launch page. Hua, rather than go stright to xml, just do a straight dump of the data to see whats up. maybe your master doesn't match your file TABLE FILE LITDES PRINT TRTP END
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 17, 2009, 04:05 AM
GamP
I ahve seen this happen before, but then with an MS SQL database. There it was caused by the database being set up to allow for multiple languages and unicode. We did solve this, but I really can't remember how we did it. Don't know if this could also be the case in your setup.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 17, 2009, 09:44 AM
Hua
Thank you for responding.
I did a simple print, or COMPUTE, the result is the same.
It was fine if I pull the sample data directly in the synonym editor. I also tried use the ODBC driver to dump the data onto excel and it looked fine too.
GamP, LITDES is a physical file DB and no different than other files I have been working on.
HuaThis message has been edited. Last edited by: Hua,
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
March 17, 2009, 12:11 PM
Hua
I just found out that it is data problem. The weird values are actually the *HIVALs in AS400/RPGLE.
I will do a string replace to get rid of them since I know what they look like in WF.
Thanks.
Hua
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
March 17, 2009, 12:27 PM
nubi
golden rule: always always always check your source data.
we all do it but seriously make it the first thing you do next time; will save you a lot of time...
This message has been edited. Last edited by: nubi,
Developer Studio 7.64 Win XP Output: mostly HTML, also Excel and PDF
"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
March 17, 2009, 12:47 PM
Hua
nubi, I am slapping my face now
HuaThis message has been edited. Last edited by: Hua,
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
March 18, 2009, 03:30 AM
nubi
well don't slap too hard! we've all done it and its the only way to learn, so the next time you get a problem like this you'll think 'wait a minute, lets check the data first!'
keep going!
Developer Studio 7.64 Win XP Output: mostly HTML, also Excel and PDF
"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor