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



Just a suggestion.

If you define your prototype like this and make it a service program or a 
module:
               
DErrorLogs        PR              
DProcess                        75A  value                 
DErrorMsg                       75A  value                 
DErrorMsg2                      75A  value            

then you can call the program like this

     errorlogs('Process':'Errormes1':'Errormes2');

No need to define 3 separate fields so that you can pass the values.

Marvin

------------------------------

message: 6
date: Thu, 9 Mar 2006 09:22:30 +0000 (GMT)
from: IAIN WILSON <wilson.forfar.1@xxxxxxxxxxxxxx>
subject: Program call failure - /free with Program Interface

Hi All, Hope someone can help me.
I have just started using RPG /free and have the
following small test setup to print an errorlog
spoolfile. Any help offered is most gratefully
received.

Thanks

Iain

A program (with include file) called ErrorLogs with an
interface 
defined in the include file 


// The include file

F****************************************************************
               
F*                                                    
         *                
F* INCLUDE: AERRORPI                                  
         *                
F*                                                    
         *                
F****************************************************************
               
DErrorLogs        PR                 
EXTPGM('ErrorLogs')                        
DProcess                        75A                   
                          
DErrorMsg                       75A                   
                          
DErrorMsg2                      75A                   
                          
 *                                                    
                          
DErrorLogs        PI                                  
                          
DProcess                        75A                   
                          
DErrorMsg                       75A                   
                          
DErrorMsg2                      75A                   
                          
 *                                        

// --------- THe program includes the above interface
-------


The program 

FErrorLog  O    E             PRINTER                 
    
 *                                                    
    
 /Include QrpGleSrc,AERRORPI                          
    
 *                                                    
    
D  TDAT           S               D                   
    
D  TDATE          S             10                    
    
.............
.............
.............


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


The errorlogs program is called by the following
program
with the interface defined in the include file


F****************************************************************
     
F*                                                    
         *      
F* Include: AERRORPR                                  
         *      
F* Include Routines For RPGILE Programs               
         *      
F*                                                    
         *      
F****************************************************************
     
DErrorLogs        PR                 
EXTPGM('ErrorLogs')              
DProcess                        75A                   
                
DErrorMsg                       75A                   
                
DErrorMsg2                      75A                   
                



// --------- THe program includes the above interface
-------


 *                                                    
                
 /Include QrpGleSrc,AERRORPR                          
                
 *                                                    
                
DParm1            S             75A                   
                
DParm2            S             75A                   
                
DParm3            S             75A                   
                
 *                                                    
                

*----------------------------------------------------------------
    
 *                                                    
                
 /free                                                
                
   Eval Parm1     = 'Error Line 1';                   
                
   Eval Parm2     = 'Error Line 2';                   
                
   Eval Parm3     = 'Error Line 3';                   
                
   CallP ErrorLogs (Parm1:Parm2:Parm3);               
                
 /end-free                                            
                
 *                                                    
                
C                   Seton                             
          LR    
C                   Return                            
                


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The Errorlogs program call fails at the line 

   CallP ErrorLogs (Parm1:Parm2:Parm3);               
                

with the error 

 Message ID . . . . . . :   RNQ0211       Severity . .
. . . . . :   99        
 Message type . . . . . :   Inquiry                   
                        
 Date sent  . . . . . . :   09/03/06      Time sent  .
. . . . . :   09:11:35  
                                                      
                        
 Message . . . . :   Error occurred while calling
program or procedure         
   *LIBL/ErrorLogs (C G D F).                         
                        
 Cause . . . . . :   RPG procedure ATEST01 in program
ICOSP/ATEST01 at         
   statement 38 attempted to call program or procedure
*LIBL/ErrorLogs, but was
   unable to access the program or procedure, the
library, or a required       
   service program. If the name is *N, the call was a
bound call by procedure  
   pointer.                                           
                        


The dump file lists the error

ILE RPG/400 FORMATTED DUMP                            
                                       
Program Status Area:                                  
                                       
Procedure Name . . . . . . . . . . . . :   ATEST01    
                                       
Program Name . . . . . . . . . . . . . :   ATEST01    
                                       
   Library . . . . . . . . . . . . . . :   ICOSP      
                                       
Module Name. . . . . . . . . . . . . . :   ATEST01    
                                       
Program Status . . . . . . . . . . . . :   00211      
                                       
             Error occurred while calling program or
procedure  (C G D F).                    
Previous Status  . . . . . . . . . . . :   00000      
                                       
Statement in Error . . . . . . . . . . :   00000038   
                                       
RPG Routine  . . . . . . . . . . . . . :   ErrorLog   
                                       
Number of Parameters . . . . . . . . . :              
                                       
Message Type . . . . . . . . . . . . . :   MCH        
                                       
Additional Message Info  . . . . . . . :   3401       
                                       
Message Data . . . . . . . . . . . . . :              
                                       
             Cannot resolve to object ErrorLogs. Type
and Subtype X'0201' Authority X'0000'.  




I have checked the library list and it is correct.




I can call the Errorlogs program from the command line
passing the 
required parmaters (with the same library list ) and I
get the 
desired result (a spool file)


















when running the program the job log displays the
following error


 Message ID . . . . . . :   RNQ0211       Severity . .
. . . . . :   99         
 Message type . . . . . :   Inquiry                   
                         
 Date sent  . . . . . . :   09/03/06      Time sent  .
. . . . . :   08:43:20   
                                                      
                         
 Message . . . . :   Error occurred while calling
program or procedure          
   *LIBL/ErrorLogs (C G D F).                         
                         
 Cause . . . . . :   RPG procedure ATEST01 in program
ICOSP/ATEST01 at          
   statement 38 attempted to call program or procedure
*LIBL/ErrorLogs, but was 
   unable to access the program or procedure, the
library, or a required        
   service program. If the name is *N, the call was a
bound call by procedure   
   pointer.                                           
                         
===========================================================================


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.