Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DFSORT for converting HEXA to ASCII format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSORT for converting HEXA to ASCII format
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    Post subject:
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 Moderator


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

PostPosted: Mon Jan 21, 2008 9:40 pm    Post subject:
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:

http://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 Moderator


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

PostPosted: Thu Nov 04, 2010 1:47 am    Post subject:
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:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


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

PostPosted: Thu Nov 04, 2010 7:58 pm    Post subject:
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 Moderator


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

PostPosted: Thu Nov 04, 2010 11:43 pm    Post subject:
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

Active Member


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

PostPosted: Thu Nov 04, 2010 11:46 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us