Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us