In the CPYTOIMPF command, can the TOSTMF file name be &varible file name. I want the "to" file name to be the same...
as my "from" file name. But when I enter the command I provide the "from" file as &OUT from library &LSPDTA (actual name on iSeries is TAX1099M/MYLIB). The to file written as &OUT.
My guess is that you are putting quotes around your variable name. Here is an example CL program that may help.
PGM DCL VAR(&FNM) TYPE(*CHAR) LEN(10) VALUE('MYFILE') DCL VAR(&TOSTMF) TYPE(*CHAR) LEN(30) CHGVAR VAR(&TOSTMF) VALUE('MYDIR' *TCAT &FNM) CPYTOIMPF FROMFILE(&FNM) TOSTMF(&TOSTMF) + STMFCODPAG(*PCASCII) RCDDLM(*CR) ENDPGM
MORE INFORMATION ON THIS TOPIC
The Best Web Links: Tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Read this Search400.com Featured Topic: Managing your iSeries.
Dig Deeper on Performance
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.