ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

delete IFS files

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

  • delete IFS files

    Hi all

    I want to delete the IFS files using UNLINK

    i did like this

    Eval DelRval = unlink('XFILE')

    XFILE = IFS PATH

    Thanx in advance

    magesh

  • #2
    Re: delete IFS files

    PHP Code:
    ~
         
    H dftactgrp( *no bnddir('QC2LE'OPTION(*NODEBUGIOACTGRP(*NEW)  
                                                                       
          * 
    Unlink a File from system... Delete File                   
          
    value returned (OK) or , -(Error)                    
         
    dunlink           PR            10I 0 EXTPROC('unlink')       
         
    d path                            *   Value options(*string)  
         
    c                   if        unlink(FileName) < 0      
         c                   
    endif 
    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

    Comment


    • #3
      Re: delete IFS files

      Hi,,,
      U can use
      DLTLNK
      DEL
      ERASE


      Thanks
      Pavan Pokala

      Comment


      • #4
        Re: delete IFS files

        Hi

        I also did same thing after run the program the IFS file still there. I don't know what is the problem. can u help me please.

        Thanx in advance

        magesh

        Comment


        • #5
          Re: delete IFS files

          Hi

          I am using display file then if i put opt = 4 then i have to delete the IFS file.

          if opt = 4
          if unlink(XFILE) < 0
          endif
          endif

          can any one help me.

          Thanx in advance

          magesh

          Comment


          • #6
            Re: delete IFS files

            Is your code exactly as I posted it...including the header specs?

            This is required. It is a c function.

            I asssure you my example works I have used it many times.

            Look closly at the example.

            jamie
            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

            Comment


            • #7
              Re: delete IFS files

              Hi jamie

              I tryed with WRKLNK, WRKLNK OBJ('/ABC/AED0380155B518BA.XML')

              i got the the result is Object not found.

              if i try with WRKLNK OBJ('/ABC')
              after opt 5 it's working fine.

              Thanx in advance

              magesh

              Comment


              • #8
                Re: delete IFS files

                Hi Magesh..

                WRKLNK OBJ('/ABC/AED0380155B518BA.XML')
                Check AED0380155B518BA.XML this name is correct...??
                and also dont give any space after .xml ...check u given XML as extension..



                Thanks
                Pavan Pokala

                Comment


                • #9
                  Re: delete IFS files

                  I would agree with Pavan - but I was wanting you to use the unlink not the wrklnk...
                  dont you want to delete the object from a program?

                  download this link and give it a try





                  let me know if I can help

                  jamie
                  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

                  Comment


                  • #10
                    Re: delete IFS files

                    just curious...why cant we use RMVLNK<pathname/objectname> to get rid of the object?

                    Comment


                    • #11
                      Re: delete IFS files

                      You could if in CL or using qcmdexc in RPG...
                      but I assumed (I know @#%@#%@#% outta you and me) that because he was
                      messin with XML that the program would be RPG. so thats why I
                      went with the unlink.
                      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

                      Comment

                      Working...
                      X