Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
[Solved]How to specify an exponential value for a data-item in cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
vrch

New User


Joined: 21 Mar 2005
Posts: 21

PostPosted: Fri May 06, 2005 5:31 pm    Post subject: How to specify an exponential value for a data-item in cobol
Reply with quote

I want to specify an exponential value to a data item.
I specified like this....

77 A pic 9(4) value 3 * * 4

Then i am getting " * was invalid " message.

And i again tried with MOVE statement like:

MOVE 3 * * 4 TO A.

Then also i am getting same msg.

Plz let me know is there any wrong with me.

Thanks,
Vrch
Back to top
View user's profile Send private message
References
Rajen

Active User


Joined: 05 May 2005
Posts: 61

PostPosted: Fri May 06, 2005 6:34 pm    Post subject:
Reply with quote

hi vrch,
I am sorry to say that but i think we dont have option for Exponential.
In your case that 3**4.
You need to run a loop, thru simple logic.
Correct me if i am wrong.

Thanks
Raj
Back to top
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 141

PostPosted: Fri May 06, 2005 7:07 pm    Post subject:
Reply with quote

vrch
Exponential is an arithmetic expression. Like addition ,division etc.. So you can't assign it with a value clause.

Try this method

01 A pic 9(4).

COMPUTE A = 3 ** 4

Raj
We do have this. ** represents exponential.

Regds
-Som
Back to top
View user's profile Send private message
vrch

New User


Joined: 21 Mar 2005
Posts: 21

PostPosted: Fri May 06, 2005 7:13 pm    Post subject:
Reply with quote

Hi somaundaram

It's working...

Thank u.

Thanks,
vrch
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1