|
|
| Author |
Message |
gaps030980
New User
Joined: 27 Sep 2005 Posts: 6 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 |
|
 |
References
|
|
 |
rakesha.hg
Active User
Joined: 21 Mar 2008 Posts: 103 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: 197 Location: At my Desk
|
|
|
|
| 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 D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2241 Location: Mumbai, India
|
|
| Back to top |
|
 |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2241 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: 6 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: 1184 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: 11 Location: bangalore
|
|
|
|
| initially 9(9( value will be allocated after that any spaces will be allocated |
|
| Back to top |
|
 |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2241 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
Global Moderator
Joined: 23 Nov 2006 Posts: 8771 Location: 221 B Baker St
|
|
|
|
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 |
|
 |
|
|