IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFSORT for converting HEXA to ASCII format


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
NAGARJUN CARALAPATI

New User


Joined: 09 Oct 2007
Posts: 22
Location: chennai.India

PostPosted: Mon Jan 21, 2008 1:08 pm
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Jan 21, 2008 4:14 pm
Reply with quote

What is the LRECL RECFM of your file?
Show sample i/p records with expected o/p!!!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Jan 21, 2008 9:40 pm
Reply with quote

"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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Nov 04, 2010 1:47 am
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Nov 04, 2010 7:58 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Nov 04, 2010 11:43 pm
Reply with quote

As I said, I believe the original poster meant EBCDIC, not HEX.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Nov 04, 2010 11:46 pm
Reply with quote

Right - I'm talking to the op, with the weak assumption that he and all others are listening.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top