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] Quick ?: Where is the doc. for the WITH command? May the 4th be WITH you...

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Quick ?: Where is the doc. for the WITH command? May the 4th be WITH you...
 Login/Join
 
Virtuoso
posted
Anyone know where to find documentation on the WITH command?

Example use case:
DEFINE FILE CAR
COUNTER/I3 WITH COUNTRY = COUNTER + 1;
END


Thanks in advance!

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


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
I usually refer back to 8.1.04 DS Help file since it's faster to search and it's an actual help file, but the only WITH it refers to is "WITH CHILDREN"

TABLE FILE filename{PRINT|SUM} ...
FOR hierarchyfld 
parentvalue {GET|WITH} CHILD[REN] [n|ALL]
 [AS CAPTION|'text'] [LABEL label]



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Sorry about the font, I'll clean it up if needed...
I searched with this syntax: using a virtual field

8.1.05 Documentation

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
I think you found all the documentation on it. :P



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Yep, probably! LOL


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
I found this under Virtual Fields Attributes, but no example code or definitions of it's use.

Miscellaneous
WITH
If no columns from the synonym are used in the expression or have been defined, you can use the WITH option to identify the logical home of the defined calculation. You can also use the WITH option to move the logical home for the virtual column to a lower segment than it would otherwise be assigned (for example, to count instances in a lower segment).

Note: This attribute only appears for DEFINE and FILTER custom fields.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
EEEWWWWW... Look what I just found.. Found it under "virtual field for OCCURS"

DEFINE FILE EMPLOYEE
  CTR/I5 WITH DED_AMT = IF EMP_ID NE LAST EMP_ID THEN 1 ELSE LAST CTR + 1;
END
TABLE FILE EMPLOYEE
  SUM CNT.DED_AMT NOPRINT EMP_ID LAST_NAME FIRST_NAME CURR_SAL
  COMPUTE DEDLEN/I5 = 12 * CNT.DED_AMT;
  BY EMP_ID NOPRINT
  SUM DED_AMT
  BY EMP_ID NOPRINT
  ACROSS CTR NOPRINT
  WHERE DED_CODE EQ 'FICA'
  ON TABLE SET HOLDLIST PRINTONLY
  ON TABLE HOLD AS OCCURS1 FORMAT ALPHA
END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Virtuoso
posted Hide Post
Tom and Gavin,

You guys are the best! lol Near impossible to find anything on this guy.

So it's a way to build in a virtual field assigning it a segment if no real field is used therein. I can create counters, etc. with this bad boy.

That example is quite interesting. Why stick the CTR value in an invisible ACROSS? What is that DEFINE doing? haha

If this record's employee ID is not the same as the last record's employee ID, then set CTR to 1, else set it to whatever the value of CTR was last and add 1... ???? Why? Oh! So, it's resetting the counter every time an employee ID changes. Der!

Haven't worked with that employee sample data much myself. So, in essence, its showing the ded_amt rolled up for every employee by ID across...whaaah???

Thanks for finding what you did guys! Appreciate it!

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


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
Also funny, it was an example for WITH, but wasn't really about WITH, they just happen to use it in that example. Smiler Welcome to IBI Documentation.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Platinum Member
posted Hide Post
No wonder why sometimes users forego the documentation for the smarts on this forum Smiler


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Master
posted Hide Post
Also found a small phrase and example here, but not much more than you already found:

DEFINE FILE GGSALES
NCOUNT/I5 WITH UNITS = NCOUNT+1;
END


http://infocenter.informationb...20%57%49%54%48%22%20



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Virtuoso
posted Hide Post
Sheesh....

So, they are hiding the sum of the count of how many deduction amounts there are for each employee by ID, while denoting them by such with their last name, first name, and current salary, while also throwing in some fandangled computed length of deduction amt time period of some sort. Then, showcasing each of those amounts for each employee across the number of deductions there were for each of them.

So, in conclusion, you can build a counter for a given segment's measure(s) to do some pivot voodoo if desired.... Hmmm...

Again, SHEESH!! lol


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Virtuoso
posted Hide Post
Thanks Gavin for all the finds!

The docs really need some TLC... Search is horrible too.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
I'll see if this works.. It's a snapshot of the help file in 8.1.04..




- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Virtuoso
posted Hide Post
Trippy stuff! Again, thanks for sharing!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report 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] Quick ?: Where is the doc. for the WITH command? May the 4th be WITH you...

Copyright © 1996-2020 Information Builders