ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Creating a blank file using FTP.

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

  • Creating a blank file using FTP.

    Hi,

    I have a program that is generating a report and it may happen that report have no rows at all. This file is then FTP'ed to a remote location, I get a 226 File received OK after the put command.

    But there is no file created in the remote directory. Is there any way I can create a blank file if there are no records using FTP?

    Thanks a lot.
    Proto.
    *...1....+....2....+....3....+....4....+....5....+ ....6....+....7.......+....8.......+....9.......+. ...10.......+....11...
    C*There are only 10 type of people in this world, those who understand binary and those who don't.

  • #2
    Re: Creating a blank file using FTP.

    Is this ok?

    Code:
    ftp> quote rcmd CRTPF FILE(FILETEST) RCDLEN(100)
    
    250 Command CRTPF FILE(FILETEST) RCDLEN(100) successful.
    dhanuxp

    Comment


    • #3
      Re: Creating a blank file using FTP.

      Originally posted by dhanuxp View Post
      Is this ok?

      Code:
      ftp> quote rcmd CRTPF FILE(FILETEST) RCDLEN(100)
      
      250 Command CRTPF FILE(FILETEST) RCDLEN(100) successful.
      dhanuxp
      I will try this out and will let you know.

      Thanks for your help.
      *...1....+....2....+....3....+....4....+....5....+ ....6....+....7.......+....8.......+....9.......+. ...10.......+....11...
      C*There are only 10 type of people in this world, those who understand binary and those who don't.

      Comment


      • #4
        Re: Creating a blank file using FTP.

        IMO instead of trying to create a blank file, you'd be better off writing a line like "No records found to print" when the file is empty.
        Philippe

        Comment


        • #5
          Re: Creating a blank file using FTP.

          Originally posted by Mercury View Post
          IMO instead of trying to create a blank file, you'd be better off writing a line like "No records found to print" when the file is empty.
          This is exactly what I did. Thanks for all the help everyone.
          *...1....+....2....+....3....+....4....+....5....+ ....6....+....7.......+....8.......+....9.......+. ...10.......+....11...
          C*There are only 10 type of people in this world, those who understand binary and those who don't.

          Comment

          Working...
          X