IBM Support

Sample FTP Gateway Service Session Scripts

Question & Answer


Question

Sample FTP Gateway Service Session Scripts

Answer

Sample FTP Gateway Service Session Scripts

Use scripts to automate access to Sterling B2B CollaborationNetwork.This section contains a sample FTP session script. For a list of FTPcommands see Summaryof FTP Client Commands.

CAUTION:
Use the followingsample FTP session script as a guideline only. Do not use any of thecommands exactly as they appear in this section. For example youneed to use your mailbox ID instead of the ID listed in the samplescript.

Open a connection to the FTP gateway service:

ftp> open ftp.gts.globalec.com220 Connected.

Submit login information:

User (primary.gts.globalec.com:(none)): SX999001331 Password required.Password: *******230 User SX999001 logged in proceed.

Upload outgoingEDI file:

ftp> cd send250 CWD command successful.ftp> put outbound.txt200 PORT command successful.150 Opening ASCII mode data connection for outbound.txt.150 Opening data connection.ftp: 1655 bytes sent in 0.00Seconds 655000.00Kbytes/sec.

Verifythat the file was successfully transmitted:

ftp> ls200 PORT command successful.150 Opening ASCII mode data connection.outbound.txtcommit226 Transfer complete.ftp: 625 bytes sent in 0.00Seconds 55000.00Kbytes/sec.

Movethe outgoing file to the commit directory:

ftp> ren "/send/outbound.txt" "/send/commit/outbound.txt"350 File exists ready for destination name250 RNTO command successful.

Verify that the file wassuccessfully moved:

ftp> ls200 PORT command successful.150 Opening ASCII mode data connectioncommit226 Transfer complete.ftp: 57 bytes sent in 0.00Seconds 5000.00Kbytes/sec.

Changeto mailbox containing inbound EDI data:

ftp> cd /receive250 cwd Directory changed. Current working mailbox is ?/receive.?

Viewavailable EDI files:

ftp> ls200 PORT command successful.150 Opening data connection.322322850902129928169054322329310601390029614837226 Transfer complete. 1625 Bytes sent.

Turn off interactivemode. No prompt will be given between each file:

ftp> promptInteractive mode Off.

Download files:

ftp> mget *200 Command okay.200 PORT command successful.150 Opening ASCII mode data connection for 322320403202120028094870.226 Transfer complete.ftp: 307 bytes sent in 0.28Seconds 2.11Kbytes/sec.200 PORT command successful.150 Opening ASCII mode data connection for 322321047302120028112985.226 Transfer complete.ftp: 1625 bytes sent in 0.33Seconds 1.79Kbytes/sec.

Verifythat all available files have been downloaded:

ftp> ls200 PORT command successful.150 Opening ASCII mode data connection.226 Transfer complete.

Sign off:

ftp> bye221 Goodbye.

"

[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SS73G6","label":"Sterling Total Payments for Financial Services"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
08 December 2018

UID

ibm10758207