View previous topic :: View next topic
|
Author |
Message |
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
Hi folks,
I have one problem with me, Could u please help me in solving this.
str1 pic x(40) value 'jdfksjlhfljsdhfjhsdjfhlksdhfkljsdfjk'
01 ws-str
03 ws-str1 pic x(9)
03 ws-str2 pic x(3)
03 ws-str3 pic x(4)
03 no-str4 pic x(4)
03 no-str5 pic x(4)
Problem :- I want to move str1 to ws-str1,ws-str2,ws-str3 only according to their sizes. |
|
Back to top |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
Hi,
I think redefines will work here. try as
str1 pic x(40) value 'jdfksjlhfljsdhfjhsdjfhlksdhfkljsdfjk'
01 ws-str redefines str1.
03 ws-str1 pic x(9)
03 ws-str2 pic x(3)
03 ws-str3 pic x(4)
03 no-str4 pic x(4)
03 no-str5 pic x(4)
Hope this will work. let me know.... |
|
Back to top |
|
|
sbalajibe
New User
Joined: 15 Aug 2005 Posts: 62
|
|
|
|
hi dipanshu,
U can also use reference modification....
like
move str1(1:9) to ws-str1
move str1(10:3) to ws-str2
so on....
thanks
Balaji |
|
Back to top |
|
|
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
Thanks,
But i only want str1 to move to first three WS variables, In case of redefine str1 moves to all variables.
Pls assist if there are any more solution other than using refrence modification.
Solution by ref. mod.
Move str1(1:9) to ws-str1
Move str1(10:3) to ws-str1
Move str1(13:4) to ws-str1
Thanks,
DIpanshu |
|
Back to top |
|
|
|