Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved] Weird alpha value
Go
New
Search
Notify
Tools
Reply
  
[solved] Weird alpha value
 Login/Join
 
Guru
posted
Can someone see why this is happening...
the trailing blanks of the TRTP field became ÿ Frowner

Here is the synonym:
FILENAME=LITDES, SUFFIX=DB2     ,
 REMARKS='ledger interface transaction description', $
  SEGMENT=LITDES, SEGTYPE=S0,
    DESCRIPTION='ledger interface transaction description', $
    FIELDNAME=TRTP, ALIAS=TRTP, USAGE=A4, ACTUAL=A4,
      TITLE='Trans,Type', DESCRIPTION='Transaction type', $
    FIELDNAME=APID, ALIAS=APID, USAGE=A1, ACTUAL=A1,
      TITLE='App,Ind', DESCRIPTION='Application indicator', $
    FIELDNAME=TDES, ALIAS=TDES, USAGE=A40, ACTUAL=A40,
      TITLE='Transaction,Description', DESCRIPTION='Transaction description', $
    FIELDNAME=INFC, ALIAS=INFC, USAGE=A1, ACTUAL=A1,
      TITLE='Interface,Code', DESCRIPTION='Interface code', $
  


and here is the fex:

-* 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(one of)...
<tr linetype="data" linenum="5">
  <td colnum="c0">CIÿÿ</td> 
  <td colnum="c1">CIÿÿ -Cost invoices - all items</td> 
  </tr>
  


The result of DB2 field TRTP should be "CI" or "CI ", not "CIÿÿ" Confused

Hua

This message has been edited. Last edited by: Hua,


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
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
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
Guru
posted Hide Post
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.

Hua

This message has been edited. Last edited by: Hua,


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
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
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
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...

Smiler

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
 
Posts: 285 | Location: UK | Registered: October 26, 2007Reply With QuoteReport This Post
Guru
posted Hide Post
nubi, I am slapping my face now Mad


Hua

This message has been edited. Last edited by: Hua,


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
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
 
Posts: 285 | Location: UK | Registered: October 26, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved] Weird alpha value

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.