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] HOW TO COMBINE TWO OR MORE FIELDS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] HOW TO COMBINE TWO OR MORE FIELDS
 Login/Join
 
Member
posted
I AM USING DEVELOPER STUDIO AND I AM TRYING TO COMBING 4 FIELDS INTO ONE. YEARS IN PRACTICE 'YEARS' IS THE FIELD I WANT TO CREATE FROM NYEARS (NURSES) DYEARS (DOCTORS) AND PHYEARS (PHARMACISTS). THEY ARE SEPARATED IN THE DATA FILE BUT CONTAIN THE SAME TYPE OF INFORMATION CODED THE EXACT SAME WAY AND I NEED TO COMBINE THEM IS THIS POSSIBLE. i CAN WORK WITH GUI, BUT PREFER CODING!

THANKS,
KEMA

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


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 4 | Location: Charlotte, NC | Registered: July 08, 2011Report This Post
Platinum Member
posted Hide Post
Hi,

By combining do you mean adding up all the years to arrive at the total number of years:

a simple define or compute should do the trick:

 
DEFINE FILE FILENAME
TOTAL1/I4 = FLD1+FLD2+FLD3+FLD4;
END
TABLE FILE FILENAME
PRINT
TOTAL1 AS 'This is the Total Years'
END



thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
 
Posts: 103 | Registered: June 12, 2009Report This Post
Virtuoso
posted Hide Post
Combine could be the way Severus does it but you might want to see the result in an other way.
concatenate would be on

first convert the 4 year fields to alpha value and then make one long string of it.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Member
posted Hide Post
NO THE ANSWERS ARE CODED SO THAT 2= '2 TO 10 YEARS' AND 3= '11-35 YEARS'. THE ANSWERS FROM DOCTORS, NURSES AND PHARMACISTS ARE IN DIFFERENT FIELDS. I WANT TO COMBINE THEM SO THAT WHEN I RUN THE REPORT IT WILL SHOW THE COUNT ACCROSS THE SPECIALTIES BY THE ABOVE LIMITS.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 4 | Location: Charlotte, NC | Registered: July 08, 2011Report This Post
Guru
posted Hide Post
Are records for Doctors, Nurses and Pharmacists al on the same row?

Can you provide some example output? Just type out how you want the report to look like.

Something like?

NAME YEARS OF SERVICE
2-10 11-35
---------------------------------------------
Jane D. 3
John D. 12
Jim D. 2
----------------------------------------------
Total 5 12


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Member
posted Hide Post
DOC PHARM NURSE

2-10 25 10 5

11-35 60 26 9

36+ 21 15 0

tHIS IS A HORRIBLE REPRESENTATION...BUT I NEED THE REPORT TO LOOK SOMETHING LIKE THIS.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 4 | Location: Charlotte, NC | Registered: July 08, 2011Report This Post
Virtuoso
posted Hide Post
that is not very difficult

have you ever used the MORE functionality?

DEFINE FILE XXXX
YEARCODE=the field for nurses
GROUPCODE/A1='N';
END
TABLE FILE XXXX
COUNT somefield 
BY YEARCODE
BY GROUPCODE
ON TABLE HOLD AS NURSES
END

DEFINE FILE XXXX
YEARCODE=the field for doctors
GROUPCODE/A1='D';
END
TABLE FILE XXXX
COUNT somefield 
BY YEARCODE
BY GROUPCODE
ON TABLE HOLD AS DOCTORS
END
...and so on
then.
TABLE FILE NURSES
PRINT *
ON TABLE HOLD AS COMBITABLE
MORE
FILE DOCTORS
....
END
TABLE FILE COMBITABLE
SUM field
BY YEARCODE
ACROSS GROUPCODE
END




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
Seems like you may be looking for counts instead of sums? Maybe something like this:

DEFINE FILE x
 YEARS_IN_PRACTICE/A11 = IF (NYEARS EQ 2) OR (DYEARS EQ 2) OR (PHYEARS EQ 2) THEN '2-10 Years' ELSE
                         IF (NYEARS EQ 3) OR (DYEARS EQ 3) OR (PHYEARS EQ 3) THEN '11-35 Years' ELSE '+36 Years';
 COUNT_NURSES/I5C      = IF (NYEARS  NE 0) THEN 1 ELSE 0 ;
 COUNT_DOCTORS/I5C     = IF (DYEARS  NE 0) THEN 1 ELSE 0 ;
 COUNT_PHARMACISTS/I5C = IF (PHYEARS NE 0) THEN 1 ELSE 0 ;
END
-*
TABLE FILE x
 SUM
  COUNT_NURSES         AS '# of,Nurses'
  COUNT_DOCTORS        AS '# of,Doctors'
  COUNT_PHARMACISTS    AS '# of,Pharmacists'
 BY YEARS_IN_PRACTICE  AS 'Years in,Practice'
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
Thank you very much, it looks like one of these will work.

Kema


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 4 | Location: Charlotte, NC | Registered: July 08, 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     [SOLVED] HOW TO COMBINE TWO OR MORE FIELDS

Copyright © 1996-2020 Information Builders