ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

merge all text files in qdls into one file in qdls

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • merge all text files in qdls into one file in qdls

    Hi,

    I want to merge all the files (they are all text file but may not have .txt extension) in qdls/temp folder and put into a new file 'mynewfile.txt' which also in qdls/temp folder.
    What command should I use?
    I tried 'copy' command but it prompt me with a list of files and ask me to select one.

  • #2
    Re: merge all text files in qdls into one file in qdls

    not sure why you would use the outdated QDLS but...

    do a dspflr *outfile
    then read the outfile
    doing a cpytopcd along the way...

    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: merge all text files in qdls into one file in qdls

      Thanks for the reply Jamie.
      But isn't there a one command to do this? I tried qshell cat command, strqsh cmd('cat qdls/temp/*.* > qdls/temp/mynewfile.txt'). The result file became unreadable. However when I use this command in /home/ directory then it work, strqsh cmd('cat home/temp/*.* > home/temp/mynewfile.txt'). Why is that?

      Comment


      • #4
        Re: merge all text files in qdls into one file in qdls

        Hi Jamie,

        cat cmd in qshell work fine. I problably made a typo or something. I tried it again and it works fine.

        Thanks.

        Comment

        Working...
        X