Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syncsort - hex to char conversion possible? 1

Status
Not open for further replies.

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?
 
Yes ;-)

Regards,

Glenn






PS - Look at OUTREC for the HEX option for an output field
 
Thanks 3gm. I will add an example once I get it working.
 
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
-------------------------------
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top