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

EBCDIC to ASCII conversion


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
HABBIE

New User


Joined: 08 Jul 2014
Posts: 24
Location: INDIA

PostPosted: Thu Aug 21, 2014 7:30 pm
Reply with quote

Hi,
I need to convert some EBCDIC format to ASCII format on linux. I am using through DD statement on linux but it is failing for packed decimals.
Is there any command prompt that can be run on linux for my conversions from EBCDIC to ASCII formats.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 21, 2014 7:44 pm
Reply with quote

EBCDIC if for "text" and control characters. ASCII is for "text2 and control characters.

Why can't you see any reference to packed-decimal, floating-point, binary? Because they are neither EBCDIC nor ASCII. Their values can easily overlap with textual data. If your data contains "non-text" fields, then you will screw it up if you do EBCDIC to ASCII (or ASCII to EBCDIC).

Now, what was your problem? Oh, yes, screwed-up data. Only way you'll do it without suspect practices is to convert all your "non-text" fields to "text". Simple.Two-minute job. Then EBCDIC to ASCII is fine.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 21, 2014 11:46 pm
Reply with quote

iconv will convert EBCDIC to ASCII and vice versa. However, if you use it on a data set with packed decimal data, your data WILL be changed in ways you do not want. You only want to convert from EBCDIC to ASCII when there are no binary nor packed decimal data in any record.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts SMF Record Date conversion failing CLIST & REXX 1
Search our Forums:

Back to Top