ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CPY with option ADD with IFS files

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

  • CPY with option ADD with IFS files

    How i do a CPY with option ADD with IFS files

  • #2
    Re: CPY with option ADD with IFS files

    cpytoimpf & cpytostmf default to *ALL so the commands already do that

    PHP Code:
    CPYTOIMPF FROMFILE(SOMELIB/SOMEFILE)              
    TOSTMF('/somefolder/somefile.txt'MBROPT(*ADD)   
    STMFCCSID(*PCASCIIRCDDLM(*CRLFSTRDLM(*NONE)   
    STRESCCHR(*NONE
    Question remains...Exactly what are you trying to do.
    I prefer to write directly to ifs and not use the copy commands.
    This may work for you, but I need to understand what the process is
    and what is the expected outcome.

    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


    • #3
      Re: CPY with option ADD with IFS files

      i have a ifs file and need add other registers in the same ifs file

      Comment


      • #4
        Re: CPY with option ADD with IFS files

        see my reply from the thread you resurrected...
        http://www.code400.com/forum/showthr...ll=1#post67828
        I'm not anti-social, I just don't like people -Tommy Holden

        Comment


        • #5
          Re: CPY with option ADD with IFS files

          It does not work try:

          These are the commands you use:

          FILE CRTPF (QTEMP/ZZTMP01) RCDLEN (5000)
          MONMSG MSGID (CPF0000)
          CPYFRMIMPF FROMSTMF (& DSTFIL) TOFILE (QTEMP/ZZTMP01) +
          MBROPT (* REPLACE) RCDDLM (* CRLF) STRDLM (* NONE)
          CPYFRMIMPF FROMSTMF (& ORGFIL) TOFILE (QTEMP/ZZTMP01) +
          MBROPT (* ADD) RCDDLM (* CRLF)
          CPYTOIMPF FROMFILE (QTEMP/ZZTMP01) TOSTMF (& DSTFIL) +
          MBROPT (* REPLACE) RCDDLM (* CRLF)

          Comment


          • #6
            Re: CPY with option ADD with IFS files

            How does it not work...
            Or : Please explain what the outcome was when you ran the above code.


            thanks
            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

            Working...
            X