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] Changing column to row, spliting column to row. using BY after or with OVER.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Changing column to row, spliting column to row. using BY after or with OVER.
 Login/Join
 
Gold member
posted
I have a database data as below:

ID |DESC | A_1| A_2 | A_3 | A_4 | A_5|
----------------------------------------------------------------------
1 | FIRST |21 | 22 | 23 | 24 | 25 |
2 |SECOND |32 |33 | 34 |35 | 36 |
--------------------------------------------------------------------------

I WOULD LIKE TO PRINT IT AS

FOR A_1
FIRST ---> 21
SECOND ----> 32

FOR A_2
FIRST ---> 22
SECOND ----> 33

FOR A_3
FIRST ---> 23
SECOND ----> 34

FOR A_4
FIRST ---> 24
SECOND ----> 35

FOR A_5
FIRST ---> 25
SECOND ----> 36


As with little knowledge in reporting and with WebFocus it seams that this simple requirement involves little complication to first split the columns to rows and then use by field to separate it.

But before that i would like to know if there is any simple way/technique to do this?

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


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
 
Posts: 50 | Registered: August 04, 2009Report This Post
<JG>
posted
If you would care to search the forum this sort of thing has been discussed many times ( McGuyver Technique )

However here is a novel approach. (remember Windows and Unix use different end of line characters)

DEFINE  FILE SOURCE
NL/A2= HEXBYT(013,'A1')||HEXBYT(010,'A1');
A_1T/A3='A_1';
A_2T/A3='A_2';
A_3T/A3='A_3';
A_4T/A3='A_4';
A_5T/A3='A_5';
END
TABLE FILE SOURCE
SUM A_1T DESC A_1 NL A_2T  DESC A_2 NL A_3T DESC A_3 NL A_4T  DESC A_4  NL A_5T DESC  A_5
BY DESC NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD FORMAT ALPHA
END
-RUN
FILEDEF HOLD DISK HOLD.FTM (LRECL 11
-RUN
EX -LINES 6 EDAPUT MASTER,hold,CV,FILE
FILENAME=HOLD, SUFFIX=FIX,$
SEGNAME=ONE, SEGTYPE=S1 ,$
  FIELD=COL  ,ALIAS=  ,A3 ,A3 ,$ 
  FIELD=DESC  ,ALIAS=  ,A6 ,A6 ,$ 
  FIELD=VALUE  ,ALIAS=  ,I2 ,A2 ,$
-RUN
TABLE FILE HOLD
PRINT  DESC AS ''   VALUE AS ''
BY COL NOPRINT
ON COL SUBHEAD
"For <COL"
ON COL SUBFOOT
" "
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END
 
Report 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] Changing column to row, spliting column to row. using BY after or with OVER.

Copyright © 1996-2020 Information Builders