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.

Questions by abhay06

Showing Answers 1 - 3 of 3 Answers


  • Jul 27th, 2011

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

  Was this answer useful?  Yes

neelesh baghel

  • 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

Neelesh Baghel

  • Oct 12th, 2011

Declared variables as

01 PIC 9(4)v9(3).

  Was this answer useful?  Yes

Give your answer:

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


Related Answered Questions


Related Open Questions