View previous topic :: View next topic
|
Author |
Message |
NAGARJUN CARALAPATI
New User
Joined: 09 Oct 2007 Posts: 22 Location: chennai.India
|
|
|
|
I have a file in hexadecimal format, could any one help me in finding out
'HOW TO CONVERT HEXADECIMAL VALUE TO ASCII VALUES USING DFSORT'. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
What is the LRECL RECFM of your file?
Show sample i/p records with expected o/p!!! |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
"hexadecimal format"? Do you mean EBCDIC?
If so, there's no standard way to translate EBCDIC to ASCII. You'd have to pick the translation table you want to use. You could then set up that table using DFSORT's ALTSEQ statement and do the translation using TRAN=ALTSEQ. For example, if your input file has RECFM=FB and LRECL=80, you could use a DFSORT job like this:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
ALTSEQ CODE=(...)
INREC BUILD=(1,80,TRAN=ALTSEQ)
/*
|
For more information on DFSORT's ALTSEQ statement, see:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/3.4?DT=20060615185603 |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct,2010), you can now use DFSORT's new TRAN=ETOA function to translate EBCDIC to ASCII.
For complete details on the new functions for DFSORT and DFSORT's ICETOOL available with the Oct, 2010 PTF, see:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242 |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Hexadecimal is just a convenient way of seeing binary. Everything is binary - 0's and 1's.
E.g.,
hex 1 = binary 0001
hex A = binary 1010
Hex has nothing to do with formats, collating systems, or even how to interpret a data value. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
As I said, I believe the original poster meant EBCDIC, not HEX. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Right - I'm talking to the op, with the weak assumption that he and all others are listening. |
|
Back to top |
|
|
|