Ask the Expert

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.


This was first published in April 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: