View previous topic :: View next topic
|
Author |
Message |
bhaskar_kanteti
Active User
Joined: 01 Feb 2007 Posts: 123 Location: Hyderabad
|
|
|
|
Hi,
i had a query regarding the movements of values.
When i am trying to move negative values or decimal values to an alphanumeric field i am getting some junk values.
Is this movement not possible?
The below are my actual movements i need
i want to move the value from S9(16)V99 comp-3 to x(50)
How can i do this.
Also can anyone please tell me where can i find all possible movements. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What do you consider "junk values"? The last digit?
The move is possible, but without editing, the sign and decimal point will be a problem. |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
hi bhasker,
You can;t view comp-3 value. You need to convert COmp-3 value to numeric (display format) before moving to X(50).
~Vamsi |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
bhaskar_kanteti
Active User
Joined: 01 Feb 2007 Posts: 123 Location: Hyderabad
|
|
|
|
Hi,
[/quote]To move from comp-3 to pic x, you should move thru an intermediate zoned decimal field.
Quote: |
You mean to say S9(13)V9(2) COMP-3 to 9(13)V9(2) and then to x(20).
Is this correct.
Or is this movement correct. I will move S9(13)V(2) COMP-3 to the below group variable and then to x(20). Is this correct.
10 group-varibale.
15 var-1 pic 9(13).
15 var-2 pic x(1) value '.'.
15 var-3 pic 9(2).
I am trying all the ways. If any one has any idea tell me. |
|
|
Back to top |
|
|
Umamaheswari K
New User
Joined: 23 May 2007 Posts: 2 Location: chennai
|
|
|
|
You could use edited picture clause. first move comp-3 variable value to the edited picture clause variable. Then you could move that edited variable to the alphanumeric variable.This would be easy .
Uma.. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Right justified?
01 from9 pic S9(16)V99 comp-3
01 tox pic x(50)
01 temp pic -z(15)9.99
move from9 to temp
move temp to tox
display tox
01 tox
05 temp pic -z(35)9.99
move from9 to temp
display tox
left justified?
01 filler
05 tox pic x(50) value spaces
05 temp redefines tox pic -z(15)9.99
move from9 to temp
display tox |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Depending on how you need the output from the move, you could use various techniques.
Quote: |
You mean to say S9(13)V9(2) COMP-3 to 9(13)V9(2) and then to x(20). |
This move will get numbers you can see in the pic x field, but there will be no decimal point shown and no minus sign if the value was negative. If the value was negative you would get the letter J thru the letter R (-1 to -9) or one of these ({ } - i don't recall which is -zero).
If you want to see the "-" and the decimal point, you could use "01 temp pic -z(15)9.99 " as Bill suggests. |
|
Back to top |
|
|
|