Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
Hi all. We have some stored procedures that retrieve a name parameter CHAR(35) and we are currently testing it with French characters. If the name is completely filled (all 35 chars) we're getting an "invalid string or buffer length" SQLSTATE HY090. Does this mean that French characters are somehow larger, or does it not recognize the characters, therefore being an invalid string?
Any suggestions would be greatly appreciated. Thanks!
There is nothing special about French characters. Hélène occupies 6 bytes, just as Helene does. Well, in CCSID 819, they do. What CCSID is your name defined to use? What CCSID is the calling job using? And finally, what does the code that's using this name look like?
CREATE PROCEDURE OrderConfirmation
(in p_storeno dec(5,0), -- store number
in p_orderno dec(8,0), -- SODA order number
in p_cimcust char(18), -- CIM customer number
in p_dworder char(25), -- demandware order no
in p_saporder char(25), -- SAP order number
in p_sku dec(9,0), -- SKU
in p_upc char(48), -- UPC
in p_sapmatno char(18), -- SAP material number
in p_matdesc char(70), -- SAP material de!--script--ion
in p_sizdim char(8), -- size/dimension
in p_quantity dec(9,2), -- quantity
in p_rjctqty dec(9,2), -- reject quantity
in p_cancod char(10), -- cancel reason code
in p_linstat char(1), -- line status
in p_pono char(10), -- allocation po number
in p_bulkord char(10), -- bulk order number
in p_dccode char(15), -- DC code
in p_soldto char(17), -- SAP sold to
in p_soldnm char(35) -- SAP sold to name
)
insert into mlsoci (mocpo#, mocbo#, mocdc, mocsku, mocstr,
mocqty, mocupc, mocmat, mocsor, mocsld, mocnam) values(p_pono,
p_bulkord, p_dccode, p_sku, p_storeno, p_quantity, p_upc, p_sapmatno,
p_saporder, p_soldto, p_soldnm);
So I was thinking maybe a CCSID mis-match. If all of these are the same, then that's probably not the issue:
What CCSID is the machine? DSPSYSVAL QCCSID
What CCSID is the job trying the INSERT? DSPJOB, option 2
What CCSID is the column P_SOLDNM? DSPFFD MLSOCI
Google tells me that HY090 is a Microsoft SQLSTATE. Are you using the correct DB2 driver? The DB2 LUW driver is not the same as the DB2 for i driver that comes with IBM i Access.