ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CPY command

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CPY command

    I'm trying to use the CPY command

    CPY OBJ('/qsys.lib/emars.lib/kerscpd.file/kerscpd.mbr') TOOBJ('/home/Treas/KERS/Upload/kerscpd.txt') TOCCSID(*PCASCII) DTAFMT(*TEXT) REPLACE(*YES)

    Function not supported by file system.

    I've checked authority and everything I can think of. Any Ideas?

  • #2
    I think the problem is that you're copying from /QSYS.LIB, which doesn't support all of the functions that many IFS-based programs expect. If your goal is to copy data from a physical file to a stream file, use either the CPYTOSTMF command (if copying from a flat file) or CPYTOIMPF (if copying from a file with fields defined in it.)

    Once you have a stream file, then CPY would be appropriate to copy it to other locations in the IFS.

    Comment

    Working...
    X