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



rpg400-l-request@xxxxxxxxxxxx wrote:

>   7. Error on compile (Douglas W. Palme)
>
>C                   EVAL      CMD = 'SBMJOB CMD(CALL PGM(INVMARGIN) ' +
>C                             'PARM("' + PARM1 + '" ' +                
>C                             '"' + PARM2 + '" ' + 
>C                             '"' + PARM3 + '"))'  

Douglas:

You got answers before I had time to read the newsgroup today, so I won't add 
to that series. However, I'll make one suggestion.

Change:

>C                   EVAL      CMD = 'SBMJOB CMD(CALL PGM(INVMARGIN) ' +

...to:

>C                   EVAL      CMD = 'SBMJOB RQSDTA(CALL PGM(INVMARGIN) ' +

Get away from the habit of building your request strings in the CMD() parameter 
and build them directly in the RQSDTA() parameter instead. They'll end up in 
RQSDTA() anyway and you'll avoid a couple of issues that CMD() introduces when 
the SBMJOB command converts between the two. (One earlier post showed an 
example that would cause a failure due to the CMD()/RQSDTA() conversion if it 
were actually run, but it wasn't relevant to your problem anyway.) You might 
need to tweak your program a little, but the long-term should be worth it.

The CMD() parameter is extremely handy when commands are being prompted, and it 
can be a shortcut. But the handling of parms that contain only numeric 
characters or character parms that are more than CHAR(32) in length and have 
trailing spaces can really cause a bunch of debugging surprises later.

Build the request string exactly as you want it and submit it via RQSDTA(). 
Avoid most of the problems that show up so often.

Tom Liotta


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.