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
 
how can i move 1.20 to numeric data type statically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vnbabu.au

New User


Joined: 11 Dec 2006
Posts: 2
Location: chennai,india

PostPosted: Tue Dec 12, 2006 5:41 pm    Post subject: how can i move 1.20 to numeric data type statically
Reply with quote

i have one application. in that, i need to calculate
salary=designation code *hours worked * incentive factor.
incentive factor = 1.00 for 1st quarter,
= 1.10 for 2nd quarter
= 1.20 for 3rd quarter
= 1.30 for 4th quarter

how can i move these to incentive factor.
there is limitation in value claus and also in 'move statemeent;
Back to top
View user's profile Send private message

Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Tue Dec 12, 2006 6:50 pm    Post subject: Re: how can i move 1.20 to numeric data type statically
Reply with quote

Hi vnbabu,

You can define variable for Incentive Factor as
WS-INCENTIVE-FAC PIC 9(3)v9(2).

Now based on Quarter value (1st,2nd,3rd,4th) you move 1.00,1.10,1.20,1.30 to this variable.

This variable will take 5 bytes. you can increase/decrease picture clause value based on your requirement.

Let me know if it worked or not.

Thanks,
Rajen.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2287
Location: @my desk

PostPosted: Tue Dec 12, 2006 6:59 pm    Post subject:
Reply with quote

Hi

Quote:
there is limitation in value claus and also in 'move statemeent


Could u plz explain on wat ur limitation is

Thanks
Arun
Back to top
View user's profile Send private message
vnbabu.au

New User


Joined: 11 Dec 2006
Posts: 2
Location: chennai,india

PostPosted: Wed Dec 13, 2006 6:28 pm    Post subject: Re: how can i move 1.20 to numeric data type statically
Reply with quote

o.k, thanks rajen.
but i get soc7 abend as i us that icentive factor in arithmetic operation.
how can i over come.


Rajen wrote:
Hi vnbabu,

You can define variable for Incentive Factor as
WS-INCENTIVE-FAC PIC 9(3)v9(2).

Now based on Quarter value (1st,2nd,3rd,4th) you move 1.00,1.10,1.20,1.30 to this variable.

This variable will take 5 bytes. you can increase/decrease picture clause value based on your requirement.

Let me know if it worked or not.

Thanks,
Rajen.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Dec 13, 2006 6:39 pm    Post subject:
Reply with quote

How is the "incentive factor" being loaded with the "1.00" and what is the definition of "salary", "designation code", "hours worked" and "incentive factor"?
Back to top
View user's profile Send private message
sankar_MF

New User


Joined: 19 Sep 2006
Posts: 29

PostPosted: Thu Dec 14, 2006 10:55 am    Post subject:
Reply with quote

Hi vnbabu,

If you declare the Incentive factor as 9(3)99, as Rajen said, it won't abend.It will work fine. can u please check once again.

Thanks
Sankar
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Thu Dec 14, 2006 1:06 pm    Post subject: Re: how can i move 1.20 to numeric data type statically
Reply with quote

Hi vnbabu,
You got soc7 abend as i us that icentive factor in arithmetic operation.

This might have happened because you are trying to add Incentive Factor to some variable which not of the proper picture clause.

Remember when you declare
Code:
WS-INCENTIVE-FAC PIC 9(3)v9(2).


It takes only 5 bytes.
Can you please give us defination of the other variable which you are using for the arithmetic operation.
If possible give us arithmetic operation also.

I guess the problem is when you are giving values (Result valuyesin your case) to other variable (Let say WS-SUM-INCENTIVE) , the receiving variable might not be of correct data type.

Thanks,
Rajen Patel.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am

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