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

Cobol to convert UTF-8 to EBCDIC


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandhyarenu

New User


Joined: 04 Jan 2007
Posts: 16
Location: India

PostPosted: Tue May 20, 2008 10:25 am
Reply with quote

Hi,

Could someone help with a sampe Cobol Code that converts UTF-8 data to EBCDIC and vice versa ? Thanks much in advance.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue May 20, 2008 10:35 am
Reply with quote

a google search on "cobol utf ebcdic conversion" will return lots of pointers

the request, as posed, is a bit generic -
here is a pointer for the CICS environment ,

http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/com.ibm.cics.ts31.doc/dfhp3/dqx1dfhp3i2.htm
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue May 20, 2008 10:45 am
Reply with quote

Hello sandhyarenu and welcome to the forums,

Please clarify your requirement.

UTF-8 does not directly "convert" to EBCDIC.

If you show some sample data and what you want to do with it, someone may have a suggestion.
Back to top
View user's profile Send private message
sandhyarenu

New User


Joined: 04 Jan 2007
Posts: 16
Location: India

PostPosted: Tue May 20, 2008 11:00 am
Reply with quote

Thanks for the quick updates. My requirement however plainly states that a cobol code is to be developed which takes file containing UTF-8 data as input and converts it to EBCDIC which will form the o/p file so that a normal mainframe cobol code is compatible with the data. I googled and found some sample codes which do ASCII-EBCDIC conversions but not UTF-8 ! And, I did not quite understand dick's response as to why UTF-8 cannot be converted to EBCDIC. Is there a normalisation required like using the Function National() which converts UTF/EBCDIC data to national format before further conversion ? I hope I make myself clear. Any thoughts ?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue May 20, 2008 11:02 am
Reply with quote

where does the file come from??
if it is ftp'ed then ftp will take care of it ( IIRC )
Back to top
View user's profile Send private message
sandhyarenu

New User


Joined: 04 Jan 2007
Posts: 16
Location: India

PostPosted: Tue May 20, 2008 11:16 am
Reply with quote

I don't think it's ftped. Atleast in my requirement, I need to come up with a test file containing UTF-8 data(manually created).
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue May 20, 2008 11:16 am
Reply with quote

Hello,

Quote:
not quite understand dick's response as to why UTF-8 cannot be converted to EBCDIC
I believe you missed a rather inportant word - directly.

This http://www.unicode.org/reports/tr16/ is probably more than you want, but you might take a look at it.
Back to top
View user's profile Send private message
sandhyarenu

New User


Joined: 04 Jan 2007
Posts: 16
Location: India

PostPosted: Tue May 20, 2008 11:17 am
Reply with quote

Absolutely, Dick ! My mistake..
Back to top
View user's profile Send private message
sandhyarenu

New User


Joined: 04 Jan 2007
Posts: 16
Location: India

PostPosted: Tue May 20, 2008 11:44 am
Reply with quote

Dick, The link is more of theory and I really couldn't trace a cobol code for the conversion I am looking for. icon_sad.gif
Back to top
View user's profile Send private message
sandhyarenu

New User


Joined: 04 Jan 2007
Posts: 16
Location: India

PostPosted: Tue May 20, 2008 4:20 pm
Reply with quote

I found that UTF-16 could be converted to and from an EBCDIC data. Now my task is to convert UTF-8 to & from a UTF-16 data. Any inputs to this ?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue May 20, 2008 4:34 pm
Reply with quote

if You had searched the zos bookshelves for publications containing
in the title the word unicode
You would have been directed to


http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/SEARCH?SEARCHREQUEST=unicode&Book=IEA2UN71&DN=SA22-7649-09&DT=20080118011120&TYPE=FUZZY&RANK=RANK&SEARCHTOPIC=TOPIC&SEARCHTEXT=TEXT&SEARCHINDEX=INDEX&SHELF=EZ2ZO10K.bks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue May 20, 2008 8:13 pm
Reply with quote

Hello,

--> sandhyarenu
Do you have what you need?

Where does your UTFx input originate?
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts Replacing FILLER with FILLER<SeqNu... DFSORT/ICETOOL 2
No new posts CONVERT a given date from UTC TO BST CICS 0
No new posts Compile Sp Cobol base COBOL Programming 1
Search our Forums:

Back to Top