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



Vern,

The command value in the example is a variable, not a constant (CONST keyword not withstanding.

-mark


At 12/30/08 01:46 PM, you wrote:
Shannon - you might have got hit by a problem with literals when calling
programs - you have 2000 as the length - might have junk somewhere in
that length - after the command you are trying to run.

The fact it works now is just luck, IMO.

Shannon ODonnell wrote:
> Right. I know it should generate an error. That's why I coded it with the
> CALLP(e) rather than CALLP.
>
> But my point was that this same code used to run fine and on multiple
> systems but now it was generating the error in my original message and I was
> trying to figure out why it would do that now when it never did before.
>
> However..logging off and back on again seemed to resolve it so I don't know
> why this happened in the first place.
>
> Thanks for your responses everyone!
>
>
>
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
> On Behalf Of rob@xxxxxxxxx
> Sent: Tuesday, December 30, 2008 9:55 AM
> To: RPG programming on the IBM i / System i
> Subject: Re: Driving me nuts!
>
> It should generate an error, but it won't hard halt. Remove the error
>
> D cmd PR ExtPgm('QCMDEXC')
> D command 2000A const
> D length 15P 5 const
> d CmdString s 2000A
> D ErrStatus S 5s 0
>
> /free
> *inlr=*on;
> monitor;
> callp cmd(CmdString : 2000);
> on-error 202;
> // Use the associated api for RCVMSG to remove the message from
> the
> // joblog.
> // ...
> ENDMON;
>
> Rob Berendt


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.