|
Like yours, my *PGM is 65535 and my *MODULE is 37
I used CRTSQLRPGI to create the module and program in one step.
I altered my code to use the CCSID(1208) variable for 'from' and 'to',
and it works here :-(
I see a parameter CVTCCSID on the CRTSQLRPGI command, but there's no
help for it. Not via F1 on the command, nor in the CL guide.
https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/cl/crtsqlrpgi.htm
What is the CCSID of your QRPGLESRC file?
Mine is 37.
--buck
On Thu, 13 Oct 2022 at 10:47, Brad Stone <bvstone@xxxxxxxxx> wrote:
*N
I may have found it... I did a DSPPGM and found this:
Coded character set identifier . . . . . . . . : 65535
When I view the module info for the program I see:
Coded character set identifier . . . . . . . . : 37
So, where does the program CCSID come from? I don't see a parameter for
it on CRTPGM, CRTSQLRPGI, etc....
On Thu, Oct 13, 2022 at 9:29 AM Brad Stone <bvstone@xxxxxxxxx> wrote:
I ran it in debug and see this in the job log:
Character conversion between CCSID 1208 and CCSID 65535 not valid.
Here are the two errors:
Message ID . . . . . . : CPD434A
Date sent . . . . . . : 10/13/22 Time sent . . . . . . :
09:09:12
Message . . . . : Coded Character Set Identifiers (CCSIDs) of field
*N toand
*N are not compatible.
Cause . . . . . : Field *N in file *N in library *N format *N join
reference
0 is mapped to field *N in format FORMAT0001. However, the CCSIDs of
the
two fields are not compatible because of reason code 2.
1 -- CCSID 1208 was not found.
2 -- Conversion between the job or program CCSID 1208 for field
for
CCSID 65535 for field *N is not defined.
If the file name is *FUNCTION, the file was user-defined table
function *N
Message ID . . . . . . : SQL0332
Date sent . . . . . . : 10/13/22 Time sent . . . . . . :
09:09:12
Message . . . . : Character conversion between CCSID 1208 and CCSID
65535
not valid.
Cause . . . . . : Character or graphic conversion has been attempted
Conversion
data that is not compatible. There is no conversion defined between
CCSID
1208 and CCSID 65535.
If one CCSID is 65535, the other CCSID is a graphic CCSID.
theis
not defined between 65535 and a graphic CCSID.
Well, normally if your job is running in 65535 this error would have
fromtwo CCSIDs reversed, so what this is saying is that it can't convert
themit's own SQL variables (created by the SQL precomiler) to another one.
SQL_00005 129 230A VARYING CCSID(*HEX)
TOBEENCODED
SQL_00006 231 332A VARYING CCSID(*HEX)
TOBEENCODED
These are being defined incorrectly during compile... at least one of
error... Iis. the field *N in the job log tells me it's the SQL fields in
Ithink
So, it's obvious I probably either have some setting wrong (which one,
wrote:have no idea) or I need a PTF. I have compiled right from the command
line so that removes SBMJOB from the equation at least.
Any ideas from anyone?
On Thu, Oct 13, 2022 at 8:33 AM Brad Stone <bvstone@xxxxxxxxx> wrote:
I know I've used CCSIDs on variables before... not sure why this is
happening. I'm on the same OS version... TR 5.
On Wed, Oct 12, 2022 at 6:16 PM Buck Calabro <kc2hiz@xxxxxxxxx>
wrote:
The only difference seems to be that I used different variables for
the 'from' and 'to'.
Your compiler listing has *HEX for both; mine has *JOBRUNMIX for the
'from'.
--buck
On Wed, 12 Oct 2022 at 17:40, Brad Stone <bvstone@xxxxxxxxx> wrote:
D SQL_00005 129 230A VARYING CCSID(*HEX)
TOBEENCODED
SQL_00005 A(100) 78D 86M
VARYING(2)
CCSID(65535)
And in the source:
SQL_00005 = TOBEENCODED;
This is in my code as well (generated):
/SET CCSID(*CHAR:*JOBRUNMIX)
On Wed, Oct 12, 2022 at 4:33 PM Brad Stone <bvstone@xxxxxxxxx>
CCSID
Interesting.. I have:
D SQL_00004 10 128A CCSID(*JOBRUNMIX)
D SQL_00005 129 230A VARYING CCSID(*HEX)
D SQL_00006 231 332A VARYING CCSID(*HEX)
I've never used the /set directive before... and there is no
set tooption
on the CRTSQLRPGI command that I can find... SBMJOB CCSID is
wrote:wrote:*CURRENT and I know my job CCSID is 37 as is QCCSID System value.
On Wed, Oct 12, 2022 at 4:24 PM Buck Calabro <kc2hiz@xxxxxxxxx>
On Wed, 12 Oct 2022 at 16:34, Brad Stone <bvstone@xxxxxxxxx>
SYSTOOLS.BASE64ENCODE(:ToBeEncoded);
Dcl-S SomeCharVar Varchar(50);
Dcl-S ToBeEncoded Varchar(100) Inz('') CCSID(1208);
SomeCharVar = 'hello db2 summit';
ToBeEncoded = SomeCharVar; //Convert it to 1208
//Encode based on 1208
EXEC SQL SET :ToBeEncoded =
variables
When I run it I get SQLCOD 332 and SQLSTATE 57017.
My job is CCSID 37. I've tripled checked that.
I do see in the SQL Precompiler it's creating some temp
CCSIDs(ie,
SQL_00000x) and they are defined as 65535.
Where would I find a more detailed error text showing what
toit
CCSID(*JOBRUNMIX)thinks
it's trying to convert from and to?
Here is a similar program on 7.4 TR4:
dcl-s ch varchar(50);
dcl-s ch1208 varchar(100) ccsid(1208) inz;
ch = 'hello db2 summit';
exec sql set :ch1208 = systools.base64encode(:ch);
My compiler listing shows this:
Line <---------------------- Source
Number ....1....+....2....+....3....+
000100 // Set SQL Parameters
000100 /SET CCSID(*CHAR:*JOBRUNMIX)
000100 // SQL COMMUNICATION AREA
...
001000 D DS
SET
001000 D SQL_00000 1 2B 0 INZ(128)
length of header
001000 D SQL_00001 3 4B 0 INZ(4)
statement number
001000 D SQL_00002 5 8U 0 INZ(0)
invocation mark
001000 D SQL_00003 9 9A INZ('0')
CCSID(*JOBRUNMIX) data is okay
001000 D SQL_00004 10 128A CCSID(*JOBRUNMIX)
end of header
001000 D SQL_00005 129 180A VARYING
'iIWTk5ZAhILyQKKklJSJow=='CH
001000 D SQL_00006 181 282A VARYING CCSID(*HEX)
CH1208
dump(a) shows this:
CH CHAR(50) VARYING(2) 'hello db2 summit'
CH1208 CHAR(100) VARYING(2) CCSID(1208)
I'd check that the job/SBMJOB which compiles the RPG is also
CCSID(37), and if it is, brute force it by adding the RPG /SET
subscriptionset
the CCSID to *JOBRUNMIX.
Note: this is an RPG compiler function, not SQL!
https://www.ibm.com/docs/en/i/7.4?topic=directives-set#cdset
--buck
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any
affiliaterelated
affiliatequestions.
Help support midrange.com by shopping at amazon.com with our
related questions.--link: https://amazon.midrange.com
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
affiliate link: https://amazon.midrange.com
Help support midrange.com by shopping at amazon.com with our
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.
Help support midrange.com by shopping at amazon.com with our
related questions.--link: https://amazon.midrange.com
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
link: https://amazon.midrange.com
Help support midrange.com by shopping at amazon.com with our affiliate
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
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.