Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Focus help needed abt numeric operator '**'

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Focus help needed abt numeric operator '**'
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: 171
Location: Bangalore

PostPosted: Tue Nov 14, 2006 9:50 pm    Post subject: Focus
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    Post subject: Focus help needed abt numeric operator '**
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    Post subject: Focus help needed abt numeric operator '**
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts Relatated to FOCUS program Sumeendar All Other Mainframe Topics 1 Thu Mar 10, 2016 5:21 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us