Sep 11, 2006 #1 DaveTO Programmer Nov 18, 2002 9 CA Hi everyone, Does anyone know if syncsort can read in a field with hex characters and convert it to alpha-numeric characters in the sort out?
Hi everyone, Does anyone know if syncsort can read in a field with hex characters and convert it to alpha-numeric characters in the sort out?
Sep 12, 2006 #2 3gm Programmer Mar 7, 2001 437 US Yes ;-) Regards, Glenn PS - Look at OUTREC for the HEX option for an output field Upvote 0 Downvote
Sep 12, 2006 1 Thread starter #3 DaveTO Programmer Nov 18, 2002 9 CA Thanks 3gm. I will add an example once I get it working. Upvote 0 Downvote
Sep 13, 2006 Thread starter #4 DaveTO Programmer Nov 18, 2002 9 CA I like to see code so here is how an example would look: Read in first 4 bytes as hex. Sortout - convert hex to 8 characters. The out file will be 8 bytes in this case. ------------------------------- SORT FIELDS=(1,4,BI,A) OUTFIL FILES(OUT), OUTREC=(1:1,4,HEX) END ------------------------------- Upvote 0 Downvote
I like to see code so here is how an example would look: Read in first 4 bytes as hex. Sortout - convert hex to 8 characters. The out file will be 8 bytes in this case. ------------------------------- SORT FIELDS=(1,4,BI,A) OUTFIL FILES(OUT), OUTREC=(1:1,4,HEX) END -------------------------------
Sep 14, 2006 #5 3gm Programmer Mar 7, 2001 437 US Dave - Note that you don't have to sort the input file to do what you want. SORT FIELDS=COPY should work just fine. Glenn Upvote 0 Downvote
Dave - Note that you don't have to sort the input file to do what you want. SORT FIELDS=COPY should work just fine. Glenn