Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
EBCDIC to ASCII conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: EBCDIC to ASCII conversion
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7312

PostPosted: Thu Aug 21, 2014 7:44 pm    Post subject: Reply to: EBCDIC to ASCII conversion
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: 8491
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 21, 2014 11:46 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts String to ASCII conversion JPLMARTINS COBOL Programming 4 Sun Sep 29, 2019 12:00 am
No new posts Pack to Unpack conversion for sending... A_programmers COBOL Programming 13 Wed Sep 11, 2019 10:46 pm
No new posts Alphanumeric to Packed Decimal Conver... Vijay_Sirisha COBOL Programming 2 Mon May 27, 2019 2:52 am
No new posts data conversion error maxsubrat PL/I & Assembler 4 Thu May 09, 2019 10:57 pm
No new posts Need to strip off first line - ascii ... harisukumaran DFSORT/ICETOOL 7 Thu May 02, 2019 12:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us