View previous topic :: View next topic
|
Author |
Message |
sarat_911
New User
Joined: 19 Sep 2005 Posts: 2
|
|
|
|
Hi,
01 emp-rec.
02 emp-id pic 9(6).
02 emp-name pic x(4).
Now,,,
move "12345alfaa" to emp-rec.
What Shall happen?
MY interviewer said that it won't throw any SOC-7 error, and it works just fine. But how I'm now sure.. Please try it..
p.s assume everything in lower case is in upper case..
Kindly Look into this issue.. |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi,
Quote: |
What Shall happen? |
This will not give any abend.
In emp-id values =12345a
and in emp-name= lfaa
Hope this helps you.
Regards
Rupesh |
|
Back to top |
|
|
nitin4.a
New User
Joined: 16 Aug 2005 Posts: 26
|
|
|
|
Hi
rupesh you are write ,but if you declare emp-id as pic9(6) without group variable then the error will come while moving "12345a" to it,This is working because of the rules of group variable which is
"""group item is always assumed to be PIC X because a group item may have several different data items and types subordinate to it and an X picture is the only one which could support such collections"""" |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi Nitin,
Thanks a lot for your clarification. Yes you are Right as it is group variable it will not give any error but if we define it as single variable it will give error as alphanumeric value can not move in Numeric value.
Thanks again for your clarification
Regards
Rupesh |
|
Back to top |
|
|
|