|
Hi Tom, You're right, the help does indicate that it should be CPY OBJ('/QSYS.LIB/ROBDELME.LIB/DELETEME.FILE/*') TODIR('/QFileSvr.400/GDIHQ/QSYS.LIB/ROBDELME.LIB')unless perhaps you're trying to copy the directory without it's contents, i.e. the file without it's members. I don't think you can do it with CRTDUPOBJ or CPYF, but you can with SQL CREATE TABLE AS...WITH NO DATA.
All of this discussion applies to any directories, not just QFileSvr.400, so I tried out some stuff on a v5r3 machine, and noticed a parm which wasn't present on the v4r4 machine I was working with initially -- SUBTREE. This command
CPY OBJ('/qsys.lib/utlib.lib/syscdep1.file')TODIR('/qsys.lib/pdow.lib') SUBTREE(*ALL)
copied the file and it's single member to library PDOW where it did not previously exist. Once the file exists in PDOW, repeating the command fails because the REPLACE parm defaults to *NO; when changed to *YES, it works.
So I tried it from the v5r3 to the v4r4 machine:CPY OBJ('/qsys.lib/utlib.lib/syscdep1.file') TODIR('/QFileSvr.400/dss/qsys.lib/pdow.lib') SUBTREE(*ALL) Not able to allocate object SYSCDEP1 M001. Object in use. Object is /qsys.lib/utlib.lib/syscdep1.file/M001.MBR. 1 objects copied. 1 objects failed. It copied the file, but not the member (which was definitely in use). Going up a level, I created a library, put a few things in it, then did:
CPY OBJ('/qsys.lib/deleteme.lib') TODIR('/QFileSvr.400/v4r4/qsys.lib') SUBTREE(*ALL)
Information passed to this operation was not valid. Information passed to this operation was not valid. Information passed to this operation was not valid. Information passed to this operation was not valid. Information passed to this operation was not valid. Information passed to this operation was not valid. Information passed to this operation was not valid. Information passed to this operation was not valid. 33 objects copied. 8 objects failed.The failed objects were programs, commands and a display file, so it makes sense, because they are v5r3 objects and I was copying to a v4r4 machine. I don't have machines at the same level, so I deleted the DELETEME library from the v5r3 system and tried v5r2 to v5r3:
CPY OBJ('/qsys.lib/deleteme.lib') TODIR('/QFileSvr.400/v5r3/qsys.lib') SUBTREE(*ALL)
Again, the library, data & source files copied, but not the programs, display files or commands. And I should note that I accidentally tested the following command:
CPY OBJ('/qsys.lib/deleteme.lib') TODIR('/QFileSvr.400/v5r3') SUBTREE(*ALL)and it happily copied the files to a directory named deleteme.lib in the root.
Summarizing, it looks like QFileSvr.400 is good for copying data in the form of stream files or physical files (either data or source), but not any other type of object. Too bad, it could've been an alternative to SAVRSTOBJ, with a lot less setup.
***Regarding IFS vs QSYS.LIB and My Computer vs Desktop (which is in My Documents), you make a good point -- it's all about point of view. WRKLNK presents things as
/ home etc QIBM QSYS.LIB ONE.LIB TWO.LIB FILEA.FILE FILEB.FILE THREE.LIB and iSeries Navigator shows A9 File Systems Integrated File System Root ...does not include QSYS.LIB QOpenSys QDLS QSYS.LIB ...does not include / QFileSvr.400 QOPT QNTC *Peter Dow* / Dow Software Services, Inc. 909 793-9050 pdow@xxxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxxx> /
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.