Batch ftp text line

2555 pts.
Tags:
AS/400
Batch
FTP
logging
I have a pgm which generates ftp-statement to a sourcefile for batch execution. I have implemented a logging function (saves the ftp-source and corresponding execution log). I want to be able to add a line of text so the generated source statements have some kind of ftp-statement that actually does nothing but leaves the text as a line in the ftp-log. Can this be acomplished? - and how?

Software/Hardware used:
Power System i v6r1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Because this is (apparently) specific to the i ftp client, you can create a kind of extension through the use of the “!” FTP subcommand.

Create a CL program that accepts a single *CHAR (50) parm. The only executable statement will be RETURN. Then create a FTPCOMMENT *CMD with a single *CHAR (50) PARM and set the CLP as the CPP.

In your FTP script:<pre>
! FTPCOMMENT ‘This is my comment line’</pre>
As long as the FTPCOMMENT *CMD is somewhere in the library list, it shouldn’t have any problem.

Tom

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BigKat
    I think
    ...accepts a single *CHAR (5) parm...
    should be
    ...accepts a single *CHAR (50) parm...
    8,200 pointsBadges:
    report
  • TomLiotta
    Heh. Yep. But maybe even better... Since the "!" subcommands accept valid i5/OS commands and comment lines are acceptable to the command analyzer, I tried this:
    > ! /* do comments work? */
    There was no indication of any problem. IOW, if you want to add a comment, just try adding a "comment". Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following