|
Mel Rothman Mel Rothman, Inc.
Hi Mel,
See the Move Stream File (QHFMOVSF) API at http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/qhfmovsf.htm
The API, most likely will perform better than calling QCMDEXC to run the MOVOBJ command. If you are not moving large numbers of files in short periods of time, there's probably nothing wrong with calling QCMDEXC.
The QMFMOVSF API is one of the old "Hierarchical File System" APIs that only works with /QDLS and /QOPT. IMHO, you shouldn't use these APIs in new work -- they reduce the flexibility of your program.
Aside from the obvious restriction of using 8.3 filenames, /QDLS is much than the "root' or '/QOpenSys" filesystems. It also requires users to be enrolled in the system distribution directory, which is awkward, IMHO...
Since the IFS APIs will work with /QDLS (in case you need to use /QDLS for the time being) but will also work elsewhere, I really recommend using them instead.
The downside to using QCMDEXC with the MOV command (not MOVOBJ, which is a traditional LIB/OBJ type command) is that you may have to make sure that the filenames are properly escaped in order to include them in a command string. You have to double-up any quotation marks in the pathname, etc. Not a big deal, but something to think about.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.