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



Try...

EVAL      CMD = 'CPYF FROMFILE(' + %TRIMR(SOURCE) +       
                 ') TOFILE(' + %TRIMR(DEST) +  
                 ') MBROPT(*REPLACE) +           
                      CRTFILE(*YES) FMTOPT(*NOCHK)' 

You simply had the FROMFILE keyword missing and the ( followed CPYF. I also
removed the ''s around the file names.

What is the value of DEST? Hopefully it contains the LIB/NAM value, as the
default of *LIBL on the TOFILE isn't appropriate with the CRTFILE(*YES).
IMO, I'd like to see both the source library and destination library names
in the statement even if *LIBL were in use.

Hope this helps. It should,

Ken Slaugh (707) 795-1512 x118
Chouinard & Myhre, Inc.
http://www.cm-inc.com/

DISCLAIMER: The information contained in this e-mail may be confidential and
is intended solely for the use of the addressee.  Access, copying or re-use
of the e-mail or any information contained therein by any other person is
not authorized.  If you are not the intended recipient, please notify us
immediately by returning the e-mail to the originator and destroying all
unauthorized copies.


-----Original Message-----
From: rpg400-l-bounces+ken.slaugh=cm-inc.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+ken.slaugh=cm-inc.com@xxxxxxxxxxxx] On Behalf Of
as400tech@xxxxxxxxxxx
Sent: Monday, May 10, 2004 1:55 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Help with qcmdexc

 
List,
I have the following eval statement in my RPG program:

EVAL      CMD = 'CPYF(''' + %TRIMR(SOURCE) +       
                 ''') TOFILE(''' + %TRIMR(DEST) +  
                 ''') MBROPT(*REPLACE) +           
                      CRTFILE(*YES) FMTOPT(*NOCHK)'

When it executes, I get the following error:
                                                   
String beginning 'CPYF      ' not valid command name.

However, in debug the string looks like this:

       ....5...10...15...20...25...30...35...40...45...50...55...60      
  1   'CPYF('LIB1      FILE1     ') TOFILE('LIB1      FILE2     ') '     
61   'MBROPT(*REPLACE) CRTFILE(*YES) FMTOPT(*NOCHK)               '     
121   '                                                            '     

We are running V5R2. Any help in figuring out what I am doing wrong will be
greatly appreciated.

Thanks,
Terry 
 

--
http://www.fastmail.fm - And now for something completely different.

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


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.