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] Reagarding sum by and HOLD and SAVB

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Reagarding sum by and HOLD and SAVB
 Login/Join
 
Member
posted
Hi, I am new to focus and would like to clarify the following doubt which amy be basic.

Here the focus procedure using two file EMPLOY01 and EMPDEPT01 with EMP-ID as the key field.

DEFINE FILE EMPLOY01
EFLAG/A1 = 'E' ;
END
-*-
TABLE FILE EMPLOY01
SUM EFLAG
BY EMP_ID ON TABLE HOLD AS EMPRPT2
END
-*-
JOIN CLEAR *
JOIN EMP_ID IN EMPDPT01 TO EMP_ID IN EMPLOY01 AS JE1
-*-
DEFINE FILE EMPDPT01
EFLAG/A1 = 'E' ;
END
-*-
TABLE
FILE EMPDPT01
SUM EFLAG
BY EMP_ID ON TABLE SAVB AS EMPRPT2
END
-*-
-RUN
-*-
TABLE FILE EMPRPT2
SUM EFLAG
BY EMP_ID
ON TABLE SAVE AS EMPRPT4
END

My understanding is sum by is like sorting out the unique EMP-IDs from EMPLOY01 file and add Flag "E" after EMP-ID in output file.
But ,as we see the EMPRPT2 is written twice (first as HOLD from employ01 file and next as SAVB from EMPDEPT01)
So what does EMPRPT2 actually contain (Is it a concatenation of EMP-IDS in both EMPLOY01 file and EMPDEPT01 file?)
What is the significance of "-RUN " command?

Can someone expalain why it was coded this way?

Thanks
Harsha.gsh

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


Focus 7.62, ZOS/Mainframes, Excel
 
Posts: 4 | Location: San Francisco | Registered: November 15, 2010Report This Post
Platinum Member
posted Hide Post
Any experience FOCUS user can explain what this code does but only the author could explain WHY it was done this way.

Maybe it would be better to describe what the purpose is so we can write something for you that will acheive what you're trying to do.

This code is not well written but without knowing what is supposed to do it's difficult to judge.
 
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006Report This Post
Master
posted Hide Post
OPALTOSH is correct, but to answer your questions, EMPRPT2 will contain what ever was in the SAVB step which means that is what is in the EMPRPT4 file as well. If the intent was to append the data, there needs to be a FILEDEF with the APPEND attribute added before the TABLE with the SAVB. In this fex, the -RUN servers no purpose.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Member
posted Hide Post
Thanks for clarifying my doubts.


Focus 7.62, ZOS/Mainframes, Excel
 
Posts: 4 | Location: San Francisco | Registered: November 15, 2010Report This Post
Platinum Member
posted Hide Post
If you want to append the data you could also use MORE.
 
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006Report 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] Reagarding sum by and HOLD and SAVB

Copyright © 1996-2020 Information Builders