The Store Database


Global Configuration Physical File

The MGLOBALP physical file contains a single record that defines how the store operates. This file must contain a record, and if more than one exists, the first is used.

This file contains your Merchant Name and Password, so be careful with the authority given to this file. WWWUSER must have read access to this file.

 
Field Name  Data Type  Length  Description
GFRTI  zoned decimal  7,2  This is the freight charge for each item in the customers order. 
This can be zero, in which case no per item charge is added.
GFRTF  zoned decimal  7,2  This is the flat freight charge added to each order. 
This can be zero, in which no per order charge is added.
GMRCID  character  256  This is the merchant name that is passed to the Merchant/400 API. 
See the Input and Output Formats for more information on setting this value.
GMRCPW  character  256  This is the merchant password that is passed to the Merchant/400 API. 
See the Input and Output Formats for more information on setting this value.
GSVCNM  zoned decimal  3,0  This is the remote processing host service name. 
See the Input and Output Formats for more information on setting this value.
GHOSTN  character  256  This is the name and domain, or IP address, of the remote processing host. 
See the Using the Merchant/400 API in an ILE Program or an OPM Program for more information on setting this value.
GPORT  zoned decimal  5,0  This is the socket port number used by the remote host for SSL communications. 
This will usually be set to 443. 
See the Using the Merchant/400 API in an ILE Program or an OPM Program for more information on setting this value.
GHPORT  zoned decimal  5,0  This is the socket port used by Commerce Server/400 for non-secure communication (HTTP). This is used by the store application to switch to/from secure mode when needed. 
This will usually be set to 80.
GSPORT  zoned decimal  5,0  This is the socket port used by Commerce Server/400 for secure communication (SSL). This is used by the store application to switch to/from secure mode when needed. 
This will usually be set to 443.
GIFSPT  character  256  This is the IFS file path to where the files containing the header and footer text files for the application. 
This is set to '/WWWSERV/WEBDOCS/SHIPPED/MERCHANT' when the product is installed and should be changed to reflect the location where your unique text files are stored.
GTMETH  zoned decimal  3,0  This tells the Merchant/400 API how to the transmission method to use when transmitting the data. 
See the Using the Merchant/400 API in an ILE Program or an OPM Program for more information on setting this value.
GVISAY  character  This indicates that the merchant can accept VISA credit cards. 
Set to 'Y', 'y', or '1' for YES. Any other values indicates NO.
GMCY  character  This indicates that the merchant can accept Master Card credit cards. 
Set to 'Y', 'y', or '1' for YES. Any other values indicates NO.
GDISCY  character  This indicates that the merchant can accept Discover credit cards. 
Set to 'Y', 'y', or '1' for YES. Any other values indicates NO.
GAMEXY  character  This indicates that the merchant can accept American Express credit cards. 
Set to 'Y', 'y', or '1' for YES. Any other values indicates NO.
GTRTYP  zoned decimal  3,0  This tells the Merchant/400 API the transaction type to use for the credit card transaction.  This must be set to MERCH_TRTYPE1_SALE or MERCH_TRTYPE1_BOOK. 
See the Input and Output Formats for more information on setting this value.

Product Description Physical File

The MPRODCTP physical file contains information describing each product that is being sold in the store.

There are two logical files over this file:

 
Field Name  Data Type  Length  Description
PRDID  character  10  This is the identifier assigned to the product. It can be any value up to 10 characters long. The product identifier cannot contain any of the following characters: ',', '&', or ';'.
PRDSQ  zoned decimal  6,0  This field determines the order that products are displayed in the store. The products are displayed in ascending order. These values do not have to be sequential.
PRDNM  character  25  This is then name of the product.
PRDPRC  zoned decimal  7,2  This is the price for each unit of the product. If more than one of the product is ordered, this value is charged for each product ordered.
PRDWT  zoned decimal  3,0  This is the weight for each unit of the product.
PRDUM  character  10  This is a description for each units packaging. Examples include: each, set, pair, case, pounds, liters, etc.
PRDPIC  character  256  This is the HTML displayed in the first column for the product. It can contain an image tag and/or other text to display. 
An example: <img src="/products/product.gif" alt="Product Name"> 

Note that any file paths in the HTML must be relative to the document root (i.e. begin with a slash). 

PRDURL  character  256  This is the URL of an HTML document that gives more information about the product. If this value is supplied, the Product ID becomes a link to the description HTML document. If no URL is supplied then the Product ID is displayed without a link. 
An example: /products/product.html 

Note that this URL must be relative to the document root (i.e. begin with a slash).

PRDDS1  character  30  The five product description lines are combined into a single description and displayed under the product name. Each description line is separated by a space from the preceding one, allowing them to wrap into a single block of text.
PRDDS2  character  30  See PRDDS1.
PRDDS3  character  30  See PRDDS1.
PRDDS4  character  30  See PRDDS1.
PRDDS5  character  30  See PRDDS1.

Customer Order Physical File

The MORDERP physical file contains information about the orders placed by customers. It contains one record for each order that has been successfully placed. It contains customer information, totals calculated for the sale, and several fields that can be used to track the order after placement. The shipping address is only supplied if it is different than the billing address.

This file contains your customers credit card information, so be careful with the authority given to this file. WWWUSER must have change access to this file.

There is one logical file over this file:

 
Field Name  Data Type  Length  Description
ORDID  character  10  This is the order identifier that is assigned to the order. These are assigned sequentially and are assigned before the credit card is verified. No order record is stored if the credit card verification fails, so this file can and will contain gaps in the sequence of IDs. 

The last ID used is stored in the MORDIDP table. This value is read, incremented, and then written back to the file. If no record exists in the MORDIDP table, an order ID of 1 is used and written to the file.

ORDDT  zoned decimal  8,0  This is the date that the order was placed. It is stored in the format of YYYYMMDD.
ORDCNM  character  40  This is the name of the customer.
ORDCCO  character  40  This is the name of the company.
ORDCA1  character  40  This is the first line of the customers billing address.
ORDCA2  character  40  This is the first line of the customers billing address, if needed.
ORDCCT  character  40  This is the billing address city.
ORDCST  character  This is the billing address state.
ORDCZP  character  This is the billing address ZIP code.
ORDCCY  character  20  This is the billing address country.
ORDCPH  character  20  This is the customer's phone number.
ORDCFX  character  20  This is the customer's FAX number.
ORDCEM  character  40  This is the customer's e-mail address.
ORDCRF  character  40  This is the reference number that the customer entered. It is only for the customers use to allow them to identify the order.
ORDCDT  character  This is the credit card type. 
    MC - Master Card
    V  - VISA
    D  - Discover
    AM - American Express
ORDCDN  character  19  This is the credit card number
ORDCDX  zoned decimal  8,0  This is the credit card expiration date. It is stored in the format of YYYYMMDD, where February 1999 is stored as 19990201.
ORDSA1  character  40  This is the first line of the customers shipping address.
ORDSA2  character  40  This is the first line of the customers shipping address, if needed.
ORDSCT  character  40  This is the shipping address city.
ORDSST  character  This is the shipping address state.
ORDSZP  character  This is the shipping address ZIP code.
ORDSCY  character  20  This is the shipping address country.
ORDSDT  zoned decimal  8,0  This field can be used to store the date that the order was shipped. It is left blank by the store application.
ORDSCA  character  40  This field can be used to store what carrier shipped the order. This field is left blank by the store application.
ORDSBL  character  40  This field can be used to store the bill of laiding number. This field is left blank by the store application.
ORDAUT  character  20  The authorization ID returned by the Merchant/400 API. 
See the Input and Output Formats for more information on this value.
ORDFRT  zoned decimal  7,2  This is the total freight costs charged for the order. It is equal to the flat freight charge plus the per item freight charge time the number of items ordered.
ORDTOT  zoned decimal  9,2  This is the total amount charged for the order. It is the total charged for the item(s) ordered, plus the freight charges.

Customer Order Item Physical File

The MORDITMP physical file contains one record for each type of product that a customer ordered. If the customer orders one of product A and two of product B, two records will be created, a record for product A with a quantity of one and a record for product B with a quantity of two.
 
Field Name  Data Type  Length  Description
ORDID  character  10  This is the order identifier.
PRDID  character  10  This is the product identifier.
ORDQTY  zoned decimal  6,0  This is the number of items of this product that were ordered.
PRDPRC  zoned decimal  7,2  This is the price of the item that was ordered. This is the price for one item of this type, so the total cost for all of the items of this type is equal to this quantity multiplied the number of items ordered. This is the cost of the item at the time that it was ordered.

The Order Identifier Control Physical File

The MORDIDP physical file contains zero or one records that control the generation of order numbers. If the file contains zero records, the next order number to be assigned will be 1. If a record does exist, it contains the last number generated, and the store application reads this value, increments it and writes back the new number.
 
Field Name  Data Type  Length  Description
ORDID  character  10  This is the last order identifier that was assigned to an order.

Net.Commerce Order Information Physical File

The MNCINFP physical file contains information about the orders placed by customers via the Net.Commerce product from IBM. It is used by the Net.Commerce - Merchant/400 do_payment interface to help communicate information about completed credit card transactions to a Net.Commerce shopper. It contains one record for each order that has been successfully placed and processed by Merchant/400. It contains fields that can be used to track the order after placement.

This file contains your customer's credit card information, so be careful with the authority given to this file.

There is one logical file over this file:

 
Field Name  Data Type  Length  Description
ORDID  character  10  This is the order identifier that is assigned to the order. These are assigned by Net.Commerce before the credit card is verified and can be associated with the order_rn Net.Commerce variable. No MNCINFP record is stored if the credit card verification fails, so this file may contain gaps in the sequence of IDs. 
ORDCDN  character  19  This is the credit card number
ORDCDX  zoned decimal  8,0  This is the credit card expiration date. It is stored in the format of YYYYMMDD, where February 1999 is stored as 19990201.
ORDAUT  character  20  The authorization ID returned by the Merchant/400 API. 
See the Input and Output Formats for more information on this value.
ORDTOT  zoned decimal  9,2  This is the total amount charged for the order. 
ORDREF  character  20  A string that uniquely identifies the transaction. This is the order authorization reference originated from the DataCash servuce and returned by the Merchant/400 API. 
ORDCDI  zoned decimal  8,0  This is the credit card start date / issue code. It is stored in the format of YYYYMMDD, where February 1999 is stored as 19990201. In the case of using a card issue number, this will typically be stored in a format zzzznnzz with a value that looks like 0000nn00 (where the nn is the issue code of 01-99).