View previous topic :: View next topic
|
Author |
Message |
gaps030980
New User
Joined: 27 Sep 2005 Posts: 8 Location: Gurgaon
|
|
|
|
What will happen if a variable is declared as below..
Explain with an example?
Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9). |
|
Back to top |
|
|
rakesha.hg
Active User
Joined: 21 Mar 2008 Posts: 161 Location: bangalore
|
|
|
|
hi,
did you try writing a small program & test ??
let the forum know ....... if you find anything interesting!
Time to experiment |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
gaps030980 wrote: |
What will happen if a variable is declared as below..
Explain with an example?
Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9). |
Similar posts you can find..Just Search ... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hello again,
BTW, what do you think what should happen, when you say -
Quote: |
What will happen if a variable is declared as below.. |
does something strange happen at your end ? |
|
Back to top |
|
|
gaps030980
New User
Joined: 27 Sep 2005 Posts: 8 Location: Gurgaon
|
|
|
|
I am getting a SOC-7. I tried. Guess because I am moving non -numeric data to num field. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Quote: |
am getting a SOC-7. I tried. Guess because I am moving non -numeric data to num field.
|
Moving alone will not cause SOC-7 . It would abend with SOC7 only when you do arithmetic operations on a numeric field populated with non-numeric data . If am not wrong, this was once posted in this forum. |
|
Back to top |
|
|
vv
New User
Joined: 06 Jan 2008 Posts: 10 Location: bangalore
|
|
|
|
initially 9(9( value will be allocated after that any spaces will be allocated |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I think some words are is stuk-up there in your key board, please complete the sentence.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I am getting a SOC-7. I tried. Guess because I am moving non -numeric data to num field. |
A redefines will not cause an 0c7.
Invalid numeric data will.
Simply redefining an "x" field as a "9" field does not make the content numeric. You must validate and/or correct the data before you use it.
Quote: |
initially 9(9( value will be allocated after that any spaces will be allocated |
This needs clarification. . . |
|
Back to top |
|
|
John K
New User
Joined: 27 Aug 2008 Posts: 3 Location: St. Louis, MO
|
|
|
|
You'll find you get the most effective help if you explain what are you trying to accomplish. At this point one can only guess. |
|
Back to top |
|
|
|