× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi James,
I am just new to this area and am learning. I went to search for Unicode
on info center and found the following info. Please let me know if I
understood this incorrectly.
Thanks,
Sudha

Creating physical files: 

Unicode graphic fields can be created in physical files. This is done by
specifying a G data type and a Unicode CCSID for the CCSID keyword. 

The following example shows the DDS for a physical file containing four
fields, and the command for creating the file: 

A          R FMT1
A            EMPNO          6A
A            NAME          30G         CCSID(1200)
A            DESCR1       500G         CCSID(1200) VARLEN
A            DESCR2       500A
 
CRTPF FILE(UNICODEPF) SRCFILE(CLR/QDDSSRC)

In the example: 

The first field, EMPNO, is a character field of length 6. The CCSID of
the EMPNO field is the SBCS CCSID of the job. The decision was made to
use a character field because the EMPNO field contains only numerics and
Unicode support is not needed. 
The NAME and DESCR1 fields are both Unicode fields. Both of these fields
may need to contain data from more than one EBCDIC code page so the
decision was made to make these fields Unicode graphic. 
The DESCR2 field is the SBCS CCSID of the job. This field is used as
illustratioin of mapping to a logical field in Creating logical files. 
You can specify the default (DFT) keyword for Unicode graphic fields.
The default value can be specified as SBCS, bracketed-DBCS, or
bracketed-DBCS-graphic character strings. If you do not specify the DFT
keyword, the default value for fixed-length Unicode fields is the
Unicode blank (hexadecimal 0020). For varying-length Unicode fields, the
default is the empty string. 

SQL tables 
 
SQL supports tables that contain Unicode graphic columns by specifying a
Unicode CCSID for the GRAPHIC and VARGRAPHIC data types. 

The following SQL example creates the table U_TABLE. U_TABLE contains
one character column called EMPNO, and two Unicode graphic columns. NAME
is a fixed-length Unicode graphic column and DESCRIPTION is a
variable-length Unicode graphic column. The decision was made to use a
character field since the EMPNO field only contains numerics and Unicode
support is not needed. The NAME and DESCRIPTION fields are both Unicode
fields. Both of these fields may contain data from more than one EBCDIC
code page. 

CREATE TABLE U_TABLE (EMPNO CHAR(6) NOT NULL,
NAME GRAPHIC(30) CCSID 1200,
DESCRIPTION VARGRAPHIC(500) CCSID 1200)


Sudha Ramanujan
SunGard Futures Systems
sramanujan@xxxxxxxxxxxxxxxxxx
(312) 577 6179
(312) 577 6101 - Fax


-----Original Message-----
From: James H H Lampert [mailto:jamesl@xxxxxxxxxxx] 
Sent: Thursday, March 31, 2005 1:03 PM
To: Midrange Systems Technical Discussion
Subject: Re: Unicode

<SRamanujan@xxxxxxxxxxxxxxxxxx> wrote:
> I know a Graphic/VarGraphic with CCSID 1200 is Unicode
> but can I create one as Char/Varchar with CCSID to make
> it Unicode as well?


Uh, since when is CCSID 1200 Unicode? Since when is CCSID 
1200 even defined on an AS/400?

2-byte Unicode/UCS-2/UTF-16 is CCSID 13488 (or 61952, if 
you want to be archaic).

1-byte Unicode/UCS-1/UTF-8 appears to be CCSID 1208, but 
that's news to me. When was that introduced?

--
JHHL
-- 
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.