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 Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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