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]merge several columns into one

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]merge several columns into one
 Login/Join
 
Member
posted
Hello,

I am using webfocus development studio 8.009

I have a master file with several columns for Invoice number. Can someone please tell me if there is an easy way to merge this 4 columns (INV1, INV2, INV3, INV4)together into a column INVNO?

here is the fex file:

TABLE FILE CT_SHIP
PRINT
CT_SHIP.CT_SHIP.MAST
CT_SHIP.CT_SHIP.INV1/A7
CT_SHIP.CT_SHIP.INV2
CT_SHIP.CT_SHIP.INV3
CT_SHIP.CT_SHIP.INV4
WHERE CT_SHIP.CT_SHIP.SHIPDT EQ &SHIPDT.SHIPDT:.;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END

thanks,

Vera

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS DS 8.0.0.9
WebFOCUS AS 8.2.0.1
Iway Data Migrator 8.0.09
Windows, All Outputs
 
Posts: 13 | Registered: January 28, 2016Report This Post
Virtuoso
posted Hide Post
One possible way to do it is to use MATCH.

MATCH FILE CAR
BY CAR 
WHERE COUNTRY EQ 'FRANCE';
RUN
FILE CAR
BY CAR
WHERE COUNTRY EQ 'ENGLAND';
AFTER MATCH HOLD OLD-OR-NEW
END
TABLE FILE HOLD
PRINT CAR
END


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
thank you


WebFOCUS DS 8.0.0.9
WebFOCUS AS 8.2.0.1
Iway Data Migrator 8.0.09
Windows, All Outputs
 
Posts: 13 | Registered: January 28, 2016Report This Post
Master
posted Hide Post
much easier with a compute...

 
TABLE FILE CT_SHIP
PRINT 
CT_SHIP.CT_SHIP.MAST
CT_SHIP.CT_SHIP.INV1/A7
CT_SHIP.CT_SHIP.INV2
CT_SHIP.CT_SHIP.INV3
CT_SHIP.CT_SHIP.INV4
COMPUTE INV/A100V=CT_SHIP.CT_SHIP.INV1 | CT_SHIP.CT_SHIP.INV2 | CT_SHIP.CT_SHIP.INV3 | CT_SHIP.CT_SHIP.INV4 ;
WHERE CT_SHIP.CT_SHIP.SHIPDT EQ &SHIPDT.SHIPDT:.;
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END


The | Character does a soft concatenation preserving trailing spaces and the || does a hard concatenation, suppressing trailing spaces.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Expert
posted Hide Post
I agree with eric,

Concatenate "|" is probably the best way.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Or try the universal concatenation with MORE


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com

 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report This Post
Virtuoso
posted Hide Post
If those INV1..4 fields are numeric, you'll probably want to convert them to strings when concatenating them into a single field using compute.

See the Help on FPRINT and EDIT for that.


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
Member
posted Hide Post
Thanks for all the reply.


WebFOCUS DS 8.0.0.9
WebFOCUS AS 8.2.0.1
Iway Data Migrator 8.0.09
Windows, All Outputs
 
Posts: 13 | Registered: January 28, 2016Report 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]merge several columns into one

Copyright © 1996-2020 Information Builders