Chuck,
Thank you for the FROMSTMF clarification, we will try the conversion
as soon as my co-worker is available.
Here is a link to the page I found on CCSID 1201:
http://www-01.ibm.com/software/globalization/ccsid/ccsid1201.html
To John Yeung's point about UTF-16 BE - I am ignorant about this topic,
but made my assumption/statement because the files we want to convert
are from "quick and dirty" queries run in MS SQL Server Studio 2005.
We run various queries and sometimes find it handy to right-click
in the results pane and select "Save Results As..."
These files always appear to be in the same "double byte character format";
what that format is, I don't know.
Viewing the saved files with Notepad we see what appears to be a good
candidate for CPYFRMIMP FROMSTMF - but, so far, we only have success
using MS Excel "Text to Columns" function to create a ".csv".
As Joe Wood commented, it will be a real time-saver when we get the
"character conversion" problem solved.
Thanks everyone - we will post what we learn
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Tuesday, April 09, 2013 7:56 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: CPYFRMIMPF FROMCCSID(1201)
On 09 Apr 2013 16:37, Gary Thompson wrote:
My first attempt at "consuming" a .txt file in, I think, Unicode
format did not work as expected.
CPYFRMIMPF did copy the data to the local EBCDIC file, but the data
was still "double byte" (an "extra" space between each character).
I tried both
FROMCCSID(1201)
FROMCCSID(1200)
CCSID is described as UTF-16 BE and it seems to be a Windows
"standard" for text files.
AFaIK the FROMCCSID parameter applies to the FROMFILE, not the FROMSTMF [¿unless the FROMSTMF CCSID is 65535?]. See the doc link after the two archived message links. If the results are not as described, e.g. no error when the /from-file/ [as FROMSTMF] is not *HEX, then either report the contradiction with the effects and the doc as a defect.
Note: I do not know anything about CCSID(1201), I know only of
CCSID(1200) as UNICODE UTF-16BE. There is no mention of 1201 here:
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzaha/fileenc.htm
Correctly tag the CCSID for the FROMSTMF [e.g. CHGATR], and the problem will be resolved; well, it has always worked for me anyhow, since v5r3. For example, as described in the recent messages:
http://archive.midrange.com/midrange-l/201303/msg00039.html
"... The CCSID for the FROMSTMF is always the CCSID of the STMF. Thus if the stream files are improperly tagged, then improper effects are to be expected. To correct the CCSID tagging, use the following request:
CHGATR OBJ(the_file) ATR(*CCSID) VALUE(1200) ..."
http://archive.midrange.com/midrange-l/201303/msg00084.html
"... Again, that issue [almost positively] is due to the incorrect tagging; i.e. wrong CCSID. When the STMF is tagged with something other than 1200 but its data is UTF-16BE, then the copy feature does not work.
So if the file is incorrectly tagged with CCSID-1252 or CCSID-819, then CPYFRMSTMF does not know you lied, and tries to convert the data based on that lie, then the effect will *appear to be* byte-by-byte conversion. That is because the feature has no idea that the data is two-byte characters, when the CCSID says they are not. Unlike the CPYFRMIMPF however, the STMFCCSID [or STMFCODPAG on older releases] can be used to override the STMF CCSID to 1200" <ed: addendum:> on the CPYFRMSTMF command.
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/cl/cpyfrmimpf.htm
_i Copy From Import File (CPYFRMIMPF) i_ "The Copy From Import File (CPYFRMIMPF) command copies all or part of an import file to the TOFILE. The term import file is used to describe a file created for purposes of copying data between heterogeneous databases. The import file (FROMSTMF or FROMFILE parameter) is called the from-file for this command.
...
From CCSID (FROMCCSID)
Specifies the coded character set identifier (CCSID) of the from-file.
*FILE
The from-file CCSID is used. If the from-file is a tape file, the job's default CCSID is used.
1-65533
Specify the CCSID to be used when the CCSID of the from-file is 65535, or if the from-file is a tape file. If the from-file CCSID is not 65535, or the from-file is not a tape file, an error message will be sent.
..."
--
Regards, Chuck
--
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.