Can "does not work" be explained with a message identifier &
text? Or any other details? If not, what does DMPCLPGM show for
the variables that will be used in the upcoming failing CPYF?
What is the relationship between having the files declared and
the copy-file command? If the &B_YYMMDD is a CL variable name for
the field name B_YYMMDD, as the implicit DCL generated for one of
the files named on DCLF, does the character [string] data in these
variables represent the field names of the FROMFILE?
I did not review for an issue using variables for the field
names, but if the first request works, then the second should work
when formed as a valid command string which is then passed to
QCMDEXC [or another command processor]; i.e. eliminate variables for
the field names.
Regards, Chuck
Jack Kingsley wrote:
This works:
CPYF FROMFILE(QTEMP/QHSTP) TOFILE(QTEMP/QHSTP1) +
MBROPT(*REPLACE) CRTFILE(*YES) +
INCREL((*IF YYMMDD *EQ &YERYYMMDD) +
(*AND TIME *GE 230000))
I have a cl with 3 files, I have all 3 declared, when I attempt
to do this it does not work, is there a work around for this?
CPYF FROMFILE(QTEMP/QHSTP) TOFILE(QTEMP/QHSTP1) +
MBROPT(*REPLACE) CRTFILE(*YES) +
INCREL((*IF &B_YYMMDD *EQ &YERYYMMDD) +
(*AND &B_TIME *GE 230000))