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     Modifying column data and using in BY-Issue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Modifying column data and using in BY-Issue
 Login/Join
 
Gold member
posted
All,
I have to rename the data of the Column in the Output and I'm using this column in the grouping condition(BY).I tried using IF Condition in DEFINE but its not giving me the expected output.For eg: if i have a COLUMN1 with data as AB,BC,CD,EF.And i want show AB,BC as ABC and CD,EF as CDEF.So, in the output i will be having ABC and CDEF with the data of AB,BC grouped iin ABC and CD,EF grouped in CDEF.
When i tried the same with COMPUTE,it is not giving me the right answer.
Let me know if you have a solution.
Regards
R.Prasanna


Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP


 
Posts: 80 | Registered: March 21, 2007Report This Post
Virtuoso
posted Hide Post
Prasanna,
Be clear:
If you have in your TABLE command BY COL1 and a result where:
COL1
AB
BC
CD
EF

you would like to see 2 rows instead of 4. That is ok. BUT, if in the first 2 original rows, by chance, you have AB and BC then in the resulting 1 row you want to see ABC? Then what is B?

However, if you want to show in each resulting row the concatenation of the values of COL1 for each 2 original rows, then try this:
TABLE FILE CAR
SUM SALES 
COMPUTE CC/I1=IF LAST CC EQ 0 THEN 1 ELSE 0;
COMPUTE LL/I5=IF CC EQ 1 THEN LAST LL + 1 ELSE LAST LL;
BY CAR
ON TABLE HOLD
END
-RUN
SET ASNAMES=ON
TABLE FILE HOLD
SUM CAR SALES BY LL
ACROSS HIGHEST CC
ON TABLE HOLD AS HOLD1
END
DEFINE FILE HOLD1
CAR2/A38=CAR1 || ' ' | CAR0;
SAL2/I6=SAL1 + SAL0;
END
TABLE FILE HOLD1
PRINT CAR2 SAL2
END

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Prasanna,

Add a define (as you probably aready have) that DECODEs the value from column1 -
DEFINE FILE filename
NEW_COL/A4 = DECODE column1 ('AB' 'ABC' 'BC' 'ABC' 'CD' 'CDEF' 'EF' 'CDEF' ELSE '?')
and then sort on NEW_COL.

This would be covered in a basic training course and you should push your managers to provide you with training.

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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Modifying column data and using in BY-Issue

Copyright © 1996-2020 Information Builders