2,540 pts.
 Batch ftp text line
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
ASKED: March 25, 2010  2:31 PM
UPDATED: March 27, 2010  12:48 AM

Answer Wiki:
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
Last Wiki Answer Submitted:  March 27, 2010  12:48 am  by  TomLiotta   108,005 pts.
All Answer Wiki Contributors:  TomLiotta   108,005 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I think

...accepts a single *CHAR (5) parm...

should be

...accepts a single *CHAR (50) parm...
 7,185 pts.

 

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

 108,005 pts.