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



Douglas,
        RPG allows 0 to 256 parameters.  It will not tell you the exact
number.  Also, add a field called CMDLEN 15.0 packed.  Before the call to
QCMDEXC put "EVAL   CMDLEN = %LEN(%TRIMR(CMD))".  On the call to QCMDEXC add
another parameter enter "PARM       CMDLEN".  See if this helps.  I am
wondering if you are actually submitting the program or is this a message
you get on the call to QCMDEXC?  


Thank you,
Matt Tyler
WinCo Foods, LLC
mattt@xxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Douglas W. Palme
Sent: Monday, July 18, 2005 11:34 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Error on compile

Here is the full error message, btw Scott I ran the dsppgm and it did not 
show any listing for how many parameters are expected, part of the reason 
why I have been lost up to now.

Message . . . . :   Total parameters passed does not match number required.

Cause . . . . . :   Program &2 attempted to call program &1 with 1
parameters
  Program &1 expects a minimum of 2 and a maximum of 3 parameters.

Recovery  . . . :   Use the Display Program (DSPPGM) command to determine
the
  correct number of parameters to pass.




The program to this point is simple, only accepts three parameters from the 
dspf and then submits the job.

Here is the source:

C                   EXFMT     MAIN                                     
C                   IF        *IN12 = *ON                              
C                   EVAL      *INLR = *ON                              
C                   RETURN                                             
C                   ELSE                                               
C                   MOVE      DBRANCH       PARM1                      
C                   MOVE      DSTARTDATE    PARM2                      
C                   MOVE      DENDDATE      PARM3                      
C                   EVAL      CMD = 'SBMJOB CMD(CALL PGM(INVMARGIN) ' +
C                             'PARM(''' + PARM1 + ''' ' +              
 C                             '''' + %CHAR(PARM2) + ''' ' +    
 C                             '''' + %CHAR(PARM3) + '''))'     
 C                   CALL      'QCMDEXC'                        
 C                   PARM                    CMD                
 C                   ENDIF                                      
 C                   EVAL      *INLR = *ON                      
 C                   RETURN                                     

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.