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



Rob:

With ERRCDE defined as a single character and apparently not initialized 
(though I no longer recall what happens with PARM fields by default), how are 
you determining that CPF3C21 is the error? I suspect that this error is false 
and will disappear if ERRCDE is properly defined and initialized.

Define ERRCDE to be at least 8 bytes in length, and initialize the first 32 
bits to be the binary/integer of the length of ERRCDE. E.g., if ERRCDE is 8 
bytes, then the first 32 bits should be X'00000008'.

Those first 32 bits tell APIs how much space is available for returning error 
information. The next 32 bits will be used by the APIs to tell you how much 
space they wanted to use in case you don't give enough. If that single 
character is initialized to *BLANK, then those first bits look like X'40xxxxxx' 
where the trailing bits can be any hex values. When that binary/integer number 
is thought as a decimal value, you can see that you're telling the API that it 
has at least a gigabyte of memory in that field.

Tom Liotta


midrange-l-request@xxxxxxxxxxxx wrote:

>   3. Receive Program Message (QMHRCVPM) API (Joubert, Robert)
>
>I am trying to use the QMHRCVPM API in a RPG iv program at V5R2M0.  I keep
>on getting the error CPF3C21 (Format name &1 is not valid) even though the
>format I am using is RCVM0200. Can someone PLEASE tell me what I am doing
>wrong???
> 
>The code looks like this:
> 
>D MSGDTA2         S            500
>
>
>...
>....
>.....
>D MSGAPI          DS                           
>D  MSGLEN                 1      4B 0 INZ      
>D  CSTKCN                 5      8B 0 INZ      
>D  WAITTM                 9     12B 0 INZ      
>.....
>.....
>.....
>C                   MOVE      'RCVM0200'    FMTNAM              
>C                   CALL      'QMHRCVPM'                        
>C                   PARM                    MSGDTA2             
>C                   PARM      500           MSGLEN              
>C                   PARM                    FMTNAM            8  
>C                   PARM      '*'           CSTKEN           10 
>C                   PARM                    CSTKCN              
>C                   PARM      '*LAST'       MSGTYP           10 
>C                   PARM      *BLANKS       MSGKEY            4 
>C                   PARM                    WAITTM              
>C                   PARM      '*REMOVE'     MSGACT           10 
>C                   PARM                    ERRCDE            1 

-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertech.com


__________________________________________________________________
New! Unlimited Access from the Netscape Internet Service.
Beta test the new Netscape Internet Service for only $1.00 per month until 
3/1/04.
Sign up today at http://isp.netscape.com/register
Act now to get a personalized email address!

Netscape. Just the Net You Need.

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.