View previous topic :: View next topic
|
Author |
Message |
amajhi
New User
Joined: 21 Jul 2006 Posts: 18 Location: Pune
|
|
|
|
Hi Guys,
As we all know if Alphanumeric item is moved to Numeric item,we will get
Abend SOC7 but it's strange I am not getting this abend while junk value has been moved to Numeric item.
Is there any compile option which allows Alphanumeric field to be moved in Numeric ? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
amajhi wrote: |
As we all know if Alphanumeric item is moved to Numeric item,we will get Abend SOC7 |
No, we didn't know.....Neither PACK, UNPK or MVC will raise a data exception no matter what "junk" you feed them.
Quote: |
Is there any compile option which allows Alphanumeric field to be moved in Numeric ? |
You don't need a compile option when it is a legal move. |
|
Back to top |
|
|
amajhi
New User
Joined: 21 Jul 2006 Posts: 18 Location: Pune
|
|
|
|
So William, If we move Alphanumeric to Numeric it will not give SOC7. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Not the move, it is even listed as a legal COBOL move.
What you do with that data could very well result in the S0C7......
By the way, that is an alpha "S" for system followed by the hex string zero charlie seven...... |
|
Back to top |
|
|
amajhi
New User
Joined: 21 Jul 2006 Posts: 18 Location: Pune
|
|
|
|
I have declared two variables as :
05 ws-var-1 pic X(3) value 'ABC".
05 ws-var-2 pic 9(3) value 001.
then i am moving ws-var-1 to ws-var-2,but getting junk values in ws-var-2 instead of SOC7. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
amajhi wrote: |
I have declared two variables as :
05 ws-var-1 pic X(3) value 'ABC".
05 ws-var-2 pic 9(3) value 001.
then i am moving ws-var-1 to ws-var-2,but getting junk values in ws-var-2 instead of SOC7. |
OK, what is your point?
If you really want to try for that S0C7, try majing the ws-var-2 a comp field, CVB will raise a data exception...... |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi
Try some condition check or computation with ws-var-2....
Thanks
Arun |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
ws-var-2 should print (in display statement) 123 after you move ws-var-1 to ws-var-2.
You will not get S0C7 until you do arithmatic operation on non-numeric data in PACKED-DECIMAL format. |
|
Back to top |
|
|
|