IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Focus help needed abt numeric operator '**'


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Wed Nov 01, 2006 9:59 pm
Reply with quote

Hi All,
Currently I am working in a FOCUS migration project. Here in a FOCUS program, I have found a statement like the following -
test/I2 = 2;
Var2 = Var1 ** test;
- My question is what this numeric operator - '**' stands for? While taking the output of this FOCUS program we are getting like following -
Code:

Var1                    Test                Var2
-----                     ----                 -----
1                           2                     1
2                           2                     3 
3                           2                     8
4                           2                     15
5                           2                     24
6                           2                     35
7                           2                     48
8                           2                     64
:
:
:
113                         2                     112


Please help me out...
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Tue Nov 14, 2006 9:50 pm
Reply with quote

In FOCUS it Stands as other programs I mean to say is its a power operator.
But I am wondering how you are getting the output like that. That is also till 7 you got everytime 1 less than the squared one and at 8 you got the 64.
Strange!!!!

Thanks
Shri
Back to top
View user's profile Send private message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Wed Nov 15, 2006 2:36 am
Reply with quote

its an exponentiation.

it works with double pression. so remove i2 and try

var1 = 3;
test = 2;
var2 = var1 ** test;
Back to top
View user's profile Send private message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Wed Nov 15, 2006 2:58 am
Reply with quote

use this code to convert var2

VAR3/A2 = FTOA(VAR2,'(F2)', VAR3);

example
16.00 to 16
.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts Convert HEX to Numeric DB2 3
No new posts Help needed to assemble IMS sample co... ABENDS & Debugging 4
No new posts Find a record count/numeric is multip... COBOL Programming 1
Search our Forums:

Back to Top