Conversion of DBCS to Chinese Traditional Language

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
ithakotamurali
Member
Posts: 2
Joined: Fri Dec 06, 2013 2:08 pm

Conversion of DBCS to Chinese Traditional Language

Post by ithakotamurali » Fri Dec 06, 2013 3:02 pm

Hi,

Could You please help me on below issue:-

Issue:- How to Convert DBCS to Chinese Traditional Language.

I have done the code as given below, still i am not able to convert DBCS to Chinese Traditional Language.

WORKING-STORAGE SECTION.

01 WS-LOCAL-LANG-NM.
05 WS-LOCAL-CM-NAME PIC N(400) usage national.
05 WS-LOCAL-CM-NAME2 PIC N(400) usage national.

01 INP-STRING.
05 SO PIC X.
05 WS-CM-LOCAL-NM PIC X(400).
05 SI PIC X.

PROCEDURE DIVISION


MOVE '$w|ÏßÐíb' TO WS-CM-LOCAL-NM -----------> Filed with DBCS data.
MOVE SHIFT-OUT TO SO
MOVE SHIFT-IN TO SI
MOVE FUNCTION NATIONAL-OF(WS-CM-LOCAL-NM,835) TO
WS-LOCAL-CM-NAME
DISPLAY 'MURALI NAME IN XML1' WS-CM-LOCAL-NM
DISPLAY 'MURALI NAME IN XML1-1' WS-LOCAL-CM-NAME

MOVE FUNCTION DISPLAY-OF(WS-LOCAL-CM-NAME,01208) TO
WS-LOCAL-CM-NAME2
DISPLAY 'MURALI NAME IN XML1-2' WS-LOCAL-CM-NAME2

Output i am seeing after "NATIONAL-OF" is:-
MURALI NAME IN XML1-1 C +-\ \

Seems i am getting some Junk data

Thanks & Regards,
Murali.I

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sun Dec 08, 2013 7:33 pm

Are you viewing the data using the code page for "Chinese Traditional Language"?
Regards
Nic

ithakotamurali
Member
Posts: 2
Joined: Fri Dec 06, 2013 2:08 pm

Post by ithakotamurali » Mon Dec 09, 2013 10:45 am

Hi Nic,

Yes I am using Chinese Traditional Language Code Page. After Conversion i even down loaded data to Binary format. Still i am seeing some junk char..

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others