|
Looks like you're missing a ' (single qoute) before the last parm. Because
it was not quoted, the command processor choked on the / character in the
path name.
Also put a space between the quotes of first 3 parms. A back to back quote
( '' ) will translate to a literal quote and the 3 fields will be passed as
1 parm and not 3 as you are expecting.
Try.
CALL PGM(mmblib/cpyfiles) PARM('AFB' 'AFBCAB' 'CABDETP'
'qntc/JAMAICA/TDRIVE/TRANLIB/CABS/AFB/TST.txt')
----- Original Message -----
From: "Matthew B." <mattb@xxxxxxxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Friday, August 13, 2004 12:30 PM
Subject: Hi New to list. QCMDEXC Question Kind of long. Thanks a lot.
> 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.
> 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).
> _________________________________________________________
> Hitting F1 on String ' ' contains a character that is
not
> valid
> Gives me this :
>
> Message ID . . . . . . : CPD0018
> Date sent . . . . . . : 08/13/04 Time sent . . . . . . :
> 13:02:01
>
> Message . . . . : String ' ' contains a character that is not
> valid.
>
> Cause . . . . . : The string contains a character that is only valid
in
> a
> quoted string or a comment.
> Recovery . . . : Remove the character that is not valid from string
> X'00000000000000000000', or if it is a parameter value, make the
string
> a
> quoted string. More information on valid characters can be found in
the
> CL
> Reference manual.
>
> ____________________________________________________
>
> Now the code :
>
> D RunCmd PR EXTPGM('QCMDEXC')
>
> D 3000 CONST OPTIONS(*VARSIZE)
>
> D 15 5 CONST
>
> D CMD S 3000 VARYING
>
> D Client_Prm S 3A
>
> D ClientLib S 6A
>
> D FFILE_Prm s 10A
>
> D TFILE_Prm S 125A
>
> D apos S 4a INZ('''')
>
> D tab S 1A INZ(x'05')
>
> /free
>
> CMD='CPYTOIMPF FROMFILE('+Clientlib+'/'+%trim(FFILE_PRM)+
> >
> ') TOSTMF('+%TRIM(TFILE_PRM)+') MBROPT(*REPLACE) +
>
> STMFCODPAG(*PCASCII) RCDDLM(*CRLF) STRDLM(*NONE) +
>
> FLDDLM(X''05'')';
>
> RUNCMD(CMD:%LEN(CMD));
>
> *INLR=*ON;
>
> RETURN;
>
> BEGSR *INZSR;
> >
> /end-free
>
> C *ENTRY PLIST
>
> C PARM CLIENT_Prm
>
> C PARM CLIENTLIB
>
> C PARM FFILE_PRM
>
> C PARM TFILE_PRM
>
> /free
>
> ENDSR;
>
> This program is going to copy a Tab delimited file from the Iseries to a
> server through the qntc gateway. The parameters that are passed are
Client
> (3 letter acronym for our client) ClientLib( Libary on the as/400 for
that
> client) FFILE_PRM(File records are coming from) TFILE (Full path for
copy
> .
> This string is built in another rpg program It can be a max length of 110
> chars) and example of this is '/qntc/server/shareddrive/test.txt'
>
> Thanks for taking the time to read this . thanks for any info.
> Matt Beckler.
>
>
>
> --
> 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 mailing list archive is Copyright 1997-2025 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.