Results 1 to 6 of 6

Thread: IFS copy/delete file from a CLP

  1. #1
    Code400 Newbie
    Join Date
    Nov 2008
    Location
    Hong Kong
    Posts
    30
    Rep Power
    463

    IFS copy/delete file from a CLP

    hi guys,

    anybody tell me pl how copy a file in ifs fldr to a subfldr and also how delete a file. i want in cl program.

    i will thankyoufull to you.

    kali

  2. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

  3. #2
    Programmer Mercury's Avatar
    Join Date
    Feb 2007
    Location
    Paris, France
    Posts
    1,831
    Rep Power
    5425

    Re: IFS copy/delete file from a CLP

    Use COPY (or CPY) to copy and DEL (or RMVLNK) to delete a streamfile in the IFS.
    PHP Code:
    COPY OBJ('/Path_From_Stmf/Stmf_Name.ext'TOOBJ('/Path1/Path2/.../Any_Stmf_Name.ext')
     
    DTAFMT(*TEXT or *BINARY)

    DEL OBJLNK('/Path1/Path2/.../Stmf_To_Delete.ext'
    Philippe

  4. #3
    Code400 Newbie
    Join Date
    Nov 2008
    Location
    Hong Kong
    Posts
    30
    Rep Power
    463

    Re: IFS copy/delete file from a CLP

    Mercury thanks you but can you tall me how cpy many txt files in one time. it is saying More than one name matches pattern. select 1 file.

    also what is wrong bewlo:

    COPY OBJ('/FLDR1/*.TXT') TODIR('/FLDR1/FLDR2/') TOCCSID(*OBJ) DTAFMT(*TEXT)

    it say:
    Character string not converted.
    Last edited by kali; December 30th, 2008 at 06:58 AM.

  5. #4
    Code400 Newbie
    Join Date
    Sep 2005
    Location
    Quito-Ecuador
    Age
    50
    Posts
    37
    Rep Power
    704

    Re: IFS copy/delete file from a CLP

    How i do a CPY with option ADD with IFS files

  6. #5
    Driver of cars, eater of food jamief's Avatar
    Join Date
    Jan 2004
    Location
    Belvidere, IL - United States of America
    Age
    49
    Posts
    9,416
    Rep Power
    12606

    Re: IFS copy/delete file from a CLP

    Zombie thread --- Shoot for the head!

    Just what are you trying to do young man?
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  7. #6
    Harbinger of Doom tomholden's Avatar
    Join Date
    Dec 2007
    Location
    Lebanon, Tennessee, United States
    Posts
    4,328
    Rep Power
    8645

    Re: IFS copy/delete file from a CLP

    Quote Originally Posted by scsr01 View Post
    How i do a CPY with option ADD with IFS files
    simple you can't...however you can copy the IFS file to a PF, add your records into the PF then copy back to the IFS
    I'm not anti-social, I just don't like people -Tommy Holden

  8. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

Facebook Comments


Similar Threads

  1. Retrieve OUTQ Content List into PF
    By Shogun1950 in forum CLP/CLLE
    Replies: 9
    Last Post: August 11th, 2009, 09:28 AM
  2. Rename an IFS file in remote location
    By sudesh in forum IFS
    Replies: 8
    Last Post: October 2nd, 2008, 06:59 PM
  3. Replies: 4
    Last Post: July 8th, 2008, 07:56 AM
  4. Regd moving
    By sudha in forum Iseries System administration
    Replies: 4
    Last Post: April 26th, 2007, 09:17 AM
  5. Transferring Save file
    By vivek in forum RPG/RPGLE
    Replies: 13
    Last Post: July 10th, 2006, 10:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •