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



Ah, I see the problem Doug.
It's not YOUR RPG that's bombing due to it's the QCMDEXEC that's bombing.
You're only sending it one parm, it's expecting 2 or 3.
Change this:
     C                   CALL      'QCMDEXC'
     C                   PARM                    CMD 

To use the following source.
 
     DCMD              S            200A
     DCMDLEN           S             15P 5

     C                   EVAL      CMDLEN = %LEN(CMD)
     C                   CALL      'QCMDEXC'
     C                   PARM                    CMD
     C                   PARM                    CMDLEN

Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
709-576-8132
rpower@xxxxxxxxxx
http://www.stjohns.ca/
___________________________________________________________________________
Success is going from failure to failure without a loss of enthusiasm. - 
Sir Winston Churchill




"Douglas W. Palme" <dpalme@xxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
2005/07/18 02:57 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Error on compile






This is not a CL program, its strictly an rpgle calling another rpgle


On Mon, 18 Jul 2005 11:21:36 -0500 (CDT), Scott Klement wrote
> > It did allow it to compile but it is still giving the same error that 
I 
am
> > not passing the correct number of parameters.
> >
> 
> How are you calculating the length of the CMD string?  Is it 
> possible that this value is wrong?  or, are you using the system() 
> API, and therefore don't need a length?
> 
> After all of the posts in this thread so far, it appears that you've 
> got the string formatted properly -- but if the length is wrong, it 
> might not be seeing all of the parms.
> 
> Also, ILE RPG programs don't typically issue an error message when 
> you call them if you don't pass the correct number of parameters. 
> Instead, they let the programmer use %parms and other tricks to test 
> for parameters being omitted.
> 
> Are you calling an OPM CL program?
> 
> If not, I'd be curious to see the error message. It's possible that 
> you're troubleshooting the wrong part of the program.  Perhaps 
> you're calling QCAPCMD and passing the wrong number of parmeters to 
> that API, rather than the program that you're submitting to batch.
> 
> It sure would help if you wrote a very simple proof of concept 
> program that just accepts the parms and submits the job.  Very short,
>  very simple. Then, if you can't get it to work, you can post that 
> program on the list, and we'll be able to try it as well.
> 
> Just a thought.
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
>  mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To 
> subscribe, unsubscribe, or change list options, visit: 
> http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-
> L-request@xxxxxxxxxxxx Before posting, please take a moment to 
> review the archives at http://archive.midrange.com/rpg400-l.


If you bought, it was hauled by a truck - somewhere, sometime.


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.