Q
Problem solve Get help with specific problems with your technologies, process and projects.

Copy a file from one location to another

I want to use the CPY command to copy a file through a CL program in the IFS from one location to another through a CL program. The name of the file can differ. Therefore I want to use a variable in the CPY command.

Can you tell me please the syntax to use a variable in the CPY command as describes below?

>
 CPY OBJ('/SCSERVER/UserData/Reports/Web/''*CAT + &FILENAME')
TODIR('/scserver/domrpt')        


I would create a string first and then use a variable in the command.

Example:

           

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


Dig Deeper on iSeries COBOL programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close