Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Copying multiple .txt files to AS/400 library/file

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

  • Copying multiple .txt files to AS/400 library/file

    I am not sure you need this line: cd source.file (which is the srcpf inside mylib) Also, have you tried renaming the text files on the PC to the Sourcefile.Membername format before FTPing? I believe I read somewhere that files that will be FTP'd using MPUT should be named in the format Sourcefile.Membername in order to be placed in a source file on the iSeries. For example, instead of file names (on the PC) like sourcembr1.txt and sourcembr2.txt the names would be qrpglesrc.sourcembr1 and qrpglesrc.sourcembr2. The MPUT statement would look something like: MPUT QRPGLESRC* Hope this helps. Bill

  • #2
    Copying multiple .txt files to AS/400 library/file

    Bill, I appreciate your suggestion. Tried it, but it didn't work. What I found that does work is to rename the extensions of all files you wish to copy to ".mbr". I found some freeware that would do this in one fell swoop. After FTPing, a simple "mput *.mbr" did the trick. I still think there is sntax on the MPUT command that will make it work. I just can't figure it out. Open for other suggestions if you have any. Again, thanks! Keith

    Comment


    • #3
      Copying multiple .txt files to AS/400 library/file

      Keith, The following is an excerpt from the FTP log from the PC to the iSeries: ftp> cd testlib 250 "TESTLIB" is current library. ftp> ascii 200 Representation type is ASCII nonprint. ftp> prompt Interactive mode Off . ftp> mput testsrc* 200 PORT subcommand request successful. 150 Sending file to member SOURCE1 in file TESTSRC in library TESTLIB. 250 File transfer completed successfully. ftp: 117 bytes sent in 0.00Seconds 117000.00Kbytes/sec. 200 PORT subcommand request successful. 150 Sending file to member SOURCE2 in file TESTSRC in library TESTLIB. 250 File transfer completed successfully. ftp: 117 bytes sent in 0.00Seconds 117000.00Kbytes/sec. ftp> The files on the PC were named testsrc.source1 and testsrc.source2. The MPUT copied them to library TESTLIB, source file TESTSRC, members source1 and source2 on the iSeries (see green screen print)...
      Code

      Comment


      • #4
        Copying multiple .txt files to AS/400 library/file

        Sorry about the formatting, I will try this again with carriage returns... ftp> cd testlib 250 "TESTLIB" is current library. ftp> ascii 200 Representation type is ASCII nonprint. ftp> prompt Interactive mode Off . ftp> mput testsrc* 200 PORT subcommand request successful. 150 Sending file to member SOURCE1 in file TESTSRC in library TESTLIB. 250 File transfer completed successfully. ftp: 117 bytes sent in 0.00Seconds 117000.00Kbytes/sec. 200 PORT subcommand request successful. 150 Sending file to member SOURCE2 in file TESTSRC in library TESTLIB. 250 File transfer completed successfully. ftp: 117 bytes sent in 0.00Seconds 117000.00Kbytes/sec. ftp>

        Comment


        • #5
          Copying multiple .txt files to AS/400 library/file

          Still a bit hard to follow, so I will put the excerpt into the green screen section and try that. Again, the FTP was actually from the PC to the iSeries. Bill
          Code

          Comment


          • #6
            Copying multiple .txt files to AS/400 library/file

            I'm trying to copy multiple .txt files from a pc to a srcpf in a library on my AS/400. From a command prompt on my pc, I change to the directory on my pc where the .txt files reside, ftp to the AS400, login, and issue the following commands: cd /qsys.lib/mylib.lib cd source.file (which is the srcpf inside mylib) ascii mput *.txt *.mbr At this point, I get the message, "unknown extension in database name". However, if I use a "put" command as "put stuff.txt stuff.mbr", it works like a charm. Help? Thanks, Keith

            Comment

            Working...
            X