Posted: Fri Aug 29, 2003 1:48 am Post subject: "UNICODE" option in db2 UNLOAD utility
Hi Experts,
Please try to solve this issue.
Here are the issues -
1) When a file containing any special chars ( extended ascii chars only..not double-byte ) is FTPd from Mainframe to SUN box, those characters are getting converted to some other special characters. Our requirement is to send them as they appear in the database table and in Mainframe File.
2) For the above problem, we researched and found that their is one "UNICODE" option in db2 UNLOAD utility which we might be able to use to resolve the isue..But when we try to execute the Unload utility with that option, it is giving us error of "Unidentified Token UNICODE". Hence we are not able to further explore UNLOAD utility even.
Thanks in advance. _________________ Have a Great Day.
Thanks & Regards,
Jai
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Fri Aug 29, 2003 4:43 am Post subject:
Jai,
You need to have the application encoding scheme as unicode as your first statement in unload followed by your select statement for the table in question.
Code:
SET CURRENT APPLICATION ENCODING SCHEME ='UNICODE';
We included the statement
"SET CURRENT APPLICATION ENCODING SCHEME ='UNICODE'; "
in the query and executed the job and job is abending with sqlcode '-084'.
The explanation for this error sql code is 'This SQL statement is unacceptable to DB2'
Please let me know.
Thanks in advance. _________________ Have a Great Day.
Thanks & Regards,
Jai
My DB2 Version is 7.1.1
It is Mainframes DB2 and not the UDB one.
Actually all the datas from DB2 has to be unloaded to Mainframes File and then has to be ftp'ed to SUN box.
And while unloading to File we are not able to run with that option which you provided, and was giving -084 sql error.
If u don't give that UNICODE option, datas are unloaded with special characters as mentioned and when ftp'ed to SUN Box, it is not as such in the Database.
I have suggested to recreate the table with UNICODE option. But it is not preferred here and they want to do it as such.
It is very urgent and that's why please provide your valuable suggestion as soon as possible.
Please let me know
Thanks in advance. _________________ Have a Great Day.
Thanks & Regards,
Jai
Can you please tell me how to ensure whether unicode services is installed on our os/390 mvs system or not.
And Please tell me what are the other options, if not this option.
Please let me know.
Thanks in advance. _________________ Have a Great Day.
Thanks & Regards,
Jai
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
Posted: Wed Sep 03, 2003 9:59 am Post subject:
We are os/390 2.10 and unicode has to be separately downloaded and installed (which we haven't done yet). I'm guessing that somewhere in the z/OS releases it comes with it. At any rate we haven't installed it yet so I can't help with guessing about your system having it installed.
Please let me know the details of downloading UNICODE(As You told that unicode has to be separately downloaded and installed )(Source & Other Informations)
Thanks in advance. _________________ Have a Great Day.
Thanks & Regards,
Jai
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
Posted: Thu Sep 04, 2003 9:03 am Post subject:
This document concerns the application of PTFs that require the prerequisite of OS/390 V2 R8/9/10 Support for Unicode, FMID HUNI2A0. Those PTFs require you to install and customize OS/390 V2 R8/9/10 Support for Unicode before the functionalities shipped in the operating system PTFs are supported. Required operating system PTFs are documented OW44581. The following outlines the steps you need to follow to install OS/390 V2 R8/9/10 Support for Unicode.
1. OS/390 V2 R8/R9/R10 support for Unicode is packaged using the SMP/E GIMZIP function. The SMP/E GIMUNZIP function is required to process the download package. Obtain the appropriate SMP/E PTF for your driving system to extract the GIMZIP archives in the download package: PTF UR52471 PTF UR52473 for Japanese
2. The distribution medium for OS/390 Release 8, Release 9, Release 10 and z/OS V1R1 is Web delivery. (Support for Unicode will be integrated into z/OS V1R2.) For OS/390 releases 8, 9, and 10 and z/OS V1R1, download the Unicode component from http://www.ibm.com/servers/s390/os390/downloads.html to a node that has connectivity to your OS/390 target system. Then upload the files to the OS/390 target system where the Unicode component will be installed. You need to download two files from this site:
a. A README file that contains a sample job that extracts the archives from the downloaded package, places the archive contents in data sets that SMP/E can process and executes the SMP/E RECEIVE function to receive the FMIDs.
b. A pax archive file containing both the base function and the additional FMID function. This file contains the SMP/E MCS and the associated RELFILEs. Upload this file to the OS/390 target system in BINARY format.
3. Update the job card information and elsewhere as indicated in the sample job provided in the README.TXT file.
4. Run the sample job provided in the README.TXT file. This job will perform the required tasks up to and including the SMP/E RECEIVE step.
5. Complete the installation following the steps in the chapter "Installation Instructions" of Program Directory for OS/390 V2 R8/R9/R10 support for Unicode (GI10-9760). Softcopy is available at the link provided in item 2 above. Select "BROWSE" for the BookManager format. A PDF format link is also provided.
6. Once the SMP/E ACCEPT has completed in the step above, obtain the OS/390 V2 support for Unicode: using Conversion Services (SC33-7050) manual to complete the activation process. Softcopy is available at: http://publibz.boulder.ibm.com/epubs/pdf/cunuge00.pdf (PDF format) http://publibz.boulder.ibm.com/cgi- bin/bookmgr_OS390/BOOKS/CUNUGE00/CCONTENTS (BookManager format) The conversion services can only be used when the conversion environment is active. The infrastructure provides tools to create a conversion image. When the image is loaded into a common data space, the conversion environment is activated and the conversion services are ready to be used by DB2.
7. The jobs in hlq.SCUNJCL, for example CUNJIUTL, as shipped by IBM, have placeholders for values on the JOB card such as the following:
//$JOBPREF$$JOBNAME$ JOB ($ACCOUNT$),'$USER$',
// NOTIFY=$NOTIFY$,MSGCLASS=$MC$,MSGLEVEL=$ML$,
// TIME=$TI$,CLASS=$CL$,REGION=$REGION0M$
The REXX exec CUNRUCST in hlq.SCUNREXX lets you customize these values and when you run the REXX exec CUNRUALL, the values you specify will be supplied on all the JCL images. You may also choose to customize your system by displaying Japanese messages or displaying English messages with modified date and time formats. You set up the MVS Message Service to obtain this capability. For more information on both of the above topics, refer to the chapter "Setting up the system" in OS/390 V2 support for Unicode: using Conversion Services (SC33-7050)
8. Set up the conversion image. Following is the sample JCL member in hlq.SCUNJCL(CUNJIUTL).
//CUNMIUTL EXEC PGM=CUNMIUTL
//SYSPRINT DD SYSOUT=*
//TABIN DD DISP=SHR,DSN=hlq.SCUNTBL
//SYSIMG DD DSN=hlq.IMAGES(CUNIMG00),DISP=SHR
//SYSIN DD * /******************************************** * INPUT STATEMENTS FOR THE IMAGE GENERATOR * ********************************************/ CASE NORMAL; /* ENABLE TOUPPER AND TOLOWER */ CONVERSION 1047,850; /* EBCDIC -> ASCII */ CONVERSION 850,1047; /* ASCII -> EBCDIC */ /*
The DDNAMEs that are passed to CUNMIUTL are described as follows:
SYSPRINT: A listing that shows the processed steps and error messages if applicable.
TABIN: Conversion tables for character conversion and case conversion. They are supplied by IBM, in this
example in data set hlq.SCUNTBL. The image
transforms the conversion tables into an internal
format and stores them in the conversion image.
SYSIMG: Output is a single image of the entire conversion environment. The conversion image is built
according to the specification in the SYSIN DDNAME.
The conversion image resides in either a sequential
data set or a member of a partitioned data set with
a fixed block 80 format, in this example in
partitioned data set member hlq.IMAGES(CUNIMG00).
SYSIN: Two types of statements are recognized in this DD statement: case conversion, identified by the CASE
control statement, and character conversion,
identified by the CONVERSION control statement.
CASE Control Statement:
Case conversion is defined as converting unicode
characters (for instance, UCS-2) to their upper
case equivalent or their lower case equivalent.
In the example above, "CASE NORMAL" is specified
which means basic case conversion is provided,
based solely on the file UnicodeData.txt provided
by the Unicode consortium. It does not include
special casing as described in the file
SpecialCasing.txt provided by the Unicode
consortium. An example for special casing is the
German "hard S" which when written appears as a
flat B; in special casing it uppercases to SS in
German text.
Because DB2 does not make use of the case
conversion service, you can avoid specifying this statement.
CONVERSION Control Statement:
Character conversion is also referred to as
conversion between specified CCSIDs. An application
such as DB2 invokes the CUNLCNV function to convert characters between the specified code pages, but
the application can do so, you need to identify the
conversions that are possible on the CONVERSION
control statement.
In the example above, the two CONVERSION
statements provide conversion between the EBCDIC
code page 1047, the ASCII code page 850 and vice versa.
There is an extremely large list of code page
conversions that are possible. They are documented
in the appendix "Summary of IBM-supplied conversion
tables" in OS/390 V2 support for Unicode: using
Conversion Services (SC33-7050). However, when
identifying the conversions that DB2 is to use, you
need only be concerned with conversions for the
national languages you use and conversion from
these code pages to and from code page 1200, which
is the code page for UCS-2. For example, on a DB2
FETCH request, you are concerned with conversions
from a given code page and 1200 and on a DB2 INSERT request, you are concerned with conversions from
code page 1200 and a given code page. The appendix
"Specifying a system coded character set identifier
identifier" in the DB2 UDB for OS/390 and z/OS V7
Installation Guide (GC26-9936) or DB2 UDB for
OS/390 V6 Installation Guide (GC26-9008) lists the
choices available. Just as you specify these values
in fields 7, 8 and 9 of the installation panel
DSNTIPF, you must specify them on the CONVERSION statement in the CUNJIUTL job.
technique-search-order (not shown in the above example):
There may be multiple conversion tables available
for converting one CCSID to another. A technique-
search-order can be used to specify which table
should be used. It consists of up to 8 technique-
characters. If you specify more than one technique
character, the image generator tries to find a
matching table for the leftmost technique character
in the sequence of the technique-search-order. If
not found, the search continues with the second one
and so on. Especially for mixed conversion, it is
advisable to use more than one technique-character
as one of the sub-conversions might exist only in
round-trip mode and one only in enforced-subset.
In this case, a technique-search-order of 'RE' or
'ER' would be required. technique-search-order is
optional. If not specified, RECLM is used.
In the example above, technique-search-order is not
specified on any of the CONVERSION statements.
Therefore, they are logically equivalent to the following:
CONVERSION 1047,850,RECLM; /* EBCDIC -> ASCII */ CONVERSION 850,1047,RECLM; /* ASCII -> EBCDIC */
The important technique characters for you to take
note of regarding DB2 are E (enforced subset)
followed by R (round trip). Enforced Subset
conversions map only those characters from one
CCSID to another which have a corresponding
character in the second CCSID. All other characters
are replaced by a substitution character.
Roundtrip conversions between two CCSIDs assure
that all characters making the 'roundtrip' arrive
as they were originally.
Therefore, you must specify CONVERSION statements
as follows for DB2:
CONVERSION xxx,yyy,ER;
CONVERSION yyy,xxx,ER;
on each of the CONVERSION statements you specify.
This completes the set up of the conversion image. At this
time, you should have an updated CUNJIUTL JCL member. **** Please reference II13049 for further installing and
customizing steps.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum