|
Thanks, Barbara. I will look into things... Thanks!
On Mon, Jun 13, 2016 at 12:01 PM, Barbara Morris <bmorris@xxxxxxxxxx>
wrote:
On 6/10/2016 3:48 PM, Bradley Stone wrote:
Ok, so I set up the field with CCSID 1208 in the DDS. I didn't specifyBrad, what is your job CCSID? My understanding (and experience) is that
the
*NORMALIZE option. From what I understand, this will fix any
non-corresponding hex values to the closest match available?
...
We shall see if this will help. But I'm wondering if there are any RPG
D-Spec keywords one can use so that when data is read in from this field
it
is automatically converted to the JOB's CCSID? Or is iConv (or another
conversion API) required?
CCSID 1208 data (and all other alphanumeric data) is converted to the job
CCSID automatically by database unless the job CCSID is 65535. When the job
CCSID is 65535, no alphanumeric data is converted to the job CCSID.
At least, that's true when RPG opens the file prior to 7.2, and by
default from 7.2 on. Starting in 7.2, you can code DATA(*NOCVT) in your F
spec to cause the file to be opened with no conversion to the job CCSID.
You could also code OPENOPT(*NOCVTDATA) to have that be the default for all
database files.
Also in 7.2, you could code DATA(*CVT) on your F spec, and ensure the
program field matching your 1208 field is in the job CCSID. Then RPG would
do a runtime check, and if the job CCSID was 65535, it would convert the
1208 data in the buffer to your field's job CCSID.
DATA(*CVT) is the default, but RPG needs some indication in the code that
you want this new support. The old support wasn't necessarily correct, but
we know that people coded workarounds that we can't break.
As long as you code the the DATA keyword on your file, or CCSID(*EXACT)
in your H spec, or OPENOPT(*(no)CVTDATA) in your H spec, or the CCSID
keyword on that field or its externally-described data structure, RPG will
handle any necessary CCSID conversions when the record is read.
--
Barbara
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
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.