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
 

 

UTF-8 to EBCDIC conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
TS70363

New User


Joined: 07 Apr 2010
Posts: 93
Location: Bangalore, India

PostPosted: Wed Mar 07, 2012 5:37 pm    Post subject: UTF-8 to EBCDIC conversion
Reply with quote

Hi All,

I am using the below code to convert my input data in UTF-8 format to EBCDIC.

Code:
MOVE FUNCTION DISPLAY-OF (FUNCTION NATIONAL-OF   
             (UTF8-VARIABLE , 1208), 500)
                       TO EBCDIC-VARIABLE


It works fine for most of the input UTF-8 Characters. But the above piece of code does not convert X'E2809C' and X'E2809D' which actually should be opening and closing quotes in EBCDIC.

Could you please let me know, what could be the reason?

Is the compiler option correct? Or do I need to change the compiler option?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Mar 07, 2012 6:15 pm    Post subject:
Reply with quote

In looking at the EBCDIC 500 character set, I do not see either of the characters you're having problems with. Perhaps the problem is that there's nothing to convert them to?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Mar 07, 2012 6:21 pm    Post subject:
Reply with quote

Quote:
Is the compiler option correct? Or do I need to change the compiler option?


it is never the code,
it is always something else.

as robert said, insure that you are using the correct code page in
your line of code
which has nothing to do with the compiler or options
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 110
Location: Puerto Rico

PostPosted: Wed Mar 07, 2012 8:28 pm    Post subject:
Reply with quote

Good day to all!

Your system doesn't have code pages 1005 & 1156 in the graphic table definitions because 'E2809C' and 'E2809D' are in these code pages.
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 93
Location: Bangalore, India

PostPosted: Wed Mar 07, 2012 9:51 pm    Post subject: Reply to: UTF - 8 to EBCDIC conversion
Reply with quote

Hi..

Could you please let me know what should be the changes to my code?

Also can you please let me know what is the purpose of CODE PAGE.
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 93
Location: Bangalore, India

PostPosted: Wed Mar 07, 2012 10:00 pm    Post subject:
Reply with quote

Hi..

I have few set of UTF8 characters -

X'E28093' - represents a hyphen
X'E28099' - represents an apostrophe
X'E2809C' - represents opening double inverted commas
X'E2809D' - represents closing double inverted commas
X'E282AC' - represents Euro sign.

Whenever this set of input is given, I get X'3F' in the output,

but I would like it to get converted to a valid set of EBCDIC characters.

Can you please let me know what could be wrong?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7235

PostPosted: Wed Mar 07, 2012 10:08 pm    Post subject: Reply to: UTF - 8 to EBCDIC conversion
Reply with quote

For the meaning of CODE PAGE within a Cobol program, you should find sufficient explanations in the Language Reference and Programming Guide. You'll get it better if you do the reading yourself. If still unclear, explain what you understand, and what you don't.
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 93
Location: Bangalore, India

PostPosted: Wed Mar 07, 2012 10:51 pm    Post subject:
Reply with quote

Can you please let me know the code changes?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Mar 07, 2012 10:55 pm    Post subject:
Reply with quote

TS70363 wrote:
Can you please let me know the code changes?


Check this post: http://ibmmainframes.com/about30851.html
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Converting EBCDIC to Unicode (TimeStamp) muralikrishnan_new COBOL Programming 2 Mon Jul 25, 2016 10:42 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm


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