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     [CLOSED]Convert column from TEXT to Alpha?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Convert column from TEXT to Alpha?
 Login/Join
 
Member
posted
Not sure if this is feasible but I have a report where one of the columns is set to text with some numbers in it.

So

1
6
8
Full
9
Full

I have some formatting where it checks to see if there is a value in this column 'GE 8'

Im hitting an error saying it cant do it (makes sense) since its a text type field. I also of course cant perform max, min or average for this column since its text.

I was wondering, if i were to convert this column into an ALPHA format would I then be able to manipulate the numbers in the column?

Thanks in advance WF gurus

This message has been edited. Last edited by: Rodney Chan,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 26 | Registered: October 27, 2011Report This Post
Virtuoso
posted Hide Post
How big can your data be in that particular field?

If its around <= 4096 characters, you can just add a new field in your masterfile aliasing the same database field. Make it an "A4096
" data type and treat it as you would any alphanumeric field.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
This is what I mean ...

Let's say you have a field like the following in your master file:

...
FIELDNAME=MYTEXT, ALIAS=MYTEXT, USAGE=TX50, ACTUAL=TX, $



Adding a new field (still aliasing your MYTEXT database field) you would end up with something like:

...
FIELDNAME=MYTEXT, ALIAS=MYTEXT, USAGE=TX50, ACTUAL=TX, $
FIELDNAME=MYTEXT_ALPHA, ALIAS=MYTEXT, USAGE=A4096, ACTUAL=A4096, $



You can now use MYTEXT_ALPHA as you would with any regular alpha field.

That does not solve your problem about the "8" value. Does the original field contain only "8" as its entire value, or is "8" just one piece among many others that make up the value of that field in a particular record? I ask because TEXT fields by nature are "huge" fields (CLOB's) with any content in them (including LF/CR, etc.) so you may still need to parse this alpha field, extract the value somehow (you know your data patterns) and then use/compare as you need.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
From the Manual:

quote:

Using Text Fields in DEFINE and COMPUTE
Text fields can be assigned to alphanumeric fields and receive assignment from alphanumeric
fields. If an alphanumeric field is assigned the value of a text field that is too long for the
alphanumeric field, the value is truncated before being assigned to the alphanumeric field.


WF 7.6.10, Windows, PDF, Excel
 
Posts: 75 | Location: Dallas, TX | Registered: February 12, 2004Report This Post
Expert
posted Hide Post
FIELDNAME=MYTEXT, ALIAS=MYTEXT, USAGE=TX50, ACTUAL=TX, $
FIELDNAME=MYTEXT_ALPHA, ALIAS=MYTEXT, USAGE=A4096, ACTUAL=A4096, $


Just my thoughts here (imho), aside from your original post. You shouldn't use the same value for ALIAS multiple
times. This may cause problems now or later, for you or who ever maintains this code. Also, keep in mind the rules for "shortest unique truncations" when names fields and aliases in MFDs.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
quote:
I was wondering, if i were to convert this column into an ALPHA format would I then be able to manipulate the numbers in the column?


No, you would need a numeric field for that, not an ALPHA field.

Make sure you have some idea what 'Full' (and possibly other text strings) would mean in a numeric context - is that similar to MISSING or is it perhaps closer to 'infinity'?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
Doug, ALIAS= refers to the physical name of the column in the database, so it can't be changed.

I had a similar confusion years ago when I thought FIELDNAME= referred to the physical field and ALIAS= was just "my" chosen name for the field in the WebFOCUS world but it's actually the opposite. The attribute naming used in the MFD makes this confusing but there's not much we can do about that. Frowner



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Hmmm, now I am confused again Confused will have to check the docs once more ...



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Okay, found it!

quote:
Assign a value to ALIAS in the following way for the following types of data sources:

Relational data sources. ALIAS describes the field original column name as defined
in the relational table

Sequential data sources. ALIAS describes a synonym, or alternative name, that you
can use in a request to identify the field. You can assign any name as the alias .. (more stuff)

FOCUS data sources. ALIAS describes a synonym, or alternative name, that you can
use in a request to identify the field ... ( more stuff)



So, ALIAS is indeed a field "alias" when dealing with FOCUS or sequential data sources, but it refers to the original column name in the database (Oracle, SQL Server, etc.) which is the way I regularly use it.

I just assumed Rodney was using a DBMS as he needed to deal with a TEXT field which I usually associate with DBMS-based tables.

Perhaps he could tell us exactly what he's using and how?

Anyway, this was a good refresh of foundation concepts for me Smiler



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Member
posted Hide Post
quote:
Originally posted by Wep5622:
quote:
I was wondering, if i were to convert this column into an ALPHA format would I then be able to manipulate the numbers in the column?


No, you would need a numeric field for that, not an ALPHA field.

Make sure you have some idea what 'Full' (and possibly other text strings) would mean in a numeric context - is that similar to MISSING or is it perhaps closer to 'infinity'?


Ugh this is what i was wanting to confirm.

I will speak to the end user and just try to convince them to use a numeric error code (such as 9999) rather then display text as its really causing a lot of problems with formatting and calculations and such.

Thank you all! (And thanks again njsden ^_^)


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 26 | Registered: October 27, 2011Report 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     [CLOSED]Convert column from TEXT to Alpha?

Copyright © 1996-2020 Information Builders