|
Doitbest FTP
Communications Guideline
Revised: 11/17/2006
Summary
*
Prerequisites
*
Valid Batch Names Used by Do it Best Corp.
*
Valid FTP Commands
*
Logging On to the "Host"
*
FTP Login Example
*
Logging Off of the "Host"
*
FTP Logoff Example
*
Batch Status Flags
*
Command Reference and Usage
*
dir Command
*
dir example
*
dir $$ Command
*
dir $$ Syntax
*
Format of dir $$
*
dir $$ Examples
*
Transmitting POS Data Files
*
put Command
*
put example
*
put $$ Command
*
put $$ Syntax
*
Required Parameters
*
put $$ Example
*
Transmitting Retail Sales Data
*
Retail Sales put Example
*
Retails Sale put $$ Example
*
Retrieving POS Data Files
*
get Command
*
get Example
*
get $$ Command
*
Required Parameters
*
get $$ Examples
*
Retrieving Catalog Update Files
*
mget $$ Command
*
mget $$ Syntax
*
Catalog Update mget $$ Example
*
Summary
Do it Best Corp. members will communicate with Do it Best Corp.
using the File Transfer Protocol (FTP) with SSL (Secure Sockets
Layer) encryption for added security. An electronic mailbox along
with a unique Login ID and Password will be provided
for each member communicating directly with Do it Best Corp. via
FTP. To retrieve this information you will need to contact a Do it
Best Corp. Communications Specialist at 260-748-5565.
The system is available for communications 7 days a week, 24
hours a day, with the exception of system maintenance downtime.
Scheduled system maintenance requiring downtime will be posted in
advance on the Do it Best member portal website http://www.mydoitbest.com
Throughout the remainder of this document, the Do it Best FTP
server will be referred to as the host and the member
will be referred to as the remote.
Prerequisites
The following prerequisites must be met to perform FTP
communications using SSL encryption with Do it Best Corp.
Login ID (Supplied by Do it Best EDI
Services)
Password (Supplied by Do it Best EDI
Services)
Hostname edi3.doitbestcorp.com Port Number
10021
FTP Client capable of SSL encryption and Passive FTP
Supported Cipher Suites Are:
SSL_RSA_EXPORT_WITH_RC4_40_MD5
SSL_RSA_WITH_RC4_128_MD5
SSL_RSA_WITH_RC4_128_SHA
SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_RSA_WITH_DES_CBC_SHA
SSL_RSA_WITH_3DES_EDE_CBC_SHA
SSL_RSA_WITH_NULL_MD5
SSL_RSA_WITH_NULL_SHA
Valid Batch Names Used by Do it Best
Corp.
The following table lists valid Batch names (BID) used by Do it
Best EDI Services. Detailed information on each of these Batch names
and their format can be requested by Do it Best EDI Services at
260-748-5565 or edimembersupport@doitbest.com
Version 0 Batch Names
|
Version 000
Inbound Batch Names |
|
Descriptive Name |
Mailbox Batch ID |
| Regular Order |
MBRORDS |
| Promo Order |
MBRORDS |
| Inventory Refill
order |
MBRINVR |
| IMCS Maintenance |
MBRIMCS |
| PAR items |
MBRSENS |
| CF1 Claims |
MBRCF1S |
| Customer Direct
RSC PO |
MBRCDPO |
| Member RSC order
|
MBRORDS |
|
|
|
|
Version 000
Outbound Batch Names |
|
Descriptive Name |
Mailbox Batch
ID |
| Warehouse invoice
|
ORDCNFM |
| Price Change |
PRCCHGS |
| Vendor Direct
Invoice |
DIRINVC |
| Statement |
STATMNT |
| File maintenance
|
FILEMNT |
| Warehouse On
Hand |
ohXXout.zip
where xx is Warehouse # - Mailbox = MBR6999 |
| Catalog Updates |
CATALOGxxCCYYMMDD.zip
where xx is Warehouse # - Mailbox = MBR6998 |
..Batch Names Continued
Version 1 Batch Names
|
Version 010
Inbound Batch Names |
|
Descriptive Name |
Mailbox Batch ID |
| Regular Order |
POS_ORDS_010 |
| Promo Order |
POS_ORDS_010 |
| Inventory Refill
order |
POS_INVR_010 |
| IMCS maintenance |
POS_IMCS_010 |
| PAR items |
POS_PAR_010 |
| CF1 Claims |
POS_CF1S_010 |
| Retail Sales
Records |
RTL_SALES_010.zip |
| Customer Direct RSC
PO |
POS_CUST_010 |
| Member RSC order
|
POS_ORDS_010 |
|
|
|
|
Version 010
Outbound Batch Names |
|
Descriptive Name |
Mailbox Batch ID |
| Warehouse invoice
|
ORDCNFM_010 |
| Price Change |
PRCCHGS_010 |
| Vendor Direct
Invoice |
DIRINVC_010 |
| Statement
(same as Version 0) |
STATMNT |
| File maintenance
|
FILEMNT_010 |
| Promotional Item
Download |
PRMOITM |
| Warehouse On
Hand (same as Version 0) |
ohXXout.zip
where xx is Warehouse # - Mailbox = MBR6999 |
| Catalog Updates
V010 |
FILEMNTxx_010_CCYYMMDD.zip where xx
is Warehouse # - Mailbox = MBR6998 |
Valid FTP Commands
Do it Best Corp. utilizes the Sterling Commerce
CONNECT:Enterprise software suite for Secure FTP communications,
using SSL (Secure Sockets Layer) encryption, to an AIX UNIX server
located at Do it Best Corp. This software requires a user ID and
Password to access an electronic mailbox assigned to each remote.
The mailbox credentials can be retrieved by contacting an EDI
Services Communications Specialist at 260-748-5565 or
edimembersupport@doitbest.com
The following table lists the available FTP commands with a brief
explanation of each command. The explanation and use of these
commands are listed throughout the remainder of this document.
|
Command |
Brief Description |
|
dir |
Outputs a list
of files in current working directory |
|
dir $$ |
Outputs a
formatted list of files in the current working directory
|
|
get |
Receives a
specified file from the host system |
|
get $$ |
Same as the
get command but allows special parameters to be used as
explained later in this document. |
|
mget |
Receives
multiple files with the same name from the host
system. The mget command can also be used with the *
wildcard, such as mget FILE123*, which will receive
files with the first seven characters of the filename
FILE123*. |
|
mget $$ |
Same as the
mget command but allows special parameters to be used as
explained later in this document. |
|
put |
Sends one file
to the host system. |
|
bin or binary |
Sets the FTP
transfer mode to binary. This transfer mode must be
used when sending compiled computer code (executable files)
or zipped data to ensure it arrives in its original state. |
|
asc or ascii |
The default.
This transfer mode is used to send text files to the host.
If you have issued a binary command to transmit and
executable or zipped file, you must issue the asc or
ascii command prior to sending a text file. This is
to ensure the content of the data file is received in its
original state. |
|
cd |
Allows the
remote to change from the current working directory to
another working directory. Sub-directories are restricted
to: /MBR6998 Catalog Update files updated weekly
/MBR6999 RSC (Warehouse) On-Hand files updated daily
Procedures for downloading these file types is explained
later in this document. |
Logging On to the "Host"
If your "remote" site uses FTP communications software
from a command line, use the commands (bold text) and procedures
that follow to access and communicate with the "Host".
At the command line prompt of your system, type
ftp and any special parameters needed so set
the session to secure (SSL).
At the ftp> prompt type the hostname
edi3.doitbestcorp.com 10021
The "Host" site returns User: You
will need to key your assigned Logon ID
The "Host" site returns Password:
You will need to key your assigned Password
The "Host" system is now ready to receive
user commands as documented in the following
sections.
FTP Login Example
C:\> ftp (secure parameters for your software)
ftp> open edi3.doitbestcorp.com 10021
220 Welcom to Do it Best Corp., Unauthorized use is prohibited.
Time =
07:13:23
234 AUTH TLS-P/SSL OK.
Connected to edi3.doitbestcorp.com.
User: login_ID (Supplied by Do it Best)
331 Password required for login_ID
Password: ******** (Supplied by Do it Best)
230 CONNECT:Enterprise for UNIX login ok, access restrictions
apply.
ftp>
Logging Off of the "Host"
When you have completed your communications session with the "Host",
you must properly logoff using one of two commands: bye or
quit. Once you have issued one of these commands, you will
receive a 221 (Goodbye) message from the "Host". At
this point, you may exit the command prompt or other application
safely.
FTP Logoff Example
ftp> quit
221 Goodbye.
Batch Status Flags
Batch Status Flags are labels assigned to each batch in
the mailbox. The commands use flags to identify processes,
protocols, and data formats that apply to the data.
The following tables list the possible flag values.
A - Added Offline
D - Flagged for Delete
I - Incomplete Collection C -
Collected online
T - Online Transmit Done R - Online
Request Allowed
E - Extracted batch M - Multiple
transmission
P - Transmission in Progress
U -
Batch Unextractable
N - Batch Nontransmittable
B - BSC
F - FTP
Q - ASYNC
K - EBCDIC Z - ASCII
Y - BINARY S - LOG batch
B SSL O Batch Encryption
Not applicable with
the FLAGS parameter
The data format flags follow
transparency. If data is received transparently, the batch is
flagged as binary. Therefore, the inbound transparency
sets the data format flag.
Command Reference and Usage
dir Command
The dir command displays information about batches
in the current working mailbox. In order to view the
contents of the mailbox in a readable format, you will need
to use the $$ syntax.
If you enter a dir command for a mailbox you do
not have access to, the message "Permission denied"
is returned. The contents of the dir command are
displayed to standard output.
dir example
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection.
-AR-------TCP A ceadmin 10847 63754 May 27 04:35 FILEMNT
-AR-------TCP A ceadmin 6559 16566 May 28 04:36 FILEMNT
-AR-------TCP A ceadmin 12493 44064 May 28 04:40 CDPRCHG
-AR-------TCP A ceadmin 16460 4016 May 29 04:35 FILEMNT
-AR-------TCP A ceadmin 2469 3321 May 30 04:37 DLXSTMT
-AR-------TCP A ceadmin 3767 5020 May 30 04:39 FILEMNT
-AR-------TCP A ceadmin 8629 153863 Jun 02 04:35 FILEMNT
Total Number of batches listed: 7
226 Transfer complete.
dir $$ Command
The dir $$ command displays information about
batches in the current working mailbox. You must provide the
$$ syntax to list the directory in a readable format.
If you enter a dir $$ command for a mailbox you do
not have access to, the message "Permission denied"
is returned. This command does not display batches with a
D (deleted) status flag. The contents are displayed
either to standard output or to a local file by specifying a
filename.
dir $$ Syntax
Required parameters are in bold text in the following table.
Optional parameters
are in plain text. Any number of blanks between parameters may be
used, but not
within parameters, except for the Batch ID. A Batch ID
with spaces must be enclosed in single quotation marks. All
text following the dir command (including $$) must be
enclosed in one set of double quotation marks.
| Command |
Parameter |
Associated
Value |
| dir |
$$ |
|
|
BID= |
xx
.xx|#nnnnnnnn |
|
remote_filename |
remote_filename |
|
FLAGS= |
[[!][A|C|D|E|I|M|R|T|B|F|G|Q|Y|Z|K]] |
|
FTIME= |
[CC]yymmdd[:hhmm]|nnn[:hhmm]] |
|
ID= |
XXXXXXXX |
Format of dir $$
Xxxxxxx The 8-character mailbox ID for the batch
Nnnnnnnn The 8-digit batch number assigned to the batch
Bbbbbbbbbb The total byte count of the batch
<x. . . x> The first 24 characters of the batchs user
batch ID. If the
user batch ID is longer that 24
characters, it is shortened to the
first 23 characters of the literal
with the 24th character
becoming a plus sign (+)
HHMM-YYJJ The time and julian date the batch was
added to the
mailbox
Flags One or more flags identifying the current status of
a batch
in the mailbox. See "Batch Status Flags"
in the previous
section.
dir $$ Examples
The following dir $$ command displays the contents of the
mailbox to
standard output (on the screen).
ftp:> dir $$
MBR8415 #0010769 CT=000049572 BID=ORDCNFM 1633-02239 A R
EM ceadmin
MBR8415 #0007902 CT=000034182 BID=PRCCHGS 1701-02239 A R
M ceadmin
MBR8415 #0002067 CT=001405349 BID=FILEMNT 1627-02249 A R
M ceadmin
MBR8415 #0002805 CT=001206306 BID=FILEMNT 1627-02249 A R
M ceadmin
Total Number of batches listed: 4
226 Transfer complete.
ftp>
The following dir $$ example writes the
output of the command to a file on the remote system
called localfile.txt. No listing is displayed
to standard output.
ftp> passive
Passive mode On .
ftp> dir $$ localfile.txt
227 Entering Passive Mode (12,162,57,204,136,184)
150 Opening ASCII mode data connection for $$.
ftp: 854 bytes received in 0.09Seconds 9.16Kbytes/sec.
226 Transfer complete.
Transmitting POS Data Files
Once you make a connection to the Do it Best FTP communications
server using your Secure FTP Client, you may transmit and receive
files accordingly.
All files transmitted must use the Batch name(s) (BID)
specified by Do it Best, and must be in UPPERCASE letters to
be successfully processed. The Batch names (BID) recognized by Do it
Best are listed in the section "Valid Batch Names used by Do it
Best Corp."
put Command
The put command adds a single batch of data to the
current working mailbox. If the data format is EBCDIC or
binary, the "remote" user must enter the FTP command
binary before issuing the put command. ASCII is
the default file transfer mode of the host. The
user-specified parameters control characteristics of the
batch being sent..
put example
The following put example displays a user sending
a file called your_file
to be given a valid Batch name (BID) of
MBRORDS on the host.
ftp>put your_file MBRORDS
200 PORT command successful.
150 Opening ASCII mode data connection for MBRORDS
226 Transfer complete.
45 bytes sent in 0.04915 seconds (0.8941 Kbytes/s)
ftp>quit
221 Goodbye.
put $$ Command
The put $$ command is the similar to the put
command with the exception of required parameter as
explained below.
put $$ Syntax
Required parameters are in bold font in the
following table. Optional parameter are in plain
font.
The source_path parameter must be the
first option, immediately after the put
command. This is followed by a double quotation
mark, two dollar signs, any parameters needed and an
ending double quotation mark. The double quotation
marks are required.
|
Command
put |
Parameter
$$
source_path
BID= |
Associated Value
xx...xx |
Required Parameters
The following parameters are required with $$ syntax.
$$ indicates that the preceding data is destined for
the
mailbox.
source_path indicates the
path name of the source file for the
data you want added to the
mailbox.
BID=xx. . . xx identifies the 164 byte user batch
ID for the batch
being added. The entire
phrase (BID= xx. . . xx)
is required for $$ syntax.
The BATCH name must be in
CAPITAL LETTERS.
Note: You cannot specify a batch number; it is
generated internally.
put $$ Example
The following put $$ example displays a user
sending a file called
order.dat to be given a valid Batch name (BID) of
MBRORDS on the
host using the "$$ BID=MBRORDS" parameter and
syntax.
ftp> put order.dat "$$ BID=MBRORDS"
200 PORT command successful.
150 Opening ASCII mode data connection for $$ BID=MBRORDS.
226 Transfer complete (Batch Number = 105).
45 bytes sent in 0.04915 seconds (0.8941 Kbytes/s)
ftp>
Transmitting Retail Sales Data
When transmitting RTL_SALES_010.zip data from
point-of-sale to the host, the data file must be zipped an
added as Batch name (BID) RTL_SALES_010.zip. Prior to
uploading the RLT_SALE_010.zip data file, the binary command
must be issued. The binary mode must be used when sending
compiled computer code (executable files) or zipped data to ensure
it arrives in its original state. Failing to issue the binary
command for this file type will result in a corrupt data file.
Retail Sales put Example
ftp>bin
200 Type set to I.
ftp>put rtlsales.zip RTL_SALE_010.zip
200 PORT command successful.
150 Opening Binary mode data connection for RTL_SALES_010.zip
226 Transfer complete.
228 98842 bytes sent in 3.54Seconds 27.31Kbytes/sec.
ftp>quit
221 Goodbye
Retails Sale put $$ Example
ftp>bin
200 Type set to I.
ftp>put rtlsales.zip "$$ BID=RTL_SALE_010.zip"
200 PORT command successful.
150 Opening Binary mode data connection for RTL_SALES_010.zip
226 Transfer complete.
228 98842 bytes sent in 3.54Seconds 27.31Kbytes/sec.
ftp>quit
221 Goodbye
Retrieving POS Data Files
Before downloading files, you will need to request a directory of
your mailbox to view the contents. Once you have received the
directory listing and determined data is available for download, you
may choose the files to download accordingly. If a file was
previously downloaded and you are attempting to download it again,
you will receive a message "550 ***
Error *** No Batches For Transmission". If you
need to download the file(s) again you will need to contact Do it
Best EDI Services Communications Support at 260-748-5565 to have the
data file reset.
A valid Batch name (BID) specified by Do it Best must be
requested. The available Batch names (BID) are listed in the section
"Valid Batch Names used by Do it Best Corp."
get Command
The get command requests a single file from the
mailbox. This single file
contains all the batches matching the selection criteria.
For example, if BID=ORDCNFM is specified, all retrievable
batches contained in the mailbox with a Batch name (BID) of
ORDCNFM are sent and concatenated into one file on the
remote.
The get command copies a file from the
mailbox to a specified directory on the remote.
Multiple batches with same Batch name (BID) are always
concatenated into a single file on the remote.
Eligible batches are batches that have a Requestable
flag but do not yet have a Transmitted (T), Nontransmittable
(N), or Deleted (D) flag. The user can view these
status flags by first issuing a dir $$ command to
receive a listing of the batches in the mailbox.
If the data format is binary, the remote user must
enter the binary command prior to issuing the
get command. ASCII is the default data transfer
mode, but can be set using the asc command.
get Example
ftp>get ORDCNFM_010
remote_filename.dat
200 PORT command successful.
150 Opening ASCII mode data
connection for ORDCNFM_010
226 Transfer complete.
344 bytes received in 0.4150 seconds (0.4911 Kbytes/s)
ftp>
get $$ Command
Required parameters are in bold font in the following
table. Optional parameters are in plain font. Both types of
parameters are listed alphabetically.
The keyword is followed by double quotation marks, two
dollar signs, any parameters needed, and ending double
quotation marks. The dest_filename must be the last
option after the final double quotation marks. The double
quotation marks are required. Refer to the get Command
Format section.
Eligible batches are batches that have a Requestable
flag but do not yet have a Transmitted (T), Nontransmittable
(N), or Deleted (D) flag. Although the Requestable
flags are retained after transmission, if the user issues
this same get command in the future, those batches
are no longer eligible. The user can view these status flags
by first issuing a dir $$ command to receive a
listing of the batches in the mailbox.
You can use any number of blanks between paramters, but
not within parameters, except for the BID, which must be
enclosed in single quotes if spaces are embedded.
|
Command get |
Parameter $$
BID=
ID
dest_filename |
Associated Value
xx. . . xx|#nnnnnnnn
XXXXXXXX
dest_filename |
Required Parameters
The BID parameter is required with the $$ syntax.
BID=xx. . xx identifies either the user batch ID or
the batch
number. It can be 164
characters. To create a
multiword BID, enclose the
user batch ID in single
quotation marks ( ).
Single-word BIDs (with no
spaces) do not require
quotes. Wildcard
specifications (like an
asterisk, *) are supported.
dest_filename identifies the
destination file name and directory
path name for the data you want
from the mailbox.
Depending on the file
system being used, the
get command can truncate
file names (for example, to
the 8.3 format on DOS).
Therefore, always supply the
dest_filename argument if it
is known.
get $$ Examples
ftp> get "$$ BID=FILEMNT" filemnt.dat
200 PORT command successful.
150 Opening ASCII mode data connection for $$
BID=FILEMNT.
226 Transfer complete.
619 bytes received in 0.5157 seconds (1.172
Kbytes/s)
ftp>
Retrieving Catalog Update Files
IMPORTANT NOTE: Do it Best Corp. provides two
types of Catalog update files, they are:
Version 0 files containing a Batch Name (BID) of
CatalogXX_ccyymmdd.zip, where XX is the RSC
(warehouse) number
Version 1 files containing a Batch Name (BID) of
CTFMxx_010_ccyymmdd.zip, where xx is the RSC
(warehouse) number. If your system is not capable of
processing Version 1 File Maintenance data, it is
recommended you contact Do it Best EDI Services at
260-748-5565 for further details on the format of this file.
These files are located in a common mailbox (MBR6998) allowing
all users capable of processing the Catalog Update file(s) to
request this data. Prior to send the mget command, the bin
or binary command must be issued.
mget $$ Command
The mget command is used to retrieve multiple Batch names
(BID) of the same or
similar name. This results in a file being created for each batch
matching the
selection criteria containing a remote filename
batchnumber.dat, where batchnumber is the
mailbox batch number.
mget $$ Syntax
Required parameters are in bold text in the
following table. Optional parameters are in plain
text. Both types of parameters are listed
alphabetically.
| Command |
Parameter |
Associated Value |
| |
|
|
| mget |
$$ |
|
| |
BID |
xx. . . xx|#nnnnnnnn |
| |
ID |
XXXXXXXX |
| |
FTIME |
[CC]yymmdd[:hhmm]|nnn[:hhmm]] |
ID Required. The 8-character mailbox ID for the batch
BID Required. The batch name, up to 24 characters, being
requested. The * wildcard
character can be used in conjunction
with a portion of the Batch ID.
FTIME Required. Specifies the
earliest date, prior to the current
date, batches should be retrieved.
This is used to request batch from a
prior date to the current date,
resulting in multiple days or weeks
of data being downloaded within that
time period.
Catalog Update mget $$
Examples
ftp> cd /MBR6998
ftp> bin
200 Type set to I
ftp> mget "$$ ID=MBR6998 BID=CATALOG01* FTIME=050601"
150 Opening Binary mode data connection for CATALOG01*
ftp> cd /MBR6998
ftp> bin
200 Type set to I
ftp> mget "$$ ID=MBR6998 BID=CTFM01_010* FTIME=050601"
150 Opening Binary mode data connection for
FILEMNT01_010*
Retrieving RSC (Warehouse) On-Hand Files
The RSC On-Hand files are updated daily, Sunday through Friday,
to allow members to review Quantity On-Hand information for their
respective RSC. The data files are located in a common mailbox
(MBR6999) allowing all members capable of processing this data to
download it to their point-of-sale system. To request documentation
and formatting of this file, please contact Do it Best EDI Services
at 260-748-5565 or edimembersupport@doitbest.com
The get or get $$ command is used to request the
ohXXout.zip data file, where XX is the RSC (warehouse)
number. More information on the get and get $$
commands can be found in the section "Retrieving POS Data Files".
Prior to sending the get or get $$ command, the bin
or binary command must be issued.
RSC On-Hand get Example
ftp> cd /MBR6999
ftp> bin
200 Type set to I
ftp> get ohXXout.zip remotefilename.zip
150 Opening Binary mode data connection for remotefilename.zip
ftp> cd /MBR6999
ftp> bin
200 Type set to I
ftp> get "$$ ID=MBR6999 BID=ohXXout.zip" remotefilename.zip
150 Opening Binary mode data connection for remotefilename.zip
Revision History
| Date |
Who
Changed |
Change
Description |
| |
|
|
|
03/02/2006 |
L Fogle |
Remove
.zip extension on Retail Sales v01.0 |
|
03/13/2006 |
L Fogle |
Update
v01.0 download file list |
|