View previous topic :: View next topic
|
Author |
Message |
yaju4ever Warnings : 1 New User
Joined: 30 Sep 2006 Posts: 19 Location: mumbai
|
|
|
|
cONSIDER THE FOLLOWING DATA DIVISION ENTRIES:
01 Figures.
02 Fig-A PIC 99V99.
02 Fig-B Redefines Fig-A PIC 9(4)
02 Fig-C PIC 9(4)V99.
What will be the contents of Fig-C after the execution of the following statements?
Move 17.25 TO Fig-B.
Move Fig-A To Fig-C.
Options :: (a) 001725 (b) 001700 (c) 000017 (d) 172500
Please EXPLAIN your Answer. |
|
Back to top |
|
|
nbalajibe Warnings : 1 New User
Joined: 28 Nov 2006 Posts: 75 Location: India
|
|
|
|
hi,
i think the answer is the second option. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
b, you are right.
Is this a test or do you just not know why? |
|
Back to top |
|
|
rammf Currently Banned New User
Joined: 24 Jul 2005 Posts: 17 Location: chennai
|
|
|
|
Thompson,
Could u Plz explain briefly? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You have a point, I do jump to conclusions too quikly sometimes....
Quote: |
01 Figures.
02 Fig-A PIC 99V99.
02 Fig-B Redefines Fig-A PIC 9(4)
02 Fig-C PIC 9(4)V99.
Move 17.25 TO Fig-B.
Move Fig-A To Fig-C.
|
17.25 to whole number truncates to 17
9999 redefined to 99V99 puts the 17 behind the implied decimal
.17 moved to a two decimal field keeps .17
A display without editing results in "c" 000017
Thanks for the heads up |
|
Back to top |
|
|
rammf Currently Banned New User
Joined: 24 Jul 2005 Posts: 17 Location: chennai
|
|
|
|
Cool, Thompson.
Thx for ur quick turn-around. |
|
Back to top |
|
|
|