Manage Learn to apply best practices and optimize your operations.

Sending Text File That Contains Notes Documents to a Host That Has Notes on Unix

Instead of doing a manual FTP each time it's required, here is a scheduled agent that runs everyday and FTPs a text file to a Notes server at another location that has Unix as the O.S. I have used a batch file which is created in Notes and which actually accesses the destination server & exports the text file there. The batch file and the text file are assumed to reside in the same directory.

'IP address of the destn host
Const gFTPDestnHost$ = ""
'UserID required to log on at the destn
Const gUserID$ = "UserID"
'Password required to log on at the destn
Const gPassword$ = "password"
'Name of the file to be exported.
Const ExportFileName$ = "ExportFile.txt"
'Path where the text file resides
'Const gSourceFilePath$ = "/xx/yy"
'FTP executable
'Const gFTPProgram$ = "ftp"

Sub Initialize
Dim FTPBatchFileNum As Integer
Dim FTPBatchFileName As String
Dim TaskID As Integer

'Creating a batch file that contains all the FTP commands to FTP the "ExportFile.txt" to the destination server whose host name is indicated in the constant gFTPDestnHost$ above
FTPBatchFilenum% = Freefile()
FTPBatchFilename$ = gSourceFilePath$ & "/" &
Open FTBatchFileName$ For Output As

'Writing FTP commands to the batch file
Print #FTPBatchFileNum% "open" & " " &
Print #FTPBatchFileNum% "user" & " " &
gUserID$ & " " & gPassword$
Print #FTPBatchFileNum% "put" & " " &
gSourceFilePath$ & "/" & gExportFileName$
Print #FTPBatchFileNum% "bye"
Close #FTPBatchFileNum%

'Shell command used to execute the FTP commands in the FTPBatchFileName$ created above.
TaskID% = Shell(gFTPProgram$ & " -I -v -n < "
& FTPBatchFileName$ , 6)

Exit Sub

Dig Deeper on Domino Resources - Part 7

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...