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.
I have a field that contains a course number ENGLISH 1000 , for example. Now I need to make sure that the list of values for a particular student are unique. EXAMPLE
As you can see on the table above the student has ENGL1000 on both Slot 1 and 5. In order for me to determine that I would have to have 5 define fields (1 per slot) in which I compare the slots crsnum to the crsnum in all of the previous slots. Unfortunately this would leave me with a denormalized record which I will then have to normalize again into rows. Is there a better way to solve this problem? If I go the denomalization route it will break if a student has more than 5 slots.
-ThanksThis message has been edited. Last edited by: Kerry,
you can use the last command to check for duplicates. What you would want to do is sort your data by student id and course num and then hold it. take a second pass at the data and then in the define do something along the lines of:
check_dupes/A1=IF LAST STUDENT_ID EQ STUDENT_ID AND LAST CRSNUM EQ CRSNUM THEN 1 ELSE 0;
Eric Woerle WF 7.6.7 Reportting Server ETL 7.6.10 Dev Studio 7.6.7
Thanks for the advice but LAST is of limited use in this since I must compare the value to all of the previous members not just the immediate one. But I will look into how sorting the crnsnums might influence such an algorithm. It might allow me to make certain assumptions.
This is fine because basically the way the structure works is you have a primary course num which is tied to multiple alternate course numbers for that same slot number. My task is to make sure that the primary course numbers do not replicate across the slots while still keeping the alternate data. If there is a duplication then I must take the primary and replace it with the first alternate crns number for that slot.
Aha! So you can tolerate multiple rows with the same course#, as long as all have the same slot number; you want to identify students and courses where the course appears in multiple slots.
This approach should work:
table ...
write
min.slot
max.slot
and compute
range/i3=max.slot - min.slot; noprint
by student by course
where total range ne 0;
...
This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Hi I have not had time to read all the learned answers. This is how I would handle it. Create a DEFINE called concatvar a50 whatever and concatenate all fields together. A number would need an edit. alpha1||edit(number)|| alpha table file.. sum concatvar by concatvar noprint on table hold as end
I have tried your solution and it worked PERFECTLY! At first glance it looks like j.gross's solution is identical. This solution allows me to find the values and substitute them. Because it only looks at the max and min I use dialogue manager to loop multiple times just in case the course appears more than twice in the file for the student. It reminds me of a binary sort.