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
 

 

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: 2238
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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am


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