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] Build a string from a field in multiple records

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Build a string from a field in multiple records
 Login/Join
 
Gold member
posted
I know I've seen this before but can't seem to get back to it.

I have a table with student_id and course_id like this:

quote:

PAGE 1

PERSON_UID CRS_ID
00021572 MAT 000
MAT 112
MAT 119
MAT 191

01038239 MAT 000
MAT 115



I need to print all the courses as a string field like this:

quote:

PERSON_UID ALL_MATH_COURSES
00021572 MAT 000 MAT 112 MAT 119 MAT 191
01038239 MAT 000 MAT 115



Thanks......Steve

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


Dev Studio /7.6.11/7.7.02M
MVS/USS
AIX/SOLARIS
Windows WF Client 7.6.8/7.6.11
 
Posts: 64 | Location: Eastern and middle NC | Registered: March 13, 2007Report This Post
Expert
posted Hide Post
Here's my first thought: COMPUTE (or DEFINE) a field which concatenates NewField/A132 = ThisField | LAST ThisField ; and so on...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Hi Steve,

Here's an example using the CAR file. This creates a string (CAR_LIT) of all CARs per COUNTY.

-*
TABLE FILE CAR
PRINT CAR
BY COUNTRY
ON TABLE HOLD AS TMP_CAR
END
-*
DEFINE FILE TMP_CAR
CAR_LIT/A90 = IF COUNTRY EQ LAST COUNTRY
THEN SUBSTR(90, CAR_LIT, 1, 72, 72, 'A72') || (', ' | CAR)
ELSE CAR;
END
-*
TABLE FILE TMP_CAR
SUM CAR_LIT
BY COUNTRY
END

Maybe this will help.

Jim


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Gold member
posted Hide Post
Jim,

That worked perfectly!

I had started looking at string functions but figured by the time I went through all the iterations, someone would have the answer already.

Thanks a bunch............Steve

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


Dev Studio /7.6.11/7.7.02M
MVS/USS
AIX/SOLARIS
Windows WF Client 7.6.8/7.6.11
 
Posts: 64 | Location: Eastern and middle NC | Registered: March 13, 2007Report This Post
Platinum Member
posted Hide Post
Hi Steve,

Glad it worked.

I save little examples like this so I can use them the next time I need it.

~Jim


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 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] Build a string from a field in multiple records

Copyright © 1996-2020 Information Builders