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     [SOLVED] Alpha numeric to Varchar conversion

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Alpha numeric to Varchar conversion
 Login/Join
 
Member
posted
how to covert a field of A22 format into A160V without white spaces

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


WebFOCUS 769, Windows XP platform and Output formats: HTML,excel, PDF
 
Posts: 19 | Registered: November 04, 2008Report This Post
Virtuoso
posted Hide Post
Just do an assigment: FA160V = FA22;
What exactly do you mean with 'no white space'?
That's just what a AxxV variable does, it removes the white space when it is stored in the database.
But this is valid only for relational databases, not for FOCUS db nor for hold format alpha or binary.


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
Focus and xfocus support "alpha variable" fields.

Focus format is based on uniform segment-instance length within all pages of a Segment; segment instances are keyed to page and offset.

Xfocus is designed to accommodate variable-length fields, and thus variable-length segment instances (so your 1-character value in an A40V can take up less room than a full 40-char value): Segment instances are keyed to page and row (rather than page and offset); the offset and length are stored in a table on the page (somewhat like IDMS's page structure).


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Member
posted Hide Post
Actually i am trying to create a define field which concate 3 fields(in RDBMS) of format A6,A8,A8 and then assign to A160V format

Below is the code I used in my
VALPFX/A7V = TRIMV('B', PFX, 6, ' ', 1, 'A6V');
VALBAS/A9V = TRIMV('B', BAS, 8, ' ', 1, 'A8V');
VALSFX/A8V = TRIMV('B', SFX, 8, ' ', 1, 'A8V')

CONCAT04/A22V = VALPFX || VALBAS || VALSFX;
Part_No/A160V= CONCAT04

I am storing this output in FOCUS database and set index to Part_No since I need to join this output with another table field of format A160V.

I am getting an error (FOC1400) SQLCODE IS -904 (HEX: FFFFFC78)


WebFOCUS 769, Windows XP platform and Output formats: HTML,excel, PDF
 
Posts: 19 | Registered: November 04, 2008Report This Post
Expert
posted Hide Post
Gopal,

When does 7+9+8 equal 22???
quote:
VALPFX/A7V = TRIMV('B', PFX, 6, ' ', 1, 'A6V');
VALBAS/A9V = TRIMV('B', BAS, 8, ' ', 1, 'A8V');
VALSFX/A8V = TRIMV('B', SFX, 8, ' ', 1, 'A8V');


S/B

 
VALPFX/A6V = TRIMV('B', PFX, 6, ' ', 1, 'A6V');
VALBAS/A8V = TRIMV('B', BAS, 8, ' ', 1, 'A8V');
VALSFX/A8V = TRIMV('B', SFX, 8, ' ', 1, 'A8V');
 



Programmer error...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
Joining a virtual A160V field to a real A160V field is not a very smart idea.
I would suggest to convert the real A160V field to the A24 field (without the 'V'.




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
Member
posted Hide Post
Sorry it is Typo error, i have it as
VALPFX/A6V = TRIMV('B', PFX, 6, ' ', 1, 'A6V');
VALBAS/A8V = TRIMV('B', BAS, 8, ' ', 1, 'A8V');
VALSFX/A8V = TRIMV('B', SFX, 8, ' ', 1, 'A8V')

only


WebFOCUS 769, Windows XP platform and Output formats: HTML,excel, PDF
 
Posts: 19 | Registered: November 04, 2008Report This Post
Expert
posted Hide Post
Gopal,

I am sure we don't have all the information.

Is missing the semi-colon on this line also a typo???
  
Part_No/A160V= CONCAT04


quote:

Joining a virtual A160V field to a real A160V field is not a very smart idea.

Frank, he states he's creating a FOCUS DB, so, it's not virtual...

You are probably trying to JOIN a FOCUS DB with a RDBMS table; I have always mentored to pull the RDBMS data, HOLD it, then do the JOINs.

Using a VARCHAR for a JOIN is "not" a good idea, I refuse to do it. Frank's second statement is the route to take, maybe A160 instead of A22...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
It worked!! I did a Join define field of A22 against hold file field of A22 format....

Many Many Thanks....... Tom & Frank


WebFOCUS 769, Windows XP platform and Output formats: HTML,excel, PDF
 
Posts: 19 | Registered: November 04, 2008Report 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     [SOLVED] Alpha numeric to Varchar conversion

Copyright © 1996-2020 Information Builders