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
 

 

Cobol to convert UTF-8 to EBCDIC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Cobol to convert UTF-8 to EBCDIC
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue May 20, 2008 10:35 am    Post subject: Reply to: Cobol to convert UTF-8 to EBCDIC
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

Site Director


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

PostPosted: Tue May 20, 2008 10:45 am    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue May 20, 2008 11:02 am    Post subject: Reply to: Cobol to convert UTF-8 to EBCDIC
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    Post subject:
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

Site Director


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

PostPosted: Tue May 20, 2008 11:16 am    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue May 20, 2008 4:34 pm    Post subject: Reply to: Cobol to convert UTF-8 to EBCDIC
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

Site Director


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

PostPosted: Tue May 20, 2008 8:13 pm    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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