× 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.



Frank.Kolmann=R2w+CULl3trQT0dZR+AlfA@public.gmane.org wrote:
>
> I noticed recently that someone asked how to get data fields from
> the trigger programs buffer and saw a reference to external defined
> DS, so I gave it a try.
>
> I had problems because all the Varying Char fields were 2 bytes
> bigger than they should have been.  When I program described
> the fields in the DS and made the Varying Char fields the
> proper size all worked OK.
>
> There is probably a PTF for this and I have ordered the latest Cume
> others may have a similar issue.
>

Frank, I think the problem is that you specified CVTOPT(*VARCHAR) on
your compile or in your H spec.  Check your cross-reference - I think
you'll see that with the external-DS version, those fields aren't
actually VARYING.

With CVTOPT(*VARCHAR):
5=D F1PROFILE                     22A   EXTFLD
(PROFILE)
                                             External data type is
Variable Length Char
6=D
VARYING
7=D F1NOTE                       255A   EXTFLD (NOTE)
                                             External data type is
Variable Length Char
8=D                                     VARYING

Without CVTOPT(*VARCHAR):
4=D F1PROFILE                     20A   EXTFLD (PROFILE)
5=D                                     VARYING
6=D F1NOTE                       255A   EXTFLD (NOTE)
7=D                                     VARYING

Hmm, I see that the listing IS misleading when you have VARYING with
CVTOPT(*VARCHAR).  The VARYING lines shouldn't be in the listing in the
CVTOPT case.

You probably don't want to specify any CVTOPT.  CVTOPT is really there
for converted RPG/400 programs that had to use CVTOPT to get those
fields into the program.  CVTOPT makes the fields come into the program
as ordinary character (as opposed to varying or date, or whatever the
original type was).




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.