× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Glenn,

I'd check the defaults on CRTBNDRPG and/or CRTRPGMOD.

My system has CVTOPT(*NONE) as a default, it sounds as if yours has
CVTOPT(*VARCHAR)

HTH,
Charles

On Fri, Jan 15, 2010 at 1:49 PM, Gundermann, Glenn / Kuehne + Nagel /
Tor ZI-A <Glenn.Gundermann@xxxxxxxxxxxxxxxx> wrote:
Hi folks,

I searched the archives and didn't find anything to help me with my error so now that I have figured it out, I thought I would send this in case it might help someone in the future.

I have a DDL-described table, and among other columns, have one defined as follows:
PONUMBERS  VARCHAR(760) CCSID 37 NOT NULL

I found that I needed the following control-spec in my rpg module:
h cvtopt(*novarchar)

because without this, the rpg dump listing showed that PONUMBERS was CHAR and not VCHAR.

So even if my getPOs procedure returns varying-length data:
D getPOs          PI           760a   varying
D   orderType                    4a   const
D   orderNumber                 17a   const

The following statement moves the returned data into a character field, which then causes an error when writing to the database file.
poNumbers = getPOs(orderType: orderNumber);

The control-spec fixed it.

Happy computing.

Glenn Gundermann
Work: 905-501-6596
Cell: 416-317-3144

To learn more about Kuehne + Nagel Ltd, please visit our website at: www.kuehne-nagel.com For the Kuehne + Nagel email disclaimer, visit: http://www.kn-portal.com/material/Electronic_Email_Disclaimer_English_French.pdf



Visitez le site internet de Kuehne + Nagel Lt?e: www.kuehne-nagel.com Notre d?charge de responsabilit? est disponible comme suit: http://www.kn-portal.com/material/Electronic_Email_Disclaimer_English_French.pdf
--
This is the RPG programming on the IBM i / System i (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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.