Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     numbers prepended to char output

Read-Only Read-Only Topic
Go
Search
Notify
Tools
numbers prepended to char output
 Login/Join
 
Platinum Member
posted
I'm trying to grab a person's name from a table and display in HTML:

TABLE FILE CONTACT
PRINT FULLNAME
WHERE ID EQ &ID
ON TABLE SAVE AS FULLNM
END
-RUN
-READ FULLNM &FULLNM.A50
-TYPE &FULLNM

What displays is "000012" prepended to the person's name. "fullname" col is defined as A50V in master file, but it works as A50. Why is this the case?


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Master
posted Hide Post
I see this issue in the earlier versions.

Try this,

TABLE FILE CONTACT
PRINT FULLNAME
WHERE ID EQ &ID
ON TABLE SAVE AS FULLNM
ON TABLE SET VARCHAR OFF
END
-RUN
-READ FULLNM &FULLNM.A50
-TYPE &FULLNM

Hope this helps,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Virtuoso
posted Hide Post
quote:
fullname" col is defined as A50V in master file, but it works as A50. Why is this the case?


If your question is as to the last part, I believe variable character data can be accessed as fixed at the maximum length, I also don't believe that for reporting purposes, focus likes variable character much.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Using "ON TABLE SET VARCHAR OFF" did not work. I'll just stick to the fixed char solution, unless someone else out there has an idea. Thank you both.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
Mark

If you do need the varchar field you can either first define an other field like NEWFULL/A50=FULLNAME or you can solve this in the read command, I found that this varchar fields always gives 6 extra characters, so
-READ FULLNM FILL.A6. &FULLNM.A50

will do it.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Mark,

A very simple method is to force the output to be a fixed length and then you need not mess around with the -READ -

TABLE FILE CONTACT
PRINT FULLNAME.A50
WHERE ID EQ &ID
ON TABLE SAVE AS FULLNM
END
-RUN
-READ FULLNM, &FULLNM
-TYPE &FULLNM

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Tony

quote:

PRINT FULLNAME.A50


should this be FULLNAME/A50 ?

and now you get the field two times unless???




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Frank,

Too true Frank, wondered who would pick up my intentional typo Music Glad to see that you're awake.

And of course I forgot to add ON TABLE SET HOLDLIST PRINTONLY.

I put it down to a dys.. dis... dyslexic keyboard Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
There is a setting on your WebFocus server that can be used to turn off the varchar option. Unfortunately, I can not remember what it is. Open a case with IBI and ask about it. Functions other than concatenation can be affected by the varchar and give incorrect results.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Place this setting in your edasprof
SQL SQLORA SET VARCHAR OFF
This will keep future mfd's from being created with variable length fields.

Also, since the field is defined in the mfd as a AnV, I would define a new field in the mfd to a straight alpha format. If my memory serves me correctly, you can just change the USAGE format to an alpha. Give that a shot, if not define a new field.


WF 7.7.05
HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files
HTML, Excel, PDF
 
Posts: 149 | Location: Dallas, TX | Registered: June 08, 2007Report This Post
Virtuoso
posted Hide Post
And, if you do need the varchar to be present, you could always read your hold file using DM and skip the 6 bytes that contain the length of the variable. The hold file will be fixed length no matter what.
So:
-READ FULLNM &X.6 &FULLNM.A50

G.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
G

That is what I said too, but I never realised that the first six digit gives you the lengt of the characterstring. Interesting to know, and might be usable sometime.!




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     numbers prepended to char output

Copyright © 1996-2020 Information Builders