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



Hi Matt,

>  Hello I'm brand new to the list. I just graduated College and working at a
>  small company programming on the As/400. Anyways. I have question. I looked
>  through the archives and found something almost exactly like my question
>  but I can't get it to work properly.

Welcome!  It's always good to hear that there are new people joining the
iSeries world from school...


>  Here is the error I get
> CALL PGM(mmblib/cpyfiles) PARM('AFB' 'AFBCAB' 'CABDETP' qntc/JAMAICA/TDRI
>   VE/TRANLIB/CABS/AFB/TST.txt')
>   String '          ' contains a character that is not valid.
>    Error found on *N command.
>    Errors occurred in command.
>    Function check. CPF0006 unmonitored by CPYFILES at statement 0000000016,
>      instruction X'0000'.
>    The call to *LIBL/QCMDEXC ended in error (C G D F).
>    The call to *LIBL/QCMDEXC ended in error (C G D F).

You're missin a quote before the 'qntc' part of the command-line, though I
suspect that this is just a typo.  I think it's more likely that you're
running into the standard problem that you get when calling a program with
a parameter that's longer than 32-bytes.

I suggest making a CMD to act as a front-end to CPYFILES.  Call that CMD
instead of using "CALL" to invoke your program.

Alternately, use RPG's "CALL" or "CALLP" op-code to call CPYFILES instead
of QCMDEXC -- and make sure that all of the parameters that you use are
teh same length and data type in the caller as they are in the called
program.

More info about the 32 byte problem can be found in the Midrange.com FAQ.
Although the following link talks about CL parameters, it really applies
to any program on the iSeries that's called via SBMJOB, QCMDEXC, from the
command-line, or using literals in a CL program:

  http://faq.midrange.com/data/cache/70.html


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.