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     Use of Hold File results in a compute field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Use of Hold File results in a compute field
 Login/Join
 
Member
posted
I have a hold file that contains a count (one row, one column). I would like to use that count in a compute field. How can I do something like this?

COMPUTE NEWVALUE/D12.2 = MYCOLUMN/HOLDCOUNT

The hold file value will be applied to each row returned in MYCOLUMN from the join.
 
Posts: 19 | Location: WI | Registered: July 06, 2005Report This Post
Guru
posted Hide Post
You want to do a -READ on your hold file, and read the value into an &variable. Then you can use the &variable in your compute.

-READ holdfile &VARNAME.I6.
(or however long your count value is.)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Member
posted Hide Post
That still prompts me to fill in a variable. Here is the code, I'm hitting a Date table that will give me a list of dates and information about those dates.

-SET &STARTDATE='6/1/2005';
-SET &ENDDATE='6/7/2005';

TABLE FILE DATE
COUNT DATE.DATEKEY
WHERE DATE.FULLDATE FROM '&STARTDATE' TO '&ENDDATE'
AND
DATE.WEEKDAYINDICATOR EQ 'YES'
AND
DATE.HOLIDAYINDICATOR EQ 'NO'
ON TABLE HOLD AS CALENDAR
END
-*? HOLD CALENDAR
-RUN
-READ CALENDAR &DAYCOUNT.I5.
-? &DAYCOUNT
END

The value entered on the prompt shows in the resultant output. Not the value from the hold file. There is one record in the table with a value of 5 which is the number of business days between the dates and not a holiday. The value returned on the @variable is 2 which is what was entered at the parameter prompt.

0 NUMBER OF RECORDS IN TABLE= 1 LINES= 1
CURRENTLY DEFINED & VARIABLES STARTING WITH 'DAYCOUNT':
&DAYCOUNT = 2
 
Posts: 19 | Location: WI | Registered: July 06, 2005Report This Post
Expert
posted Hide Post
Paul,

Try putting a comma after the holdfile name in the READ and forget about the format.
Also force the output format in ALPHA so that you can read the variable and not have a byte value -

TABLE FILE DATE
COUNT DATE.DATEKEY
WHERE DATE.FULLDATE FROM '&STARTDATE' TO '&ENDDATE'
AND
DATE.WEEKDAYINDICATOR EQ 'YES'
AND
DATE.HOLIDAYINDICATOR EQ 'NO'
ON TABLE HOLD AS CALENDAR FORMAT ALPHA
END
-*? HOLD CALENDAR
-RUN
-READ CALENDAR, &DAYCOUNT
-? &DAYCOUNT
END
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     Use of Hold File results in a compute field

Copyright © 1996-2020 Information Builders