×
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.
I assume the CPF3C12 error is caused by the QlgConvertCase APIs third
parameter (InputLength) being passed by value as opposed to by
reference. Try changing the value keyword for this parameter to const.
As Tom suggests you'd also want to add code to initialize the error data
structure's first subfield to the actual length of the error data
structure:
Error.QUSBPRV = %Size( Error );
This ensures that the API only addresses storage actually belonging to
the Error data structure. According to the API documentation, the API
also expects the reserved part of the ConvCaseReqBlock to be initialized
to all x'00'. I haven't tested the tolerance of the QlgConvertCase API
in this respect, but most APIs return an error if reserved space is not
initialized to the documented value - adding the following line should
do the trick:
ConvertType.Reserved = *Allx'00';
Best regards,
Carsten Flensburg
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Neill Harper
Sent: 13. december 2009 11:58
To: 'Midrange Systems Technical Discussion'
Subject: RE: QlgConvertCase - Example using Character data CCSID(13488)
Thanks for the tip Bruce, last night I was trying both number of chars
and
number of bytes with no success.
Here is my code, it is an typed so formatting in probably off, but it
does
compile
DS declaration for type of request
D ConvCaseReqBlock...
D DS QUALIFIED
D RequestType 10i 0 Inz(1)
D CCSID 10i 0
D CaseRequest 10i 0
D Reserved 10a
Api call prototype
D ConvertCase PR
EXTPROC('QlgConvertCase')
D Type
LikeDS(ConvCaseReqBlock)
D Input * value
D Output * value
D InputLength 10i 0 value
D error LikeDS(qusec)
Prototype for my wrapper routine
D ToUpper PR 16383C varying
ccsid(13488)
D Input 16383C varying
options(*varsize)
D
ccsid(13488)
D Length 10i 0
Options(*nopass) const
Code for my wrapper
D ToUpper b
D ToUpper Pi 16383C varying
ccsid(13488)
D Input 16383C varying
options(*varsize)
D
ccsid(13488)
const
D Length 10i 0
Options(*nopass) const
D rtnVal s Like(Input)
D wrkVal s 16383C
ccsid(13488)
D wrkVal2 s 16488C
ccsid(13488)
D ConvertType ds
LikeDS(ConvCaseReqBlock)
D error ds
likeds(qusec)
D len s 10i 0
/free
ConvertType.CCSID = 13488;
ConvertType.CaseRequest = 0;
If %parms > 1;
Len = length * 2;
Else;
Len = %len(Input) * 2;
Endif;
Qusbprv looks dodgy to me. Put apart from that I can't figure out where
I am
going wrong
This communication is intended only for use by the addressee.It may contain confidential or privilegedinformation.
If you receive this communication unintentionally, please inform us immediately and delete this e-mail and any attachments.
Warning: Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept
responsibility for any loss or damage arising from the use of this email orattachments.
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.