| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| venkata Beginner
 
 
 Joined: 31 Dec 2002
 Posts: 16
 Topics: 8
 Location: India
 
 | 
			
				|  Posted: Thu Jun 10, 2004 11:55 am    Post subject: Moving Data from Numeric to Alphanumeric |   |  
				| 
 |  
				| Dear all, 
 Can anybody tell how to move numeric data to alphanumeric variable?
 say Numeric varible is S9(9)v99 comp-3 and alphanumeric variable is X(10).
 
 I hope, I will get quick answer.
 
 
 Thanks in advance,
 Venkata
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| venkata Beginner
 
 
 Joined: 31 Dec 2002
 Posts: 16
 Topics: 8
 Location: India
 
 | 
			
				|  Posted: Thu Jun 10, 2004 12:44 pm    Post subject: |   |  
				| 
 |  
				| Hi Kolusu, 
 Thanks for your prompt reply.
 
 Is there any solution for this?
 
 
 Thanks,
 Venkata
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Thu Jun 10, 2004 2:09 pm    Post subject: |   |  
				| 
 |  
				| Venkata, 
 The solution depends on how you want to see the output.
 
 
  	  | Code: |  	  | 01 WS-PACK               PIC S9(9)V99 COMP-3.
 01 WS-NUM                PIC +9(9).99.
 01 WS-CHAR               PIC X(13).
 
 PROCEDURE DIVISION.
 
 MOVE -55.67   TO WS-PACK
 MOVE WS-PACK  TO WS-NUM
 MOVE WS-NUM   TO WS-CHAR
 
 DISPLAY 'WS-PACK   : ' WS-PACK
 DISPLAY 'WS-CHAR   : ' WS-CHAR
 DISPLAY 'WS-NUM    : ' WS-NUM
 GOBACK.
 
 | 
 
 Will produce
 
 
  	  | Code: |  	  | WS-PACK   : 0000000556P
 WS-CHAR   : -000000055.67
 WS-NUM    : -000000055.67
 
 | 
 
 Hope this helps...
 
 Cheers
 
 Kolusu
 _________________
 Kolusu
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| venkata Beginner
 
 
 Joined: 31 Dec 2002
 Posts: 16
 Topics: 8
 Location: India
 
 | 
			
				|  Posted: Thu Jun 10, 2004 6:18 pm    Post subject: |   |  
				| 
 |  
				| Thanks Kolusu. It helped me a lot. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |