| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| waitling Beginner
 
 
 Joined: 12 Dec 2006
 Posts: 15
 Topics: 3
 
 
 | 
			
				|  Posted: Tue May 15, 2007 10:26 am    Post subject: How to transform hex to char |   |  
				| 
 |  
				| Hi all 
 e.g
 ORIG
 F0F0F0F0F0F0F9F8F7F6F5F4F3F2F1C1C2C3C4C5...
 NEW
 000000987654321ABCDE...
 
 can dfsort do this?
 i have tried but failed, cos i couldn't find a proper data format to represent hex value.
 
 thx in advanced.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Frank Yaeger Sort Forum Moderator
 
  
 
 Joined: 02 Dec 2002
 Posts: 1618
 Topics: 31
 Location: San Jose
 
 | 
			
				|  Posted: Tue May 15, 2007 11:13 am    Post subject: |   |  
				| 
 |  
				| That's NOT hex ... hex would be X'F0F0...C1...'.   If that's actually a character string, then it's the EBCDIC representation of the hex values which you don't usually see in records.  How did you get that? 
 At any rate, DFSORT doesn't have any built-in functions to do that kind of unusual conversion.  You could write a simple E15 exit to do the conversion.
 _________________
 Frank Yaeger - DFSORT Development Team (IBM)
 Specialties: JOINKEYS, FINDREP, WHEN=GROUP,  ICETOOL, Symbols, Migration
 DFSORT is on the Web at:
 www.ibm.com/storage/dfsort
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| semigeezer Supermod
 
 
 Joined: 03 Jan 2003
 Posts: 1014
 Topics: 13
 Location: Atlantis
 
 | 
			
				|  Posted: Tue May 15, 2007 11:25 am    Post subject: |   |  
				| 
 |  
				| THis is a good candidate for using Rexx.  See the x2c function |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| waitling Beginner
 
 
 Joined: 12 Dec 2006
 Posts: 15
 Topics: 3
 
 
 | 
			
				|  Posted: Fri May 18, 2007 12:11 pm    Post subject: |   |  
				| 
 |  
				| many thanks! |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |