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.
 ..."
As an Amazon Associate we earn from qualifying purchases.