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



He Stefan

First, that message is probably the last of some messages - one of them might me MCH5601, which has says a template is invalid and has more information.

/_*But I think I know already - your data structure is missing position 16*_//__/- that is defined as a reserved subfield of length 1 in the API documentation for the error code parameter -

*All* reserved subfields *must* be all hex 0's.

I strongly recommend looking at the QUSEC data structure in the QUSEC member of QSYSINC/QRPGLESRC - it *is* fixed-format RPG, yes, but it has everything you have to have - when building a free-form version, just be sure to include everything.

HTH
Vern

On 6/18/2023 3:25 PM, stefan@xxxxxxxxxx wrote:
Hi all!


I’m trying to receive some environment variables while taking care of the ccsid for those environment variables.

Surprisingly – the net result so far is CPF3CF1 Error code parameter is not valid.

Please tell me what I’m doing wrong:


dcl-pr getenv extproc('QzsrGetEnvCCSID');

returnvalue char( 65535 );

returnvalue_length int( 10 ) const;

response_length int( 10 );

envvar char( 1024 ) const;

envvar_value_length int( 10 ) const;

envvar_ccsid int( 10 ) const;

returnvalue_ccsid int( 10 ) const;

errorcode likeds( dsEcx );

end-pr;


dcl-ds dsECx qualified;

BytesProvided int( 10 ) pos( 1 );

BytesAvail int( 10 ) pos( 5 ) inz( 0 );

MessageID char( 7 ) pos( 9 );

MessageData char( 240 ) pos( 17 );

end-ds;


// ------------------------------------------------------------------

// * Code *

// ------------------------------------------------------------------


monitor;

dsEcx.BytesProvided = %size( dsEcx );

dsEcx.BytesAvail = 0;

envvar_length = %len( %trim( envvar ));


getenv( returnvalue:

rv_variable_length:

response_length:

envvar:

envvar_length:

0: // ccsid of envvar = 0 = job

ccsid:

dsEcx );


I’m totally lost,


Thanks!


Stefan


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.