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



Thank you very much, you solved my problem.

Denis Robitaille
Cascades inc.
Tel: 819-363-5187
DRobitaille@cascades.com

>>> <bvining@VNET.IBM.COM> 12/22 4:07 pm >>>
Denis,

The various system APIs (QWCRDTAA included) check the error code for a
valid Bytes Provided value where Bytes Provided is defined as a 4-byte
binary value.  Your attached example shows the Error Code as being
defined as a 1-byte character field though.  You should define it as
a *CHAR 4 and then CHGVAR VAR(%BIN(&ERR)) VALUE(0) assuming you want
errors returned as exceptions.

Why this executed properly on V4R2 is the question in my mind.  It might
be some difference in data alignment on CISC vs RISC, or a difference in
storage initialization across CISC/RISC, or who knows what.  In any case
though, the sample as imbedded in the note is coded incorrectly for either
release.

Bruce Vining

>
>Hello all,
>
>I needed to extract the defined length of a data area inside a program.
>To do that, I used the retrieve data area(QWCRDTAA) API. I wrote a CLLE
>to call the API and to retrieve the value from the return buffer.
>Everyting is OK. This was developped on a V4R2 machine.
>
>I moved the code on a V3R2 machine and now i get the error CPF3CF1
>"Error code parameter not valid. ". I checked the manual and the API
>has not changed. I recompile everyting but no change. The message
>speaks of the error code parameter, i tried different length (from 1 to
>200 bytes), but still no chance.
>
>Here is some extract of the code i used:
>
>...
>DCL        VAR(&QUAL)       TYPE(*CHAR) LEN(20)
>DCL        VAR(&REC)        TYPE(*CHAR) LEN(2000)
>DCL        VAR(&LREC)       TYPE(*CHAR) LEN(4)
>DCL        VAR(&STR)        TYPE(*CHAR) LEN(4)
>DCL        VAR(&LEN)        TYPE(*CHAR) LEN(4)
>DCL        VAR(&ERR)        TYPE(*CHAR) LEN(1)
>...
>  CHGVAR     VAR(%BIN(&LREC)) VALUE(2000)
>  CHGVAR     VAR(%BIN(&STR)) VALUE(-1)
>  CHGVAR     VAR(%BIN(&LEN)) VALUE(1)
>  CALL       PGM(QWCRDTAA) PARM(&REC &LREC &QUAL &STR +
>               &LEN &ERR)
>...
>
>Does anybody have any idea why this does no work in V3R2?
>
>Denis Robitaille
>

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com 
+---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.