For Programmers: Free Programming Magazines  


Home > Archive > Cobol > September 2006 > IBM COBOL and Unicode









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author IBM COBOL and Unicode
sgbojo@gmail.com

2006-09-18, 6:55 pm

I have an example of COBOL from IBM dealing with national data. I am
inexperienced when dealing with the IBM compiler on Aix 5L 5.2.

I am using this command line:
cob CODEPAGE=00037 ibm1.cbl

I recieve this error: Function argument must be between 1 and collating
sequence length

Here is my program:
IDENTIFICATION DIVISION.
PROGRAM-ID. ibm1.
INSTALLATION. comment-entry.
DATE-WRITTEN. 1999/XX/XX - 99:99:99.
DATE-COMPILED. 1999/XX/XX - 00:00:00.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. computer-name.
OBJECT-COMPUTER. computer-name.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 Chinese-EBCDIC pic X(16) value 'Chinese text'.
01 Chinese-GB18030-String pic X(16).
01 UnicodeString pic N(14).
PROCEDURE DIVISION.
Main Section.
Move function National-of(Chinese-EBCDIC, 1388)
to UnicodeString.
Move function Display-of(UnicodeString, 1388)
to Chinese-GB18030-String.
Exit Program.
Stop Run.

Suggestions welcomed. Thanks.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com