Ever had a need to move a PC object from one PC to another in a CL program? We did. We needed this for change management. At home in the middle of the night using VPN through the Internet, we needed to copy PC files for a client server application.
Before using the QNTC file system and the CPY command, moving these files took up to an hour as the files were copied from the NT/WIN2000 server to the PC at home, then back to the target Windows 2000 server. We now use CPY submitted in a CL program to copy these objects in about five minutes. The time is reduced mainly because the servers are on a high-speed network. Of course, you'll need to have appropriate security to the Win2k servers for this to work.
In the example I remove the link (PC Object) first. This makes sure there are no objects with that name currently at the target location. You'll need to monitor for CPFA0A9 "object not found". Then copy the new object to the target location. Very easy and quick to do.
CPY OBJ ('/QNTC/NTSERVER1/DIR1/FILE.CSV') TOOBJ
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.