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

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
foc281
 Login/Join
 
<Vipul>
posted
Any Ideas about this:


-* File testneg.fex
-SET &NEGNM = -14977162.91;
-SET &ONEGT = EDIT(0) + EDIT(&NEGNM) ;
-TYPE &ONEGT

Gives me the error: (FOC281) ALPHA ARGUMENTS IN PLACE WHERE NUMERIC ARE CALLED FOR
This is a negative number from the Read on a file.

Thanks,

Vipul

This message has been edited. Last edited by: <Mabel>,
 
Reply With QuoteReport This Post
Expert
posted Hide Post
well, yeah, i think you're EDITing a number which makes it ALPHA and then you're trying to add together two ALPHA's. Dialog manager doesn't know what you want to do.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
<Vipul>
posted
Even if I take EDIT() off it gives the same error. Like


-* File testneg.fex
-SET &NEGNM = -14977162.91;
-SET &ONEGT = 0 + &NEGNM ;
-TYPE &ONEGT

Vipul

This message has been edited. Last edited by: <Mabel>,
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Vipul,

Well, the only way I got this to work was to do a subtraction:

-set &negnum = 0 - nnnnnn ;

and then continue from there. I guess the dash makes it look like an alpha. I even tried the asis function and got the same results.

vivian
 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Vipul,

code as follows:

&negnum = 0 - 789766;
&neq = 0 + &negnum ;
-type &neq

works.

David
 
Posts: 116 | Location: US | Registered: February 09, 2004Reply With QuoteReport This Post
<Vipul>
posted
Thanks David, it works but is there a limit on the size as if you do this (basically change your number), this does not work

-SET &negnum = 0 - 1497716;
-SET &neq = 0 + &negnum ;
-TYPE &neq
-RUN


Vipul
 
Reply With QuoteReport This Post
<Pietro De Santis>
posted
You could try FTOA:


-* FILE TESTNEG.FEX
-SET &ECHO=ALL;
-SET &NM = 14977162.91;
-TYPE &NM
-SET &ONEGT =FTOA(0-&NM , '(D12.2c)', A15);
-TYPE &ONEGT

(D12.2c - Lower case c to suppress the thousands commas)

This message has been edited. Last edited by: <Mabel>,
 
Reply With QuoteReport This Post
<Vipul>
posted
Thanks Pietro

This will work.

Vipul
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 


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