Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Unable to read Hold amper variable.
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Unable to read Hold amper variable.
 Login/Join
 
Gold member
posted
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
 
Posts: 67 | Registered: September 26, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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 Smiler

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
 
Posts: 103 | Registered: April 06, 2009Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Thanks Kofi...I didn't read it right.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
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.


WebFOCUS 8.0.0.7 App Studio
 
Posts: 67 | Registered: September 26, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
If you insist on using HOLD,

ON TABLE HOLD AS HOLDRATE1 FORMAT ALPHA
END
-RUN

READ HOLDRATE1 &CURR_RATE.A17.
-TYPE &CURR_RATE

Kofi's suggestion also works:

ON TABLE SAVE AS HOLDRATE1
END
-RUN

-READ HOLDRATE1, &CURR_RATE
-TYPE &CURR_RATE

SAVE holds ALPHA, HOLD holds BINARY.


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Santhu,

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 Smiler 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
 
Posts: 103 | Registered: April 06, 2009Reply With QuoteReport This Post
Guru
posted Hide Post
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.
 
Posts: 394 | Location: St. Paul, MN | Registered: November 06, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
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


Tom


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Guru
posted Hide Post
DOH!

I knew I was missing a step. Music

Thanks Tom!


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 394 | Location: St. Paul, MN | Registered: November 06, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Or add ON TABLE SET HOLDLIST PRINTONLY to your request.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Yep, Ginny's correct! Smiler

I always forget about that one, probably, because I haven't used it. Financial stuff is a bit more complex than CAR...

Tom


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Unable to read Hold amper variable.

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.