GeekInterview.com
Series: Subject: Topic:
Question: 19 of 231

PIC clause to hold decimal values

I have a file with 2 fields say 1st field is a indicator.2nd field is amount field.It has the values A,B,C,D.

Suppose if the indicator is A,i want to move 123.4

when B move 12.34

when c move 1.234

when d move 1234

my question is what pic clause(only one op field variable) should be used to hold all the 4 types of variables.
Asked by: abhay06 | Member Since Jun-2011 | Asked on: Jun 27th, 2011

View all questions by abhay06

Showing Answers 1 - 3 of 3 Answers
talluri

Answered On : Jul 27th, 2011

View all answers by talluri

Declared variables as

01 a pic 9(3)v9 value 1234.
01 b redefines a pic 99v99.
01 c redefines a pic 9v999.
01 d redefines a pic 9999.

pl correct me anything wrong

Babjee talluri

  
Login to rate this answer.
neelesh baghel

Answered On : Oct 12th, 2011

we can use picture clause like bellow mention

01 PIC 9(3)v9(3)

so u can move all given value on this

Yes  1 User has rated as useful.
  
Login to rate this answer.
Neelesh Baghel

Answered On : Oct 12th, 2011


Declared variables as

D
01 PIC 9(4)v9(3).

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.