DEFINE FILE EXCHANGE_TABLE CURR_RATE/P17.8 = 1/CURRENCY_RATE; END TABLE FILE HOLD_PREV PRINT CURR_RATE WHERE READLIMIT EQ 1 ON TABLE HOLD AS HOLDRATE1 END -RUN
-READ HOLDRATE1 &CURR_RATE. -TYPE &CURR_RATE
I am unable to read hold value into ampervariable(&CURR_RATE) i tried by giving &CURR_RATE.A15. and checked, But there is no result.
Do we have solution for this.This message has been edited. Last edited by: Kerry,
WebFOCUS 8.0.0.7 App Studio
April 09, 2009, 01:22 PM
Prarie
You don't have an &CURR_RATE. You have a Defined field called CURR_RATE.
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
April 09, 2009, 01:25 PM
Kofi
quote:
DEFINE FILE EXCHANGE_TABLE CURR_RATE/P17.8 = 1/CURRENCY_RATE; END TABLE FILE HOLD_PREV PRINT CURR_RATE WHERE READLIMIT EQ 1 ON TABLE SAVE AS HOLDRATE1 END -RUN
-READ HOLDRATE1, &CURR_RATE -TYPE &CURR_RATE
I know this one, is easy. Use SAVE not HOLD no need master. Use , no need A15. I found using search
Kofi
Client Server 8.1.05: Apache; Tomcat;Windows Server 2012 Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
April 09, 2009, 01:30 PM
Prarie
Thanks Kofi...I didn't read it right.
April 09, 2009, 01:46 PM
Santhu
Super Kofi, Thanks for replying...
I tried like THIS
ON TABLE HOLD AS HOLDRATE1 END -RUN
-READ HOLDRATE1, &CURR_RATE -TYPE &CURR_RATE
And can i know the difference between SAVE and HOLD.
I help I learn, I search and find answer. HOLD give master SAVE not. SAVE give ALPHA, Tom say HOLD give not ALPHA unless you say.
I like Focal Forum, help learn also help me engrish
Kofi
Client Server 8.1.05: Apache; Tomcat;Windows Server 2012 Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
April 17, 2009, 12:12 PM
Dan Pinault
Kofi,
Focal Point has saved me many times! I like it too.
I'm trying to do the same thing but with multiple fields. However, when I read the values into AmperVariables they do not come out right.
My first variable reads OK but the second one starts reading from the beginning of the file again. What am I doing wrong?
TABLE FILE CAR
SUM RETAIL_COST/P13 DEALER_COST/P13
ON TABLE SAVE
END
-RUN
-READ SAVE &RETAIL_COST.A13. &DEALER_COST.A13
TABLE FILE CAR
SUM RETAIL_COST/P13 DEALER_COST/P13
HEADING
"&RETAIL_COST - &DEALER_COST"
END
Thanks!
Dan
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
April 17, 2009, 12:49 PM
Tom Flynn
Dan,
You should only use column/format for "display only". If you do
ON TABLE HOLD AS HOLD1 FORMAT ALPHA END -RUN ?FF HOLD1
You will have 2 columns for each, the 1st with the database formats, the second with reformatted columns; Maybe, that's what you wnat.
You can do a COMPUTE/DEFINE like the following:
DEFINE FILE CAR
RETAIL_COST1/P13 = RETAIL_COST;
DEALER_COST1/P13 = DEALER_COST;
END
TABLE FILE CAR
SUM RETAIL_COST1 DEALER_COST1
ON TABLE SAVE
END
-RUN
-READ SAVE &RETAIL_COST.A13. &DEALER_COST.A13
TABLE FILE CAR
SUM RETAIL_COST/P13 DEALER_COST/P13
HEADING
"&RETAIL_COST - &DEALER_COST"
END
-EXIT