AS/400 e-commerce: Net.Commerce

An IBM Redbook Publication
IBM Redbook Form Number: SG24-2129-00
ISBN: 0738412651
ISBN: 9780738412658
Publication Date: 22-Feb-1999
Find Similar Download

Related People

Mick Lugton - Author [+4] [-4]
Sankarson Banerjee - Author
Steve Miedema - Author
Dalia Rady - Author
Craig Stancl - Author

Abstract

This IBM Redbooks publication helps you install, tailor, and configure IBM Net.Commerce for AS/400. IBM Net.Commerce for AS/400 is based on Net.Commerce Version 2. IBM Net.Commerce provides the infrastructure around which an online shopping mall can be built. This shopping mall may be a mall of many stores or a single store mall.

Net.Commerce has two main components: the Net.Commerce Server and the Net.Commerce Administrator. The Net.Commerce Server receives and executes requests from the Web using a secure Web server for AS/400. The Net.Commerce Administrator provides Web browser-based tools for creating and maintaining the online mall and stores. The book looks in detail at both the Net.Commerce Server and the Net.Commerce Administrator.

This book targets the needs of system and network administrators who plan, configure, and maintain AS/400 networks. It also addresses the needs of application designers who create Net.Commerce sites.

This document was developed using Version 4 Release 2 of the AS/400 Web server implementation. Net.Commerce can run with the Version 4 Release 2 and Release 3. Because of the continuous improvements to the Web server on the AS/400 system, some descriptions in this document do not apply to Release 3. Throughout this document, we add notes where V4R3 implementations are different from V4R2.

The following list summarizes the major differences in the Web server implementations for the two releases.
1. To achieve a secured Web server, you need the following products:
- V4R2: Internet Connection Secure Server (5769-NC1 or 5769-NCE)
- V4R3: HTTP Server (5769-DG1) and Cryptographic Access Provider (5769-AC1, 5769-AC2 or 5769-AC3)

2. SSL (Secured Socket Layer) configuration:
- V4R2: This is done both in the ICSS configuration tasks and in the Digital Certificate Manager (DCM) task. More detailed descriptions of the DCM follow.
- V4R3: This is done as a separate configuration step in a Web server (HTTP Server). To configure the SSL with V4R3, select the "Digital Certificate Manager" task from the AS/400 Tasks Administrative Page on your browser screen. Then follow the instructions. Appendix A shows you the detailed steps for this configuration. You can also get the detailed information in the AS/400 Information Center by typing the following URL for the configuration steps: http://publib.boulder.ibm.com/pubs/html/as400/ic2924/info/index.htm
Then select the topics "Internet" and "Digital Certificate Management".

3. The HTTP server jobs are running under a different subsystem with V4R3. When you want to make sure the HTTP server jobs are running, look at the following subsystem depending on the release you are using:
- V4R2: The subsystem name is QSYSWRK.
- V4R3: The subsystem name is QHTTPSVR.

4. Net.Data is packaged differently in V4R3 than V4R2. You may have to consider this difference when you install Net.Commerce.
- V4R2: As a part of TCP/IP (5769-TC1)
- V4R3: As a part of the HTTP Server (5769-DG1)

Language

English

Table of Content

Chapter 1. Introduction to Net.Commerce for AS/400 1.0
Chapter 2. IBM e-commerce Offerings 2.0
Chapter 3. Net.Commerce Overview 3.0
Chapter 4. Net.Commerce for AS/400 4.0
Chapter 5. Planning for Net.Commerce 5.0
Chapter 6. Net.Commerce Installation 6.0
Chapter 7. Net.Commerce Basic Configuration 7.0
Chapter 8. Net.Commerce Advanced Configuration 8.0
Chapter 9. Net.Commerce System Operations 9.0
Chapter 10. Setting Up a Net.Commerce Shopping Mall 10.0
Chapter 11. Integrating Legacy Applications and Data with Net.Commerce 11.0
Chapter 12. Building an e-commerce Site 12.0
Chapter 13. Shopping Trip in the Demo Mall 13.0
Appendix A. SSL Configuration for V4R3 A.0
Appendix B. Special Notices B.0
Appendix C. Related Publications C.0
IBML
AS/400 e-commerce: Net.Commerce
Mick Lugton, Sankarson Banerjee,
Steve Miedema, Dalia Rady, Craig Stancl
International Technical Support Organization
http://www.redbooks.ibm.com
This book was printed at 240 dpi (dots per inch).The final production redbook with the RED cover will
be printed at 1200 dpi and will provide superior graphics resolution.Please see “How to Get ITSO
Redbooks” at the back of this book for ordering instructions.
SG24-2129-00


International Technical Support Organization
AS/400 e-commerce: Net.Commerce
February 1999
SG24-2129-00
IBML

Take Note!
Before using this information and the product it supports, be sure to read the general information in
Appendi x B, “Special Notices” on page 239.
First Edition (February 1999)
This edition applies to Version 2 of Net.Commerce for AS/400, Program Number 5798-NC2 for use with the OS/400
Operati ng System.
Comments may be addressed to:
IBM Corporation, International Technical Support Organization
Dept. JLU Building 107-2
3605 Highway 52N
Rochester, Minnesota 55901-7829
When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any
way i t believes appropriate wi thout incurring any obli gati on to you.
© Copyright International Business Machines Corporation 1999.All rights reserved.
Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is
subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.

Contents
Preface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vi i
The Team That Wrote This Redbook
........................
viii
Comments Wel come
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
Chapter 1.Introduction to Net.Commerce for AS/400
...............
1
1.1 An Evolution to the Web
..............................
2
1.1.1 Cl i ent/Server Detour
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1.1.2 Parallel Web Development
.........................
3
1.2 Maturi ng Technologies
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
1.3 Ready for Net.Commerce
.............................
5
1.4 Addi ti onal Informati on
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
Chapter 2.IBM e-commerce Offerings
.......................
7
2.1 Net.Commerce
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.2 Payment
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.3 Useful URLs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
Chapter 3.Net.Commerce Overview
. . . . . . . . . . . . . . . . . . . . . . . . .
13
3.1 What Net.Commerce Offers
............................
14
3.1.1 Building an Electronic Site on the Internet
................
14
3.1.2 Dynamic Shopping Trip
...........................
14
3.1.3 Easy Way to Manage the Electronic Store
................
15
3.1.4 Protecting Site Information
.........................
15
3.2 Net.Commerce Components
. . . . . . . . . . . . . . . . . . . . . . . . . . .
16
3.2.1 Net.Commerce Server
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
3.2.2 Net.Commerce Admi ni strator
. . . . . . . . . . . . . . . . . . . . . . . .
17
3.3 Net.Commerce Additional Components
.....................
21
3.4 Net.Commerce APIs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
3.5 Useful URLs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
Chapter 4.Net.Commerce for AS/400
........................
23
4.1 The AS/400 Net.Commerce Server
.......................
24
4.1.1 Net.Commerce Daemon
. . . . . . . . . . . . . . . . . . . . . . . . . . .
24
4.1.2 Net.Commerce Di rector
. . . . . . . . . . . . . . . . . . . . . . . . . . .
26
4.2 Secure Web Server for AS/400
..........................
29
4.3 IBM Database 2 for AS/400
............................
30
4.4 Net.Data for AS/400
................................
30
4.5 Useful URLs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
Chapter 5.Planning for Net.Commerce
.......................
33
5.1 Presence on the Internet
.............................
33
5.2 Mall or Store
....................................
34
5.2.1 Single Store
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
5.2.2 Mal l
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
5.3 Setting Up an Implementation Plan
.......................
36
5.3.1 Marketing Plan
.................................
36
5.3.2 Evaluate the Current System
........................
36
5.3.3 Estimate the Site Activity
..........................
36
5.3.4 Prepare the Infrastructure
..........................
36
5.4 Tips for Page Design
................................
38
5.4.1 Using Recognizable Styles
.........................
38
©
Copyright IBM Corp. 1999
iii

5.4.2 Using Graphics and Colors
.........................
39
5.4.3 Using Templates
................................
39
5.4.4 Using Headers and Footers
.........................
39
5.4.5 Using a Common Set of HTML Features
.................
39
5.4.6 Using Images and Image Formats
.....................
39
5.4.7 Using Different Layouts for Different Customers
.............
40
5.5 IBM Service Offerings for e-commerce
.....................
40
5.5.1 IBM e-business Advisory Services
.....................
41
5.5.2 IBM e-commerce Services
..........................
41
5.6 Single or Multiple System Implementation
...................
42
5.6.1 Single System Setup
.............................
42
5.6.2 Multiple System Setup
............................
42
5.7 e-business Advi sor
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45
Chapter 6.Net.Commerce Installation
. . . . . . . . . . . . . . . . . . . . . . . .
47
6.1 Prel i mi nary Procedures
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
47
6.2 Installation Procedures
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
6.2.1 Installation of Net.Commerce
........................
49
6.2.2 What Was Installed
..............................
51
6.2.3 Post-Installation Procedures
.........................
52
Chapter 7.Net.Commerce Basic Configuration
..................
55
7.1 Configuration Process
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
55
7.2 Configuration Details
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
75
7.3 Verifying a Successful Net.Commerce Installation and Configuration
...
77
7.4 Printable Net.Commerce Book Files
......................
87
7.5 Net.Commerce User-Customizable Server Configuration
..........
88
7.5.1 Net.Commerce Server Configuration File
.................
88
7.5.2 Net.Data Configuration File
.........................
92
7.5.3 QNETCOMM Web Server Configuration
..................
93
Chapter 8.Net.Commerce Advanced Configuration
................
97
8.1 Caching
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
97
8.1.1 Enabling Phase 2 Caching
..........................
97
8.1.2 Enabling Phase 3 Caching
..........................
98
8.1.3 Disabling Phase 1 Caching
.........................
98
8.1.4 Disabling Phase 2 Caching
........................
100
8.1.5 To Activate the Changes
..........................
100
8.2 Setting Up Remote Database Access
.....................
100
8.3 Setting Up Multiple Net.Commerce Server Instances on the Same
System
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
102
8.3.1 Configuration Details
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
105
8.4 Setting Up Multiple Net.Commerce Server Instances on Multiple
Systems
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
108
8.5 Coexistence of Net.Commerce with a Non-Net.Commerce Web Server
.
110
8.5.1 HostName and BindSpecific Web Server Directives
..........
110
8.5.2 Pass / and Pass /sample/* Web Server Directives
..........
111
8.5.3 Client Pull
...................................
112
Chapter 9.Net.Commerce System Operations
..................
115
9.1.1 Starting the ADMIN Web Server Instance
................
115
9.1.2 Stopping the ADMIN Web Server Instance
...............
116
9.1.3 Starting the Net.Commerce Web Server Instance
...........
116
9.1.4 Stopping the Net.Commerce Web Server Instance
..........
118
9.1.5 Starting the Net.Commerce Server
....................
118
iv
AS/400 e-commerce: Net.Commerce

9.1.6 Stopping the Net.Commerce Server
...................
119
9.1.7 Database Cleanup
..............................
120
9.1.8 Database Backup
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
124
Chapter 10.Setting Up a Net.Commerce Shopping Mall
............
125
10.1 Setting Up a Mall
................................
126
10.1.1 Site Manager
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
127
10.1.2 Store Manager
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
128
10.2 Net.Commerce Site Manager
.........................
129
10.2.1 Mal l Information
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
131
10.2.2 Access Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
133
10.2.3 Store Records
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
136
10.2.4 Task Management
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
137
10.2.5 Shopper Information
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
146
10.2.6 Shipping Providers
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
149
10.2.7 Templ ate Desi gner
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
150
10.3 Net.Commerce Store Manager
........................
152
10.3.1 Store Information
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
154
10.3.2 Product Categories
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
157
10.3.3 Product Information
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
159
10.3.4 Discounts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
163
10.3.5 Shipping Services
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
164
10.3.6 Templ ate Desi gner
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
166
10.3.7 Shopper Groups
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
167
10.3.8 Customer Information
. . . . . . . . . . . . . . . . . . . . . . . . . . .
168
10.3.9 Order Informati on
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
171
10.4 Populating the Net.Commerce Database
..................
172
10.4.1 Mass Import
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
172
Chapter 11.Integrating Legacy Applications and Data with Net.Commerce 179
11.1 Integrating Applications
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
179
11.2 Modify the Database
..............................
180
11.3 Modify the Behavior of Tasks
.........................
180
11.4 API Signatures
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
182
11.5 Integrating Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
182
11.5.1 Populating the Net.Commerce Database
...............
183
11.5.2 Synchronizing the Net.Commerce Database with Backend Data
.
183
Chapter 12.Building an e-commerce Site
....................
185
12.1 Connecting to the Internet
...........................
185
12.2 Firewall Protection
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
185
12.3 Everything behind the Firewall
........................
187
12.4 Net.Commerce Server in front of the Firewall
...............
189
12.5 Backend Applications behind the Firewall
.................
190
12.6 Firewall Issues
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
190
Chapter 13.Shopping Trip in the Demo Mall
...................
193
13.1.1 Mal l Front
. . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . .
195
13.1.2 Entering the Mall
..............................
196
13.1.3 Guest Shopper
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
196
13.1.4 Register
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
198
13.1.5 Address Book
................................
202
13.1.6 Search a Specific Product or Category
.................
206
13.1.7 Shopping Cart
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
208
13.1.8 More Shopping
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
209
Contents
v

13.1.9 Prepari ng Order
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
213
13.1.10 Placing an Order
.............................
216
13.1.11 Checking Order Status
..........................
219
13.1.12 Placing Pending Orders
.........................
220
Appendix A.SSL Configuration for V4R3
.....................
221
A.1 AS/400 Implementation of Digital Certificate Management
........
221
A.1.1 Configuring a Digital Certificate Environment
.............
221
A.2 Requesting a Server Certificate from an Internet CA
...........
222
A.2.1 Request a Server Certificate from an Internet CA
..........
222
A.2.2 Receive a Server Certificate for this Server
..............
225
A.2.3 Configure the HTTP Server to Use SSL
.................
227
A.3 Creating a Self-signed Certificate
.......................
230
A.3.1 Create an Intranet Certificate Authority
.................
231
A.3.2 Create a Server Certificate with Your Intranet CA
..........
234
A.3.3 Configure the Web Server to Use SSL with Server Authentication
.
236
A.4 Addi ti onal Resources
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
237
Appendix B.Special Notices
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
239
Appendix C.Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . .
241
C.1 International Technical Support Organization Publications
........
241
C.2 Redbooks on CD-ROMs
.............................
241
C.3 Other Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
241
How to Get ITSO Redbooks
.............................
243
IBM Redbook Fax Order Form
............................
244
Index
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
245
ITSO Redbook Evaluation
...............................
247
vi
AS/400 e-commerce: Net.Commerce

Preface
This redbook helps you install, tailor, and configure IBM Net.Commerce for
AS/400.IBM Net.Commerce for AS/400 is based on Net.Commerce Version 2.
IBM Net.Commerce provides the infrastructure around which an online shopping
mall can be built.This shopping mall may be a mall of many stores or a single
store mall.
Net.Commerce has two main components: the Net.Commerce Server and the
Net.Commerce Administrator.The Net.Commerce Server receives and executes
requests from the Web using a secure Web server for AS/400.The
Net.Commerce Administrator provides Web browser-based tools for creating and
maintaining the online mall and stores.The redbook looks in detail at both the
Net.Commerce Server and the Net.Commerce Administrator.
This redbook targets the needs of system and network administrators who plan,
configure, and maintain AS/400 networks.It also addresses the needs of
application designers who create Net.Commerce sites.
©
Copyright IBM Corp. 1999
vii

Note
This document was developed using Version 4 Release 2 of the AS/400 Web
server implementation. Net.Commerce can run with the Version 4 Release 2
and Release 3.Because of the continuous improvements to the Web server
on the AS/400 system, some descriptions in this document do not apply to
Release 3.Throughout this document, we add notes where V4R3
implementations are different from V4R2.
The following list summarizes the major differences in the Web server
implementations for the two releases.
1. To achieve a secured Web server,you need the fol l owing products:

V4R2: Internet Connection Secure Server (5769-NC1 or 5769-NCE)

V4R3: HTTP Server (5769-DG1) and Cryptographic Access Provider
(5769-AC1, 5769-AC2 or 5769-AC3)
2. SSL (Secured Socket Layer) configuration:

V4R2: This is done both in the ICSS configuration tasks and in the
Digital Certificate Manager (DCM) task. More detailed descriptions of
the DCM follow.

V4R3: This is done as a separate configuration step in a Web server
(HTTP Server). To configure the SSL with V4R3, select the ″Digital
Certificate Manager″ task from the AS/400 Tasks Administrative Page
on your browser screen. Then follow the instructions.Appendi x A,
“SSL Configuration for V4R3” on page 221 shows you the detailed
steps for this configuration.You can also get the detailed information
in the AS/400 Information Center by typing the following URL for the
configuration steps:
http://publib.boulder.ibm.com/pubs/html/as400/ic2924/info/index.htm
Then select the topics ″Internet″ and ″Digital Certificate
Management″.
3. The HTTP server j obs are runni ng under a different subsystem wi th V4R3.
When you want to make sure the HTTP server jobs are running, look at
the following subsystem depending on the release you are using:

V4R2: The subsystem name is QSYSWRK.

V4R3: The subsystem name is QHTTPSVR.
4. Net.Data is packaged differently i n V4R3 than V4R2.You may have to
consider this difference when you install Net.Commerce.

V4R2: As a part of TCP/IP (5769-TC1)

V4R3: As a part of the HTTP Server (5769-DG1)
The Team That Wrote This Redbook
This redbook was produced by a team of specialists from around the world
working at the International Technical Support Organization, Rochester Center.
Mick Lugton is a Systems Engineer at the International Technical Support
Organization, Raleigh Center.He has nine years of experience in AS/400
communications and networking.He writes extensively and teaches IBM classes
worldwide on all areas of AS/400 networking and communications.Before
viii
AS/400 e-commerce: Net.Commerce

joining the ITSO 3 years ago, Mick worked in the AS/400 Business Unit, IBM UK
as a networking specialist.
Sankarson Banerjee is a Technical Manager - Systems in India.He has three
years of experience in AS/400s and Internet technologies.He holds a
post-graduate degree in Mathematics from IIT Kharagpur and an MBA from IIM
Calcutta.His areas of expertise include Internet and e-Business.
Steve Miedema is an AS/400 Technical Consultant in the United States.He has
worked in both programming and technical support for the S/38 and AS/400 for
over 16 years, after graduating from the University of South Dakota with degrees
in Mathematics and Computer Science.His current area of focus is AS/400
e-Business related topics.Although this is his first redbook, Steve has published
many works from invention disclosures to dozens of technical presentations.
Steve works for IBM′s Advanced Technical Support organization, and is located
in Rochester, Minnesota.
Dalia Rady is a Advisory Solution Specialist in Egypt.She has 7 years of
experience in the Retail field.She has worked at IBM for 9 years.She holds a
degree in Communication and Computer Sciene from Cairo University.Her
areas of expertise include Retail & Distribution, AS/400, and POS.
Craig Stancl is an Advisory I/T Specialist in the United States.He has six years
of experience in the AS/400 field.He has worked at IBM for 2.5 years.He holds
a degree in computer science from Mankato State University, Mankato,
Minnesota.His areas of expertise include Net.Data, Net.Commerce, AS/400
Internet Solutions, and the AS/400 Firewall product.
Thanks to the following people for their invaluable contributions to this project:
Suehiro Sakai
Marcel a Adan
ITSO Rochester
Gaspare Latona
IBM Toronto
Comments Welcome
Your comments are important to us!
We want our redbooks to be as helpful as possible.Please send us your
comments about this or other redbooks in one of the following ways:

Fax the evaluation form found in “ITSO Redbook Evaluation” on page 247 to
the fax number shown on the form.

Use the online evaluation form found at
http://www.redbooks.ibm.com/

Send your comments in an Internet note to
redbook@us.ibm.com
Preface
ix

x
AS/400 e-commerce: Net.Commerce

Chapter 1.Introduction to Net.Commerce for AS/400
Welcome to Net.Commerce for AS/400.This document will describe the various
aspects of Net.Commerce for AS/400 as implemented with OS/400 Version 4,
Release 2 and Version 4, Release 3.
As the Internet becomes more common and in many cases essential to today′s
society, it becomes important for businesses to be capable of exploiting the
opportunities represented by the Internet.It is no longer sufficient to simply
provide access to the Internet or perhaps even have a static presence.The real
potential of the Internet lies with going beyond those early uses to actually
conducting business transactions - conducting commerce.The Internet related
technologies including TCP/IP, HTTP, browsers, etc., are generally capable of
three primary implementation scenari os.One is an intranet, which typically
means the users connected together using the protocols are within an
organization or business.A second use is connecting to the Internet, with
typical functions being internal users having the capability to access other
Internet sites, as well as a Web presence.Finally, many businesses are
establishing extranets - using the Internet technologies to connect to other
businesses with whom they have a relationship.
The Internet implementation is generally thought of as providing
business-to-consumer value. Net.Commerce is IBM′s premier offering that allows
many businesses to quickly conduct consumer-to-business transactions through
the Internet.
The Net.Commerce system enables merchants to create electronic stores where
they can sell their products and services globally over the Internet′s World Wide
Web (WWW).Using Net.Commerce, merchants can update their product
information easily and tailor the way information is presented; create ″shopper
groups″ and offer their members special promotions or unique store views; track
demographic information that is provided by shoppers; and view purchasing
statistics.Shoppers around the world can browse online catalogs of products
and services, complete with descriptions and multimedia objects such as
graphics, photos, and video and sound clips.They can place items in an
electronic ″shopping cart″, and then order them by providing credit card and
shipping information.With Net.Commerce, shoppers can complete transactions
from their own computers while avoiding crowds and checkout lines.
While Net.Commerce is new to the AS/400, it is not a new offering from IBM.
Net.Commerce is an application solution available from IBM to run on all IBM
server platforms, including RS/6000 (AIX), S/390, PC servers (running Microsoft′s
NT) and the AS/400.
Before jumping right into Net.Commerce, a review of how the Internet-related
technologies have achieved their current status as tools of choice for
applications may be helpful.This will provide a base on which Net.Commerce
makes sense as the application of choice for business transactions.Two of the
primary factors that have occurred are the evolution of client/server computing
to Web technologies, and the maturation of technologies that enable business
transactions to utilize the Internet as a business medium.
©
Copyright IBM Corp. 1999
1

1.1 An Evolution to the Web
Over the past 10 years or so, an evolution in the computing paradigm has been
occurring.Indeed, the evolution has been going on even longer, but with
regards to client/server computing, an evolution that began with the personal
computer (PC) has come to dominate much of the data processing industry.
When PC′s were first introduced, they were largely a curiosity, in which only a
select few were interested.As their capabilities increased, so did the number of
people using them, and eventually the mainstream IS professionals took notice.
PC′s quickly became an alternative for host dependent terminals, which allowed
integration into the network, although the applications which they accessed
remained largely unchanged.
Soon however, applications that were the domain of the PC′s and their users
caught the eye of businesses.Many were ″personal productivity″ applications,
such as word processors, spreadsheets and the like.This new breed of
application was difficult if not impossible to replicate on host or centralized
computers, and became increasingly important to the daily operations of
businesses.The transition from terminal emulator to ″workstati on″ was
beginning to take hold.Some groups envisioned the transition would end with
the complete elimination of the central or host computers, although we now
know that vision was short-sighted.
Many true visionaries had a different view - one that allowed both the PC as a
workstation and the central or host computer to maximize their respective
values.This view held that applications should not be specific to a single
system, but should work in concert on both types of systems - the PC
workstation (client) and the central or host system (server).The tasks that
required task-specific CPU-intensive functions such as graphical presentation
would be done on the client, while the host would serve the data and (some)
applications from a managed system.This client/server computing model was
touted as the next great evolution of the data processing industry.
1.1.1 Client/Server Detour
Something happened on the way to client/server computing.As the early
adopters began implementing applications in a true client/server model, they
found that it was more difficult than envisioned.The difficulties included
inconsistent splitting of the application between the client and server, lack of
mature tools for application development, and less than expected, or more
accurately, inconsistent performance between the various client and server
systems.Some of the difficulties were addressed by defining client/server
models to help guide the split of the application, while tools for development got
better and better.Still, the actual process of successfully implementing and
deploying a true client/server application remained difficult.Additional changes
were required if this model was to become pervasive in the industry.
During this time of rapid change, as many ″experts″ tried to solve the
client/server challenges, several attempts were made to simplify the
cl i ent/server envi ronment.One way to simplify a difficult task is to standardize
the client/server platforms.Indeed, some progress was made, especially on the
client side.Most businesses standardized their client hardware and software
platform on ″win-tel″, the platform represented by Intel-based hardware personal
computers (PCs) and Microsoft′s Windows family of operating systems (Windows
3.1x and Windows 95).
2
AS/400 e-commerce: Net.Commerce

Similar attempts at standardizing the server were never really universally
accepted, though not for lack of effort.First came the cry for ″open″ systems,
which varied so much in meaning that no-one could really define ″open″.Some
viewed an open server as one where the hardware vendor and software vendor
were by definition two distinct entities (following the Intel - Microsoft model on
the client).Others held that open was anything but IBM, which during this time
was going through challenging business changes.After a while, the ″open″ l abel
was put on systems running the UNIX operating system, giving hope to many
than some standardization was finally occurring.What they did not realize was
that there was so much variability among UNIX operating systems (there
were/are dozens of variations), that even UNIX could not carry the open banner
by itself.Smaller-scale efforts to define APIs or interfaces to systems made
some headway as well, but standardizing the server side of the client/server
model remained elusive.
In the meantime, businesses kept running their businesses, and the specific
technologies they used remained important, but were not the central issues that
drove business decisions.Businesses were still hoping to accomplish
client/server computing, but realized the process would be difficult.As such,
they began taking small steps toward the goal of client/server computing,
without a complete switch from their traditional processing models.These steps
included getting their various systems to at least communicate with each other,
sharing data, and in some cases, deploying basic client/server applications while
steadily populating the desktop environment with PCs.These steps would
become the foundation for client/server computing, but still more change would
be required.
1.1.2 Parallel Web Development
During this time, a seemingly unrelated set of developments were occurring.A
community of computer users, largely based in research and academia, were
continuing to share data over a network.As the PC became popular in this
community as well, the sharing of data began to evolve.The users found it more
convenient to simply access remote data than to continually move it around their
network.This was in part due to the limits of the day, which were primarily the
speed of the network and the capacity of the individual systems.In order to
more effectively work together in this arrangement, their network, or
inter-connected network of systems, adopted a standard protocol.
This network, now evolved into the Internet, and protocol, TCP/IP, were the
foundations on which one more piece was to be added.The missing piece was
a way of dynamically sharing the information on various systems in the network.
An application, including protocol, was developed to dynamically link information
from these systems together, and was dubbed the hyper-text transfer protocol
application (HTTP).The application was developed in a client/server model, with
the client being responsible for end-user interaction and presentation
management, and the server largely responsible for storing and transmitting
data.The client was given a special name called a browser, while the server
was simply referred to as an HTTP server.During this time, the network
protocol (TCP/IP) emerged from the research and academic community into the
commerci al busi ness worl d.In addition, the applications and protocols soon
followed, including the newest one, HTTP.
The application/network combination was referred to as the world wide Web
(WWW or Web), and in an almost fad-like fashion, people began to use it, play
with it, experiment with its capabilities, and more.Of special interest was the
Chapter 1.Introduction to Net.Commerce for AS/400
3

client software, the browser.While the first browsers simply accessed and
displayed information from a remote system, their limit was the style of
presentation.They were text-based, much like host-dependent terminals.Since
most client platforms of the day were fast becoming intelligent workstations such
as PCs, the text-based limitation did not last.Seemingly overnight, an industry
segment developed with a sole focus on the browser.The browser revolution
was beginning.
Browser software quickly became a hot commodity, and the pace of
development of browser-based tools, applications, and function was unlike any
environment up to this time.Even so, few would predict what was to happen
next.As the client/server development process was still bogged down, the
opportunity presented by the browser was poised to revive it.Most people had
given up on standardizing the server.The further standardization of the client to
a specific application, the browser, changed the direction of client/server
computing.Now application developers could use the browser as the generic or
universal client, and would only have to focus on the server.And since the
server application was already defined via HTTP, a quantum leap in simplicity in
the client/server application development environment had seemingly occurred
overnight.
The evolution is continuing, but clearly the Web and the browser to HTTP-server
model of computing has surpassed the client/server application model to
become a de facto standard in the data processing industry.Further evidence of
this is the continuing development and maturing of application development
tools for this specific environment.
1.2 Maturing Technologies
Many of the early applications developed for the Web environment were simple
in nature, often providing access to publicly available information.Perhaps due
to its roots in research and academia, these library-like uses were to be
expected.However, with the whole realm of application development moving to
this environment, the nature of the applications soon diversified.Busi nesses
looked to this new environment to supplement and in some cases replace
traditional applications.One example of this is the area of customer service.
With the proliferation of PCs in the home, business found it viable to move some
customer service functions to the Web environment, effectively providing for
customer self-service.
A limiting factor to which applications were appropriate for this environment was
security.Accessing publicly available information and perhaps some customer
service applications were OK, but without security, specifically data privacy,
other applications would likely not be appropriate for the Web.Prior to the
Internet and Web phenomena, data privacy in the industry was a concern to only
one company at a time - as their applications and systems were deployed.With
the Web being a public network, data privacy had now become a universal
concern.Fortunately, since the browser had become the universal client, the
solution to data privacy was quickly implemented.Existing data encryption
technologies simply had to be incorporated into the HTTP browser to server
protocol, and the application developers would individually not have to worry
about data privacy.HTTPS (secure HTTP) is the protocol that was developed to
provide data privacy over the Internet.
4
AS/400 e-commerce: Net.Commerce

One other area of maturing technology that continues to develop is the area of
application development tools.The Web environment has given rise to a whole
new development environment, JAVA.While the promise of the JAVA
environment where an application can be written once to run on a variety of
hardware and software platforms has long been desired, the Web environment
has provided the momentum to make the promise a reality.
1.3 Ready for Net.Commerce
Finally, all the pieces were in place.The network, protocols, security and
development environment were mature enough to develop commercial
applications.And while many businesses develop their applications in-house,
more and more businesses are purchasing applications.One such application,
Net.Commerce, is specifically designed for the business-to-business and
business-to-consumer retail environment through the Web.It requires the
universal client, a browser, and provides all the server-side application
components.It can be described as a table-driven generic retail application,
with the tables to be filled in by the businesses using it.It is highly customizable
and scalable, and is lauded in the industry as perhaps the best retail application
for the Web environment.
The rest of this document describes the specific way in which this state-of-the-art
application is implemented on the AS/400.
1.4 Additional Information
While it is important to know what is in this document, it might also be of interest
to know what this document does not contain.Sufficient documentation exists
for the base Net.Commerce product itself, and is not duplicated here.The
Net.Commerce products are packaged with extensive online documentation,
including both cross-platform and platform-specific reference manuals, and so
on.Those sources should be used in conjunction with the material found in this
publication.
Chapter 1.Introduction to Net.Commerce for AS/400
5

6
AS/400 e-commerce: Net.Commerce

Chapter 2.IBM e-commerce Offerings
The IBM Payment Suite family of e-commerce offerings offer products and
services for building secure, end-to-end commerce solutions.Those products
and offerings include the following:

Net.Commerce

Payment
2.1 Net.Commerce
IBM Net.Commerce enables merchants to create electronic stores where they
can sell their products and services globally over the Internet′s World Wide Web
(WWW).Using Net.Commerce, merchants can update their product information
easily and tailor the way information is presented: create ″shopper groups″ and
offer their members special promotions or unique store views; track
demographic information that is provided by shoppers; and view purchasing
statistics.Shoppers around the world can browse online catalogs of products
and services, complete with descriptions and multimedia objects such as
graphics, photos, and video and sounds clips.They can place items in an
electronic ″shopping cart″, and then order them by providing credit card and
shipping information.With Net.Commerce, shoppers can complete transactions
from their own computers while avoiding crowds and checkout lines.
IBM Net.Commerce Version 3 and Version 2 are available.IBM Net.Commerce
Version 3 is available in two offerings.For business-to-business and
business-to-consumer, IBM Net.Commerce
Start is the solution for companies
investigating online opportunities.IBM Net.Commerce
Pro is designed for those
who want to maximize the benefits of their current electronic commerce
strategies.
IBM Net.Commerce Start and Pro can operate on either an IBM AIX, Windows
NT, or Sun Solaris platform.IBM Net.Commerce Pro is available on the OS/390
platform.Net.Commerce Version 2 is available on the AS/400 platform.
Net.Commerce, unlike many other electronic commerce software products, can
operate on a configuration that combines operating systems.With this
cross-platform compatibility, you can integrate IBM Net.Commerce with existing
systems and platforms, thereby minimizing resource needs and costs.
2.2 Payment
IBM Payment Suite and SET provide an end-to-end solution for secure payments.
Customers can shop the Internet with a bankcard.Bankcard data is passed to
the merchant in a digital envelope.This method prevents the merchant from
viewing the card number.The merchant passes the envelope, along with its own
digital identity, to its payment card processor for verification.The payment card
processor opens the envelope and submits the card information to the card
issuer for approval.Approval is communicated to the acquirer, the merchant,
and the cardholder.Each step of the process is included in the certification
authority digital identification process.
The SET Secure Electronic Transaction protocol has been jointly developed by
MasterCard International and Visa as a method to secure bankcard transactions
©
Copyright IBM Corp. 1999
7

over public networks.SET is being published as an open specification for the
industry.IBM is a significant contributor to MasterCard and Visa′s effort in
providing application code and testing resources.Interoperability is the key to
the ultimate success of SET.IBM Payment Suite products are therefore intended
to work with any other SET-certified product.
IBM Payment Suite is offered through four distinct software packages:

Consumer Wallet (for consumers)

Payment Server (for merchants)

Payment Gateway (for payment card processors)

Payment Registry (certification for SET protocol transactions)
Figure 1. Payment Suite
8
AS/400 e-commerce: Net.Commerce

2.2.1.1 Consumer Wallet
Consumer Wallet is a browser plug-in that provides everything needed to shop
with confidence on the World Wide Web: enhanced security, SET protocol
utilization, more convenience, and transaction routing (including certification).
Figure 2. Consumer Wallet:SampleWallet Screen
The Consumer Wallet application can′t be launched without first entering a
personal password or PIN so payment cards get an extra level of protection to
help keep them safe.All transaction data for a purchase is transmitted in
encrypted form (encrypted by SSL) on the Internet and can only be opened by
the card processor.Once the payment card processor has verified the card
purchase, the merchant is informed that payment has been approved, and the
purchase is complete.After the transaction, a Receipt of Order window opens
and displays the purchase requests and acknowledgments by merchants.
2.2.1.2 Payment Server
IBM Payment Server is a cash register on the Internet.For example, using IBM
Payment Server, credit cards can be accepted just as a salesperson accepts a
credit card in a store.Consumers wishing to make a purchase from the Web
site simply choose from a list of available payment methods.IBM Payment
Server is then activated.IBM Payment Server will handle the necessary
authorization requests and recording of the transaction in the company′s
database.This process happens automatically.With IBM Payment Server
money can be collected from consumers easily and with security.IBM′s flexible
framework ensures that the capabilities of the IBM Payment Server will grow
with the Internet: be enhanced as new methods of payment become available.
IBM Payment Server also manages the payment process, from communicating
with the consumer to drafts with your financial institution.Records of
transactions are maintained to facilitate later reconciliation and reporting.IBM
Payment Server includes a component to process digital certificates from an
organization using certificate authority software such as IBM Payment Registry.
IBM Payment Server is easily tailored to an industry, a way of doing business
and any existing technologies.IBM Payment Server supports the following
payment protocols available on the Web today:
Chapter 2.IBM e-commerce Offeri ngs
9


SET protocol for credit/charge card transactions

SET debit card transactions
IBM has developed payment cassettes containing the protocol for using each
type of payment.A new payment option is obtained by plugging in a new
cassette. Changes to the existing system are kept to a minimum.New payment
cassettes are being created as the technology becomes available on the
Internet.
Payments made by consumers flow to IBM Payment Server which communicates
with back-end systems such as financial institutions and payment processors.
IBM Payment Server handles all the payment transactions for the merchant and
acts as a ″payment server″ (using established network payment protocols)
alongside the merchant server or Web page.IBM Payment Server can be
customized to work with a merchant system using Web-based interfaces or APIs.
It is an open system, written in Java, and can run on multiple platforms.
IBM Payment Server contains a common payment API which is used for all
payment types and functions: receipt, approval, deposit and refund.This API is
implemented by the payment cassettes that contain the various types of payment
protocols.Based on the consumer′s selection of payment type, IBM Payment
Server selects the appropriate payment cassette to start the payment process.
IBM Payment Server is currently available for the following platforms:

An IBM S/390 running OS/390 Version 2 Release 4

An IBM RS/6000 workstation running AIX Version 4.1.5, or later with 64MB of
RAM

An Intel-based (or compatible) processor running Windows NT

A Sun SPARC (or compatible) system running Sun Solaris 2.5.1, or later with
64MB of RAM
And soon will be available for the AS/400.
2.2.1.3 Payment Gateway
IBM Payment Gateway is a payment processing application based on SET
standards that offers credit card protection for merchants and buyers.It allows a
merchant to be confident that customer approval and payment processing have
been performed with security.The buyer is similarly protected because the
merchant has been verified and the buyer′s credit card number has been hidden
from everyone except the acquiring bank.IBM Payment Gateway supports the
existing relationships of cardholders and merchants with their respective banks.
The IBM Payment Gateway is a part of IBM′s solution for SET which allows
protocol conversion and transaction routing for credit card processors.This
payment gateway enables the processor′s current transaction systems to accept
SET enabled transactions over the Internet with security.
IBM Payment Gateway is currently available for the following platforms:

An IBM S/390 Parallel Enterprise Server - Generation 3 or 4 and S/390
Multiprise 2000 models with Cryptographic Co-processor feature running
OS/390 Version 2 Release 4 with Integrated Cryptographic Services Facility
Version 2 Release 1
10
AS/400 e-commerce: Net.Commerce


An IBM RS/6000 workstation running AIX Version 4.1.5, or later with 128 MB
of RAM and an IBM 4758 PCI Cryptographic Co-processor running AIX
Version 4.1.5 or 4.2
2.2.1.4 IBM Payment Registry
IBM Payment Registry provides a certificate management infrastructure for
cardholders, merchants, and acquirers to facilitate more secure payments over
the Internet using the SET protocol.IBM Payment Registry allows issuing banks
to issue certificates to their cardholders and acquiring organizations to issue
certificates to their merchants.
IBM Payment Registry is a server-based application that provides issuing and
acquiring banks with the software needed to issue and manage digital
certificates within SET.It can operate as individual Certificate Authorities (CAs),
for example, a Cardholder CA and a Merchant CA, on separate machines.Or it
can be configured to allow multiple CAs to run simultaneously on a single
machi ne.
IBM Payment Registry supports online requests using protocols defined by the
SET specification for HTTP transmissions.Approval requests are completed
through a customer tailored interface.This interface allows the certificate
request to be processed immediately or deferred for further review by the
approver application.If approval is deferred, subsequent inquiries are required
to determine the status of the certificate request.
IBM Payment Registry is currently available for the following platforms:

An IBM S/390 Parallel Enterprise Server - Generation 3 or 4 and S/390
Multiprise 2000 models with Cryptographic Co-processor feature running
OS/390 Version 2 Release 4 with Integrated Cryptographic Services Facility
Version 2 Release 1

An IBM RS/6000 workstation running AIX Version 4.2, or later with 128MB of
RAM, the IBM 4755 Cryptographic Adapter, and the IBM 4754 Security
Interface Unit
2.3 Useful URLs
The following Web site provides useful additional IBM e-commerce information:
http://www.software.i bm.com/commerce
Chapter 2.IBM e-commerce Offeri ngs
11

12
AS/400 e-commerce: Net.Commerce

Chapter 3.Net.Commerce Overview
Net.Commerce is available for S/390, AIX, AS/400, Sun Solaris and Windows NT.
It is a merchant solution which provides a framework to conduct business on the
Internet in a
secure and scalable manner.It supports both business-to-business
as well as business-to-consumer environments.Net.Commerce works together
with a relational database and Secure Web Server to give users and companies
a simple and secure environment.Net.Commerce is architected to be scalable
to meet the needs of the small to very large business.Merchants can take
advantage of their existing operating environment and expand to larger systems
as their electronic traffic grows.
Figure 3. Net.CommerceOverview
Net.Commerce is a solution that allows merchants to set up stores and malls to
sell around the clock and around the world without risk.Better customer
relationships are built by providing what shoppers want, when they want it, and
by reducing response time.
Using the sophisticated Net.Commerce tools, merchants create customized,
real-time, dynamic catalogs, and allow consumers to perform shopping tasks,
such as selecting and ordering products, all on the Web.Setting up an
electronic store with Net.Commerce requires less time and money than
traditional marketing media and merchandising vehicles.Electronic shopping is
fun compared to fighting traffic jams, waiting in checkout lines, and carting
parcels.
©
Copyright IBM Corp. 1999
13

3.1 What Net.Commerce Offers
Net.Commerce offers the following functions and features.
3.1.1 Building an Electronic Site on the Internet
Whether a business is a small shop or a large department store, whether it
offers products or services, wholesale or retail, a business can be put on the
Web with Net.Commerce.You can build one store or a mall that showcases
several stores.
Net.Commerce provides a demo mall that can be used as a template to speed
up the development of an operation or the customization of a mall or stores.
Figure 4. Net.CommerceDemomall Front Page
3.1.2 Dynamic Shopping Trip
With Net.Commerce, information about merchandise is dynamically extracted
from the database each time a shopper views the online store.A store can be
quickly tailored to changing markets and profit from emerging trends.
With Net.Commerce, a merchant can build relationships with shoppers using the
information collected during shoppers′ visits and then develop and implement
consumer-centered direct marketing strategies within the online store.Different
14
AS/400 e-commerce: Net.Commerce

promotion schemes can be applied for the same product for different shopper
groups.
A template designer tool is provided to aid the creation of visually appealing
windows and pages.Specially designed effects can be included such as 3D
graphics, animation, sound, and Java Applets to create a unique look to the
store front.
Using APIs, the electronic store can be linked to existing legacy applications
such as an inventory management system.
Net.Commerce allows for different shipping carriers and lets the customer define
the shipping charges.
3.1.3 Easy Way to Manage the Electronic Store
Net.Commerce provides tools to allow the store to be easily managed.These
tools allow store information to be quickly updated, such as product descriptions
or prices with an online form.
3.1.4 Protecting Site Information
The Net.Commerce database is protected against unauthorized access.Only
authorized people with the correct password have access to the database.The
shopper′s data is also protected.Each shopper logs on with a unique ID and
password.
The shopper′s credit card data is protected using SSL.
Chapter 3.Net.Commerce Overvi ew
15

3.2 Net.Commerce Components
IBM Net.Commerce has two main components:

Net.Commerce Server

Net.Commerce Admi ni strator
The following figure shows the complete Net.Commerce system.
Figure 5. TheNet.CommerceSystem
3.2.1 Net.Commerce Server
The Net.Commerce Server is composed of the Net.Commerce Server Director
and the Net.Commerce Server Daemon.
Server Director:Using the Transmission Control Protocol/Internet Protocol
(TCP/IP), the server director receives requests from the Secure Web Server and
directs them to the Server Daemon, returning responses to the Secure Web
Server.The Server Director is a Common Gateway Interface (CGI) program.
Server Daemon:The server daemon receives requests from the server director,
executes macros, and returns results from the database to the server director
controlling the shopping process.
16
AS/400 e-commerce: Net.Commerce

3.2.2 Net.Commerce Administrator
The Net.Commerce administrator consists of three tools for creating and
maintaining an electronic store: the Site Manager, the Store Manager, and the
Template Designer.These tools use HTML, Java, and JavaScript pages.To
access them, you need Netscape Navigator 4.04 (or above) with JDK 1.1 or
equivalent.Each tool is described briefly below.
Figure 6. Net.CommerceAdministrator
The Net.Commerce Administrator is comprised of:
Site Manager Used to create and maintain the overall site.
Store Manager Used to create and maintain stores within the site.
Template Designer Used to create and maintain site and store Web
pages.
Net.Commerce Site Manager:The Net.Commerce site manager is used by the
mall administrator to create the infrastructure for the online mall or store(s).
The site manager is used to perform these tasks:

Create and manage the mall′s home page.

Assign site and store access, to ensure that only authorized individuals are
given access to the database.

Add and delete stores from the site.

Maintain a list of shipping carriers.
Chapter 3.Net.Commerce Overvi ew
17


Assign scope to tasks, which dictates whether some aspects of the shopping
process, such as ordering, can be customized by stores.

Manage site-based data, including any customized store APIs or macros.

Change shopper information in the database.

Use all the functions in the Store Manager.
To run the site manager functions, click on the SITE MANAGER button.
Figure 7. Net.CommerceSiteManager
Mall Information Defines the mall front page and directory of stores
and specifies the various directories for the
appropriate files.
Access Control Displays the access control form and the store
authorities form.
Store Records The store records form.
Task Management Customizes mall, store or shopping tasks.
Shopper Information Displays the shopper information form.
Shipping Providers Creates and maintains a list of shipping companies.
Template Designer Creates and modifies templates for your mall home
page.
18
AS/400 e-commerce: Net.Commerce

Net.Commerce Store Manager:The Net.Commerce store manager is used to
create and maintain online catalogs inside the store with different product
categories, to assign shopper groups and to view shopper information.
The store manager is used to perform these tasks:

Create and maintain store pages, product categories, and shopper groups.

Enter and update information about the store and its products or services.

View information about shoppers, add shoppers to shopper groups, and
assign numbers to shoppers if desired for record-keeping purposes.

Delete stock from the store.
To run the store manager functions, click on the STORE MANAGER button.
Figure 8. Net.CommerceStoreManager
Store Information Add and update store information.
Product Categories Creates paths to navigate through your store.
Product Information Add and maintain products and services information.
Discount Defines different discounts which may apply at
different times, for different shopper groups.
Shipping Services Displays shipping codes and defines the way
products will be shipped.
Chapter 3.Net.Commerce Overvi ew
19

Template Designer Allows for the design of Web pages for the store.
Shopper Groups Allows for the creation or modification of store
shopper groups.
Customer Information Displays all customer data.
Order Information Displays the status of all orders.
Net.Commerce Template Designer:The Net.Commerce template designer is a
tool for creating and updating the dynamic Web pages that shoppers will see.
Each Web page is dynamically linked to the Net.Commerce database, ensuring
that shoppers will always see up-to-date product information.By establishing
consistent designs, shoppers will be presented with a consistent ″look and feel″
for the store.The template designer provides a semi-WYSIWYG (What You See
Is What You Get) interface that displays the designs as they are developed (see
Figure 9 on page 21).It converts the designs into the appropriate HTML tags
and SQL statements, thereby saving significant programming effort.Each
template can be reused for multiple store products and items.Once a design is
created it can be saved as a template and used for different pages with the
same nature.For example, regularly priced products may use the same
template and discounted products may use another one.
The template designer is used to perform these tasks:

Automatically add database information to Web pages.

Include HTML tags.

Create tables and forms.

Add hypertext links.

Move, drag, and cut and paste objects.

Include multimedia objects.

Change SQL statements.

View and test created pages.
20
AS/400 e-commerce: Net.Commerce

Figure 9. TemplateDesigner
The designer′s WYSIWYG interface translates your design into HTML.Also, you
can customize the macros that work with SQL and HTML for accessing
information from the database.As a result, the Net.Commerce site works with
dynamic pages allowing a store to be quickly and easily set up and maintained
on the World Wide Web.
3.3 Net.Commerce Additional Components
The following additional products are required with the Net.Commerce Server:

IBM Secure Web Server establishes a secure connection between the
Net.Commerce Server and the Shopper.Order 5769-NC1 (US and Canada)
or 5769-NCE (International) IBM Internet Connection Secure Server.
V4R3
For V4R3, order 5769-DG1 IBM HTTP Server for AS/400 plus one of the
following Cryptographic Access Providers:

5769-AC1 Cryptographic Access Provider 40-bit

5769-AC2 Cryptographic Access Provider 56-bit

5769-AC3 Cryptographic Access Provider 128-bit
Chapter 3.Net.Commerce Overvi ew
21


IBM DB2 Relational Database holds mall, stores, catalogs, products, and
shopper information.This is supplied as a part of the operating system
(OS/400).

IBM Net.Data is an IBM environment that retrieves data from the relational
database and formulates it in an HTML format for Internet display.This is a
part of the OS/400 TCP/IP connectivity utilities for V4R2.
V4R3
It is a part of the HTTP Server for AS/400 V4R3 and is shipped with
OS/400.
All the above mentioned components communicate with each other using the
TCP/IP protocol.
3.4 Net.Commerce APIs
To allow for the integration of Net.Commerce with back-end or other legacy
applications, APIs are provided.Some of the APIs supplied with Net.Commerce
are:

Regi strati on management

Inquire and update inventory

Orders tracking

Selling and cost price calculation

Tax calculation

Discount schemes

Shipping charges calculation and shipping selection criteria

Payment checking
For more information on Net.Commerce APIs, please refer to the online help on
http://<your_host_name>/nchelp/index.htm.
3.5 Useful URLs
The following Web sites provide useful, additional IBM Net.Commerce
information:

http://www.software.i bm.com/commerce

http://advisor.internet.i bm.com
22
AS/400 e-commerce: Net.Commerce

Chapter 4.Net.Commerce for AS/400
Net.Commerce for AS/400 consists of the following major components:

Net.Commerce Admi ni strator

Net.Commerce Server

IBM Internet Connection Secure Server (ICSS) for AS/400, Version 4.2 (a
licensed product that must be purchased separately)
V4R3
HTTP Server for AS/400 Version 4.3 with one of the Cryptographic Access
Providers, 5769-AC1, 5769-AC2 or 5769-AC3.

IBM DATABASE 2 for OS/400 (which comes with the system and does not
need to be installed separately)

IBM Net.Data for AS/400 (part of the TCP/IP Connectivity Utilities for AS/400)
V4R3
This is a part of the HTTP Server for AS/400 V4R3.
Figure 10. Net.CommerceComponents
The first two components, Net.Commerce Administrator and Net.Commerce
Server, serve to tie the whole system together and provide the functionality
needed to conduct commerce over the Internet.The last three components are
separate products that can be used to meet a variety of requirements in many
computing environments.
©
Copyright IBM Corp. 1999
23

4.1 The AS/400 Net.Commerce Server
The Net.Commerce Server consists of the following components:

The Net.Commerce director

The Net.Commerce daemon
Figure 11. TheNet.CommerceServer
4.1.1 Net.Commerce Daemon
The Net.Commerce daemon is the component that actually services the requests
coming from the shopper.The Net.Commerce director, on receiving a command
decides what has to be done, such as the execution of an API, and hands it over
to the Net.Commerce daemon for execution.The Net.Commerce daemon allows
a single Net.Commerce director to handle multiple shoppers in multiple malls
easily, while still providing good response times to the shoppers.
The Net.Commerce server daemon displays store pages dynamically by
retrieving the current data from the Net.Commerce database.It maintains a
continuous connection with the database.The daemon controls the process of
shopper registration.It uses the Secure Sockets Layer (SSL) protocol and
access control, which provides security to shoppers through the use of keys.
Note:Throughout this book, the server daemon will be referred to as the
Net.Commerce server.
Net.Commerce Server Instances:The Net.Commerce product can service
multiple shopping malls from the same AS/400 Server.Each shopping mall is
serviced by one instance of the Net.Commerce application, which keeps the data
and operations of shops and shoppers in each mall separate from the other
mal l s.
24
AS/400 e-commerce: Net.Commerce

You can have more than one instance of the Net.Commerce daemon running on
both a single-machine and multiple-machine configuration.A machine with
multiple instances on it is called a multi-home machine, because it can be
referenced by more than one IP address.Each Net.Commerce instance is
connected to a separate database collection.Each database collection holds
only one mall or store.
Note
A separate license must be purchased for each Net.Commerce instance on a
mul ti -home machi ne.
Each Net.Commerce instance has a unique name, is tied to a unique IP address
and has a unique HTML root.The HTML root is the path where instance specific
data is stored for the proper operation of the Net.Commerce instances.All data
for the shopping mall is stored in a library of the same name as the instance.
Every Net.Commerce server instance shares the Web Server instance
QNETCOMM and the Net.Commerce director program.Each Net.Commerce
instance is associated with its own service processes, which help execute the
request.When the instance is created you can specify the number of service
processes that are to service that instance.You can request that more than one
service process be created for each Net.Commerce instance.The more service
processes there are for an instance, the better the instance is at servicing
multiple requests at the same time.However, the number of processes has to
be balanced with the capabilities of the AS/400 used.By default, two service
processes are created per instance of Net.Commerce.
When a Net.Commerce instance is started, the daemon starts one job for the
instance called QNETCOMM, and one or more service processes called
MSERVERD under the username of the instance in the QSYSWRK subsystem.
For example, when the MALL1 instance is started, there are (assuming that two
service jobs were requested) two active MSERVERD jobs in the QSYSWRK
subsystem, as shown in Figure 12.


Work with Active Jobs AS1
11/24/97 15:18:07
CPU %:12.3 Elapsed time:00:26:57 Active jobs:120
Type options, press Enter.
2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message
8=Work with spooled files 13=Disconnect ...
Opt Subsystem/Job User Type CPU % Function Status
QSYSWRK QSYS SBS.0 DEQW
MSERVERD MALL1 BCI 1.4 MTXW
MSERVERD MALL1 BCI 2.1 TIMW
QNETCOMM MALL1 BCH.1 PGM-QNETSTRNCS EVTW


Figure 12. WRKACTJOB:Verifyingthat Net.CommerceServer isRunning
Chapter 4.Net.Commerce for AS/400
25

4.1.2 Net.Commerce Director
The director is the component of Net.Commerce that receives requests from the
QNETCOMM Web server instance and decides what action to take based on the
request.Then, it passes the request to the daemon associated with the
Net.Commerce server instance for the action to be executed.When the request
has completed, the director then sends the results to the QNETCOMM Web
server for display to the user who requested the action.The director
communicates via a TCP/IP port with the daemon.The port used is specified in
the Net.Commerce configuration.
On the AS/400, the director is a CGI-BIN program called NCOMMERCE.PGM.
The QNETCOMM Web server passes commands to the director which then does
one of the following:

Executes the command directly via the daemon

Invokes a Net.data macro

Invokes an API task

Any combination of the above
Commands can either be User Interactive (UI) or Non-Interactive (non-UI).
Non-UI commands do not require any user interaction and do not return anything
directly to the user.Non-UI commands process and write information to the
Net.Commerce database.For some non-UI commands, the Net.Commerce
system calls APIs for part of the processing.You can create an API program to
change the way such commands process information.
UI commands retrieve information from the Net.Commerce database and display
it on HTML pages for a mall or store.They achieve this by calling Net.data
macros that contain SQL statements, HTML tags, and Net.Data language
statements, all of which you can modify to control what is being presented and
how.
The director accepts commands via CGI-BIN style syntax.When you type a
command in a macro, use the following conventions:

Ensure that there are no spaces between keywords, delimiters, and
variables.

Enter parameters in any order.

Enter keywords in lowercase.

Enter variables that represent column names and table names in lowercase.

Replace spaces in values with plus signs (+).
The Net.Commerce director command syntax is as follows:
26
AS/400 e-commerce: Net.Commerce

Net.Commerce Director Command Syntax
──http://──host
_
name──/─ ──┬ ┬─cgi-bin─── ─/ncommerce/──;───────────────
└ ┘─msprotect─
──command
_
group─ ──┬ ┬────────── ────────────────────────────────────────
└ ┘─/command─
─ ──┬ ┬────────────────────────────────────────────────── ──────────────
│ │┌ ┐──
───────────────────────────
└ ┘──?first
_
parm=value ───

┴┬ ┬─────────────────────────
└ ┘─&──other
_
parm──=──value─
Where:
host_name The fully-qualified name of your server.
cgi-bin An indicator that the command is to be processed for nonsecure
sessions.A nonsecure session is one in which the shopper does not
provide a password.This includes shoppers who have not registered
with your mall, and registered shoppers who access your store
anonymously as unregistered shoppers.In most situations, the
Net.Commerce system automatically detects whether a session is
secure, and substitutes msprotect in the URL if appropriate.Al ways
specify cgi-bin in the URL, except in the situation that is described
under msprotect.
msprotect An indicator that the command is to be processed for secure
sessions.A secure session is one in which the shopper provides a
password.msprotect forces the Web server to authenticate the user
by asking for a user ID and password.This is achieved by the
msprotect Protect block in the Web server configuration file.For a
secure session, Net.Commerce replaces cgi-bin with msprotect in the
URL.The only situation in which you must specify msprotect
explicitly is for the button or hyperlink for which you want the shopper
to enter a logon user ID and password.
command_group There are seven command groups:
addrbk Non-interactive commands related to the address book
display Commands related to catalog browsing
execmacro Commands related to executing macros
order Commands related to order handling
register Commands related to shopper registration
shipto Commands related to shipping
shopcart Commands related to the shopping cart
command Commands are available for some command groups.A command
performs a specific task in the command group.For example, the
Add command in the Addrbk command group adds an address book
entry.The following is a list of all commands under their command
groups.
addrbk add, update, delete
display category, item
execmacro commands related to executing macros
order cancel, display, list, process, unlock
register form, modify, new
shipto delete, display, list, process, update
shopcart delete, display
Chapter 4.Net.Commerce for AS/400
27

Detailed documentation of command groups and commands, and how
they map to various macros and API tasks is available in the online
documentation for Net.Commerce at the following URL:
ht t p://<your_host _name>/nchel p/nav/rnavi ndx.ht m
first_parm=value The first parameter value pair of a command, if any, is
separated from the command by a question mark.
other_ parm=value All other parameter value pairs, if any, are separated in the
command line with the ′&′ symbol.The first and other parameter
value pairs are used to pass parameters to the command.
Example
You can tell the director to add an entry to the address book of the shopper
with the reference number ABCD and nickname XYZ by using the following
command:
http://www.mall1.com/msprotect/ncommerce.pgm/;
addrbk/add?sashnbr=ABCD&sanick=XYZ
An exception to this syntax is the Execmacro command, which has a syntax of
the form:
http://<your_host_name>/[cgi-bin | msprotect]/ncommerce/;
execmacro/macro_name /[HTML_section]/parameters
Figure 13 shows how the Net.Commerce director commands are used during a
typical shopping trip.
Figure 13. Net.CommerceCommands
28
AS/400 e-commerce: Net.Commerce

4.2 Secure Web Server for AS/400
The secure Web server works very closely with Net.Commerce, providing the
means by which Net.Commerce interacts with shoppers across the Internet.
The Internet Connection Secure Server (ICSS) is the licensed product of the
AS/400, and provides the secure Web server functions.
V4R3
The HTTP Server for AS/400 with one of the following licensed products gives
the secure Web server functionality:

5769-AC1 Cryptographic Access Provider 40-bit

5769-AC2 Cryptographic Access Provider 56-bit

5769-AC3 Cryptographic Access Provider 128-bit
The following persons use the secure Web server to interact with Net.Commerce:

The shopper

The Net.Commerce administrator, possibly the merchant who maintains the
store or mall

The Net.Commerce configurator, who creates, modifies and deletes
Net.Commerce instances, and does other system maintenance tasks
When Net.Commerce is set up, it creates a QNETCOMM Web server instance
that is used to service all interaction between a shopper and Net.Commerce.
The QNETCOMM Web server instance listens for http requests on the default
port 80 and for https requests on the default port 443.Whenever a page related
to Net.Commerce is requested by a shopper, the Secure Web Server passes the
request to the Net.Commerce director to process.
The secure Web server is also responsible for implementing password validation
for Net.Commerce requests.All secure requests by a registered shopper are
validated against a validation list maintained by Net.Commerce for each instance
of Net.Commerce.When a shopper registers, the user ID and password are
stored in this validation list.The secure Web server then ensures that private
information related to that shopper requires the user ID and password to access.
This is accomplished using the msprotect Protect block in the configuration file.
The secure Web server also encrypts the conversation between the shopper and
Net.Commerce so that sensitive information like credit card numbers can be kept
safe.
The Net.Commerce Administrator, which allows access to the site manager, the
store manager and the template designer is accessed through the secure Web
server using Netscape 4.04 (or above) or equivalent with JDK 1.1.Access to the
Net.Commerce administrator is through SSL using a validation list to
authenticate the user.It is not possible to execute the Administrator from the
AS/400 command line.
The secure Web server also provides the configuration interface for
Net.Commerce.Net.Commerce instances can be created, modified, deleted,
started or stopped using the *ADMIN instance of the secure Web server.Access
to this instance is restricted by an AS/400 user ID and password that must have
sufficient rights.This access is also enforced by the secure Web server.
Chapter 4.Net.Commerce for AS/400
29

However, it is also possible to start and stop the Net.Commerce server through
the command line of the AS/400.
For additional information on the V4R2 ICSS, please refer to
Webmaster′s Guide,
GC41-5434 or the redbook
AS/400 e-commerce: Internet Connection Servers,
SG24-2150.
V4R3
For additional information on the V4R3 HTTP Server for AS/400, please refer
to
HTTP Server for AS/400 Webmaster′s Guide, GC41-5434.
4.3 IBM Database 2 for AS/400
The Net.Commerce database contains the information entered about the store
and merchandise, and information about the shoppers who order from the store.
Net.Commerce for AS/400 uses IBM Database 2 (DB2), which is included in the
OS/400 operating system.For information on DB2 for AS/400, please refer to
DB2 for AS/400 Database Programming, SC41-5701.
4.4 Net.Data for AS/400
Net.Data is a CGI program that interprets macros and allows the creation of
dynamic Web pages.A dynamic Web page, unlike a static one, can contain
information which changes with time and context, such as the current level of
inventory of a requested item.Net.Data provides a simple macro language that
incorporates HTML tags, SQL statements, logical constructs and a rich function
set that helps create such pages easily.
A Net.Data macro contains Net.Data directives, HTML tags or SQL statements in
plain text.This can be created with any text editor and reside either in the IFS
or in an AS/400 object.The macro is invoked through the Secure Web Server,
which uses the Net.Data CGI program to execute the requested macro.
Net.Commerce uses Net.Data macros to display dynamic pages for stores and
malls, containing updated information customized to the shopper.You can add
your own macros or modify the existing macros to refine the presentation of a
mall in Net.Commerce.
Net.Data is available as part of the TCP/IP Connectivity Utilities for AS/400 V4R2
and comes with the OS/400 operating system.
V4R3
Net.Data is part of the HTTP Server for AS/400 V4R3, and also comes with the
OS/400.
For additional information on Net.Data for AS/400, visit the AS/400 Net.Data Web
site at:http://www.as400.ibm.com/netdata
30
AS/400 e-commerce: Net.Commerce

4.5 Useful URLs
The following Web site provides useful additional AS/400 information:
http://www.as400.ibm.com
Chapter 4.Net.Commerce for AS/400
31

32
AS/400 e-commerce: Net.Commerce

Chapter 5.Planning for Net.Commerce
In this chapter, we look at some of the planning considerations that should be
taken into account before implementing Net.Commerce.
Figure 14 illustrates the steps to implementing a Net.Commerce site.
Figure 14. Net.CommerceImplementationandPlanning
Net.Commerce is a powerful product that lets you sell either products or
services over the Internet, whether you are a small retailer or a large
wholesaler.The following are some preliminary considerations that should be
taken into account prior to starting a Net.Commerce implementation.We
consider the following areas:

Presence on the Internet

Mall or store

Setting up an implementation plan

Page design

Single or multiple system implementation
5.1 Presence on the Internet
A Net.Commerce implementation can take the form of simply a presence on the
Internet to shopping with electronic payment:
Presence displays products or services over the Internet.
©
Copyright IBM Corp. 1999
33

Shopping gives shoppers the possibility to surf a site, choose products and
place orders.Payment is performed separately using either electronic
mailing, cash on delivery or any other non-electronic method.
Shopping and electronic payment gives shoppers the possibility to surf,
choose, place orders and then securely pay for their orders over the Internet.
Payment should be secured with a secure payment process such as the use
of SSL and SET.
The above three ways are applicable whether the implementation is an
electronic mall or a single store.
An implementation could start with just a presence then move on to shopping
and ultimately electronic payment.
If implementing as a merchant, you are targeting
Internet users with a relatively
above average income.
If implementing as a wholesaler, you are targeting
your agents.
The following is a list of some products and services sold today on the Internet:

Books

CDs

Computers

Software

Arts and crafts

Vacation packages

Airline tickets

Train tickets

Opera tickets

Gambl i ng

Propriety information

Medical supplies
5.2 Mall or Store
Net.Commerce supports the implementation of a single store on the Internet or a
complete shopping mall comprising multiple stores.With a mall implementation,
stores that complement each other can be placed together such that shoppers
surfing one store can search through the contents of other stores also.
5.2.1 Single Store
A store′s size may vary, so we will assume that a small store consists of the
following categories:

Two main categories

Twenty subcategories

One hundred products
and a large store consists of the following categories:

Ten main categories

One hundred subcategories

Ten thousand products

Connection to legacy applications such as inventory management and
accounts payable.
34
AS/400 e-commerce: Net.Commerce

Small stores are unlikely to have specifications for all of their products in a
database and in most cases are not automated.
Unlike small stores, large stores usually have a database with complete
specifications of their product lines in addition to a dedicated staff to maintain it.
A small store can be maintained using Net.Commerce′s built-in editing tools.
Depending on the products that the merchant sells, editing may be needed more
or less frequently.
In the case of a large store, the merchant probably does not rely on the
HTML-based customization forms provided by Net.Commerce.Updating
information of 10 000 products is a lengthy process (five pages per product) and
the store administrator prefers to have direct access to the database columns
and tables to change prices, description, availability, and so on.
A small store may host both the Web server and database on the same server
(which does not need to be dedicated).This server may run locally or be hosted
at a third party site.In that case, the system administrator is responsible for
communicating the electronic orders to the merchant, either by fax or e-mail
system.The administrator might also be responsible for communicating orders
to manufacturers or shipping carriers.
For large stores, the company has to decide whether to use an existing database
or create a new one for Net.Commerce.System security may be a consideration
when making this choice.Especially for mission-critical systems, speed and
reliability should not be affected by adding an online Net.Commerce application.
The Web servers and the database might be on separate machines.You may
use a faster machine for the front-end Web server.
If you use multiple front-end systems, there must be a way to divide the
incoming requests over the multiple systems such as a network dispatcher.
5.2.2 Mall
A mal l ′s size may vary from two stores up to 50 stores or more with a different
number of categories, subcategories, and products.
In all cases, the mall is maintained by a dedicated staff, which may be a small
content hosting company doing this as their main business.The mall
administrator has the responsibility of running the electronic mall.Activities
include:

Keeping the hardware running and up-to-date.

Administering the mall (site manager).

Writing applications to run in the mall or connecting to legacy applications.

Helping merchants design their stores.

Running a help desk for merchants and/or customers.
Maintenance depends on the nature of stores and how merchants want to run
their own stores, (for example, stores may share a common database, server,
security setup, and so on).Some stores may want their own shopping cart,
navigation, and ordering process while some may not.You can use the task
manager to customize which macro or API to use for a specific task for each
store.
Chapter 5.Planni ng for Net.Commerce
35

The merchants may sell products of the same nature and sometimes from the
same manufacturer so the use of search tools across the mall is useful to
shoppers.
In all cases, the site administrator has to define each shop′s front page and its
personalized data.
For more information about setting up an e-business, please refer to
http://advisor.internet.ibm.com/
5.3 Setting Up an Implementation Plan
The Net.Commerce implementation plan should include the following areas.
5.3.1 Marketing Plan
A marketing plan should be developed that outlines the current state of the
business, the results expected to be achieved through electronic commerce, and
a plan to achieve them.By clearly defining such things as the targeted market,
customer needs, suitable products, existing and required resources, you will be
better positioned to implement the processes required to achieve these goals.
5.3.2 Evaluate the Current System
The current system should be evaluated to determine whether it can be used as
the basis for the electronic commerce site.For example, if there is already a
Web site that contains pages displaying products, it may be possible to use
these pages in the electronic commerce site.
The current fulfillment and shipping processes should be evaluated to be sure
that they are capable of fulfilling the electronic orders and physically shipping
products to customers.
Current back-end or legacy applications such as inventory management and
accounts receivable have to be integrated with the electronic store.
Net.Commerce provides APIs that allow this integration to be achieved.
However, these APIs require programming skills.
5.3.3 Estimate the Site Activity
Estimating the anticipated site activity allows for the more accurate
determination of hardware requirements.A single-machine configuration may
not be able to handle the number of hits to an electronic store belonging to a
well-known company, frustrating both the merchant and shoppers with long
delays.On the other hand, a home-based entrepreneur may find such a
configuration both adequate and affordable.A little research before hand can
help avoid costly errors.
5.3.4 Prepare the Infrastructure
Listed below are some of the Net.Commerce infrastructure implementation
steps.
1. The hardware requi rements for AS/400 Net.Commerce are:

A minimum of 32MB of system memory (64MB is recommended)

A minimum of 4Gigabytes (GB) of total system DASD storage (8GB is
recommended).
36
AS/400 e-commerce: Net.Commerce


A CD-ROM drive
AS/400 Model
When deciding on the AS/400 model to be used, consideration should be
given for the complex nature of Net.Commerce command processing (CGI
programs may run, the database accessed, etc.).The system is likely to
be doing much more that simple HTML page serving!
Net.Commerce is configured through a Web browser.An additional
hardware requirement is therefore a workstation, such as a Pentium, running
a Web browser, such as Netscape.Plus:

A mouse or other pointing device

A local area network (LAN) adapter that is supported by the TCP/IP
protocol

A graphics-capable monitor
2. The software requi rements for AS/400 Net.Commerce if used i n conj uncti on
with OS/400 V4R2 are:

OS/400, Version 4, Release 2

IBM Net.Data for AS/400, V4R2 (shipped as part of the TCP/IP
Connectivity Utilities for AS/400)

TCP/IP Connectivity Utilities for AS/400 (product 5769-TC1)

IBM Internet Connection Secure Server (ICSS) for AS/400 V4R2 (product
5769-NC1 or 5769-NCE)

IBM DB2 for OS/400 (shipped with OS/400)

Net.Commerce for AS/400 (product 5798-NC2)
V4R3
The software requirements for AS/400 Net.Commerce if used in
conjunction with OS/400 V4R3 are:

OS/400, Version 4, Release 3

IBM Net.Data for AS/400, V4R3 (shipped as part of the HTTP Server
for AS/400)

TCP/IP Connectivity Utilities for AS/400 (product 5769-TC1)

IBM HTTP Server for AS/400 V4R3 (product 5769-DG1)

Cryptographic Access Provider (product 5769-AC1 - 40-bit, 5769-AC2 -
56-bit or 5769-AC3 - 128-bit)

IBM DB2 for OS/400 (shipped with OS/400)

Net.Commerce for AS/400 (product 5798-NC2)
3. A server certificate must be acqui red from a certifying authority.
4. A Web browser is requi red to access the Net.Commerce admi ni strati on tools.
The browser must support:

Secure Sockets Layer (SSL)

Java and JavaScript

Tables and frames

Cookies
Net.Commerce supports the following Web browser:Netscape Navigator
4.04 (or above) or equivalent with JDK 1.1.
5. We recommend that you install IBM AS/400 Client Access for Windows 95/NT
on your workstation.
Chapter 5.Planni ng for Net.Commerce
37

6. You need to prepare (or obtain) pictures for al l the products to be made
available through the electronic store.
7. Design a front page.
8. Design a product hi erarchy.
9. Identify authori zati on and who i s to act as the el ectroni c store admi ni strator.
10.Use the supplied APIs to cater to specific requirements.Some of the APIs
that may be used are Registration management, Inventory Inquiry and
update, Order tracking, Selling and cost price calculation, Tax calculation,
Discount schemes, Shipping charges calculation, Shipping selection criteria
and Payment checking.
11.Design product pages.
12.Enter product data into the Net.Commerce database.
13.Integrate the electronic store with legacy applications such as inventory
management system and accounts receivable.
14.Before going online, you need to heavily test the site.There is nothing
worse for an electronic shopper than getting an error message.
15.Do not forget also to continuously review any changes made to the linking
between pictures or pages.
5.4 Tips for Page Design
It is important that the store presents a professional image.Professional looking
pages are required that fit the image the store is to create.In the case of a real
store, we judge the store by the way the building, staff, catalog, and advertising
look.The Web pages, which substitute almost all these items, should look good
as well.
For selling products over the Internet, you need to find the right balance between
″hi p″ pages that look nice but are not functional or boring, and business-like
pages.Remember, the store is selling products so make it easy to order those
products.
Let a professional graphic designer who is experienced in designing interactive
media and images do the page layout.Shoppers browsing the net are used to
nice pictures and well-designed pages.A nice design makes them want to come
back more often.
Do not underestimate the graphical design of your Web pages!
In general, consider the following things before designing a Web page.
5.4.1 Using Recognizable Styles
Try to find a basic layout that appears on all the pages and is unique for your
company.This includes headers, footers, colors, fonts, location of images and
so on.
Net.Commerce provides a template designer that can be used to design macros
(dynamic HTML pages that interact with the Net.Commerce database).However,
the template designer may not be sufficient for professional looking HTML pages.
It may be better to use a dedicated HTML editor for this task.These programs
offer more control over the layout of the page and also offer the latest HTML
additions.Although some editors claim WYSIWYG control over the pages they
38
AS/400 e-commerce: Net.Commerce

create, it is still the browser that does the final formatting, so check the
appearance of created pages regularly using popular browsers to avoid
surprises.
Note:If you decide to edit the macros using a text editor, do not expect the
Net.Commerce template designer to further edit the file.It is not built to
interpret these changes.
5.4.2 Using Graphics and Colors
Web pages should not look the same as lists on a 5250 screen.However, the
pages should not be overloaded with too many fancy pictures or animations that
take a long time to load.Keep in mind that a lot of users still have slow
connections to the Internet.
5.4.3 Using Templates
Use different layouts for different product categories.You certainly want to use
another background picture or text font for winter coats than for summer
swi msui ts.
5.4.4 Using Headers and Footers
Create headers that include the company logo, colors, and slogans that are also
used in other media.The footer can be used for links to the shopping cart, the
order pages, and back to the product and category pages.The footer can also
be used to add links to sales offerings or to general product categories that
might be interesting for all shoppers (for example, candies or fancy mousepads).
More complicated designs can be created that show the shopping cart all the
time, or show the category and product pages together.
Note:Not all browsers support frames, so do not forget to include a notification
of some sort on pages when using advanced HTML features.Pages without
frames may also be included for the benefit of those users whose browsers
cannot support them.
5.4.5 Using a Common Set of HTML Features
Try to use a subset of HTML features that most browsers support.There are
many HTML extensions that can be used to produce fancy graphics, animations
and so on but can only be viewed with the latest browsers or special browser
plug-ins.It might deter shoppers from visiting the site if they are forced to
change to another browser or obtain and install additional code for viewing.Use
these enhancements if that is the only way to make an impression, and only for
″nice-to-have″ features, not for essential information.Be aware of the target
group.Is it young people that want to keep up with the latest technology or are
the customers people that look at browsers as a necessary tool.
5.4.6 Using Images and Image Formats
Perhaps the most important factor in the look of a catalog is the pictures.It is
important to do this right.
Produce images (photos) of all the products to be sold through the Internet.Do
not underestimate this step.These pictures must be of good quality and contain
just the product.Do not use photos of the whole family of products on all
product pages.Likewise, do not use badly scanned images from brochures with
text across the picture.
Chapter 5.Planni ng for Net.Commerce
39

Making pictures is expensive and time consuming.Try the manufacturer of the
products you are selling for good images of all products.These images need to
be in JPEG or GIF format.These two image formats are different.
JPEG images can contain up to 16 million colors but they use ″lossy″
compressi on.The image degrades during compression, but the file size is just a
fraction of the original.Some image-editing programs such as PaintShop Pro
(available as shareware on the Internet) or Adobe Photoshop allow you to
specify the compression ratio.The higher the compression ratio, the lower the
file size, but also the lower the quality of the image.Also, during the editing
process in some programs you lose quality every time you open a picture and
save it as JPEG.In color photos, even large compression is hardly visible.You
need to experiment to find the optimum level of compression.
For graphics using plain colors, JPEG images are less suitable because of the
distortion that comes with the data compression.GIF images are better for
these types of graphics.GIF images can contain only 256 colors and use only
non-lossy data compression, so they can be fully reconstructed.Most programs
allow reducing the number of colors to 128 or even less to further decrease the
file size.Here also you have to try to find the best solution.
GIF images allow for a ″transparent color″.Some editors allow you to designate
one color to be transparent, so that the background (color or image) shines
through.This gives the picture a nice, integrated look.When designing your
own graphics, use the anti-aliasing option that most editors have to get the
edges more fluent.When using a transparent background, anti-alias to the color
that best describes your background.
You might omit images for self-explaining items such as a memory extension for
a PC.However, in general, your customers prefer buying things they have seen
in advance.
5.4.7 Using Different Layouts for Different Customers
Net.Commerce supports registered and non-registered shoppers.If a shopper
has registered and entered personal information such as age, gender, income,
address, job and so on, you can use this data to show special sales offerings to
them, or to use different page layouts.
5.5 IBM Service Offerings for e-commerce
A family of services is available from IBM Global Services that help companies
of all sizes use networks and Internet technologies to transform their internal
business processes (via intranets); their business relationships (via extranets);
and the buying and selling of goods, services and information (via electronic
commerce).
These services help a customer across all stages of an electronic project
implementation from planning for an e-business application, to architecting,
constructing and even outsourcing management and operations.
IBM′s e-business Services fall into the following six categories:

IBM e-business Advisory Services

IBM e-commerce Services

IBM Intranet/Extranet Services
40
AS/400 e-commerce: Net.Commerce


IBM Managed Data Network Services

IBM Security Services

IBM Distributed Learning Services
In this chapter, we briefly discuss the first two offerings.For more information
on all offerings, please refer to the IBM internal Web page
http://w3.ibm.com/services/e-business/ or the IBM external Web page
http://www.ibm.com/services/profservices/ebus-index.html.For global
information on IBM services offerings please refer to the IBM external Web page
at: http://www.i bm.com/servi ces
5.5.1 IBM e-business Advisory Services
These services consist of a suite of seminars and workshops designed to satisfy
a customer′s requirement for an efficient and affordable way to evaluate the
value of e-business to their company.This offering is composed of:

IBM e-business Seminar

IBM e-business Opportunity Workshop

IBM e-business Strategy Workshop

Additional Information
The e-business Seminar assists clients in understanding the overall value of
e-business.The Opportunity Workshop takes this understanding a step further
by delivering a one to two day intensive session with consultants as they guide
them through the process of evaluating how e-business can directly benefit their
company.Finally, the strategy workshop allows the merchant to complete his
analysis and build an executable strategy and action plan.
5.5.2 IBM e-commerce Services
e-commerce services are a family of offerings designed to assist merchants in
preparing and conducting Internet business transactions both with other
business counterparts and with customers.Offerings range from readiness
assessments and strategy workshops, to implementation of specific business
solutions, to education and training.IBM e-commerce services include:

Business Planning for e-commerce

Electronic Retailing/Trade

Electronic Transaction Services

Electronic Financial Services

Additional Information
Electronic Retailing/Trade:Specific offerings for ERT cover the entire commerce
cycle from pre-trade to post-trade and provide a business with the ability to
implement a secure, scalable solution to reduce the costs of doing business
while broadening market reach.These offerings are grouped around the
planning, design, and implementation of business-to-business or
business-to-consumer transaction systems on a choice of platforms.The
offerings range from helping small to medium-sized businesses get started, to
implementing large and complex solutions with advanced technologies such as
intelligent catalogs and personalized shopping.

e-Commerce Solution Planning 1-3 day Workshop

e-Commerce Functional Design 1-3 day Workshop

e-Commerce Prototype/Solution Development
Chapter 5.Planni ng for Net.Commerce
41

5.6 Single or Multiple System Implementation
Net.Commerce can be implemented as a single system setup or in a multiple
system configuration.In this section we look at some of the planning
considerations associated with selecting the appropriate setup.
5.6.1 Single System Setup
In the single system setup, both the Net.Commerce server and database are on
the same system.This setup may be sufficient for a single store or small mall.
Figure 15. SingleSystemConfiguration
5.6.2 Multiple System Setup
As the database size and number of shoppers increases, a single system may
not be able to cope with the load.In a multiple system setup, the workload will
be spread across multiple systems.The advantages of a multiple machine
configuration are:

The workload is spread among machines.

If one machine is down, the others can take over its workload.

The database machine can be placed behind a firewall for additional
protection.
The installation of Net.Commerce on multiple systems is similar to the single
system install except that you must set up the database for remote access.
42
AS/400 e-commerce: Net.Commerce

There are several ways to implement Net.Commerce on multiple systems:
1. You can have the Net.Commerce server on one system and the database
collection on another system (Figure 16).
Figure 16. MultipleSystemConfigurationScenario1
2. You can have mul ti pl e Net.Commerce server systems and a si ngl e database
collection where the database can be on one of the server systems or on a
different system (Figure 17).
Figure 17. MultipleSystemConfigurationScenario2
This scenario represents a single Net.Commerce shopping mall.The
multiple Net.Commerce server systems represent a single Net.Commerce
server instance.The router is balancing the load across the multiple server
systems.
Chapter 5.Planni ng for Net.Commerce
43

3. You can have a si ngl e server system wi th mul ti pl e instances of
Net.Commerce using databases on multiple systems (Figure 18).
Figure 18. MultipleSystemConfigurationScenario3
This scenario represents multiple Net.Commerce shopping malls.Each
Net.Commerce server instance and associated database collection
represents a separate mall.Each Net.Commerce server instance will be
associated with a unique host name and IP address; this is called a
multihome configuration.
Each Net.Commerce server system must have the Net.Commerce director
and daemon, Net.Data and Secure Web Server on the same system.The
database collection can reside on a different system.
The Net.Commerce product must be installed on each system that is to run
the Net.Commerce Server.
Detailed instructions for these configurations are given in Chapter 8,
“Net.Commerce Advanced Confi gurati on” on page 97.
44
AS/400 e-commerce: Net.Commerce

5.7 e-business Advisor
An online e-business Advisor is available at:http://advisor.internet.ibm.com
The areas covered by the advisor are as follows:

Scenario 1: Thinking of creating an Internet site.

Scenario 2: Thinking of creating an internal company intranet.

Scenario 3: Improving the Internet site you currently have.

Scenario 4: Creating an Internet site.

Scenario 5: Creating an internal company intranet site.

Scenario 6: Determining which of your products (services) have the best
chance of marketing success on the Internet.

Scenario 7: Measuring your Internet marketed products against your
competitors.

Scenario 8: Determining if an intranet solution is the right way to implement
your project.

Scenario 9: Estimating the costs and time required to create an internal
company intranet.

Scenario 10: Estimating the technical schedule required to create an internal
company intranet.
Chapter 5.Planni ng for Net.Commerce
45

46
AS/400 e-commerce: Net.Commerce

Chapter 6.Net.Commerce Installation
In this chapter, we cover the Net.Commerce installation tasks after covering the
preliminary tasks that must be performed before installing Net.Commerce.
6.1 Preliminary Procedures
Prior to beginning the installation, you must have the following:

An OS/400 user ID with authority to execute the installation.
You must create or have access to a user ID with the user class of *SECOFR
and special authority of *USRCLS.Use this user ID when you install the
product.

The host name for your AS/400 system.
You must know the host names of the system or systems on which you want
to run Net.Commerce.If you plan to run Net.Commerce either on multiple
systems or run multiple instances of Net.Commerce on a single system, it is
necessary to define a host name for each system or Net.Commerce instance.
You can use the command
CFGTCP
, and select Option 12 (Change local
domain and host name), to determine whether a local host name and domain
name have been defined for a system.This screen will allow you to
determine if a host name exists, or to define or change a host name.


Change TCP/IP Domain (CHGTCPDMN)
Type choices, press Enter.
Host name. . . . . . . . . . .<YOUR_HOST_NAME>____________________________
____________________________________
Domain name. . . . . . . . . .<YOUR_DOMAIN_NAME>__________________________
________________________________________________________________________________
________________________________________________________________________________
____________________________________________________
Host name search priority. . .*LOCAL__ *REMOTE, *LOCAL, *SAME
Internet address . . . . . . .′<YOUR_DNS_IP>′__
′<YOUR_DNS_IP>′__
_________________
Bottom
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys


Figure 19. VerifyYour Local Host NameandDomainName

The Relational Database Directory Entry for the system that will host the
database collection.
To determine or create a relational database directory entry, use the
command
WRKRDBDIRE
(Figure 20 on page 48).Make a note of the directory
entry name.If no entry exists, you must create one by selecting Option 1
©
Copyright IBM Corp. 1999
47

from the Work with Relational Database Directory Entries screen.You can
specify either a *LOCAL database, a remote database, or both depending on
whether your Net.Commerce database is going to be local (on the same
AS/400 as the Net.Commerce server) or remote.For more information on
setting up a remote database, refer to 8.2, “Setting Up Remote Database
Access” on page 100.


Work with Relational Database Directory Entries
Position to. . . . . .___________________
Type options, press Enter.
1=Add 2=Change 4=Remove 5=Display details 6=Print details
Relational Remote
Option Database Location Text
__ __________________
__ <YOUR_HOST_NAME> *LOCAL RDB ENTRY FOR *LOCAL
Bottom
F3=Exit F5=Refresh F6=Print list F12=Cancel
(C) COPYRIGHT IBM CORP. 1980, 1998.


Figure 20. VerifyYour Relational DatabaseDirectoryEntry

Net.Data is included with your OS/400 system, product TCP/IP Connectivity
Utilities for AS/400
, number 5769-TC1.
V4R3
Net.Data is included with your OS/400 system, product
HTTP Server for
AS/400
, number 5769-DG1.
To install it, use the command
GO LICPGM
.
Note
Refer to the product′s documentation for further details about the
installation and configuration.

To install the IBM Internet Connection Secure Server (product number
5769-NC1 in North America, product number 5769-NCE in other countries) or
IBM HTTP Server for AS/400 (product number 5769-DG1) with 5769AC1,
5769AC2 or 5769AC3, use the command
GO LICPGM
.
Note
Refer to the product′s documentation for further details about the
installation and configuration.
48
AS/400 e-commerce: Net.Commerce

6.2 Installation Procedures
Before proceeding with the installation of IBM Net.Commerce, please ensure that
you have completed the steps described in 6.1, “Preliminary Procedures” on
page 47.
To install all the components of Net.Commerce on a single system, follow the
instructions in ″Installation of Net.Commerce on a Single system″ that follow
below.If you are planning to install the Net.Commerce database on one system
and the Net.Commerce server components on another system, follow the
instructions below then follow the instructions in 8.2, “Setting Up Remote
Database Access” on page 100.
6.2.1 Installation of Net.Commerce
The following steps describe the installation of IBM Net.Commerce on a single
system (Figure 21).
Figure 21. SingleSystemConfigurationScenario
1. Sign on to the AS/400 usi ng the user ID that you created i n 6.1,“Prel i mi nary
Procedures” on page 47.
2. If Net.Commerce has been previ ousl y i nstal l ed and you wi sh to retai n any
changes made to the Net.Commerce configuration file, initialization file,
macros and HTML pages, do the following:
a.Copy the Net.Commerce configuration file to a path that is not used by
Net.Commerce.The name and path for the file is:
/QIBM/ProdData/HTTP/Protect/NetC/server/Admin/ncconfig.dat
b.Copy the Net.Commerce initialization file to a path that is not used by
Net.Commerce.The name and path for the file is:
/QIBM/UserData/NetCommerce/instance/mserver.ini
or for a multiple instance system:
/QIBM/UserData/NetCommerce/instance/<instance_name>/mserver.ini
c. Copy al l macros that have been modi fi ed to a path that is not used by
Net.Commerce.
d.Copy all HTML files that have been modified to a path that is not used by
Net.Commerce except any that have been modified using the template
designer (these are saved under UserData and will not be overwritten
when Net.Commerce is reinstalled).
Chapter 6.Net.Commerce Instal l ati on
49

Having deleted and reinstalled Net.Commerce, do not configure
Net.Commerce until the above configuration, initialization, macro and
HTML files have been restored.
Note that none of the existing user data files, user profiles, database
collections or Web server configuration files are deleted as part of the
reinstall of Net.Commerce.
3. If Net.Commerce has been previ ously instal l ed,use the Del ete Licensed
program command
DLTLICPGM
to delete Net.Commerce.


Delete Licensed Program (DLTLICPGM)
Type choices, press Enter.
Product. . . . . . . . . . . .5798NC2 Character value
Optional part to be deleted. .*ALL *ALL, 1, 2, 3, 4, 5, 6, 7...
Release. . . . . . . . . . . .*ONLY Character value, *ONLY, *ALL
Language for licensed program.*ALL Character value, *ALL
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys


Figure 22. DeleteLicensedProgramMenu
Note
Do not lock any objects in QNETCOMM when you are doing the deletion.
Make sure that Client Access is not attached to the IFS directories.
4. To install IBM Net.Commerce (product number 5798NC2),i nsert the product
CD-ROM and use the command
RSTLICPGM
.
50
AS/400 e-commerce: Net.Commerce



Restore Licensed Program (RSTLICPGM)
Type choices, press Enter.
Product. . . . . . . . . . . .5798NC2 Character value
Device . . . . . . . . . . . . .OPT1 Name, *SAVF
+ for more values
Optional part to be restored . .*BASE *BASE, 1, 2, 3, 4, 5, 6, 7...
Type of object to be restored.*ALL *ALL, *PGM, *LNG
Language for licensed program.*PRIMARY Character value, *PRIMARY...
Output . . . . . . . . . . . . .*NONE *NONE, *PRINT
Release. . . . . . . . . . . .*FIRST Character value, *FIRST
Replace release. . . . . . . .*ONLY Character value, *ONLY, *NO
Bottom
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys


Figure 23. RestoreLicensedProgramMenu
An acknowledgment message appears, indicating that you have successfully
installed Net.Commerce.
Congratulations!You have now successfully installed the Net.Commerce
system and all its components.To continue, go to the 6.2.3,
“Post-Installation Procedures” on page 52.
6.2.2 What Was Installed
The following is a list of the files and objects that were created during the
installation.

QNETCOMM Library
Contains the main program objects, service programs, files, commands, and
message files for Net.Commerce.Take note of the following:
Table 1 (Page 1 of 2). QNETCOMMLibraryProgramObjects
Object
Type
Description
QNETCOMM
*VLDL
Val i dati on l i st
QACSRC
*FILE
Sample C source to create trigger programs used for
cachi ng
QSQLSRC
*FILE
SQL scripts used to build instance databases.The
members are greater than 240 bytes and the AS/400
cannot nati vel y edi t them.You must use FTP, Client
Access, or another method to modify these files.
STRNETCSVR
*CMD
Start Net.Commerce Server
ENDNETCSVR
*CMD
End Net.Commerce Server
QNEADDTR
*CMD
Add t ri gger
QNERMVTR
*CMD
Remove t ri gger
DLTNCDBE
*CMD
Net.Commerce DB2 database cleanup
Chapter 6.Net.Commerce Instal l ati on
51

Table 1 (Page 2 of 2). QNETCOMMLibraryProgramObjects
Object
Type
Description
IMPNCDATA
*CMD
Import Net.Commerce data

IFS Root File System
Contains stream files that are stored in the ″root″ file system.Take note of
the following:
Table 2. IFSRoot FileSystemObjects
Object
Description
/QIBM/ProdData/HTTP/Protect/NetC/server
Di rectory contai ni ng fi l es
associ ated wi th confi gurati on
/QIBM/ProdData/HTTP/Publ i c/NetCommerce/Html
Di rectory contai ni ng
Net.Commerce HTML files
(including DEMOMALL samples).
This directory also contains some
online help printable files in PDF
and postscri pt format.
/QIBM/ProdData/NetCommerce/macro
Di rectory contai ni ng
Net.Commerce macros (i ncl udi ng
DEMOMALL sampl es)
/QIBM/ProdData/NetCommerce/MRI2924/demodata.i n
Mass import input file used for
DEMOMALL creati on
/QIBM/ProdData/NetCommerce/MRI2924/nc_msg.cat
Net.Commerce message fil e
/QIBM/ProdData/NetCommerce/MRI2924/netcsrvr.cat
Net.Commerce message fil e

QSYSCGI Li brary
Location of CGI Web objects.
Table 3. QSYSCGILibraryProgramObjects
Object
Type
Description
WEBCONFIG
*PGM
Invoked by the Admi ni strati on Server to confi gure
Net.Commerce
6.2.3 Post-Installation Procedures
After the Net.Commerce system is installed, you must do the following:

Configure the Net.Commerce server instance or instances.This does the
following:
− Configures the Net.Commerce Web server instance.
− Provides and configures the Net.Data initialization file.
− Creates the Net.Commerce database collection initialization file.
− Populates the database with the demonstration mall (optional).
− Creates a user profile for Net.Commerce use.

Configure the Net.Commerce Web server for SSL (Secure Sockets Layer).

Enable caching (optional).

Complete the setup of remote database access, if applicable.
52
AS/400 e-commerce: Net.Commerce

Instructions for configuring Net.Commerce instances is covered in detail in
Chapter 7, “Net.Commerce Basic Configuration” on page 55.
Chapter 6.Net.Commerce Instal l ati on
53

54
AS/400 e-commerce: Net.Commerce

Chapter 7.Net.Commerce Basic Configuration
In this chapter, we look at the configuration of Net.Commerce for AS/400.The
chapter covers the following topics:

Configuration

Configuration details

Verifying that the Net.Commerce installation and configuration are successful

User-customizable server configuration
7.1 Configuration Process
Having successfully installed Net.Commerce, the next step is to create a
Net.Commerce server configuration.This is performed through the ADMIN Web
server instance.Follow these steps to create the Net.Commerce server
configuration:
1. Sign on to the AS/400 system as admi ni strator usi ng an ID wi th *IOSYSCFG
special authority.
Hint
We used a user profile with *SECOFR authority.
2. To prevent ti meouts duri ng the confi gurati on of Net.Commerce,al ter the
*ADMIN Web server instance to increase the script timeout value as follows:
a.From the command line, type:
WRKHTTPCFG *ADMIN
b.Add the following line to the end of the configuration file:
ScriptTimeOut 60 minutes
(Use option 13 (insert) against the last line in the file.)
The file should look similar to Figure 24 on page 56.
©
Copyright IBM Corp. 1999
55



Work with HTTP Configuration
System:HOSTNAME
Configuration name . . . . . . . :ADMIN
Type options, press Enter.
1=Add 2=Change 3=Copy 4=Remove 5=Display 13=Insert
Sequence
Opt Number Entry
___ _____ _______________________________________________________
___ 00010# * * * * * * * * * * * * * * * * * * * * * * * * * * * >
___ 00020# HTTP Admin server CUSTOMER configuration >
___ 00030# * * * * * * * * * * * * * * * * * * * * * * * * * * * >
___ 00040 ScriptTimeOut 60 minutes
Bottom
F3=Exit F5=Refresh F6=Print List F12=Cancel F17=Top F18=Bottom
F19=Edit Sequence


Figure 24. HTTPConfigurationfor theAdministrationServer
Note
This change to the configuration file should be removed when you have
finished configuring the Net.Commerce Instance.
3. Start the HTTP admi ni strati on Web server (*ADMIN) instance wi th the
fol l owi ng command:
STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN)
National Language Support
For NLS support when starting the *ADMIN server, add the -fsccsid and
-netccsid parameters as shown below.
STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN ′-fsccsid xxxx -netccsid yyy′)
Where xxxx is the DefaultFsCCSID and yyy is the DefaultNetCCSID listed
for the system language feature.For a list of the available languages,
see the latest Net.Commerce readme.
If the server is already started, close the server using the command:
ENDTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN)
and then start it again using the previous STRTCPSVR command.
4. Start your Web browser,and ensure that the following are
disabled:

Memory cache

Disk cache
Figure 25 on page 57 displays these settings if you are using Netscape
Communicator 4.03.Notice that Every time has been selected to ensure the
browser does not use a cached page.
56
AS/400 e-commerce: Net.Commerce

Figure 25. NetscapeCommunicator 4.03CacheSettings
The panel is accessed as follows: Preferences

Advanced

Cache.
5. Also ensure the fol l owi ng are di sabl ed for your Web browser:

Proxy servers

Socks servers
Figure 26 displays these settings if you are using Netscape Communicator
4.03.Notice that Direct connection to the Internet has been selected to
ensure the proxy server does not use a cached page.
Figure 26. NetscapeCommunicator 4.03ProxySettings
This panel is accessed as follows: Preferences

Advanced

Proxies.
6. Display the mai n AS/400 Tasks page by l oadi ng the fol l owi ng URL:
http://<your_host_name>:2001
Enter your AS/400 user ID and password at the authentication prompts and
click on OK.The AS/400 Tasks Administration page will be displayed
(Figure 27 on page 58).
Chapter 7.Net.Commerce Basi c Confi gurati on
57

Figure 27. AS/400TasksAdministrationPage
7. Click on IBM Net.Commerce for AS/400.The ConfiguringtheNet.Commerce
System
page appears (Figure 28).
Figure 28. Net.CommerceConfigurationScreen
Note:If you have already created Net.Commerce instances, and want to
change an existing instance, select it by clicking on the radio button beside
it, and then click on Properties.If you want to delete an existing instance,
select it and then click on Delete.
8. To create a new Net.Commerce instance,click on New.
9. The Net.Commerce Instance Properties page appears.Fill i n the fol l owi ng
fields as shown in Figure 29 on page 59.
58
AS/400 e-commerce: Net.Commerce

Figure 29. Net.CommerceInstancePropertiesScreen
a.In the Net.Commerce Instance Name field, type in an alphanumeric name
for the Net.Commerce instance that you want to create.This will create
a user profile and a database collection of that name.
b.In the Merchant Key field, type a key that will be used to encrypt
sensitive data in the database.This key must be exactly 16 hexadecimal
characters in length.It is important that you remember it and keep it
confidential.
Chapter 7.Net.Commerce Basi c Confi gurati on
59

Note
If you are planning a multiple system configuration, the merchant key
must be the same for all the Net.Commerce servers that have access
to the same Net.Commerce database.
c. In the Type field,leave the default of
IBM Internet Connection Server for
AS/400
.
d.In the Host Name field, type in the fully qualified host name that you will
be using with the Net.Commerce server.See 6.1, “Preliminary
Procedures” on page 47.You can leave in the current host name that
appears by default.For a multihome setup, there must be a unique
name for each instance you create.
e.In the Relational Database Name field, type in the name that identifies
the system′s relational database.See 6.1, “Preliminary Procedures” on
page 47.You can leave the default value of *LOCAL if you want your
database collection on the same system.
Note
If you specify a remote relational database, your database collection
will initially be created on the *LOCAL system.See 8.2, “Setting Up
Remote Database Access” on page 100 for details on remote access.
f.In the DBMS field, leave the default of
IBM DB2/400 Server
in place.
g.In the Password field, type in the password for the user ID that is
created; then type it again in the Confirm Password field.
h.In the Processes field, type the number of processes that you want
started for the Net.Commerce instance.Multiple processes allow the
server to handle multiple concurrent requests.
i.The Port field displays a unique, available, system-generated port
address for your first Net.Commerce instance.Additional instances are
also given unique port numbers.It is normally safe to accept the default
port numbers generated by the system, however, you can select another
port number.This port is used for internal communication between the
Net.Commerce director(s) and daemon.
j.In the Macro Path field, specify the location of your Net.Data macros.By
default, these are installed in
/QIBM/ProdData/NetCommerce/Macro/MRI2924
.
k. In the HTML Path field,specify the location of the Web Server HTML
document root.For a multihome setup, there must be a unique path for
each instance.It is a good practice to append the instance name
subdirectory to the end.For example:
/QIBM/UserData/NetCommerce/instance/<instance_name>
Note
This path must exist before you submit this page.
l.If you want to install the demonstration mall, select the box beside the
Demo Mall field.
10.Click on SUBMIT. The Net.Commerce configuration and initialization files are
updated, and a number of other objects are created.
11.A confirmation page appears (Figure 30 on page 61) to indicate whether the
configuration was successful.This page also contains success/failure
messages about the database collection, validation list, the source physical
file INI (member DB2WWW), and the database preparation.
60
AS/400 e-commerce: Net.Commerce

Figure 30. Net.CommerceInstanceConfirmationPage
Click twice on the browser Back button to return to the Net.Commerce
Instance Properties page.
12.To create, change or delete a Net.Commerce instance, repeat steps 6 to 11
above.The port number, HTML path, instance name, and host name must
be unique for each instance.
13.Enable the following components that were disabled from your browser in
step 4 and step 5.

Memory cache

Disk cache

Proxy servers

Socks servers
14.Reset the *ADMIN server to its default configuration as follows:

From the command line, type:
WRKHTTPCFG *ADMIN

Remove the line
ScriptTimeOut 60 minutes
that you entered to alter the
server instance.
15.The above configuration process built a Web server configuration file for the
Net.Commerce Web server (QNETCOMM).In this step we add an SSL
configuration to that Web server configuration.SSL is required to provide a
secure connection between the shopper′s browser and the Net.Commerce
Chapter 7.Net.Commerce Basi c Confi gurati on
61

server.This secure connection will allow for the displaying of potentially
sensitive data by the shopper and for the use of the shopper′s credit card
number when purchasing items using a Web browser.
V4R3
The configuration steps of SSL for V4R3 are different.It uses the Digital
Certificate Manager (DCM), which is a separate task from the HTTP
server configuration. See Appendix A, “SSL Configuration for V4R3” on
page 221 for an overview of DCM and detailed configuration steps.
For OS/400 V4R2, follow these steps to configure Internet Connection Secure
Server for AS/400.The steps given below provide a high-level overview of
the SSL configuration process.For a more detailed understanding of this
process, see
AS/400 e-commerce: Internet Connection Servers, SG24-2150.
a.Display the main AS/400 Tasks page by loading the following URL:
http://<your_host_name>:2001
Figure 31. AS/400TasksAdministrationPage
b.Click on Internet Connection Server for AS/400 then Configuration and
Administration.
62
AS/400 e-commerce: Net.Commerce

Figure 32. General ConfigurationandAdministration
c. Select the QNETCOMM Web server i nstance and cl i ck on Change.
Chapter 7.Net.Commerce Basi c Confi gurati on
63

Figure 33. Server InstanceQNETCOMM
d.Verify that the existing configuration is QNETCOMM, select Use existing
configuration and click on Configuration and Administration Forms.
64
AS/400 e-commerce: Net.Commerce

Figure 34. ConfigurationandAdministrationForm
e.Click on Security Configuration.
Figure 35. SecurityConfiguration
f.Select Allow HTTP and SSL, enter SSL port number 443 and press the
Apply button.
Chapter 7.Net.Commerce Basi c Confi gurati on
65

Figure 36. ConfirmationPage
g.Check the Confirmation Page and press Configuration Page to return to
the
Configuration and Administration Form.Select Create Keys.
Figure 37. CreateKeyandRequest Certificate
h.Select VeriSign or Other depending on the Certificate Authority being
used.If using Net.Commerce in an Internet environment (as would
normally be the case), we would request a certificate from a third-party
Certificate Authority.In this example we are using Net.Commerce in an
intranet environment only and hence are happy to use a locally created
certificate.We use the AS/400′s ability to create a certificate.
66
AS/400 e-commerce: Net.Commerce

Figure 38. CreateKey
i.Enter a Key name for the SSL key and a file name for the Key ring where
the key file will be stored.
Figure 39. KeyRingPassword
j.Enter a Password for the Key ring.This password will secure the SSL
key file.The password used should be recorded in a secure location, as
it will be required if any change is later required to the SSL
configuration.
Chapter 7.Net.Commerce Basi c Confi gurati on
67

Figure 40. Request Certificate
k. Enter a Distinguished Name for the Net.Commerce Web server.
Figure 41. Mail To
l.If requesting a certificate by e-mail, enter the certificate authority′s and
your e-mail addresses.
Figure 42. SaveCopy
m.In this example we are not using e-mail to request a certificate and
therefore save the request to a file which we will then send to the
Certificate Authority, in our case an AS/400.Press the Apply button.
Send this file to the Certificate Authority and have them sign it.See
AS/400 e-commerce: Internet Connection Servers, SG24-2150 for
information on how to use an AS/400 to do this in an intranet
environment as we did.
68
AS/400 e-commerce: Net.Commerce

Figure 43. ConfirmationPage
n.Check the Confirmation Page and press Configuration Page to return to
the
Configuration and Administration Form.Select Security Configuration
and scroll down to Add key ring.
Figure 44. AddKeyRing
o.Enter the key ring name (as entered in Figure 38 on page 67).Press the
Apply button.
Chapter 7.Net.Commerce Basi c Confi gurati on
69

Figure 45. ConfirmationPage
p.Check the Confirmation Page and press Configuration Page to return to
the
Configuration and Administration Form.Select Receive Certificate.
Figure 46. ReceiveCertificate
q.This step is required only if the Certificate Authority being used is not
already a Trusted Root.This is the case in this example as our
certificate was signed by an AS/400 that is not a third-party Certificate
Authority.Enter the file name of the CA certificate request file received
from the Certificate Authority, in our intranet example an AS/400.Enter
the key ring file name (as used in Figure 38 on page 67) and the key
ring password (as used in Figure 39 on page 67).Press the Apply
button.
70
AS/400 e-commerce: Net.Commerce

Figure 47. ConfirmationPage
r.Check the Confirmation Page and press Configuration Page to return to
the
Configuration and Administration Form.Select Key Management.
Figure 48. KeyManagement
s. This step is requi red onl y if the Certificate Authority being used is not
already a Trusted Root.This is the case in this example as our
certificate was signed by an AS/400 that is not a third-party Certificate
Authority.Verify that the current key ring is as used in Figure 38 on
page 67.Enter the key ring password (as enterred in Figure 39 on
page 67), select Designate Trusted Root Keys and press the Apply
button.
Chapter 7.Net.Commerce Basi c Confi gurati on
71

Figure 49. DesignateTrustedRoot Keys
t.Select the CA certificate and press the Apply button.
Figure 50. ConfirmationPage
u.Check the Confirmation Page and press Configuration Page to return to
the
Configuration and Administration Form.Select Receive Certificate.
Figure 51. ReceiveCertificate
72
AS/400 e-commerce: Net.Commerce

v. Enter the file name of the server certificate file recei ved from the
Certificate Authority, in our intranet example an AS/400.Enter the key
ring file name (as used in Figure 38 on page 67) and the key ring
password (as used in Figure 39 on page 67).Press the Apply button.
Figure 52. ConfirmationPage
w.Check the Confirmation Page and press Configuration Page to return to
the
Configuration and Administration Form.Select Key Management.
Figure 53. KeyManagement
x. Enter the Key ring password (as entered i n Figure 39 on page 67),select
Manage Keys and press the Apply button.
Chapter 7.Net.Commerce Basi c Confi gurati on
73

Figure 54. ManageKeys
y. Select the server key (as created i n Figure 38 on page 67) and Set as
default then press the Apply button.
Figure 55. ConfirmationPage
z. We have now built a basic Net.Commerce configuration.In the next step
we will verify the configuration details.
74
AS/400 e-commerce: Net.Commerce

7.2 Configuration Details
The Net.Commerce configuration process completes the installation for specific
customer instances of malls or stores.It creates the database schema and
completes the mass import of the sample DEMOMALL if you choose to install the
sampl e.
The following actions take place during a Net.Commerce instance configuration.
For purposes of this example, the instance name ″ntcinst1″ will be used.

The user profile ntcinst1 is created; if it is already present, the password will
be updated.
− This user profile will be used to start the Net.Commerce jobs.
− The password is obtained from the configuration screen.

The database collection ntcinst1 is created.
− The database collection holds all information regarding the mall, the
merchants within it and the registered users/shoppers.
− This is a library that has the necessary system catalog tables and
journalling objects.

The validation list QNETCOMM is created in library ntcinst1.
− This validation list contains the Net.Commerce administration ID and
password needed to access the instance′s sensitive data.The initial
values of both the user ID and password are
ncadmin.You should
change the password at your earliest convenience.
− Entries are added to this validation list each time a new administrator
user ID is added.
− Entries are added to this validation list every time a new shopper
registers with the
ntcinst1 instance.

The source physical file INI is deleted from the ntcinst1 instance library .

A new source physical file INI is created in the ntcinst1 instance library .

Member DB2WWW is created in NTCINST1/INI.
− This is the initialization file used by Net.Data to find the macros and the
files they include into dynamically generated HTML pages.

For each Net.Commerce configuration performed (not including the initial
configuration), the following will also be done:
− The Web server configuration member QNETCOMM is backed up to
QNETCOMM00.
− The Web server instance member QNETCOMM is backed up to
QNETCOMM00.

The new Web server configuration member QNETCOMM is created in
QUSRSYS/QATMHHTTPC.
− This member contains the directives needed to reference the
Net.Commerce instance (or instances, in the case of a multihome use).
− The file can be viewed using the command
WRKHTTPCFG QNETCOMM
.
− This file is used when the Web server instance QNETCOMM is started.

The Web server instance member QNETCOMM is created in
QUSRSYS/QATMHINSTC.
Chapter 7.Net.Commerce Basi c Confi gurati on
75

− This is the Web server instance definition used to run Net.Commerce.
− This member references configuration member QNETCOMM.

If you have chosen to install the Demomall database collection, the mass
import utility imports the contents of the input data file demodata.in into the
ntcinst1 collection.
− This populates the database collection.

When started, the Net.Commerce server is started under the user profile
ntcinst1.It is the user profile that provides the access to the correct
database collection.
Because Net.Commerce uses the SQL naming mode, the user profile
ntcinst1 can facilitate the entire database access process, including that of
accessing databases on remote systems.
When the Net.Commerce server is started, the document root directory is
specified.This directory holds the key to the Net.Commerce instance
because it contains file mserver.ini, which contains all the information
required by the daemon.

When the Web server is started, it uses the directory specified by the
di recti ve
Pass/* /QIBM/UserData/NetCommerce/Instance/ntcinst1 <numeric_IP_address>
that initiates communication with the correct Net.Commerce server through
the mserver.ini file found there.

The following stream files in Table 4 are created and stored in the ″root″ file
system:
Table 4 (Page 1 of 2). StreamFilesCreatedbytheNet.CommerceConfigurationProcess
File or Directory Name
Description
/QIBM/UserData/NetCommerce/instance/<instance_name>/logs
Directory containing log files. The
<instance_name>
value is from
Fi gure 29 on page 59.
/QIBM/UserData/NetCommerce/instance/nc_cache/protect
Cache files
/QIBM/UserData/NetCommerce/instance/<instance_name>/nc_cache/protect
Cache files
The
<instance_name>
value is
from Fi gure 29 on page 59.
/QIBM/UserData/NetCommerce/instance/nc_cache/unprotect
Cache files
/QIBM/UserData/NetCommerce/instance/<instance_name>/nc_cache/unprotect
Cache files
The
<instance_name>
value is
from Fi gure 29 on page 59.
/QIBM/UserData/NetCommerce/instance/<instance_name>/teditor
Di rectory contai ni ng templ ate
editor work files. The
<instance_name>
value is from
Fi gure 29 on page 59.
/QIBM/UserData/NetCommerce/instance/mserver.ini
or
/QIBM/UserData/NetCommerce/instance/<instance_name>/mserver.ini
Initialization file for the
Net.Commerce server i nstance.
When creati ng mul ti pl e
Net.Commerce instances, each
instance will have an
mserver.ini
file which is located in a
sub-di rectory of the same name
as the instance.
76
AS/400 e-commerce: Net.Commerce

Table 4 (Page 2 of 2). StreamFilesCreatedbytheNet.CommerceConfigurationProcess
File or Directory Name
Description
/QIBM/UserData/NetCommerce/instance/db2www.ini
or
/QIBM/UserData/NetCommerce/instance/<instance_name>/db2www.ini
A work copy of the Net.Data
initialization file (the actual file is
object DB2WWW in file INI).
Mai ntai ni ng a work copy allows
for easier viewing of the file.
When creati ng mul ti pl e
Net.Commerce instances, each
instance will have an
db2www.ini
file which is located in a
sub-di rectory of the same name
as the instance.
7.3 Verifying a Successful Net.Commerce Installation and Configuration
Once you have installed and configured the Net.Commerce system, you can test
it by using the procedures described below.
1. Start the Net.Commerce QNETCOMM Web server instance,as descri bed i n
9.1.3, “Starting the Net.Commerce Web Server Instance” on page 116.
WRKTCPSTS
The
WRKTCPSTS *CNN
command can be used to verify that no other Web
servers are listening on ports 80 or 443 prior to starting the QNETCOMM
Web server instance.
2. To confi rm that the QNETCOMM Web server i s l i steni ng on port 80,first
check the
WRKACTJOB
command to see if the QNETCOMM server instance is
active.For OS/400 V4R2, the QNETCOMM jobs will be under the QSYSWRK
subsystem.
V4R3
For OS/400 V4R3, the QNETCOMM jobs will be under the QHTTPSVR
subsystem.
If there is no job called QNETCOMM then the server instance has not started
up.There may be multiple QNETCOMM service jobs servicing requests, but
there should be at least one.If there are none, look for messages in
QSYSOPR (DSPMSG QSYSOPR).
Chapter 7.Net.Commerce Basi c Confi gurati on
77



Work with Active Jobs AS1
11/18/97 14:16:05
CPU %:2.0 Elapsed time:00:00:00 Active jobs:150
Type options, press Enter.
2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message
8=Work with spooled files 13=Disconnect ...
Opt Subsystem/Job User Type CPU % Function Status
___ QNETCOMM QTMHHTTP BCH.0 PGM-QTMHHTTP TIMW
___ QNETCOMM QTMHHTTP BCI.0 SIGW
___ QNETCOMM QTMHHTTP BCI.0 SIGW
___ QNETCOMM QTMHHTTP BCI.0 TIMW


Figure 56. WorkwithActiveJobs. Checkingtoseethat QNETCOMMisactive.
3. Then use the command
WRKTCPSTS *CNN
to check for activity on ports 80 and
443.Press PF14 to display the port numbers.


Work with TCP/IP Connection Status
System:AS1
Local internet address. . . . . . . . . . . :*ALL
Type options, press Enter.
4=End 5=Display details
Remote Remote Local
Opt Address Port Port Idle Time State
_ * * 21 121:26:55 Listen
_ * * 23 000:13:47 Listen
_ * * 23 000:20:38 Listen
_ * * 25 167:36:33 Listen
_ * * 67 000:00:10 *UDP
_ * * 69 167:36:40 *UDP
_ * * 80 000:08:38 Listen
_ * * 110 167:35:08 Listen
_ * * 137 198:20:17 Listen
_ * * 443 198:20:17 Listen


Figure 57. TCP/IPConnectionStatus. Checkingtoseethat ports80and443areactive.
Note
The Net.Commerce Web server QNETCOMM uses the default port 80 to
listen for HTTP requests and the default port 443 for HTTPS requests.By
default QNETCOMM listens on all TCP/IP addresses configured on the
AS/400.With the default setup, if there is any other AS/400 server
instance already using port 80 or port 443, even if bound to a specific IP
address, the QNETCOMM instance may not start.See 8.5, “Coexistence
of Net.Commerce with a Non-Net.Commerce Web Server” on page 110.
4. Start the Net.Commerce server,as descri bed i n 9.1.5,“Starti ng the
Net.Commerce Server” on page 118.
5. To verify that the Net.Commerce server has started successfully,type the
following from the AS/400 command line:
WRKACTJOB SBS(QSYSWRK)
78
AS/400 e-commerce: Net.Commerce

V4R3
For V4R3, submit the same command to the subsystem QHTTPSVR:
WRKACTJOB SBS(QHTTPSVR)
The Work with Active Jobs panel will be displayed (Figure 58).


Work with Active Jobs AS1
12/04/97 19:25:57
CPU %:.0 Elapsed time:00:00:00 Active jobs:129
Type options, press Enter.
2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message
8=Work with spooled files 13=Disconnect ...
Opt Subsystem/Job User Type CPU % Function Status
__ QSYSWRK QSYS SBS.0 DEQW
__ MSERVERD NTCINST1 BCI.0 MTXW
__ MSERVERD NTCINST1 BCI.0 TIMW
__ QNETCOMM NTCINST1 BCH.0 PGM-QNETSTRNCS EVTW
Bottom
Parameters or command
===> _________________________________________________________________________
F3=Exit F4=Prompt F5=Refresh F10=Restart statistics
F11=Display elapsed data F12=Cancel F14=Include F24=More keys


Figure 58. ActiveJobsinSubsystemQSYSWRK
Look for entries for Job/User MSERVERD/<INSTANCE_NAME> and
QNETCOMM/<INSTANCE_NAME>.In this example (Figure 31 on page 62),
the instance name is NTCINST1.
Chapter 7.Net.Commerce Basi c Confi gurati on
79

6. To start the default store front page:
a.From your Web browser, type the following URL:
http://<your_host_name>/ncsample/base1.htm
A sample mall/store page is displayed (Figure 59).
Figure 59. Default StoreFront Page
7. To test registration:
a.From your Web browser, type the following URL:
http://<your_host_name>/cgi-bin/ncommerce/;register/form
The server will start an SSL session and the new user registration page
appears (Figure 60 on page 81).In the examples shown the secure
session is indicated by the closed padlock in the lower left-hand corner
of the browser screen (compare Figure 60 on page 81 to Figure 59).If
the SSL certificate is issued by a Certificate Authority that is not one of
the browser′s trusted roots (as in this example where the certificate is
created by an AS/400), a series of pop-ups will make you aware of this
and ask you to verify that you want to establish a secure session with
this server.
80
AS/400 e-commerce: Net.Commerce

Figure 60. NewRegistrationPage
b.Fill in the requested information (the highlighted words indicate the
required fields) and click on the Submit button.
Use
nctest as both the user ID and password.
If the registration was successful, a message window appears (Figure 61
on page 82).
A pop-up will request that you enter a user ID and password.Enter
nctest/nctest.
Note
Note that, following registration, the secure directory (msprotect) is
accessed whereas prior to registration the unsecure directory
(cgi-bin) was being accessed.Compare Figure 61 on page 82 to
Figure 60.
Chapter 7.Net.Commerce Basi c Confi gurati on
81

Figure 61. RegistrationCompletionPage
8. To test the shoppi ng cart,from your Web browser,type the following URL:
http://<your_host_name>/msprotect/ncommerce/;shopcart/display
An empty shopping cart is presented (Figure 62 on page 83).
82
AS/400 e-commerce: Net.Commerce

Figure 62. ShoppingCart Page
Net.Commerce Commands
See 4.1.2, “Net.Commerce Director” on page 26 for the makeup of
Net.Commerce commands, ″;shopcart/di spl ay″ for example.
9. To start the Net.Commerce Admi ni strator,perform these tasks:
a.Stop and re-start your Web browser to clear the cached
nctest user ID.
b.From your Web browser, type the following URL:
http://<your_host_name>/ncadmin/index.htm
c. Use ncadminas both the user ID and password.
The administrator page is displayed (Figure 63 on page 84).
Chapter 7.Net.Commerce Basi c Confi gurati on
83

Figure 63. Net.CommerceAdministrator Page
10.If you have not changed the default password for the ncadmin user ID, it is
recommended that you do so now, using the Site Manager Access Control
form.For information on how to do this, refer to the following URL:
http://<your_host_name>/nchelp/index.htm
11.To load the Net.Commerce Template Designer:
a.Click on Site Manager in the Net.Commerce Administrator.
b.Click on Template Designer.
c. Click on Load.The Templ ate Desi gner wi l l l oad (Figure 64 on page 85).
84
AS/400 e-commerce: Net.Commerce

Figure 64. Net.CommerceTemplateDesigner
d.Click on File/New.
e.Select product template.
f.Click on the Add a Text Box icon.
g.Click on and drag the box into the working area.
h.Double-click on the Text Box object.
i.Click on the Database menu item and ensure that there are items in this
menu.
12.If you installed the Net.Commerce demonstration mall on your system, you
can test your access to it by typing the following URL:
http://<your_host_name>/demomall/basemall.htm
The demonstration mall page will be displayed (Figure 65 on page 86).
Chapter 7.Net.Commerce Basi c Confi gurati on
85

Figure 65. Net.CommerceDemonstrationMall Page
13.To verify that the online help can be accessed, enter the following URL:
http://<your_host_name>/nchelp/index.htm
86
AS/400 e-commerce: Net.Commerce

Figure 66. Net.CommerceOnlineHelp
7.4 Printable Net.Commerce Book Files
The following Net.Commerce books are shipped with the product.These files
contain information that is required to perform some of the more common tasks
in Net.Commerce.
Two formats are available: postscript and PDF. To print a postscript file, you
must have a printer that is capable of printing postscript documents.To print a
PDF file, you can use the Adobe Acrobat Reader.If you do not have the Adobe
Acrobat Reader, you can download it for free from the Adobe Website at:
http://www.adobe.com

Net.Commerce Installation and Operations Guide, GC09-2509 (ncinst.pdf and
ncinst.ps)

Net.Commerce Administrator (ncadmin.pdf and ncadmin.ps)

Net.Commerce Template Designer (nctd.pdf and nctd.ps)

Net.Commerce Utilities (nc_util.pdf and nc_util.ps)

Net.Commerce Commands, Tasks, APIs, and Database Tables
(dbtofcmd.pdfand dbtofcmd.ps)
Chapter 7.Net.Commerce Basi c Confi gurati on
87

These files are available in the directory:
\QIBM\ProdData\HTTP\Public\NetCommerce\HTML\MRI2924\ncbooks
7.5 Net.Commerce User-Customizable Server Configuration
This section discusses user-specific changes that can be made to the
Net.Commerce server instance.The user can make changes to the following
files:

Net.Commerce server configuration file

Net.Data configuration file

QNETCOMM Web server instance configuration
7.5.1 Net.Commerce Server Configuration File
The mserver configuration file contains settings that affect the way the
Net.Commerce server operates. You can change any of the settings to meet the
requirements of your store or mall.
All variables must be specified unless noted otherwise.Trailing spaces entered
after a variable are allowed.There must be exactly one space between the
names of the fields and their value definitions.
The file is located in
/QIBM/UserData/NetCommerce/instance/mserver.ini
or
/QIBM/UserData/NetCommerce/instance/<your_instance_name>/mserver.ini
if you
created multiple Net.Commerce server instances.
The file will look similar to Figure 67.


MS_HOSTNAME <your_host_name>.<your_domain_name>
MS_PORT 14530
MS_HTADMIN QNETCOMM/htadm_ns
MS_HTPASS <instance_name>/QNETCOMM
MACRO_PATH/QIBM/ProdData/NetCommerce/Macro/MRI2924
MS_LOGPATH/QIBM/UserData/NetCommerce/instance/<instance_name/logs
WWW_HTML_PATH/QIBM/UserData/NetCommerce/instance/<instance_name>
MS_CGIBIN_PATH/QSYS.LIB/QNETCOMM.LIB
MS_DBNAME <database_name>
MS_DBINST <instance_name>
MS_DBPASS alafhcofnkapdfmc
MS_NUM_CHILD 2
NC_INST_PATH/QIBM/UserData/NetCommerce
NC_TEDITOR_PATH/QIBM/UserData/NetCommerce/instance/<instance_name>/teditor
NC_DMN_CACHE 1
#NC_DMN_SYNCH 1
NC_DMN_SLP_SEC 15
MS_TRANS_COUNT 1000
DB_RETRY_LIMIT 15
DB_RETRY_INTERVAL 60
MERCHANT_KEY ddbhgbmcclpomeddddbhgbmcclpomedd
NC_LANG 2924
MS_HTML_MAX 1000000


Figure 67. Net.CommerceServer ConfigurationFile
Table 5 on page 89 discusses each of the directives and gives their default
values.Be cautious when making changes as the instance may not start or may
act unexpectedly if invalid values are specified.
88
AS/400 e-commerce: Net.Commerce

Table 5 (Page 1 of 3). Net.CommerceServer ConfigurationFileDirectives
Directive
Description and Default Value
MS_HOSTNAME
The fully qualified TCP/IP domain name of your Net.Commerce server.
If you are running only one server instance, set this value to its fully
qualified host name.If you are running in a multi-home environment,
set each value to a unique, fully-qualified host name that is defined on
your system.This value is from Figure 29 on page 59.
Default: The domain name of the local host.
MS_PORT
The port number that the Net.Commerce director(s) uses to
communi cate wi th the Net.Commerce daemon.Thi s number must be
from 0 to 65535, and must not conflict with the port number assigned to
other servers.It must be greater than 1024, and must not be 1080 or
8080.Change this value only to adhere to the above conventions.This
value is from Figure 29 on page 59.
Default: A system-generated, random number that meets the above
restri cti ons.
MS_HTADMIN
The name of the program that updates the list of registered users in the
validation file.Change this value if you are using a custom program.
Default:
QNETCOMM/htadm_ns
(where
QNETCOMM
is the product library).
MS_HTPASS
The fully qualified name of the validation list that contains the list of
regi stered users.When shoppers regi ster with your store, thei r user
IDs and passwords are stored in this object.Change it if you wish to
save user IDs and passwords in a different location.Note: This value
must match the value of PasswdFile in the secure server configuration
file.
Default:
/
instance-name
/QNETCOMM
, where instance_name is the name of
the Net.Commerce coll ection l i brary.
MACRO_PATH
The fully qualified names of the directories that contain the
Net.Commerce macro files, separated by semi-colons (;).Change this
value only if you specified different directories when you configured the
Net.Commerce product.This value is from Figure 29 on page 59.
Default:
/QIBM/ProdData/NetCommerce/Macro/MRI2924
MS_LOGPATH
The fully qualified name of the directory in which the Net.Commerce
product writes its transaction logs.Change this value to write the logs
to a different directory.If no value is specified, spool files are created
f or user <i nst ance_name>.
The log files begin with the characters NC, followed by the date, with an
extension that matches the number of the process that created the file.
Default:
/QIBM/UserData/NetCommerce/instance/
instance_name
/logs
,
where
instance_name is the name of the Net.Commerce instance.
WWW_HTML_PATH
The fully qualified name of the Net.Commerce instance document root.
The document root contai ns the Net.Commerce server i niti alizati on file
mserver.ini
.This value is from Figure 29 on page 59.
Default:
/QIBM/UserData/NetCommerce/instance/instance_name
where
instance_name is the name of the Net.Commerce instance.
MS_CGIBIN_PATH
The fully qualified QSYS name of the library in which the Net.Commerce
director is located.
Default:
/QSYS.LIB/QNETCOMM.LIB
MS_DBNAME
The name of the relational database you wish to access.This value is
from Fi gure 29 on page 59.
Default:
*LOCAL
Chapter 7.Net.Commerce Basi c Confi gurati on
89

Table 5 (Page 2 of 3). Net.CommerceServer ConfigurationFileDirectives
Directive
Description and Default Value
MS_DBINST
The name of the database collection used by this Net.Commerce
instance.This database collection is owned by a user profile of the
same name.
Default: The name of the Net.Commerce instance.This name cannot be
changed.
MS_DBPASS
The encrypted password of the instance ID that is used to connect to
the database.To encrypt the password, add library
QNETCOMM
to the
library list and type the following:
CALL PGM(NC_CRYPT) PARM(′-e′
password
)
where password is your unencrypted password.The system responds
with a character string. Copy the string to the configuration file as the
value for MS_DBPASS.
Change this value if you change the password of your instance ID.
This value is from Figure 29 on page 59.
Default: No default is defined.
MS_NUM_CHILD
The number of processes that the Net.Commerce server starts to
handle requests from the Net.Commerce di rector.This number must be
from 2 to 99.Increase this value if you anticipate heavy traffic on your
site.Each process is an AS/400 child job under the Net.Commerce
parent job.This value is from Figure 29 on page 59.
Default:
2
NC_INST_PATH
The fully qualified name of the directory in which the Net.Commerce
instance files are kept.
Default:
/QIBM/UserData/NetCommerce
NC_TEDITOR_PATH
The name of the working directory for the Template Designer.Change
this value if you wish to use a different working directory.
Default:
/QIBM/UserData/NetCommerce/instance/
instance_name
/teditor
,
where
instance_name is the name of the Net.Commerce instance.
NC_DMN_CACHE
A flag that indicates whether caching is enabled for the Net.Commerce
server.Set this value to
0
to disable caching, and to
1
to enable
caching.Refer to the Net.Commerce online information system for
more i nformati on on cachi ng.
Default: The
NC_DMN_CACHE
is set to
1
by default.
NC_DMN_SYNCH
A flag that indicates whether the Synchronization Daemon is to
synchronize the validation list across Net.Commerce servers in a
mul ti pl e-system envi ronment.Set this value to
0
if you are running a
si ngl e-system envi ronment, and to
1
if you are running a
mul ti pl e-system envi ronment. Refer to the Net.Commerce onl i ne
Informati on system for more i nformati on on the Synchroni zati on
Daemon.
Default: The
NC_DMN_SYNCH
is set to
1
by default, but the entry in the
mserver.ini
file is commented out with a hash mark (
#
). To uncomment
the entry, thereby enabling the Synchronization Daemon to function,
simply edit the file and delete the hash mark.
90
AS/400 e-commerce: Net.Commerce

Table 5 (Page 3 of 3). Net.CommerceServer ConfigurationFileDirectives
Directive
Description and Default Value
NC_DMN_SLP_SEC
The number of seconds that the Synchronization Daemon sleeps
between cycles.When the Synchronization Daemon wakes up, it
synchronizes the validation list across all Net.Commerce servers in a
multiple-system environment if NC_DMN_SYNCH is not commented out
and not set to
0
.Refer to the Net.Commerce online Information system
for more i nformati on on the Synchroni zati on Daemon.
Default:
15
MS_TRANS_COUNT
The number of transactions that must occur in each Net.Commerce
server child process before it is ended.A value of zero will disable this
check.
Default:
1000
DB_RETRY_LIMIT
The number of times to retry attempts to connect to the database.
Setting this value to
0
would mean that the system does not retry
connecti on attempts.
Default:
15
DB_RETRY_INTERVAL
The number of seconds between attempts to retry connecting to the
database.
Default:
60
MERCHANT_KEY
The string that the system uses to encrypt the password file and the
passwords in the database.To determine which string to enter, add
QNETCOMM
to the library list and type the following:
CALL PGM(NC_CRYPT) PARM(′-e′
number
)
where number is a 16-digit hexadecimal number.Make sure the
number you type does not follow a predictable pattern.
After you type this command, the system responds with a character
string.Copy this string to the configuration file as the value for
MERCHANT_KEY.If you are running i n a multi pl e system envi ronment,
copy the same string into the configuration files for all servers.
The system sets this value initially, based on information you provide
duri ng confi gurati on.
Note:Do not change this value unless you have determined it is
necessary.Information that is encrypted with one key cannot be
decrypted wi th another.
This value is generated from the value entered in Figure 29 on
page 59.
Default: No default is defined.
NC_LANG
The language indicator for the Net.Commerce instance.For further
reference, see
IBM National Language Design Guide, Volume 2.
Default:
MRI2924
MS_HTML_MAX
The largest size of HTML pages that will be generated by
Net.Commerce macros, specified in bytes.Change this directive only if
your HTML pages may be larger than the default value.
Default:
1000000
Chapter 7.Net.Commerce Basi c Confi gurati on
91

7.5.2 Net.Data Configuration File
The Net.Data initialization file, member DB2WWW in file INI, contains the
directives that are used by the Net.Data component of the Net.Commerce
system.The configuration file will reflect the information provided on the
configuration page (Figure 29 on page 59) for macro paths.If the macros have
been added or moved, follow this step to modify the file.
A working copy of this file is located in
/QIBM/UserData/NetCommerce/instance/db2www.ini
or
/QIBM/UserData/NetCommerce/instance/<your_instance_name>/db2www.ini
if you
created multiple instances.
The file will look similar to Figure 68.


INCLUDE_PATH/QIBM/ProdData/NetCommerce/Macro/MRI2924/ncsample;/QIBM/ProdData/
NetCommerce/Macro/MRI2924/demomall;/QIBM/ProdData/NetCommerce/Macro/MRI2924;/
QIBM/UserData/NetCommerce/instance/<instance_name>/teditor/;/QIBM/ProdData/HTTP/
Public/NetCommerce/html/MRI2924
ENVIRONMENT (DTW_SQL)/QSYS.LIB/QNETCOMM.LIB/QNETCSQL.SRVPGM (IN SHOWSQL,
DB_CASE,DTW_SET_TOTAL_ROWS,OUT DTWTABLE,SQL_CODE,SQL_STATE,TOTAL_ROWS)
DTW_SQL_DEFAULT_EDITMASK COUNTRY_SPECIFIC
ENVIRONMENT (DTW_SYSTEM)/QSYS.LIB/QTCP.LIB/QTMHSYS.SRVPGM ()
MACRO_PATH /QIBM/ProdData/NetCommerce/Macro/MRI2924;/QIBM/ProdData/NetCommerce/
Macro/MRI2924/ncsample;/QIBM/ProdData/NetCommerce/Macro/MRI2924/demomall;/
QIBM/ProdData/NetCommerce/Macro/MRI2924/ncadmin;/QIBM/UserData/NetCommerce/
instance/<instance_name>/teditor


Figure 68. Net.DataConfigurationFile
Table 6 lists the Net.Data configuration file directives that you might wish to
change.
Table 6 (Page 1 of 2). Net.DataConfigurationFileDirectives
Directive
Description and Default Value
INCLUDE_PATH
The fully qualified names of the directories that contain the files
referred to on Net.Data %INCLUDE statements, entered on a single line
and separated by semicolons (;).Set this value to the names of the
directories in which you store your %INCLUDE files.
Default:
/QIBM/ProdData/NetCommerce/Macro/MRI2924/ncsample;
/QIBM/ProdData/NetCommerce/Macro/MRI2924/
instance_name
;
/QIBM/ProdData/NetCommerce/Macro/MRI2924;
/QIBM/UserData/NetCommerce/instance/
instance_name
/teditor;
/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924
ENVIRONMENT (DTW_SQL)
The SQL language environment variable is the fully qualified name of
the service program that Net.Data uses to execute SQL statements
through DB2/400.
ENVIRONMENT (DTW_SYSTEM)
The SYSTEM language environment variable is the fully qualified name
of the service program that Net.Data uses to call external programs on
the AS/400.
92
AS/400 e-commerce: Net.Commerce

Table 6 (Page 2 of 2). Net.DataConfigurationFileDirectives
Directive
Description and Default Value
DTW_SQL_DEFAULT_EDITMASK
COUNTRY_SPECIFIC
This line affects how numeric values from the database are presented
when extracted through Net.Data macros.The value of
COUNTRY_SPECIFIC indicates that the decimal point delimiter is
determined by the decimal point delimiter that is specified in the
Net.Commerce server job (MSERVERD).The MSERVERD job attributes
are obtained from the instance user profile which MSERVERD runs
under.
MACRO_PATH
The fully qualified names of the directories that contain the
Net.Commerce macro files, entered on a single line and separated by
semi-colons (;).Change this value only if you specified different
di rectori es when you instal l ed the Net.Commerce product.
Default:
/QIBM/ProdData/NetCommerce/Macro/MRI2924;
/QIBM/ProdData/NetCommerce/Macro/MRI2924/ncsample;
/QIBM/ProdData/NetCommerce/Macro/MRI2924/
instance_name
;
/QIBM/ProdData/NetCommerce/Macro/MRI2924/ncadmin;
/QIBM/UserData/NetCommerce/instance/
instance_name
/teditor
The Net.Data configuration file record length is longer than 240 bytes and
therefore cannot be edited or browsed using SEU, use
CPYTOSTMF
and
CPYFROMSTMF
and edit the file using a PC editor.
7.5.3 QNETCOMM Web Server Configuration
QNETCOMM is the Web server configuration built by the Net.Commerce
configuration program.The configuration file is located in
QUSRSYS/QATMHTTPC.
The file will look similar to Figure 69 on page 94.
Chapter 7.Net.Commerce Basi c Confi gurati on
93

#*****************************************************
#*** Net.Commerce/400 ICSS Server Configuration ***
#*****************************************************
Enable GET
Enable HEAD
Enable POST
#*****************************************************
######## IBM Net.Commerce ######## (Do not edit this section)
### Protect /msprotect/* <your_host_name>.<your_domain_name> {
Protect /msprotect/* <your_ip_address> {
ServerId Private_Authorization
Authtype Basic
Userid <your_instance_name>
GetMask All@(*)
PostMask All@(*)
Mask All@(*)
PasswdFile <your_instance_name>/QNETCOMM
}
Protect mserver.ini <your_ip_address> {
ServerId Private_Authorization
Authtype Basic
Userid <your_instance_name>
GetMask All@(*)
PostMask All@(*)
Mask All@(*)
PasswdFile <your_instance_name>/QNETCOMM
}
Pass/te_html/*/QIBM/UserData/NetCommerce/instance/<your_instance_name>/teditor/te_html/* <your_ip_address>
Service /cgi-bin/ncommerce/;display/* /QSYS.LIB/QNETCOMM.LIB/NCCACHE_IC.SRVPGM:nc_cache
Service /msprotect/ncommerce/;display/* /QSYS.LIB/QNETCOMM.LIB/NCCACHE_IC.SRVPGM:nc_cache
ServerInit /QSYS.LIB/QNETCOMM.LIB/NCCACHE_IC.SRVPGM:nc_init_cache
Map/msprotect/ncommerce/* /msprotect/ncommerce.pgm/*
Map/cgi-bin/ncommerce/* /cgi-bin/ncommerce.pgm/*
Exec/msprotect/* /QSYS.LIB/QNETCOMM.LIB/*
Exec/cgi-bin/*/QSYS.LIB/QNETCOMM.LIB/*
Search/QSYS.LIB/QNETCOMM.LIB/SERVEFILE.PGM
DefaultFsCCSID 37
DefaultNetCCSID 819
Pass/storemgr/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/storemgr/*
Pass/sitemgr/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/sitemgr/*
Pass /ncacom/* /QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/common/*
Pass /ncagif/* /QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/gif/*
Pass /butnbars/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/butnbars/*
Pass /ncadmin/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/*
Pass /nchelp/* /QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/nchelp/*
Pass /ncerror/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncerror/*
Pass /ncbooks/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncbooks/*
Pass /ncsample/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncsample/*
Pass /demomall/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/demomall/*
Pass /teditor/*/QIBM/ProdData/HTTP/Public/NetCommeerce/html/teditor/*
AddType.js application/x-javascript binary 1.0 #Net.Commerce java
sslmode On
######## End of IBM Net.Commerce ########
############### DO NOT REMOVE ## OR MOVE #########
#
Pass //QIBM/ProdData/HTTP/Public/TC1/ICSS/HTML/Welcome.html
Pass /sample/*/QIBM/ProdData/HTTP/Public/TC1/ICSS/HTML/*
#
######## IBM Net.Commerce (Pass) ######## (Do not edit this section)
Pass/*/QIBM/UserData/NetCommerce/instance/<your_instance_name>/* <your_ip_address>
######## End of IBM Net.Commerce (Pass) ########
############### DO NOT REMOVE ## OR MOVE #########
normalmode On
sslport 443
keyfile /QIBM/USERDATA/WWW/KEYFILE.KYR
Figure 69. Net.CommerceWebServer ConfigurationFile
Table 7 on page 95 lists the QNETCOMM Web server configuration file directives
that you may wish to change.
94
AS/400 e-commerce: Net.Commerce

Table 7 (Page 1 of 2). QNETCOMMWebServer ConfigurationFileDirectives
Directive
Description
Protect/msprotect/*
This protection setup is applying basic authentication (Authtype Basic)
to requests with a request URI of /msprotect/*.The basic
authenti cati on useri ds/passwords are veri fi ed usi ng the val i dati on l i st
(PasswdFi l e) l ocated at <i nstance_name>/QNETCOMM.While within
this protection setup the Web server will run under the user profile
<i nst ance_name>.The protection setup has an IP address template
such that the protection setup is associated with a Net.Commerce
instance.
The configuration routine substitutes IP addresses for hostnames.So,
t he ser ver name <your _host _name>.<your _domai n_name> i s
substi tuted by <your_i p_address> i n al l the di recti ves.
Protect mserver.i ni
This protection setup is applying basic authentication (Authtype Basic)
to requests with a request URI of mserver.ini.The basic authentication
userids/passwords are verified using the validation list (PasswdFile)
l ocat ed at <i nst ance_name>/QNETCOMM.While within this protection
setup the Web server will run under the user profile
<i nst ance_name>.The protection setup has an IP address template
such that the protection setup is associated with a Net.Commerce
instance.
The configuration routine substitutes IP addresses for hostnames.So,
t he ser ver name <your _host _name>.<your _domai n_name> i s
substi tuted by <your_i p_address> i n al l the di recti ves.
Pass/te_html/*
Thi s server di recti ve appl i es to templ ate desi gner requests (requests
with a URI of /te_html/*).Request routing is used within this directive
to route template designer requests to data specific to each
Net.Commerce server i nstance.
Servi ce
Servi ce
ServerIni t
These directives are used by server caching.See 8.1, “Caching” on
page 97.
Map/msprotect/ncommerce/*
Maps secure ncommerce command requests to ncommerce.pgm.
Map/cgi -bi n/ncommerce/*
Maps unsecure ncommerce command requests to ncommerce.pgm.
Exec/msprotect/*
This directive accepts secure CGI program requests that execute
Net.Commerce programs responsi bl e for executi ng Net.Commerce
commands.The protection setup for requests to /msprotect/* discussed
above authenti cates these requests.
Exec/cgi -bi n/*
This directive accepts non-secure CGI program requests that execute
Net.Commerce programs responsi bl e for executi ng Net.Commerce
commands.
Search
The search directive sets up the default search application for the Web
server.
DefaultFsCCSID and
DefaultNetCCSID
During configuration, the Net.Commerce Web server instance,
QNETCOMM, is configured with the DefaultFsCCSID and
DefaultNetCCSID values that match the Net.Commerce feature code.
These values control the conversion from EBCDIC to ASCII that the
Web server instance will perform.These values are set correctly for
the files shipped with the feature code and should not need to be
al tered.
Chapter 7.Net.Commerce Basi c Confi gurati on
95

Table 7 (Page 2 of 2). QNETCOMMWebServer ConfigurationFileDirectives
Directive
Description
Pass/st oremgr/*
Pass/si temgr/*
Pass/ncacom/*
Pass/ncagi f/*
Pass/butnbars/*
Pass/ncadmi n/*
Pass/nchel p/*
Pass/ncerror/*
Pass/ncbooks/*
Pass/ncsampl e/*
Pass/demomal l/*
These directives set up the various paths needed by Net.Commerce for
administrati on routi nes and help fil es.
AddType.js
This line adds a MIME type for handling javascript.
ssl mode
This directive allows the server to accept requests on port 443 (SSL
requests).
Pass/
Pass/sampl e/*
These directives handles requests that are not specific to
Net.Commerce.This can be used to allow non-Net.Commerce Web
server requests to be handled by this Web server.We discuss this in
8.5, “Coexistence of Net.Commerce with a Non-Net.Commerce Web
Server” on page 110.
Pass/*
This directive uses request routing to pass requests to the appropriate
Net.Commerce instance depending on the IP address the request came
in on.
ssl port
This directive allows the server to accept requests on port 443 (SSL
requests).
normal mode on
This directive allows the server to accept requests on port 80 (non-SSL
requests).
keyfi l e
For SSL requests, this directive determines the location of the SSL key
file.
96
AS/400 e-commerce: Net.Commerce

Chapter 8.Net.Commerce Advanced Configuration
In this chapter we look at the advanced configuration of Net.Commerce for
AS/400.The chapter covers the following topics:

Caching

Setting up remote database access

Setting up multiple Net.Commerce server instances on the same system

Setting up multiple Net.Commerce server instances on multiple systems

Coexistence of Net.Commerce with a non-Net.Commerce Web server
8.1 Caching
The Net.Commerce caching utility improves the performance of displaying HTML
product and category pages to shoppers by storing these pages in a directory or
″cache″.The cache feature allows Net.Commerce to reproduce product and
category pages without having to access the database redundantly.
Net.Commerce database caching can be enabled in three phases:

Net.Commerce HTML pages cached

Enabling database triggers

Synchronization daemon
Phase 1 provides ICAPI enablement and is enabled by default, phase 2 enables
cache triggers that capture database changes and phase 3 enables the
synchronization daemon that presents these database changes to the shopper.
Phase 2 and 3 ensure that when the product and category pages change, the old
pages are automatically purged from the cache directory.This prevents ″stale″
information from appearing on the Web site.
For store applications that have static data (merchandise rarely changes), phase
1 is all that is required.
8.1.1 Enabling Phase 2 Caching
Phase 2 caching (enabling the cache triggers), should be done after the initial
database population.To enable phase 2 caching, perform the following tasks:
1. Sign on to the AS/400 system wi th a user ID wi th SECOFR authority.
2. Add the Net.Commerce server i nstance l i brary to your l i brary list by enteri ng
the following command:
ADDLIBLE LIB(<instance_name>)
3. Enable the cache triggers by enteri ng the fol lowi ng:
CALL PGM(QNETCOMM/QNEADDTR) PARM(<instance_name>)
This program will add the necessary triggers to the files for caching.Once
completed, messages on the command entry screen notify you of successes
or failures (Figure 70 on page 98).
©
Copyright IBM Corp. 1999
97



Command Entry AS112
Request level:6
All previous commands and messages:
6 > ADDLIBLE <instance_name>
Library <instance_name> added to library list.
6 > CALL PGM(QNETCOMM/QNEADDTR) PARM(ITSCNC5)
Trigger added to physical file.
Trigger added to physical file.
Trigger added to physical file.
Trigger added to physical file.
Trigger added to physical file.
Trigger added to physical file.
Trigger added to physical file.
Trigger added to physical file.
Trigger added to physical file.
More...
Type command, press Enter.
===> _________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
F3=Exit F4=Prompt F9=Retrieve F10=Exclude detailed messages
F11=Display full F12=Cancel F13=Information Assistant F24=More keys


Figure 70. ConfirmationMessagesfor CachingTriggers
8.1.2 Enabling Phase 3 Caching
To enable phase 3 caching (the synchronization daemon), perform the following
tasks:
1. Sign on to the AS/400 system usi ng a user ID wi th SECOFR authority.
2. Start the synchroni zati on daemon by enteri ng the following:
CALL PGM(QNETCOMM/MS_SYNCHD) PARM(′-I′ <html_path>)
Where
<html_path>
is as entered in Figure 29 on page 59.
The
mserver.ini
NC_DMN_SLP_SEC 15 parameter (see Figure 71 on page 99)
controls how frequently the synchronization daemon wakes up to do the
checking.The default is every 15 seconds.
8.1.3 Disabling Phase 1 Caching
To disable phase 1 caching:
1. Modify the
mserver.ini
file i n the instance directory:
/QIBM/UserData/NetCommerce/instance/mserver.ini
or
/QIBM/UserData/NetCommerce/instance/<instance_name>/mserver.ini
if you
have created multiple instances.
Since the AS/400 cannot natively edit this file it is necessary to use Client
Access, FTP, or another method to edit the file.
Add a comment mark (#) to the beginning of the
NC_DMN_CACHE 1
line as
highlighted in Figure 71 on page 99.
98
AS/400 e-commerce: Net.Commerce



MS_HOSTNAME <your_host_name>.<your_domain_name>
MS_PORT 14530
MS_HTADMIN QNETCOMM/htadm_ns
MS_HTPASS NTCINST1/QNETCOMM
MACRO_PATH/QIBM/ProdData/NetCommerce/Macro/MRI2924
MS_LOGPATH/QIBM/UserData/NetCommerce/instance/<your_instance_name/logs
WWW_HTML_PATH/QIBM/UserData/NetCommerce/instance/<your_instance_name>
MS_CGIBIN_PATH/QSYS.LIB/QNETCOMM.LIB
MS_DBNAME <your_database_name>
MS_DBINST <your_instance_name>
MS_DBPASS alafhcofnkapdfmc
MS_NUM_CHILD 2
NC_INST_PATH/QIBM/UserData/NetCommerce
NC_TEDITOR_PATH/QIBM/UserData/NetCommerce/instance/<your_instance_name>/teditor
#NC_DMN_CACHE 1
#NC_DMN_SYNCH 1
NC_DMN_SLP_SEC 15
MS_TRANS_COUNT 1000
DB_RETRY_LIMIT 15
DB_RETRY_INTERVAL 60
MERCHANT_KEY ddbhgbmcclpomeddddbhgbmcclpomedd
NC_LANG 2924
MS_HTML_MAX 1000000


Figure 71. Net.CommerceServer ConfigurationFile
2. Modify the QNETCOMM Web server configuration.From the command line,
type:
WRKHTTPCFG CFG(QNETCOMM)
The screen in Figure 72 is displayed.Page down until you find the lines
highlighted in Figure 72.Use option 2 (change) to comment out these lines
with a comment mark (#) as shown.


Work with HTTP Configuration
System:AS1
Configuration name . . . . . . . :QNETCOMM
Type options, press Enter.
1=Add 2=Change 3=Copy 4=Remove 5=Display 13=Insert
Sequence
Opt Number Entry
___ _____ _______________________________________________________
___ 01110 PasswdFile <instance_name>/QNETCOMM
___ 01120 }
___ 01130
___ 01140 Pass/te_html/*/QIBM/UserData/NetCommerce/instanc >
___ 01150
___ 01160 #Service/cgi-bin/ncommerce/;display/*/QSYS.LIB/QNETCO >
___ 01170 #Service/msprotect/ncommerce/;display/*/QSYS.LIB/QNET >
___ 01180 #ServerInit/QSYS.LIB/QNETCOMM.LIB/NCCACHE_IC.SRVPGM >
___ 01190
___ 01200 Map /msprotect/ncommerce/*/msprotect/ncommerce.pgm >
F3=Exit F5=Refresh F6=Print List F12=Cancel F17=Top F18=Bottom
F19=Edit Sequence


Figure 72. HTTPConfigurationfilefor QNETCOMM
Chapter 8.Net.Commerce Advanced Confi gurati on
99

8.1.4 Disabling Phase 2 Caching
To disable phase 2 caching, follow these steps:
1. Signon to the AS/400 system wi th a user ID wi th SECOFR authority.
2. Add the Net.Commerce server i nstance l i brary to your l i brary list by enteri ng
the following command:
ADDLIBLE LIB(<instance_name>)
3. Disable the cache tri ggers by enteri ng the fol lowi ng:
CALL PGM(QNETCOMM/QNERMVTR) PARM(<instance_name>)
8.1.5 To Activate the Changes
To activate any changes made, perform the following steps:
1. Stop and restart the QNETCOMM Web server instance,as descri bed i n 9.1.4,
“Stopping the Net.Commerce Web Server Instance” on page 118 and 9.1.3,
“Starting the Net.Commerce Web Server Instance” on page 116.
2. Stop and restart the Net.Commerce server,as descri bed i n 9.1.6,“Stoppi ng
the Net.Commerce Server” on page 119 and 9.1.5, “Starting the
Net.Commerce Server” on page 118.
8.2 Setting Up Remote Database Access
If you are using a relational database other than *LOCAL (Figure 73), or if you
are using more than one server system, you will need to set up the database for
remote access.
Figure 73. Net.CommerceUsingRemoteDatabase
Follow Chapter 6, “Net.Commerce Installation” on page 47 and Chapter 7,
“Net.Commerce Basi c Confi gurati on” on page 55 to install and configure
Net.Commerce for a local database.To change the database from local to
remote, do the following:
1. Create a user profile of the instance name on the remote system.The
password must be the same as on the *LOCAL system, as entered on the
instance property screen (Figure 29 on page 59).
2. Restore and copy the database collection from the *LOCAL system.To do
this, do the following:
100
AS/400 e-commerce: Net.Commerce

a.Type the following command on the *LOCAL system:
SAVLIB <instance_DB_collection>
and follow the prompts.
b.Copy the save library to the remote system using a tape, SNADS, or FTP.
c. On the remote system,type:
RSTLIB <instance_DB_collection>
and follow the prompts.
3. On the *LOCAL system,add your remote database to the relati onal database
directory by executing the following command:
ADDRDBDIRE RDB(<system_name>) RMTLOCNAME(<location_name><type>)
TEXT(′RDB <location_name>′)
Type = *IP or *SNA
4. Enter the fol l owi ng from the command l i ne of the *LOCAL system:
CRTSQLPKG PGM(QNETCOMM/MSERVERD) RDB(<remote_database_name>)
USER(<instance_DB_collection>) PASSWORD(<value>)
DFTRDBCOL(<instance_DB_collection>) MODULE(DB2LINK)
TEXT(′SQL package for Net.Comm DB collection
<instance_DB_collection>)
You will see confirmation messages that the package has been created
successfully (Figure 74).


Command Entry <HOSTNAME>
Request level:9
All previous commands and messages:
9 > CRTSQLPKG PGM(QNETCOMM/MSERVERD) RDB(RCH12345) USER(ITSCNC2) PASSWORD() D
FTRDBCOL(ITSCNC2) MODULE(DB2LINK) TEXT(′SQL package for Net.Comm DB colle
ction ITSCNC2′)
Remote database job started.
SQL package DB2LINK in QGPL at RCH12345 has been created.
Bottom
Type command, press Enter.
===> _________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________________
F3=Exit F4=Prompt F9=Retrieve F10=Exclude detailed messages
F11=Display full F12=Cancel F13=Information Assistant F24=More keys


Figure 74. CRTSQLPKGConfirmationMessages
Notice that the SQL package is created on the remote system, not on the
local system.
5. If you di d not specify the remote database when you created the
Net.Commerce instance, you must change the
MS_DBNAME
field in the
mserver.ini
file, to the correct remote database name.See the
Net.Commerce server configuration file (Figure 67 on page 88).
Chapter 8.Net.Commerce Advanced Confi gurati on
101

6. You can now start the Net.Commerce Server i nstance as descri bed i n 9.1.5,
“Starting the Net.Commerce Server” on page 118.
Once you have completed the remote database setup, you can drop the instance
collection on the *LOCAL system.However, the instance library must be kept
and INI.FILE and QNETCOMM.VLDL must remain within it.The instance user
profile must exist on both the remote and *LOCAL system.
Interactive SQL can be used to verify the remote database connection:
STRSQL
CONNECT TO <remote_database_name>
SELECT * FROM <collection_name>/MALL
8.3 Setting Up Multiple Net.Commerce Server Instances on the Same System
This section discusses how to set up your Net.Commerce system to run multiple
Net.Commerce server instances on a single system and is referred to as a
multihome configuration.When you plan this configuration, it is important to
remember:

That the AS/400 needs to be powerful enough to handle the load.

That a Net.Commerce server instance can connect to only one
Net.Commerce database collection.

That the Net.Commerce database can support only one mall.This mall could
be comprised of multiple stores or a single store (a single store
Net.Commerce implementation is a mall of one store).
When there is more than one Net.Commerce server instance on a single AS/400,
each instance is connected to a separate database collection (Figure 75 on
page 103).A shopper accesses a particular instance by specifying the domain
host name in the URL, and the Web server determines which instance the
shopper wants to access.
102
AS/400 e-commerce: Net.Commerce

Figure 75. MultipleInstanceConfiguration
Each server instance has its own
mserver.ini
file, which contains the host name,
the database name, and the port number.Also, each instance has its own copy
of the member DB2WWW in file INI, the Net.Data initialization file, which contains
the macro path and the HTML path that are unique to that instance.These
initialization files must reside in the appropriate places.The
mserver.ini
must
be in the HTML document root, and the INI(DB2WWW) in the collection library.
The QNETCOMM Web server configuration file defines the Net.Commerce
servers so that it is able to map the multiple IP addresses to multiple document
roots.Each Net.Commerce instance has its own document root where the
mserver.ini
Net.Commerce server initialization file resides.
Figure 76 on page 104 gives an example of how you can set up your
Net.Commerce system to support two IP addresses and two database collections
on a single system.In this example, the IP addresses are 10.1.1.1 and 10.1.1.2,
and the corresponding host names are mall1.com and mall2.com.
Chapter 8.Net.Commerce Advanced Confi gurati on
103

Figure 76. MultipleInstancesonSingleSystem
To configure the system based on this example, follow these steps:
1. Perform the pre-installation steps and installation steps found i n Chapter 6,
“Net.Commerce Instal l ati on” on page 47.
2. Each Net.Commerce server i nstance must be assi gned a uni que hostname/IP
address.Follow these steps to add an IP address to a LAN interface.
a.To add a new IP address, you use the command
ADDTCPIFC
.


Add TCP/IP Interface (ADDTCPIFC)
Type choices, press Enter.
Internet address . . . . . . . . > 10.1.1.2
Line description . . . . . . . .TRNLINE Name, *LOOPBACK
Subnet mask. . . . . . . . . .255.255.255.0


Figure 77. AddingaTCP/IPInterface
b.To see what IP addresses are active, and to start and end IP sessions,
use the command
WRKTCPSTS *IFC
.
104
AS/400 e-commerce: Net.Commerce



Work with TCP/IP Interface Status
System:AS1
Type options, press Enter.
5=Display details 8=Display associated routes 9=Start 10=End
12=Work with configuration status 14=Display multicast groups
Internet Network Line Interface
Opt Address Address Description Status
___ 10.1.1.1 10.1.1.0 TRNLINE Active
___ 10.1.1.2 10.1.1.0 TRNLINE Active
___ 127.0.0.1 127.0.0.0 *LOOPBACK Active


Figure 78. WorkingwithTCP/IPInterfaces:VerifyingTCP/IPInterfaceStatus
3. Perform the instance configuration for mall1.com using the detailed
instructions found in Chapter 7, “Net.Commerce Basic Configuration” on
page 55.Pay special attention to the Host Name and HTML Path fields as
they apply to this multihome configuration.
4. Perform the instance configuration for mall2.com using the detailed
instructions found in Chapter 7, “Net.Commerce Basic Configuration” on
page 55.Pay special attention to the Host Name and HTML Path fields as
they apply to this multihome configuration.
5. The configuration routi ne for Net.Commerce creates a new configurati on file
for QNETCOMM every time a Net.Commerce server instance is added or
deleted.
The Net.Commerce Configuration routine puts a backup of the existing
QNETCOMM config in the member QNETCOMM00.Use the
WRKHTTPCFG
QNETCOMM00
command to view the backup configuration.
8.3.1 Configuration Details
Net.Commerce uses request routing to handle multiple Net.Commerce server
instances from within a single Web server instance (QNETCOMM).Each
Net.Commerce instance has an unique address assigned to it, and the
QNETCOMM Web server instance listens on these addresses for Net.Commerce
requests.Depending on the address of the server on the request, the
Net.Commerce server serves up the necessary file.
When the second Net.Commerce instance was added - called MALL2 on server
MALL2.COM (10.1.1.2) - the lines highlighted in Figure 79 on page 106 and
Figure 80 on page 107 were added to the QNETCOMM configuration file.
Chapter 8.Net.Commerce Advanced Confi gurati on
105

#*****************************************************
#*** Net.Commerce/400 ICSS Server Configuration ***
#*****************************************************
#
#*****************************************************
Enable GET
Enable HEAD
Enable POST
#************************************************************
######## IBM Net.Commerce ######## (Do not edit this section)
### Protect /msprotect/* mall1.com {
Protect /msprotect/* 10.1.1.1 {
ServerId Private_Authorization
Authtype Basic
Userid MALL1
GetMask All@(*)
PostMask All@(*)
Mask All@(*)
PasswdFile MALL1/QNETCOMM
}
Protect mserver.ini 10.1.1.1 {
ServerId Private_Authorization
Authtype Basic
Userid MALL1
GetMask All@(*)
PostMask All@(*)
Mask All@(*)
PasswdFile MALL1/QNETCOMM
}
Pass/te_html/*/QIBM/UserData/NetCommerce/instance/mall1/teditor/te_html/* 10.1.1.1
### Protect /msprotect/* mall2.com {
Protect /msprotect/* 10.1.1.2 {
ServerId Private_Authorization
Authtype Basic
Userid MALL2
GetMask All@(*)
PostMask All@(*)
Mask All@(*)
PasswdFile MALL2/QNETCOMM
}
Protect mserver.ini 10.1.1.2 {
ServerId Private_Authorization
Authtype Basic
Userid MALL2
GetMask All@(*)
PostMask All@(*)
Mask All@(*)
PasswdFile MALL2/QNETCOMM
}
Pass/te_html/*/QIBM/UserData/NetCommerce/instance/mall2/teditor/te_html/* 10.1.1.2
Service /cgi-bin/ncommerce/;display/* /QSYS.LIB/QNETCOMM.LIB/NCCACHE_IC.SRVPGM:nc_cache
Service /msprotect/ncommerce/;display/* /QSYS.LIB/QNETCOMM.LIB/NCCACHE_IC.SRVPGM:nc_cache
ServerInit /QSYS.LIB/QNETCOMM.LIB/NCCACHE_IC.SRVPGM:nc_init_cache
Map/msprotect/ncommerce/* /msprotect/ncommerce.pgm/*
Map/cgi-bin/ncommerce/* /cgi-bin/ncommerce.pgm/*
Figure 79. Net.CommerceWebServer ConfigurationFile(Part 1of 2)
106
AS/400 e-commerce: Net.Commerce

Exec/msprotect/*/QSYS.LIB/QNETCOMM.LIB/*
Exec/cgi-bin/*/QSYS.LIB/QNETCOMM.LIB/*
Search/QSYS.LIB/QNETCOMM.LIB/SERVEFILE.PGM
Pass/storemgr/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/storemgr/*
Pass/sitemgr/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/sitemgr/*
Pass /ncacom/* /QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/common/*
Pass /ncagif/* /QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/gif/*
Pass /butnbars/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/butnbars/*
Pass /ncadmin/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncadmin/*
Pass /nchelp/* /QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/nchelp/*
Pass /ncerror/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncerror/*
Pass /ncbooks/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncbooks/*
Pass /ncsample/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/ncsample/*
Pass /demomall/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/MRI2924/demomall/*
Pass /teditor/*/QIBM/ProdData/HTTP/Public/NetCommerce/html/teditor/*
AddType.js application/x-javascript binary 1.0 #Net.Commerce java
sslmode On
######## End of IBM Net.Commerce ########
############### DO NOT REMOVE ## OR MOVE #########
#
Pass //QIBM/ProdData/HTTP/Public/TC1/ICSS/HTML/Welcome.html
Pass /sample/*/QIBM/ProdData/HTTP/Public/TC1/ICSS/HTML/*
#
######## IBM Net.Commerce (Pass) ######## (Do not edit this section)
Pass/*/QIBM/UserData/NetCommerce/instance/mall1/* 10.1.1.1
Pass/*/QIBM/UserData/NetCommerce/instance/mall2/* 10.1.1.2
######## End of IBM Net.Commerce (Pass) ########
############### DO NOT REMOVE ## OR MOVE #########
normalmode On
sslport 443
keyfile /QIBM/USERDATA/WWW/KEYFILE.KYR
Figure 80. Net.CommerceWebServer ConfigurationFile(Part 2of 2)
The new Web server directives add a validation list for the new Net.Commerce
server instance and associate requests that come in on the IP address allocated
to the new server instance (10.1.1.2) with data applicable to the new server
instance.
Ensure that the configuration has been successful for each instance by
performing the instructions in 7.3, “Verifying a Successful Net.Commerce
Installation and Configuration” on page 77.
Chapter 8.Net.Commerce Advanced Confi gurati on
107

8.4 Setting Up Multiple Net.Commerce Server Instances on Multiple Systems
This section discusses how to set up your Net.Commerce system to run multiple
Net.Commerce server systems that all access the same database (Figure 81).
When you plan this configuration, it is important to remember that a
Net.Commerce instance can connect to only one database collection, and the
database can support only one mall or store.This configuration therefore
represents a single mall or store (single database) being served by multiple
Net.Commerce servers.The router is distributing the load across the multiple
servers.
Note
You must purchase a Net.Commerce license for each processor.
Figure 81. MultipleInstanceServerswithaSingleDatabaseCollection
In this scenario, each Net.Commerce Server must be configured with the same
Net.Commerce instance using the same remote database.The router controls to
which system the requests are sent.A shopper specifies one URL and the
router determines which server will process the request.
To configure the system based on this example, follow these steps:
1. Perform the pre-installation steps and installation steps found i n Chapter 6,
“Net.Commerce Instal l ati on” on page 47 for each Net.Commerce server.
2. Configure the router to route requests to the servers.
3. Perform the i nstance confi gurati on for each Net.Commerce server usi ng the
detailed instructions found in Chapter 7, “Net.Commerce Basic
Configuration” on page 55.Make sure you specify the same instance name,
108
AS/400 e-commerce: Net.Commerce

merchant key and database name (and password) for each instance.Each
Net.Commerce server would have a unique host name.The router network
despatcher function maps the host name accessed by the shopper to the
Net.Commerce server host names.
4. Configure the remote database using the instructions in 8.2,“Setti ng Up
Remote Database Access” on page 100.Perform steps 2 (copying the
database collection to the remote system) and 4 (create SQL package) from
one system only.
5. Ensure that the configuration has been successful for each instance by
performing the instructions in 7.3, “Verifying a Successful Net.Commerce
Installation and Configuration” on page 77.
6. Synchronize the vali dation lists.In 8.1,“Cachi ng”on page 97 we showed
how the synchronization daemon is used to remove obsolete pages from the
Net.Commerce cache. The synchronization daemon can also be used to
synchronize validation lists across multiple Net.Commerce servers.To
enable the synchronization daemon for this task, follow these steps:
a.Modify the
mserver.ini
file in the instance directory:
/QIBM/UserData/NetCommerce/instance/mserver.ini
or
/QIBM/UserData/NetCommerce/instance/<instance_name>/mserver.ini
if
you have created multiple instances.
Since the AS/400 cannot natively edit this file it is necessary to use
Client Access, FTP, or another method to edit the file.
Remove the comment mark (#) from the beginning of the
NC_DMN_SYNCH 1
line as highlighted in Figure 82.


MS_HOSTNAME <your_host_name>.<your_domain_name>
MS_PORT 14530
MS_HTADMIN QNETCOMM/htadm_ns
MS_HTPASS NTCINST1/QNETCOMM
MACRO_PATH/QIBM/ProdData/NetCommerce/Macro/MRI2924
MS_LOGPATH/QIBM/UserData/NetCommerce/instance/<your_instance_name/logs
WWW_HTML_PATH/QIBM/UserData/NetCommerce/instance/<your_instance_name>
MS_CGIBIN_PATH/QSYS.LIB/QNETCOMM.LIB
MS_DBNAME <your_database_name>
MS_DBINST <your_instance_name>
MS_DBPASS alafhcofnkapdfmc
MS_NUM_CHILD 2
NC_INST_PATH/QIBM/UserData/NetCommerce
NC_TEDITOR_PATH/QIBM/UserData/NetCommerce/instance/<your_instance_name>/teditor
NC_DMN_CACHE 1
NC_DMN_SYNCH 1
NC_DMN_SLP_SEC 15
MS_TRANS_COUNT 1000
DB_RETRY_LIMIT 15
DB_RETRY_INTERVAL 60
MERCHANT_KEY ddbhgbmcclpomeddddbhgbmcclpomedd
NC_LANG 2924
MS_HTML_MAX 1000000


Figure 82. Net.CommerceServer ConfigurationFile
b.Start the synchronization daemon by entering:
CALL PGM(QNETCOMM/MS_SYNCHD) PARM(′-I′ <html_path>)
Where
<html_path>
is as entered in Figure 29 on page 59.
Chapter 8.Net.Commerce Advanced Confi gurati on
109

The synchronization daemon will now keep the local validation list
<INSTANCE_NAME>/QNETCOMM
synchronized with the copy on the database
system.
The
mserver.ini
NC_DMN_SLP_SEC 15 parameter controls how frequently
the synchronization daemon wakes up to do the checking.The default is
every 15 seconds.
7. Ensure that the compl ete confi gurati on has been successful by routi ng
requests through the router.
8.5 Coexistence of Net.Commerce with a Non-Net.Commerce Web Server
By default, the Net.Commerce Web server instance (QNETCOMM) listens for
HTTP requests on port 80 and HTTPS requests on port 443 for all IP addresses.
With this default setup, no other Web server instance can run on either port 80 or
443 while Net.Commerce is running.Port 80 (non-SSL) and 443 (SSL) are the
default HTTP ports used when a port is not specified in the URL request.To run
a non-Net.Commerce Web server when Net.Commerce is running, the server
would have to be associated with a non-default port and requests for this server
would have to specify the port in the request in the form
http://<server_name>:<port_number>
.This may be workable in an intranet
environment but inconvenient in an Internet environment.In this section we look
at some options that allow a non-Net.Commerce Web server to run concurrently
with the Net.Commerce Web server QNETCOMM.We look at the following
options:

HostName and BindSpecific Web server directives

Pass / and Pass /sample/* Web server directives

Client pull
8.5.1 HostName and BindSpecific Web Server Directives
When the bindspecific server directive is set on (
BindSpecific On
), the server
binds to the IP address specified in the hostname directive only (
HostName
<host_name>
), instead of binding to all local IP addresses.
Use the
WRKHTTPCFG QNETCOMM
command to modify the Net.Commerce Web server
such that it binds only to the host name being used for Net.Commerce.
110
AS/400 e-commerce: Net.Commerce

#*****************************************************
#*** Net.Commerce/400 ICSS Server Configuration ***
#*****************************************************
#
#
#
BindSpecific On
HostName mal l 1
#*****************************************************
Enable GET
Enable HEAD
Enable POST
#************************************************************
######## IBM Net.Commerce ######## (Do not edi t thi s secti on)
### Protect /msprotect/* mal l 1.com {
Protect /msprotect/* 10.1.1.1 {
ServerId Pri vate_Authori zati on




Figure 83. HostnameandBindspecificServer Directives
With Net.Commerce bound to the host name being used by Net.Commerce, other
servers can then concurrently use ports 80 and 443 bound to other host names.
Note:This option can only be used when there is a single Net.Commerce server
instance - there can be only one Hostname directive.
8.5.2 Pass / and Pass /sample/* Web Server Directives
It is possible for the Net.Commerce Web server (QNETCOMM) to accept
non-Net.Commerce requests provided these requests are not received on an IP
address associated with a Net.Commerce server instance.QNETCOMM
provides two sever directives that allow for this.If we use the
WRKHTTPCFG
QNETCOMM
command to look at the Net.Commerce Web server directives, the
following directives direct Net.Commerce requests to Net.Commerce files:
###### IBM Net.Commerce (Pass) ###### (Do not edit this section)
Pass/*/QIBM/UserData/NetCommerce/instance/mall1/* 10.1.1.1
Pass/*/QIBM/UserData/NetCommerce/instance/mall2/* 10.1.1.2
###### End of IBM Net.Commerce (Pass) ######
10.1.1.1 and 10.1.1.2 are the IP addresses associated with the Net.Commerce
server instances.
The following directives handle requests that are not associated with a
Net.Commerce server instance:
Pass//QIBM/ProdData/HTTP/Public/TC1/ICSS/HTML/Welcome.html
Pass/sample/*/QIBM/ProdData/HTTP/Public/TC1/ICSS/HTML/*
These two directives allow the sample IBM-supplied home page to be served on
any address not bound to one of the Net.Commerce instances.In our example,
the address 10.2.2.1 is not bound to any Net.Commerce instance, so the URL
http://10.2.2.1/
will serve the sample home page shown in Figure 84 on
page 112.
Chapter 8.Net.Commerce Advanced Confi gurati on
111

Figure 84. TheDefault HomePageSuppliedbyIBM
You can replace this sample home page with any HTML page you create.
Any changes made to the QNETCOMM Web server configuration file should be
made outside of the blocks marked #### (Do not edit this section) ####.
Important
If you choose to edit the QNETCOMM Web server configuration file manually,
please ensure that any directives you insert do not interfere with the
operation of the existing Net.Commerce related directives.
8.5.3 Client Pull
In the above example we mentioned the use of a redirect to redirect a browser
request to a non-Net.Commerce Web server. An alternative to this is to use a
function called
Client Pull.Using client pull it is possible to transfer users
directly from Welcome.html (or any other page) to a different URL.This is
implemented using browser-specific meta-directives in the home page, and
causes the browser to automatically load a different specified URL after a certain
number of seconds.
Client pull uses a meta-directive of the following form:
112
AS/400 e-commerce: Net.Commerce

<META HTTP-EQUIV=REFRESH CONTENT=″<time>; URL=<new url>″>
Where:

<time>
is the number of seconds to wait before loading the URL

<new URL>
is the new URL to load.
This technique works for Netscape Navigator 2.0 and above, and Internet
Explorer 3.0 and above, but may not work with all browsers.Therefore, in case
the page is being accessed by a browser that does not support this feature, it is
usually the convention that the URL is also presented as a link on the page.
Here is a sample home page that transfers a browser to a page on a different
port (8001) and a different page on the same server.
< H T M L >
< H E A D >
<META HTTP- EQUI V=REFRESH CONTENT=″3; URL=ht t p://www.mal l 1.com:8001/homepage/Wel come.ht ml ″ >
<TI TLE>Tr ansf er r i ng t o I nt r anet </TI TLE>
</H E A D >
< B O D Y >
<H2>Tr ansf er r i ng you t o t he I BM I nt r anet!</H2><BR>
The page shoul d l oad wi thi n a short ti me. i f not,
c l i c k <A HREF=″ht t p://www.mal l 1.com:8001/homepage/Wel come.ht ml ″ >H E R E </A >
t o go t o t he I nt r anet homepage.<BR>
</B O D Y >
</H T M L >
Figure 85. HomePageExample
This HTML page looks like this when it is loaded into Netscape Communicator:
Figure 86. Client Pull Sample
After three seconds, the home page at the location
http://www.mall1.com:8001/homepage/Welcome.html
will start loading.
Using client pull, however, you must transfer the user to another port, for all
accesses to this port will be refused by QNETCOMM except to the page above.
Chapter 8.Net.Commerce Advanced Confi gurati on
113

114
AS/400 e-commerce: Net.Commerce

Chapter 9.Net.Commerce System Operations
The following operational activities are required to support the Net.Commerce
system.

Starting and stopping the ADMIN Web Server instance

Starting and stopping the Net.Commerce Web Server

Starting and stopping the Net.Commerce Server

Database cleanup

Database backup
9.1.1 Starting the ADMIN Web Server Instance
Net.Commerce is configured, and its operational status changed, through the
administration server (*ADMIN).To start the ADMIN Web server instance, do the
following:
1. From the command line,type the following:
STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN)
National Language Support
For NLS support when starting the *ADMIN server, add the -fsccsid and
-netccsid parameters as shown below.
STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN ′-fsccsid xxxx -netccsid yyy′)
Where xxxx is the DefaultFsCCSID and yyy is the DefaultNetCCSID listed
for the system language feature.For a list of the available languages,
see the latest Net.Commerce readme.
2. To verify that this has worked,type the following from the AS/400 command
line:
WRKACTJOB SBS(QSYSWRK)
V4R3
For V4R3, submit the same command to the subsystem QHTTPSVR:
WRKACTJOB SBS(QHTTPSVR)
The Work with Active Jobs display is shown (Figure 87 on page 116).
©
Copyright IBM Corp. 1999
115



Work with Active Jobs HOSTNAME
12/04/97 19:37:39
CPU %:.0 Elapsed time:00:00:00 Active jobs:129
Type options, press Enter.
2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message
8=Work with spooled files 13=Disconnect ...
Opt Subsystem/Job User Type CPU % Function Status
__ QSYSWRK QSYS SBS.0 DEQW
__ ADMIN QTMHHTTP BCH.0 PGM-QTMHHTTP TIMW
__ ADMIN QTMHHTTP BCI.0 PGM-QYUNLANG DEQW
__ ADMIN QTMHHTTP BCI.0 SIGW
__ ADMIN QTMHHTTP BCI.0 SIGW
__ ADMIN QTMHHTTP BCI.0 DEQW
__ QMSF QMSF BCH.0 DEQW
__ QNETCOMM QTMHHTTP BCH.0 PGM-QTMHHTTP TIMW
__ QNETCOMM QTMHHTTP BCI.0 DEQW
More...
Parameters or command
===> _________________________________________________________________________
F3=Exit F4=Prompt F5=Refresh F10=Restart statistics
F11=Display elapsed data F12=Cancel F14=Include F24=More keys


Figure 87. ActiveJobsinSubsystemQSYSWRK
Look for entries for Job/User ADMIN/QTMHHTTP.
The Web configuration server port number is 2001.
Note:Port 2010 is also available for a secure connection for the *ADMIN
Web server instance if appropriately configured.
9.1.2 Stopping the ADMIN Web Server Instance
To stop the *ADMIN Web server instance, do the following:
1. From the command line,type the following:
ENDTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN)
2. To verify that this has worked,type the following from the AS/400 command
line:
WRKACTJOB SBS(QSYSWRK)
V4R3
For V4R3, submit the same command to the subsystem QHTTPSVR:
WRKACTJOB SBS(QHTTPSVR)
If the server has been stopped successfully, you will not see the lines
mentioned in 9.1.1, “Starting the ADMIN Web Server Instance” on page 115.
9.1.3 Starting the Net.Commerce Web Server Instance
You can start the Net.Commerce Web server instance from either the command
line or the Web *ADMIN server.
To start it from the command line, do the following:
1. From the command line,type:
STRTCPSVR SERVER(*HTTP) HTTPSVR(QNETCOMM)
116
AS/400 e-commerce: Net.Commerce

Note:QNETCOMM is the name of the Net.Commerce instance created
during the configuration of the Net.Commerce system.
To start it from the Web browser, do the following:
1. From your browser,type the following URL:
http://<your_server_name>:2001
2. Click on Internet Connection Server for AS/400.
3. Click on the Configuration and Administration link.
4. Select
QNETCOMM
by cl i cki ng on its radi o button,and press the Start button
(see Figure 32 on page 63).
5. To verify that this has worked,type the following from the AS/400 command
line:
WRKACTJOB SBS(QSYSWRK)
V4R3
For V4R3, submit the same command to the subsystem QHTTPSVR:
WRKACTJOB SBS(QHTTPSVR)
The Work with Active Jobs display is shown (Figure 88).


Work with Active Jobs HOSTNAME
12/04/97 19:37:39
CPU %:.0 Elapsed time:00:00:00 Active jobs:129
Type options, press Enter.
2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message
8=Work with spooled files 13=Disconnect ...
Opt Subsystem/Job User Type CPU % Function Status
__ QNETCOMM QTMHHTTP BCI.0 SIGW
__ QNETCOMM QTMHHTTP BCI.0 SIGW
__ QNETCOMM QTMHHTTP BCI.0 TIMW
__ QNETCOMM QTMHHTTP BCI.0 DEQW
__ QNETCOMM QTMHHTTP BCI.0 DEQW
__ QNETWARE QSYS BCH.0 PGM-QFPANTWJ DEQW
__ QNPSERVD QUSER BCH.0 SELW
__ QPASVRP QSYS BCH.0 PGM-QPASVRP DEQW
__ QPASVRS QSYS BCH.0 PGM-QPASVRS TIMW
More...
Parameters or command
===> _________________________________________________________________________
F3=Exit F4=Prompt F5=Refresh F10=Restart statistics
F11=Display elapsed data F12=Cancel F14=Include F24=More keys


Figure 88. ActiveJobsinSubsystemQSYSWRK
Look for entries for Job/User QNETCOMM/QTMHHTTP.
Chapter 9.Net.Commerce System Operati ons
117

9.1.4 Stopping the Net.Commerce Web Server Instance
You can stop the Net.Commerce Web server instance from either the command
line or the Web *ADMIN server.
To stop it from the command line, do the following:
1. From the command line,type:
ENDTCPSVR SERVER(*HTTP) HTTPSVR(QNETCOMM)
Note:
QNETCOMM
is the name of the server configuration file created during
the configuration of the Net.Commerce system.
To stop it from the Web browser, do the following:
1. From your browser,type the following URL:
http://<your_server_name>:2001
2. Click on Internet Connection Server for AS/400.
3. Click on the Configuration and Administration link.
4. Select the instance
QNETCOMM
by cl i cki ng on its radi o button,and press the
Stop button (see Figure 32 on page 63).
5. To verify that this has worked,type the following from the AS/400 command
line:
WRKACTJOB SBS(QSYSWRK)
V4R3
For V4R3, submit the same command to the subsystem QHTTPSVR:
WRKACTJOB SBS(QHTTPSVR)
If the server has been stopped successfully, you will not see the lines
mentioned in 9.1.3, “Starting the Net.Commerce Web Server Instance” on
page 116.
9.1.5 Starting the Net.Commerce Server
You can start the Net.Commerce server from either the command line or the
Web *ADMIN server.
To start it from the command line, type:
STRNETCSVR INSTANCE(<INSTANCE_NAME>) HTML(<root_path>)
Where root_path is the HTML path entered in Figure 29 on page 59.
You can also select either or both debug and trace modes when starting the
Net.Commerce server instance by using the following parameters:

DEBUG(*YES)

TRACE(*YES)
By default, both of these parameters are set to (*NO).
To start the Net.Commerce server from the Web *ADMIN server, do the
following:
118
AS/400 e-commerce: Net.Commerce

1. Type the fol l owi ng URL:
http://<your_host_name>:2001
2. Enter your AS/400 user ID and password at the prompt.
3. Click on the IBM Net.Commerce for AS/400 link.
4. Select the Net.Commerce i nstance you wi sh to start by clicking on its radi o
button, and press the Start Server button (see Figure 28 on page 58).
5. To verify that the Net.Commerce server has started successfully,type the
following from the AS/400 command line:
WRKACTJOB SBS(QSYSWRK)
V4R3
For V4R3, submit the same command to the subsystem QHTTPSVR:
WRKACTJOB SBS(QHTTPSVR)
The Work with Active Jobs display is shown (Figure 89).


Work with Active Jobs HOSTNAME
12/04/97 19:25:57
CPU %:.0 Elapsed time:00:00:00 Active jobs:129
Type options, press Enter.
2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message
8=Work with spooled files 13=Disconnect ...
Opt Subsystem/Job User Type CPU % Function Status
__ QSYSWRK QSYS SBS.0 DEQW
__ MSERVERD ITSCNC2 BCI.0 MTXW
__ MSERVERD ITSCNC2 BCI.0 TIMW
__ QNETCOMM ITSCNC2 BCH.0 PGM-QNETSTRNCS EVTW
Bottom
Parameters or command
===> _________________________________________________________________________
F3=Exit F4=Prompt F5=Refresh F10=Restart statistics
F11=Display elapsed data F12=Cancel F14=Include F24=More keys


Figure 89. ActiveJobsinSubsystemQSYSWRK
Look for entries for Job/User MSERVERD/<INSTANCE_NAME> and
QNETCOMM/<INSTANCE_NAME>.In this example (Figure 89), the instance
name is ITSCNC2.
9.1.6 Stopping the Net.Commerce Server
You can stop the Net.Commerce server from either the AS/400 command line or
the Web *ADMIN server.
To stop it from the command line, type:
ENDNETCSVR INSTANCE(<INSTANCE NAME>)
To stop it from the Web *ADMIN server, do the following:
Chapter 9.Net.Commerce System Operati ons
119

Open your browser to the following URL:
http://<your_host_name>:2001
1. Enter your AS/400 user ID and password at the prompt.
2. Click on the IBM Net.Commerce for AS/400 link.
3. Select the Net.Commerce i nstance you wi sh to stop by clicking on its radi o
button, and press the Stop Server button (see Figure 28 on page 58).
4. To verify that the Net.Commerce server has been stopped successfully,type
the following from the AS/400 command line:
WRKACTJOB SBS(QSYSWRK)
V4R3
For V4R3, submit the same command to the subsystem QHTTPSVR:
WRKACTJOB SBS(QHTTPSVR)
If the server has been stopped successfully, you will not see the lines
mentioned in 9.1.5, “Starting the Net.Commerce Server” on page 118.
9.1.7 Database Cleanup
The Net.Commerce Database Cleanup utility allows you to delete unneeded
records from the Net.Commerce database.You can delete the following record
types:

Guest shoppers

Temporary shopper addresses

Old orders

Products that have been marked for deletion

Records in the CACHLOG table that identify invalid cache pages that have
been purged.
9.1.7.1 Guest Shopper Records
You can use the Database Cleanup utility to remove guest shopper records from
the database, except those that are associated with orders.Guest shopper
records are records for whi ch SHSHTYP=″G″ in the SHOPPER table.For
example, you can choose to delete a guest shopper record that was created at
least 30 days ago. To make this determination, the database queries column
SHRSTMP in the SHOPPER table.
Note:You cannot use this utility to remove registered shoppers from the
database.The library containing the database collection that is owned by the
Net.Commerce instance must be added to the library list before you can delete
guest shopper records.
Before the utility deletes a record from the SHOPPER table, it deletes the
corresponding records in the following child tables, to preserve the referential
integrity of the database:

SHADDR

SHOPDEM

SHOPPINGS
120
AS/400 e-commerce: Net.Commerce

9.1.7.2 Temporary Shopper Addresses
When the shopper provides new address information, for example when the
shopper moves, a new record is created in the SHADDR table.The old address
record is flagged as a temporary record. Temporary address records are also
created if a shopper provides new address information for an order without
updating the address book. (This type of temporary address record cannot be
deleted if the order which it is associated with is still pending.)
You can use the Database Cleanup utility to delete temporary address records
from the SHADDR table.The SHADDR table stores address information that is
specified by shoppers during registration, which is flagged as a permanent
record.
To delete address records, the following conditions must be satisfied:

The records are temporary (column SAADRFLG is set to T).

There are no records in the SHIPTO table that reference the address
records.
Note:The library containing the database collection that is owned by the
Net.Commerce instance must be added to the library list before you can delete
temporary shopper address records.
9.1.7.3 Old Orders
The criteria for defining an order as ″ol d″ will vary from merchant to merchant,
because merchants can add customized order status flags to the ORDSTAT
col umn.For example, a merchant may add an F flag to indicate that an order
has been filled.
You can use the Database Cleanup utility to remove an old order record from the
ORDERS table.For example, you can delete an order record that has been
processed or canceled.
Note:The library containing the database collection that is owned by the
Net.Commerce instance must be added to the library list before you can delete
old order records.
Before the utility deletes an order record, it deletes the corresponding records in
the following child tables, to preserve the referential integrity of the database:

ORDERPAY

ORDPAYMTHD

SHIPTO
9.1.7.4 Marked Products and Items
When you want to remove products from your inventory, you have two options:
you can permanently delete the product records, or you can mark them for
deletion.Permanently deleting product records deletes the products and any
items associated with them from the PRODUCT table in the database.Marki ng
products for deletion assigns the value 2 in the column PRPUB in the PRODUCT
table to the product to indicate that it has been marked for later deletion.
Products marked for deletion cannot be viewed by shoppers.When appropriate,
you can use the Database Cleanup utility to delete any product records that have
been marked for deletion and that are not referenced by any records in the
SHIPTO or SHOPPINGS table.
Chapter 9.Net.Commerce System Operati ons
121

Permanently deleting products is ideal when you are very sure that you no
longer need the product in your store.But there may be situations when
products that you wish to delete are still associated with orders that are pending
or that have not yet been processed.In these cases, you would mark them for
deletion until they can be permanently deleted.
Note:The library containing the database collection that is owned by the
Net.Commerce instance must be added to the library list before you can delete
marked product records.
Before the utility deletes a product record from the PRODUCT table, it deletes
the corresponding records in the following child tables, to preserve the
referential integrity of the database:

PRODATR

CGPRREL

PRODDSTATR

PRODPRCS
9.1.7.5 Delete Records from the CACHLOG Table
You can use the Database Cleanup utility to delete records from the CACHLOG
table that correspond to cached HTML pages that have been purged by the
Caching utility.
When the Database Cleanup utility deletes a record in a table, it also deletes the
corresponding records in other tables that are linked to that table, to preserve
the referential integrity of the database.
The administrator running this utility must sign on as the instance name that is
being deleted.The server must be terminated prior to invoking the Database
Cleanup utility.
122
AS/400 e-commerce: Net.Commerce

9.1.7.6 Database Cleanup Utility
The syntax of the database cleanup utility is as follows:
Datatbase Cleanup Utility Command Syntax
──DLTNCDBE──TBLNAME──(─ ──┬ ┬─SHOPPER────────────────────── ─)──────────
├ ┤─SHADDR───────────────────────
├ ┤─PRODUCT──────────────────────
├ ┤─CACHLOG──────────────────────
└ ┘─ORDERS──ORDSTAT──(─ ──┬ ┬─C─ ─)─
├ ┤─P─
├ ┤─X─
└ ┘─U─
─ ──DBNAME(database) ──┬ ┬──────────────── ──┬ ┬────────────────────── ─────
└ ┘──DBUSER(dbuser) └ ┘──DBPASSWD(dbpassword)
─ ──┬ ┬────────────────── ──┬ ┬────────────────── ──┬ ┬────────────────── ───
└ ┘──DAYSOLD(daysold) └ ┘──LOGLVL(loglevel) └ ┘──LOGFILE(logfile)
─ ──┬ ┬──────────────────── ────────────────────────────────────────────
└ ┘──ERRLOGF(errorfile)
Where:
database The name of the relational database.
dbuser The logon ID of the instance that created the database collection.
dbpassword The password of the logon ID that is specified by the DbUser
parameter.
daysold The age (in days) that the records must be in order to be deleted.
The default value is 2 days; if this parameter is not specified, the
Cleanup utility will delete all records that are more than two days old.
If you want to delete all records, you must specify a value of 0 for this
parameter.The utility compares the current date and time with the
date and time for each record defined in the column CACSTMP. (This
column records when each record was created.) If the difference is
greater than or equal to the value specified for this parameter, the
record is deleted.
loglevel The level of logging that you want.Specify one of the following:
0 - No log activities will be recorded.
1 - Only the record to be deleted will be recorded.
2 - All affected records in the database will be recorded.
If this parameter is not specified, the default logging level is 0.
logfile The name of the file in which the utility will record its activities.If this
parameter is not specified, a log file called dbclog.txt will be created
in the root directory of IFS.You can specify another file for logging
activities.Its path name must conform to the IFS directory structure.
To specify the path name (which must exist prior to issuing the
command) from the command line, use the following syntax:
LOGFILE(′/qibm/userdata/netcommerce/instance/instname/<logfile>′)
errorfile The name of the file in which the utility will record errors.If this
parameter is not specified, a log file called dbcerr.txt will be created
in the root directory of IFS.You can specify another file for logging
Chapter 9.Net.Commerce System Operati ons
123

errors.Its path name must conform to the IFS directory structure.To
specify the path name (which must exist prior to issuing the
command) from the command line, use the following syntax:
ERRLOGF
(′/qibm/userdata/netcommerce/instance/instname/<error logfile>′)
9.1.7.7 Example
To delete from database collection sysdb all caching records that were created
90 days ago or more, type the following:
DLTNCDBE TBLNAME(CACHLOG) DBNAME(SYSDB) DAYSOLD(90)
9.1.8 Database Backup
We recommend that the Net.Commerce database be backed up on a regular
basis.This should always be done prior to making significant changes to the
database.This protects the data in case of a hardware failure or other problems
that can result in loss of data.Use the SAVE option from the General System
Tasks menu.
124
AS/400 e-commerce: Net.Commerce

Chapter 10.Setting Up a Net.Commerce Shopping Mall
In this chapter, we look at the Net.Commerce Administrator Site Manager and
Store Manager tools.Figure 90 shows how these tools are used to create an
online store.
Figure 90. StepstoCreatingaNet.CommerceStore
The Net.Commerce Administrator is comprised of the Site Manager which is
used to create and maintain the overall site and the Store Manager which is
used to create and maintain stores within the site.The typical steps to build a
Net.Commerce online store are:
1. Site Manager
a.Install and Configure Net.Commerce
b.Create a store record
c. Assign store access
d.Create a list of shipping carriers
2. Store Manager
a.Select shipping services and modes
b.Create product templates and information
c. Define product shi ppi ng codes
d.Create categories templates
e.Create categories
f.Enter products information and relate products to categories
g.Create store home page
©
Copyright IBM Corp. 1999
125

10.1 Setting Up a Mall
In this section we look at how the Net.Commerce Administrator creates and
maintains a site.To start the Administrator module, type:
http://<your_host_name>/ncadmin/index.htm/
The default administrator ID and password is ncadmin.
Figure 91. TheNet.CommerceAdministrator MainScreen
Screen Details
The available menus are shown on the left hand side of the screen:

Site Manager

Store Manager
The small triangle on a button indicates that the list item can be expanded.
126
AS/400 e-commerce: Net.Commerce

10.1.1 Site Manager
By clicking on the Site Manager button, you can define your stores, shipping
carriers, shoppers, and other functions (refer to 10.2, “Net.Commerce Site
Manager” on page 129).
Figure 92. TheNet.CommerceSiteManager MainScreen
Screen Details
The available menus are shown on the left-hand side of the screen:

Mall Information

Access Control

Store Records

Task Management

Shopper Information

Shipping Providers

Template Designer
The small triangle on a button indicates that the list item can be expanded.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
127

10.1.2 Store Manager
By clicking on the Store Manager button, you can define categories,
sub-categories, products, and so on for each store in the mall (refer to 10.3,
“Net.Commerce Store Manager” on page 152).
Figure 93. TheNet.CommerceStoreManager MainScreen
Screen Details
The available menus are shown at the left-hand side of the screen:

Store Information

Product Categories

Product Information

Discounts

Shipping Services

Template Designer

Shopper Groups

Customer Information

Order Information
The small triangle on a button indicates that the list item can be expanded.
128
AS/400 e-commerce: Net.Commerce

10.2 Net.Commerce Site Manager
From the Net.Commerce Administrator main panel (Figure 91 on page 126), click
on Site Manager to run the Site Manager module.
Using the Site Manager you can:

Create and manage the mall′s home page.

Assign site and store access, to ensure that only authorized individuals are
given access to the database.

Add and delete stores from the site.

Maintain a list of shipping carriers.

Assign scope to tasks, which dictates whether some aspects of the shopping
process, such as ordering, can be customized by stores.

Manage site-based data, including any customized store APIs or macros.

Change shopper information in the database.

Use all the functions in the Store Manager.
Figure 94. Net.CommerceSiteManager
The following is a list of the Site Manager functions which allow you to perform
the tasks listed above:
Chapter 10.Setting Up a Net.Commerce Shopping Mall
129


Mal l Information

Access Control

Store Records

Task Management

Shopper Information

Shipping Providers

Templ ate Desi gner
In the following screens, you may find additional buttons at the bottom such as
SAVE, SEARCH, CLEAR, DELETE, and HELP.
SAVE After filling in all the fields in the screen, press this button to add the
newly entered record or update an existing one.
SEARCH To search all the available records for this module, ensure that all
fields on the screen are clear (press CLEAR to do this), then press
the SEARCH button.
To search an existing record, fill in the first field on the screen and
press this button; your screen is then divided into two frames to
display the result in the lower frame.You can use the mouse to
control the size of the lower frame.To display the attributes of one
item on the list, just click on it and the attributes are shown in the
upper frame of the screen.
CLEAR Press this button to clear all the fields on the screen.
DELETE Press this button to delete this item from your database.
HELP Detailed online help is shown.
130
AS/400 e-commerce: Net.Commerce

10.2.1 Mall Information
From the Site Manager main screen (Figure 92 on page 127), click on Mall
Information to define the general information related to the whole mall such as
front page and tax rates.
Figure 95. Net.CommerceSiteManager -Mall informationScreen
Net.Commerce allows you to create your front page in three parts:

Home page (shown at the center of the screen)

Header (shown at the top of the screen)

Footer (shown at the bottom of the screen)
You may define up to six different tax rates to be used later during tax
calculation when placing orders.
If you want to change your mall front, update the relevant field and press the
SAVE button.
Note:When you click on ″Mall Information″, a sub-list (Mall Directory) is added
under Mall Information.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
131

10.2.1.1 Mall Directory
Click on Mall Directory under Mall Information to create or remove a category
from your mall.For example, if you want to add
Women′s Fashion as a mall
category, type it in the ″New Category″ field and press the CREATE button.
Figure 96. Net.CommerceSiteManager -Mall DirectoryScreen
To remove an existing category, select it from the list and press the REMOVE
button.
132
AS/400 e-commerce: Net.Commerce

10.2.2 Access Control
From the Site Manager main screen (Figure 92 on page 127), click on Access
Control to maintain a list of personnel who have authority to perform
administrator activities.To add an ID, fill in the fields shown in Figure 97.Then
press the SAVE button.
Figure 97. Net.CommerceSiteManager -AccessControl Screen
Note:When you click on Access Control, Figure 97 is shown and a Store
Authorities sub-list underneath Access Control is added.Store Authorities is
discussed in 10.2.2.1, “Store Authorities” on page 135.
To list all those who have administrator access, ensure that all fields are clear
(press the CLEAR button) and press the SEARCH button.Net.Commerce
searches the database, then lists all the IDs having administrator access in the
bottom frame.You may adjust the frame size of Figure 98 on page 134 using
your mouse.Let′s choose ″ncadmi n″ from the lower frame to view its attributes.
You may scroll down to view more information.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
133

Figure 98. Net.CommerceSiteManager -AccessControl SearchScreen
If you want to update any of the attributes, enter the new information over the
existing one and press the SAVE button to save your updates before leaving this
screen.
134
AS/400 e-commerce: Net.Commerce

10.2.2.1 Store Authorities
The default ncadmin administrator ID has access to all stores in the mall.The
Store Authorities form can be used to prevent site administrators from updating
specific store data.To access the Store Authorities form, click on Store
Authorities under Access Control.
Figure 99. Net.CommerceSiteManager -StoreAuthoritiesScreen
To remove access to a store, select the store name then press the REMOVE
button.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
135

10.2.3 Store Records
From the Site Manager main screen (Figure 92 on page 127), click on Store
Records to maintain stores within the mall.You may add, update, delete, or list
all stores in the mall.
Figure 100. Net.CommerceSiteManager -StoreRecordsScreen
You can perform a search of the store records using the SEARCH button (refer to
page 133 for a detailed example on how to perform a search).To display
information on the ″Basi cs″ store, click on the highlighted word Basics in the
lower frame.Figure 100 is displaying the store record for the Basics store.
You may update the store information and save it.For a detailed example on
how to update and save data, please refer to page 134.
136
AS/400 e-commerce: Net.Commerce

10.2.4 Task Management
Depending on the type of customization you want to perform, you may need to
modify macros, create one or more API programs, modify HTML files, or add
new columns to the database.The following are examples of what you can
customize:

Change the look of store pages and exception pages.

Change the look of system error message pages.

Add fields to store and exception pages.

Remove fields from store pages and exception pages.

Change the flow of store pages.

Create packages of products and items.

Change when shoppers must login or register.

Change the way the system processes information.

Customize the database.
Net.Commerce provides three types of macros that can be customized:
Store page macros Display store pages such as product pages, category pages,
and shopping pages such as the order forms, shopping cart, and
registration form.Default macros are provided for the shopping
tasks; you can use them as they are, modify them, or replace them
with your own.You create your own macros to display product and
category pages in a different way to the ones supplied with the
″demomal l ″.You can use the Template Designer to create these
macros.
Exception macros Handle exceptional situations, such as if a shopper types
incorrect information or fails to enter any information, into a field that
is required by the system.Another example is when a shopper clicks
a button to add a product to the shopping cart without selecting all
the required product attributes.
API exception macros Handle exceptions that may occur during the processing
of an API function. API exception macros are closely tied to API
functions.
For detailed information on how to customize the APIs and macros, please refer
to the online help at the following URLs:

ht t p://<your_host _name>/nchel p/i ndex.ht m

ht t p://<your_host _name>/nchel p/t asks/st pacst.ht m
Chapter 10.Setting Up a Net.Commerce Shopping Mall
137

From the Site Manager main screen (Figure 92 on page 127), click on Task
Management to customize your site in an advanced way.
Figure 101. Net.CommerceSiteManager -TaskManagement Screen
Click on the small triangle on the right corner in the Select Task Type field to
display all the available tasks:

API

ERROR

ORDER

REGISTER

SHIPTO

SHOPCART
138
AS/400 e-commerce: Net.Commerce

10.2.4.1 APIs
The Net.Commerce system uses API functions to process information, perform
certain calculations and process parameters that are passed into commands.
API functions allow merchants to extend the built-in commands, for example, to
send an e-mail notification to shoppers who submit orders.API functions can
also write information to the database.API programs can be written to change
the way in which calculations are performed and maintain custom information in
the Net.Commerce database.APIs can also be written that connect the
Net.Commerce system to a legacy system, such as an order processing system.
For more information on APIs, please refer to the online help at the following
URL:
http://<your_host_name>/nchelp/nav/rnavindx.htm and select Application
programming interface (API) functions.
Figure 102. Net.CommerceSiteManager -API Screen
Select a task from the lower frame and click on Task Assignment under Task
Management to assign a customized macro or APIs for a specific store or mall.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
139

10.2.4.2 Error Macros
An error macro is called when a shopper enters invalid or incomplete
information into a required field.The macro called can be modified to change
the way the system handles the exception.
For more information on error messages, please refer to the online help at the
following URL:ht t p://<your_host _name>/nchel p/ref s/srexcmr.ht m
Figure 103. Net.CommerceSiteManager -ERRORMessagesScreen
Select a task from the lower frame and click on Task Assignment under Task
Management to assign a customized macro.See Figure 108 on page 145.
140
AS/400 e-commerce: Net.Commerce

10.2.4.3 Order Macros
These macros are used to define the ordering process, such as a macro to notify
the shopper that an order has been placed correctly; another one lists the items
in a pending order and so on.
For more information on Order macros, please refer to the online help at the
following URL:ht t p://<your_host _name>/nchel p/nav/rnavi ndx.ht m
Select Store page macros.
Figure 104. Net.CommerceSiteManager -ORDERScreen
Select a task from the lower frame and click on Task Assignment under Task
Management to assign a customized macro.See Figure 108 on page 145.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
141

10.2.4.4 Register Macros
These macros are used to define the registration process.
For more information on Register macros, please refer to the online help at the
following URL:ht t p://<your_host _name>/nchel p/nav/rnavi ndx.ht m
Select Store page macros.
Figure 105. Net.CommerceSiteManager -REGISTERScreen
Select a task from the lower frame and click on Task Assignment under Task
Management to assign a customized macro.See Figure 108 on page 145.
142
AS/400 e-commerce: Net.Commerce

10.2.4.5 Shipto Macros
These macros are used to define the shipping process.
For more information on Shipto macros, please refer to the online help at the
following URL:ht t p://<your_host _name>/nchel p/nav/rnavi ndx.ht m
Store page macros
Figure 106. Net.CommerceSiteManager -SHIPTOScreen
Select a task from the lower frame and click on Task Assignment under Task
Management to assign a customized macro.See Figure 108 on page 145.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
143

10.2.4.6 Shopcart Macros
These macros are used to define the shop cart process.
For more information on Shopcart macros, please refer to the online help at the
following URL:ht t p://<your_host _name>/nchel p/nav/rnavi ndx.ht m
Figure 107. Net.CommerceSiteManager -SHOPCARTScreen
Select a task from the lower frame and click on Task Assignment under Task
Management to assign a customized macro.See Figure 108 on page 145.
144
AS/400 e-commerce: Net.Commerce

10.2.4.7 Task Assignment
Choose the task you want to change, for example choose ORDER. A lower frame
is added at the bottom of your panel listing all the available order macros (refer
to Figure 104 on page 141).Choose
ORD_DSP_COM for our example and click
on Task Assignment.Figure 108 displays the macro name that is associated
with that task; this task displays the completed orders for a given shopper.
Figure 108. Net.CommerceSiteManager -TaskAssignment Screen
Chapter 10.Setting Up a Net.Commerce Shopping Mall
145

10.2.5 Shopper Information
From the Site Manager main screen (Figure 92 on page 127), click on Shopper
Information.Figure 109 and Figure 110 on page 147 show the information for
shopper ID ″Dalia″ as entered in Figure 143 on page 199, Figure 144 on
page 200 and Figure 145 on page 201.
Figure 109. Net.CommerceSiteManager -Shopper InformationScreen1
Note:When you click on Shopper Information, a sub-list (Address Book) is
added under Shopper Information.
146
AS/400 e-commerce: Net.Commerce

Figure 110. Net.CommerceSiteManager -Shopper InformationScreen2
The SEARCH button can be used to search through the available shopper
information (refer to page 133 for a detailed example on how to perform a
search).
An administrator can modify shopper information, for example, reset a shopper′s
password.
Note:The custom fields can be used for merchant customization.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
147

10.2.5.1 Address Book
Click on Address Book under Shopper Information to display/modify the
shopper′s address book.
Figure 111. Net.CommerceSiteManager -AddressBookScreen
148
AS/400 e-commerce: Net.Commerce

10.2.6 Shipping Providers
A key part of an online shopping trip is arranging for the shipping of purchased
products since shoppers cannot carry purchases home with them.This form can
be used to create and maintain a list of shipping companies for the site. Store
administrators can then select the shipping companies to be used by a store.
From the Site Manager main screen (Figure 92 on page 127), click on Shipping
Providers.
Figure 112. Net.CommerceSiteManager -ShippingServicesScreen
Chapter 10.Setting Up a Net.Commerce Shopping Mall
149

10.2.7 Template Designer
The Net.Commerce Template Designer is a graphical object-oriented editing tool
that allows you to create Web pages for an online mall or store.It can be used
to do the following:

Create and update home pages, product pages and category pages.

Design headers and footers for pages.

Modify the supplied sample category and product templates.
From the Site Manager main screen (Figure 92 on page 127), click on Template
Designer.
Figure 113. Net.CommerceSiteManager -TemplateDesigner Screen
Select File

Open to open a supplied sample template.See Figure 114 on
page 151.
150
AS/400 e-commerce: Net.Commerce

Figure 114. Net.CommerceSiteManager -TemplateDesigner Sample
The purpose of the Template Designer is to help you create basic pages.For
production requirements, you may need to perform additional customization
using Net.Data macros.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
151

10.3 Net.Commerce Store Manager
From the Net.Commerce Administrator main panel (Figure 91 on page 126), click
on Store Manager to run the Store Manager module.
Using the Store Manager module you can:

Create and maintain store pages, product categories, and shopper groups.

Enter and update information about the store and its products or services.

View information about shoppers, add shoppers to shopper groups, and
assign numbers to shoppers if desired for record-keeping purposes.

Delete stock from the store.
Figure 115. TheNet.CommerceStoreManager -StoreInformationScreen1
The following is a list of the Store Manager functions which allow you to perform
the previously listed tasks:

Store Information

Product categories

Product Information

Discounts

Shipping Services

Template designer

Shopper Groups
152
AS/400 e-commerce: Net.Commerce


Customer Informati on

Order Informati on
In the following screens, you may find additional buttons at the bottom such as
SAVE, SEARCH, CLEAR, DELETE, and HELP.
SAVE After filling in all the fields on the screen, press this button to add the
newly entered record or update an existing one.
SEARCH To search all the available records for this module, ensure that all
fields on the screen are clear (press CLEAR to do this) then press the
SEARCH button.
To search an existing record, fill in the first field on the screen and
press this button. Your screen is then divided into two frames to
display the result in the lower frame; you can use the mouse to
control the size of the lower frame.To display the attributes of one
item of the list just click on it, and the attributes are shown in the
upper frame of the screen.
CLEAR Press this button to clear all the fields on the screen.
DELETE Press this button to delete this item from your database.
HELP A detailed online help is shown.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
153

10.3.1 Store Information
From the Store Manager main screen (Figure 115 on page 152), click on Store
Information.Use this form to record details about stores or merchants who own
stores.
Figure 116. TheNet.CommerceStoreManager -StoreInformationScreen1
154
AS/400 e-commerce: Net.Commerce

Figure 117. TheNet.CommerceStoreManager -StoreInformationScreen2
Chapter 10.Setting Up a Net.Commerce Shopping Mall
155

Figure 118. TheNet.CommerceStoreManager -StoreInformationScreen3
156
AS/400 e-commerce: Net.Commerce

10.3.2 Product Categories
From the Store Manager main screen (Figure 115 on page 152), click on Product
Categories.This form allows you to create a category tree in order to lay out a
structure for your product line and customize navigation within your store.You
can create, view, delete, copy and move categories within the tree, and list
products within the categories.
Figure 119. TheNet.CommerceStoreManager -CategoriesScreen
To edit a category, select the item and press the Edit button.See Figure 120 on
page 158.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
157

Figure 120. TheNet.CommerceStoreManager -Edit CategoryScreen
158
AS/400 e-commerce: Net.Commerce

10.3.3 Product Information
From the Store Manager main screen (Figure 115 on page 152), click on Product
Information.Use this form to indicate specific details about products or items.
Such information includes the store(s) that sell the product or item, unique
reference numbers for identification, dimensions, descriptions and more.
Figure 121. TheNet.CommerceStoreManager -Product InformationScreen1
Note:When you click on Product Information, a sub-list is added under Product
Information:

Attributes

Prices

Templates

Parent categories
Chapter 10.Setting Up a Net.Commerce Shopping Mall
159

Figure 122. TheNet.CommerceStoreManager -Product InformationScreen2
160
AS/400 e-commerce: Net.Commerce

Figure 123. TheNet.CommerceStoreManager -Product InformationScreen3
Chapter 10.Setting Up a Net.Commerce Shopping Mall
161

Figure 124. TheNet.CommerceStoreManager -Product InformationScreen4
162
AS/400 e-commerce: Net.Commerce

10.3.4 Discounts
From the Store Manager main screen (Figure 115 on page 152), click on
Discounts.Use this form to identify which products or items you wish to
discount and to assign a code that specifies details of the discount.
Figure 125. TheNet.CommerceStoreManager -Discount Screen
When you click on Discounts, a sub-list is added under Discounts:

Define codes

Scal es/ranges
Select Define Codes under Discounts to define discount codes.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
163

10.3.5 Shipping Services
Net.Commerce provides shipping functions that enable you to define how each
product in your store can be shipped.Shoppers can then choose from shipping
modes made available to them for the products they purchase.Use the Shipping
Services form to create a list of shipping carriers and modes for your store.
From the Store Manager main screen (Figure 115 on page 152), click on
Shipping Services.
Figure 126. TheNet.CommerceStoreManager -ShippingServicesScreen
When you click on Shipping Services, a sub-list is added under Shipping
Services:

Product codes

Shipping details
The shipping functions provided in Net.Commerce are designed to suit many
online purchasing applications.They can, however, be customized.Also, you
may be able to integrate an existing automated shipping application instead of
using the one that is supplied in Net.Commerce.
164
AS/400 e-commerce: Net.Commerce

10.3.5.1 Product Shipping Codes
Use the Product Shipping Codes form to create shipping codes for specific
carriers and modes, select calculation methods and assign a shipping code to
each product in the database.Select Product Codes under Shipping Services to
define shipping codes and methods for calculating shipping charges.
Figure 127. TheNet.CommerceStoreManager -Product ShippingCodesScreen
Chapter 10.Setting Up a Net.Commerce Shopping Mall
165

10.3.5.2 Shipping Details
Select Shipping Details under Shipping Services to associate shipping codes with
shipping modes and to specify shipping charge calculation methods.
Figure 128. TheNet.CommerceStoreManager -ShippingDetailsScreen
10.3.6 Template Designer
Please see 10.2.7, “Template Designer” on page 150 for information on the
Net.Commerce Template Designer.
166
AS/400 e-commerce: Net.Commerce

10.3.7 Shopper Groups
From the Store Manager main screen (Figure 115 on page 152), click on
Shopper Groups to create shopper groups for specific shoppers.
Figure 129. TheNet.CommerceStoreManager -Shopper GroupsScreen
In the above example, we define a group for IBM employees.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
167

10.3.8 Customer Information
From the Store Manager main screen (Figure 115 on page 152), click on
Customer Information to view the information entered by shoppers when they
register.Store administrators can view the information and use the fields for
searches but they cannot update the form.Only site administrators can update
the form (see 10.2.5, “Shopper Information” on page 146).
Figure 130. TheNet.CommerceStoreManager -Customer InformationScreen
When you click on Customer Information, a sub-list is added under Customer
Information:

Address book

Customer details
168
AS/400 e-commerce: Net.Commerce

10.3.8.1 Address Book
Select Address Book under Customer Information to view information in the
customer′s address book.Store administrators can view the information and
use the fields for searches but they cannot update the form.Only site
administrators can update the form (see 10.2.5.1, “Address Book” on page 148).
Figure 131. TheNet.CommerceStoreManager -AddressBookScreen
Chapter 10.Setting Up a Net.Commerce Shopping Mall
169

10.3.8.2 Customer Details
Select Customer Details under Customer Information to assign shoppers to
shopper groups.
Figure 132. TheNet.CommerceStoreManager -Customer Detail Screen
In the example above added ″Dalia″ to the Shopper Group we defined in
Figure 129 on page 167.
170
AS/400 e-commerce: Net.Commerce

10.3.9 Order Information
From the Store Manager main screen (Figure 115 on page 152), click on Order
Information to view information on orders placed.The Order Name, Order
Status, and Payment Method fields can be modified.The other fields can be
used for search purposes only.
Figure 133. TheNet.CommerceStoreManager -Order InformationScreen
To obtain information on all orders for a store, ensure that all the fields on the
Orders form are blank (press the CLEAR button), select the store from the Select
Store drop-down list, enter information into one or more search fields on the
form, then press the SEARCH button.All orders that match the specifications
you entered are listed in the lower frame of the screen. Click on the one you
wish to view to display its attributes in the lower frame of the screen.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
171

10.4 Populating the Net.Commerce Database
In this section, we look at the options available for populating the Net.Commerce
database when first setting up an online store.
When a Net.Commerce instance is created, the database created has sufficient
information in it to allow the mall to be administered but it has no
product/category/price information unless the option was taken to install the
demo mal l.
The Net.Commerce database tables contain all the information Net.Commerce
needs to store about the mall and its operation, such as products, categories
and prices.Initially, however, these product/category/price tables are empty, so
this information must be fed into the database.This information can be added to
the database from the Net.Commerce administrator screens.However, if there
is a large amount of data to be added to the database, doing this manually
through the administrator screens may not be practical.To allow for this,
Net.Commerce provides a mass import utility.Alternately, another utility could
be used to populate the database.
10.4.1 Mass Import
Mass import is a utility supplied with Net.Commerce that allows the
Net.Commerce database to be populated from preformated data in a text file.
This utility is used if the option is chosen to install the demo mall when
configuring a Net.Commerce instance.
The mass import utility allows you to populate the Net.Commerce database with
information about categories and products.The utility imports data from a
delimited flat file on the IFS into the product-related tables in the DB2 database.
The product-related tables contain information about categories, products, items,
and their interrelationships. These tables are:

CATEGORY (Category)

CATESGP (Shopper Group Category Template)

CGRYREL (Category Relationship)

PRODUCT (Product)

CGPRREL (Category Product Relationship)

PRODDSTATR (Product Distinct Attribute)

PRODATR (Product Attribute)

PRODPRCS (Product Price)

PRODSGP (Shopper Group Product Template)
The mass import utility simplifies the process of importing data in the following
ways:

It automatically generates reference numbers to prevent referential integrity
errors.

It automatically checks whether or not records exist in the database.If a
record exists, it updates the record; otherwise it inserts a new record.
The mass import utility is ideal for importing large quantities of product data into
the database tables.To insert or update individual records in the database, you
should use the forms provided by the Net.Commerce administrator function.
172
AS/400 e-commerce: Net.Commerce

Note
Before you can use the mass import utility, you must have already created a
store using the Store Records form.See Figure 100 on page 136.
To import product and category data, there are two steps involved:
1. Create an i mport file.
2. Import data using the mass i mport utility.
10.4.1.1 Create an Import File
Before you can use the mass import utility, you must create an ASCII import file
that contains the commands and the data with which to populate the
product-related tables.The file is treated as a continuous string of transactions,
with the columns and rows of data separated by delimiters.The file must be
created as a text file residing on the IFS.It is probably easiest to use Client
Access Enhanced and edit the file directly on the IFS using a Windows text
editor.Alternately, you can use FTP to transfer the file into the IFS.
The following commands can be included in the import file:

#COLUMNDELIMITER - Defines the character that is used as a column
del i mi ter.

#ROWDELIMITER - Defines the character that is used as a row delimiter.

#STORE - Specifies the name of the store for which the product and category
records are being created.

#CATEGORY - Populates the Category table and the Category Relationship
table.

#CATESGP - Populates the Shopper Group Category Template table.

#PRODUCT - Populates the Product table.

#CGPRREL - Populates the Category Product Relationship table.

#PRODDSTATR - Populates the Product Distinct Attribute table.

#PRODATR - Populates the Product Attribute table.

#PRODPRCS - Populates the Product Price table.

#PRODSGP - Populates the Shopper Group Product Template table.
All of the above commands can be specified more than once.For example, if
you define the row delimiter as ″,″ and then later in the file you need to add
product transactions that contain this delimiter in the product descriptions, you
can define a new row delimiter for all of the affected product transactions.
Note:Following each #STORE command, you must add the product and
category commands to the import file in the sequence shown above.If you do
not follow this sequence, referential integrity problems may result.
You can type the commands in uppercase, lowercase, or mixed case. For
exampl e:

#PRODATR

#prodatr

#ProdAtr
If you want to leave a column in a transaction empty, you must still insert
delimiters to create a placeholder for that column.If you insert a new record
into the database and you leave a column empty, if a default value exists as
specified in the database schema the mass import utility will automatically insert
the default value into the column.If you update a record and you leave a
Chapter 10.Setting Up a Net.Commerce Shopping Mall
173

column empty, the existing column value will remain.Columns are updated only
when you specify new values.
There may be an existing database that you want to import into Net.Commerce.
In this case, you have to export the data from the tables in that database into a
file that conforms to the format required by mass import.No utility is provided
with Net.Commerce that will aid this step.
Mass import can be run multiple times against the same tables.If importing
data from a complex set of tables into multiple tables in Net.Commerce, it may
be easier to create multiple input files for the same store and run mass import
for each one.
Note:Do not import double quotes (″) into the database.
Import File Example:When you import the demo data into a Net.Commerce
instance, the full name of the import file used is
/QIBM/ProdData/NetCommerce/MRI2924/demodata.in
.The following few lines are
extracted from the demodata.in file:
#STORE;6ixth Avenue
#CATEGORY;6th Avenue Department Store;6th Avenue;6th Avenue Department Store;;;;1;;;;
#CATEGORY;Hardware;Hardware;Hardware;;/demomall/cat_hat1.gif;;1;/demomall/headhard.gif;;6th Avenue Department Store;
#CATEGORY;Computers;Computers;Computers;;/demomall/cat_cot1.gif;;1;/demomall/headcomp.gif;;6th Avenue Department Store;
#CATEGORY;Bottoms;Bottoms;Bottoms;;/demomall/cat_clt5.gif;/demomall/cat_clf5.gif;1;/demomall/headclot.gif;;Clothing;
#CATEGORY;Tops;Tops;Tops;;/demomall/cat_clt2.gif;/demomall/cat_clf2.gif;1;/demomall/headclot.gif;;Clothing;
#CATEGORY;Sweaters;Sweaters;Sweaters;;/demomall/cat_clt3.gif;/demomall/cat_clf3.gif;1;/demomall/headclot.gif;;Tops;
#CATEGORY;Shirts;Shirts;Shirts;;/demomall/cat_clt4.gif;/demomall/cat_clf4.gif;1;/demomall/headclot.gif;;Tops;
#CATEGORY;Shorts;Shorts;Shorts;;/demomall/cat_clt7.gif;/demomall/cat_clf7.gif;1;/demomall/headclot.gif;;Bottoms;
#CATEGORY;Pants;Pants;Pants;;/demomall/cat_clt6.gif;/demomall/cat_clf6.gif;1;/demomall/headclot.gif;;Bottoms;
#STORE;Basics
#CATEGORY;Clothing;Clothing;Clothing;;/demomall/cat_bat1.gif;;1;;;;
#CATEGORY;Tops;Tops;Tops;;/demomall/cat_bat2.gif;;1;;;Clothing;
#CATEGORY;Bottoms;Bottoms;Bottoms;;/demomall/cat_bat5.gif;;1;;;Clothing;
#CATEGORY;Sweaters;Sweaters;Sweaters;;/demomall/cat_bat3.gif;;1;;;Tops;
#CATEGORY;Shirts;Shirts;Shirts;;/demomall/cat_bat4.gif;;1;;;Tops;
#CATEGORY;Pants;Pants;Pants;;/demomall/cat_bat6.gif;;1;;;Bottoms;
#CATEGORY;Shorts;Shorts;Shorts;;/demomall/cat_bat7.gif;;1;;;Bottoms;
#STORE;NetAway
#CATEGORY;NetAway Travel Shop;NetAway;NetAway Travel Shop;;;;1;;;;
#CATEGORY;Barbados - Activities;Barbados - Activities;Barbados - Activities;;;;1;;;NetAway Travel Shop;
#STORE;6ixth Avenue
#PRODUCT;046-546R;;Regular Wrench;Made of high quality steel with custom grip. SAE sized 11 pc combination set. 5/16 to 7/8 inc...
#PRODUCT;91-123H;;Claw Hammer;Styled with slanted front and heat-treated head. Steel handle with cushion grip.;;;/demomall/hard...
#PRODUCT;91-648B;;Ballpein Hammer;2-lb steel fabricated with polished head. Hickory wood handle.;;;/demomall/hardth3.gif;/demom...
#PRODUCT;88-617-3V;;Watering Can;10L fine quality molded plastic, solid grip. Green only.;;;/demomall/hardth6.gif;/demomall/har...
#PRODUCT;288-455-2V;;Garden Hose;1/2 inch nylon fortified, economy rubber hose.;;;/demomall/hardth5.gif;/demomall/hardfu5.gif;1...
#PRODUCT;288-455-2V10;288-455-2V;Garden Hose 10 ft.;Garden Hose 10′, 1/2 inch nylon fortified, economy rubber hose.;;;/demomall...
#PRODUCT;288-455-2V15;288-455-2V;Garden Hose 15 ft.;Garden Hose 15′, 1/2 inch nylon fortified, economy rubber hose.;;;/demomall...
Notice that in the listing above there are many store directives, each populating
a store in the demonstration mall -″Metropol i tan Mal l ″.A #STORE directive tells
the mass import utility that the lines following it, until the next #STORE directive,
are all for the store indicated.Mass import ensures that the correct referential
integrity constraint information is generated so that more than one store can
have the same category and product.A #STORE directive for a store can
appear more than once in the file.In the extract for the example, the directive
″#STORE;6ixth Avenue″ appears more than once, first for category information
and then again for product information.
Each store directive and the lines following it until the next #STORE directive can
be separated into a separate input file for mass import.Thus, if you are creating
these files from an existing database, you can generate one import file for all the
categories in each store from one set of tables and then generate another input
file for all the products in each store.However, you must make sure that no
referential integrity constraints are violated by keeping the order of importing
correct as discussed earlier; you should not, for example, attempt to insert a
new product before inserting the category it goes under.
174
AS/400 e-commerce: Net.Commerce

10.4.1.2 Using the Mass Import Utility
Once you have completed the import file, you can run the mass import utility.
Before calling the mass import utility, you need to know the name of the local or
remote database, as defined in the relational database directory of the AS/400.
To work with database directory entries, you use the command:
WRKRDBDIRE
This brings up the following screen:


Work with Relational Database Directory Entries
Position to. . . . . .
Type options, press Enter.
1=Add 2=Change 4=Remove 5=Display details 6=Print details
Relational Remote
Option Database Location Text
_ MALL_DB *LOCAL RDB entry for Mall DB
_ ROCH_DB ROCHESTER RDB entry for IBM Rochester
Bottom
F3=Exit F5=Refresh F6=Print list F12=Cancel
(C) COPYRIGHT IBM CORP. 1980, 1998.


Figure 134. WRKRDBDIRE. Checkingthelocationof arelational database.
If you are using the local database, then the relational database name
corresponding to the location *LOCAL is the name of the database you use.
Otherwise, you use the RDB name corresponding to the remote location you
want.
On the AS/400, the command to invoke the mass import utility is:
IMPNCDATA INSTANCE(instance_name) PASSWD(password) INFILE(infile)
DATABASE(database) LOG(log_file) ERROR(error_file)
Where:
Instance_name The name of the Net.Commerce instance into which the
data will be imported.
Password The Net.Commerce instance database password (as entered in
Figure 29 on page 59).
infile The name of the file that contains the product and category data to be
i mported.It can be either a database file member or a stream file.
Its path name must conform to the IFS directory naming conventions.
For example, QSYS.LIB/LIBA.LIB/FILEA.FILE/MBRA.MBR is the form
required by the QSYS.LIB file system.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
175

database The name of the database into which the data is being imported.
(The mass import utility uses DRDA to connect to the database. This
parameter refers to the database name found in the Relational
Database Directory of the AS/400.)
log_file The name of the file in which you want the mass import utility to
record its activities.If this parameter is not specified, the following
default log file is created:
/QIBM/Userdata/NetCommerce/instance
/<instance_name>/logs/massimpt.log
error_file The name of the file in which the mass import utility records errors.If
this parameter is not specified, the following log file is created:
/QIBM/Userdata/NetCommerce
/instance/<instance_name>/logs/massimpt.err
An example of a mass import activity log:
Thu Nov 6 15:10:15 1997
CMN1304I Started reading input file. Processing began.
CMN1303I Connected successfully to the database.
CMN1301I The following transaction completed successfully...
·00002`#STORE;6ixth Avenue
CMN1301I The following transaction completed successfully...
·00004`#CATEGORY;6th Avenue Department Store;6th Avenue;6th Avenue Department Store;;;;1;;;;
CMN1301I The following transaction completed successfully...
·00005`#CATEGORY;Hardware;Hardware;Hardware;;/demomall/cat_hat1.gif;;1;/demomall/headhard.gif;;6th Avenue Department Store;
CMN1301I The following transaction completed successfully...
·00006`#CATEGORY;Computers;Computers;Computers;;/demomall/cat_cot1.gif;;1;/demomall/headcomp.gif;;6th Avenue Department Store;
CMN1301I The following transaction completed successfully...
·00007`#CATEGORY;Clothing;Clothing;Clothing;;/demomall/cat_clt1.gif;/demomall/cat_clf1.gif;1;/demomall/headclot.gif;;6th Avenue Depar
tment Store;
CMN1301I The following transaction completed successfully...
·00008`#CATEGORY;Hand Tools;Hand Tools;Hand Tools;; /demomall/cat_hat2.gif;/demomall/cat_haf2.gif;1;/demomall/headhard.gif;;Hardware;
+1.00000000E+000
An example of a mass import error log:
Thu Nov 6 15:10:15 1997
CMN1025E Trying to get reference number for category Hand Tools failed.
CMN1025E Trying to get reference number for category Hand Tools failed.
CMN1025E Trying to get reference number for category Gardening Tools failed.
CMN1025E Trying to get reference number for category Gardening Tools failed.
CMN1025E Trying to get reference number for category Computers failed.
CMN1025E Trying to get reference number for category Computers failed.
CMN1025E Trying to get reference number for category Software failed.
CMN1025E Trying to get reference number for category Software failed.
CMN1025E Trying to get reference number for category Computers@Hardware failed.
CMN1025E Trying to get reference number for category Computers@Hardware failed.
CMN1033E Product table update failed, (SQL class) return code = -1019.
UPDATE Product set prprfnbr=12,prsdesc=′IBM Aptiva A40′,prldesc1=′For brilliant performance, here′′s one PC that is upto speed!′,
prldesc2=NULL,prldesc3=′<B>Processor/Memory:</B> 133MHz Pentium, 16MB RAM<BR><B>Modem Type:</B>;
28.8K bps Data/Fax.<BR><B>Multimedia Features:</B>. 6X CD-ROM, 30W speakers.<BR><B>Software:</B>;
Windows 95, Lotus SmartSuite, over 40 great multimedia software titles!<BR><B>Warranty:</B>Three Year Express Maintenance Warranty
<BR>All IBM Aptiva models offer 180 days or 180 hours on the Internet at no extra cost!<BR>′,prthmb=′/demomall/compth2.gif′,
prfull=′/demomall/compfu2.gif′,prpub=1,prwght=25.30,prwmeas=′kg′,prlngth=0.7500,prwidth=0.75,prheight=1.20,prsmeas=′m′,prpsnbr=4,
prpcode=′ ′,prurl=NULL,prvent=212,pravdate=′1997-11-06-15.11.15.6728′,prspecial=′ ′,prstmp=CURRENT TIMESTAMP, prfield1=0,
prfield2=0, prfield3=0000000000000000, prfield4=NULL, prfield5=NULL, prdconbr=0 where prrfnbr=12 AND prmenbr=2066
The log files are stored in the IFS but, unlike other IFS files, are in EBCDIC
format and have to be converted before they can be viewed on a PC.If Client
Access is being used to access the logs, use the
File extensions for automatic
EBCDIC/ASCII conversion
option under Network Drives of Client Access
Properties to select conversion for the appropriate file extensions.The logs are
appended to if they already exist.They list the commands being executed and
the status of each command.
To call the mass import utility to populate the MALL1 database with Demo Mall,
for example, you would use the following command (assuming that the database
is called MALL1DB and activity and error logs are being stored in a folder on the
IFS called /logs):
IMPNCDATA INSTANCE(MALL1) PASSWD(password)
INFILE(′/QIBM/ProdData/NetCommerce/MRI2924/demodata.in′)
DATABASE(MALL1DB) LOG(′/logs/massimpt.log′) ERROR(′/logs/massimpt.err′)
176
AS/400 e-commerce: Net.Commerce

10.4.1.3 Alternatives to the Mass Import Function
If you do not want to use the mass import, then you can use one of the tools
provided with the AS/400 to populate the database.The tables related to each
instance are stored in a library of the same name as the instance.The ways of
accessing a collection of tables on the AS/400 are:

Native database manipulation commands such as Open Physical File from an
AS/400 supported language such as RPG.

Embedded SQL from a language supported on the AS/400.

An ODBC compliant application tool such as Powerbuilder or Delphi in
combination with the Client Access ODBC driver.

An ODBC compliant database manager such as Lotus Approach in
combination with the Client Access ODBC driver.

Interactive SQL using the STRSQL command.

A data replication product such as Data Propagator.
However, if you are not using mass import, then you must take care of ensuring
that referential integrity is satisfied.This can be quite complex if you are trying
to update all the tables in the collection, and is not recommended generally.
These alternative approaches are more useful when updating particular columns
or tables periodically, because unlike the general purpose mass import utility
which requires the additional step of generating a special format input file, the
alternative approaches can be written to update the tables in one step.
Alternative approaches to importing data should be used in cases of simple
batch updates.Examples of updates that could benefit from this approach are:

Updating price information for all the products.You could write a utility
program or SQL query that copies the price values from a table in your
legacy system into the PPPRC column of the table PRODPRC.

Updating merchant customizable fields.

Updating product descriptions.
Chapter 10.Setting Up a Net.Commerce Shopping Mall
177

178
AS/400 e-commerce: Net.Commerce

Chapter 11.Integrating Legacy Applications and Data with
Net.Commerce
Integrating legacy or existing applications with Net.Commerce generally means
integrating two basic aspects of the legacy application:

Integrating legacy application function

Integrating legacy application data
Net.Commerce provides for a high degree of customization, and has a rich set of
APIs (application programming interfaces).These APIs provide the mechanism
by which legacy application functions can be incorporated into the
Net.Commerce environment.The APIs can also be used to add new function
that may not be present in the legacy applications.The APIs and supporting
documentation are described in detail in the Net.Commerce manuals. The
following section provides a high level overview of how Net.Commerce can be
integrated with legacy applications and data.
While using the APIs to customize the Net.Commerce environment is optional,
most will find that integrating legacy data is mandatory.Most customers who
have products, goods, or services that they wish to make available in a
Net.Commerce environment already have an ″i nventory″ file, and require that
information to be used by Net.Commerce.As described in earlier chapters,
Net.Commerce uses its own files, and cannot simply point to existing files.The
challenge then becomes how to integrate the existing information or data into
the Net.Commerce files.
11.1 Integrating Applications
Net.Commerce is a frontend application that provides the tools to quickly set up
and populate a mall that shoppers can browse and order from.However,
shoppers cannot purchase anything unless Net.Commerce is linked to a backend
system that actually fulfills the order and collects the payment.
Net.Commerce requires the following backend systems to complete the shopping
process:

Payment system that verifies and collects credit card payment for goods
purchased.

Accounting system that handles inventory, invoicing and accounts
receivable.

Order fulfillment that handles shipping of purchased goods.
Net.Commerce provides macros and API functions that can be used to link to
these systems.With these links in place, Net.Commerce provides a complete
Internet shopping experience from browsing for products to actually purchasing
online followed by delivery.
When customizing Net.Commerce, you can do one of the following:

Modify the database.Net.Commerce has many tables that contain
user-customizeable fields.These can be used to store information not
otherwise present in Net.Commerce.You can also add other tables.
©
Copyright IBM Corp. 1999
179


Net.Commerce uses triggers to implement various functions such as
implementing cascade delete.You can modify these triggers to
accommodate extra functionality like cascade delete for tables you add.

Modify the behavior of tasks.Tasks can be modified through the use of
either APIs or macros.You can, for example, modify the Net.Commerce task
Check Inventory to get the inventory from your backend ERP (Enterprise
Resource Planning) system.
11.2 Modify the Database
Net.Commerce stores the tables for each instance in a library of the same name
as the instance on the RDBMS specified.You can add or modify tables using a
variety of tools, such as Lotus Approach or the AS/400′s native host-based tools.
In addition to adding tables, you can customize particular fields in some tables.
For example, the product category table CATEGORY has four fields for merchant
customization, called CGDISPLAY, CGLDESC, CGFIELD1 and CGFIELD2
respectively.These fields are character fields and can be used to store category
data not captured elsewhere in the category table.
When adding tables, you may have to modify the triggers for some tables to add
cascade delete functions for the tables you added.For example, to delete a row
in a table you add: if a row in the CATEGORY table is deleted, you have to
modify the Before Delete trigger in the category table, called
QNETCOMM/CASDCAT.The way to modify a trigger is to drop the trigger
command and then add the trigger again.
Note
You have to be careful when modifying triggers, so you don′t change them in
a way Net.Commerce does not expect.The changes you make to the
triggers are not validated by Net.Commerce.
11.3 Modify the Behavior of Tasks
Net.Commerce uses API functions to process information, perform certain
calculations and process parameters that are passed into commands.API
functions allow merchants to extend the built-in commands, for example, to send
an e-mail notification to shoppers who submit orders.API functions can also
write information to the database.You can write your own API programs to
change the way in which calculations are performed and maintain custom
information in the Net.Commerce database.You can also write your own API
programs to connect Net.Commerce to a legacy system, such as an order
processing system.
An API task is the task that the API function is assigned to handle.It is handled
by a service program on the AS/400.You can write your own API programs for
tasks like inventory and shipping so that they integrate with existing systems
such as an Enterprise Resource Planning (ERP) system or an order processing
system already existing in the company.
If you want to override an API, you make an entry in the APIS table
corresponding to that task for the Service program that executes the task.
180
AS/400 e-commerce: Net.Commerce

Each API task has an exception task associated with it.If Net.Commerce detects
that an API function has returned a non-zero return code, it calls the
corresponding exception task, which has the same name as the API task.A
Net.Data macro then generates an error page for the user.You may need to
modify the macro that implements the exception task for your API task.You
assign your new exception macro to the API by putting the macro name in the
MACROS table.Depending on the change that you are making, you may need to
do the following when you implement your new API function:

Extend the Net.Commerce database

Modify one or more macros
Depending on the definition of the task, the macro or API you write replaces or
adds to the behavior predefined in Net.Commerce.Macros and APIs can be
merchant specific or sometimes apply to all merchants.
You can modify a macro by inserting the relevant row into the MACROS table.
The MACROS table contains information about the macros that are defined in
Net.Commerce.The macros are Net.Data files that provide a database-Web
interface by querying the database and creating the HTML page that the visitor
sees.APIs can similarly be replaced in the API′s table.The API′s table contains
information about the APIs in Net.Commerce.
The following is a list of all the Net.Commerce API tasks and what they can be
used to change or customize:
AUDIT_ADDR_BOOK customize the parameter checking for the adrbk/add and
adrbk/process commands.
AUDIT_REG customize the parameter checking for the register/modify and
regi ster/new commands.
CHECK_INV Customize the way that the order/display, shipto/process, and
shipto/update commands check inventory.
DO_PAYMENT Change the way the order/process command processes payments
for orders.
EXT_ORD_PROC Perform additional processing just prior to the completion of
the order/process command.
EXT_SHIPTO_PROC Perform additional processing for each product and item
after the shipto/process command associates it with a shipping
address.
EXT_SHIPTO_UPDATE Perform additional processing just before completion of
the shipto/update command.
GET_BASE_SPE_PRC Change the way the order/display, shipto/display,
shipto/process, and shipto/update commands determine item prices.
This price can be different from the price that is returned by
GET_BASE_UNIT_PRC because an item that is associated with a
shipping address can have extra features that increase the price.
GET_BASE_UNIT_PRC Change the way the shopcart/add and shopcart/display
commands determine product and item prices.
GET_ORD_PROD_TAX_TOT Change the way the order/display command
calculates the total taxes payable on an order.
Chapter 11.Integrati ng Legacy Appl i cati ons and Data wi th Net.Commerce
181

GET_ORD_PROD_TOT Change the way that the order/display command
calculates the total cost of the items in an order.
GET_ORD_SH_TOT Change the way the order/display command calculates the
total shipping charges for an order.
GET_SUB_ORD_PROD_TAX_TOT Change the way the order/display command
calculates the total tax payable for all the items in a suborder.A
suborder is a part of an order that is to be shipped to a single
address.
GET_SUB_ORD_PROD_TOT Change the way the order/display command
calculates the total price of all the items in a suborder.A suborder is
a part of an order that is to be shipped to a single address.
GET_SUB_ORD_SH_TOT Change the way that the order/display command
calculates the total shipping charges for all the items in a suborder.
A suborder is a part of an order that is to be shipped to a single
address.
UPDATE_INV Customize the way that the order/process command updates the
inventory in the database.
Detailed information on each of these tasks can be found in
Net.Commerce
References
.This manual is available online from either
http://w3.torolab.ibm.com
or
http://www.shop.isc.uk.ibm.com
.
You do not have to modify the Net.Commerce tables directly for prices, shipping,
inventory or taxes.With prices, for example, you can modify the corresponding
APIs to take prices or markups from a table other than the PRODUCT table.
11.4 API Signatures
Every API has an API signature.The API signature lists the parameters the
system passes to the function that implements the task, and the parameters that
the system expects to be returned.Three of the parameters are passed to all
API functions.Other parameters are passed that are unique to the function.
When changing an API, you need to:

Use any parameters that the system passes in if they are needed by your
function.

Pass the variables that the system expects to receive, back to the system.

In case of an exception condition, return the parameters that are needed by
your API exception macro in the format that is required according to the API
signature.
11.5 Integrating Data
In addition to the integration of legacy application functions into the
Net.Commerce environment, it is important to be able to integrate legacy
application data.And while some view the task of integrating function, which
requires ″programmi ng″ to be more difficult than integrating data, true
integration of data may require more skill.This is due to the dual aspects of
integrating data.First is the task of populating the Net.Commerce database with
legacy data.There are several techniques that can be used to accomplish this,
and most are reasonably straightforward, if not a bit tedious.Secondly, and
182
AS/400 e-commerce: Net.Commerce

perhaps more importantly, is the task of keeping the Net.Commerce data and the
legacy data fully synchronized, so that changes to either set of files is replicated
in the other.This task may require a combination of data management skills
and programming skills, depending on the particular implementation.
The next section will cover the techniques available for populating the
Net.Commerce database.Those techniques include using Net.Commerce′s
mass import utility, using the store manager interface to key data in manually,
and other techniques such as using DataPropagatorRelational to populate the
database.
11.5.1 Populating the Net.Commerce Database
When setting up an individual store in a Net.Commerce site, the store manager
has the ability to enter a wide variety of data, including product specific data.
This can be done through the Net.Commerce administrator but entering data for
a single product requires filling in several ″screens″ worth of fields.This
certainly does work, but for a store that is to have thousands or even tens of
thousands (or more) of items, this process is less than desirable.Fortunately,
Version 2 of Net.Commerce, which is the level implemented for OS/400 V4R2,
includes a utility to incorporate existing data without having to manually key the
information via the Net.Commerce store administrator panels.This utility, called
mass import, is discussed in 10.4, “Populating the Net.Commerce Database” on
page 172.
In addition to using Net.Commerce′s mass import utility, other techniques for
populating the Net.Commerce files are also available.These techniques include
using platform specific utilities such as DFU (data file utility) on the AS/400,
generic DB/2 tools like DataPropagatorRelational, tools such as NotesPump, or
writing a custom program to accomplish the task.
Finally, simply populating the Net.Commerce files one time may not be all that is
required to integrate Net.Commerce and legacy applications.A customer will
likely continue to use the legacy applications in a non-Web environment, and will
require the Net.Commerce data to be kept synchronized with the
non-Net.Commerce data.
11.5.2 Synchronizing the Net.Commerce Database with Backend Data
API functions are the recommended way to deal with situations where
Net.Commerce changes data arising out of shopping activities, such as inventory
or shipping.There are certain cases, however, where you have to use some
other approach to synchronize the Net.Commerce database with some backend
or legacy system database.Some examples are:

To read from the Net.Commerce database into a backend system.For
example, you may want to synchronize shopper demographics with your
data warehouse.

When there is no API available.For example, a shop selling gambling
tickets may have rapidly changing ticket (product) descriptions, depending on
the state of the game.There is no API that deals with product descriptions,
so this can be written directly into the database with some process that
synchronizes the descriptions with some other table.

For mass scale updates.You may want to update all product names in a
particular category because your branding has changed.

For connectivity or security reasons.You may not want to link
Net.Commerce to your legacy system directly, because of your company′s
Chapter 11.Integrati ng Legacy Appl i cati ons and Data wi th Net.Commerce
183

security policies, because your legacy system is on a platform or data format
that cannot be linked easily, or because you do not have enough information
about your backend system to code the links.In these and other cases, it
may be easier to write a batch update program that periodically updates
prices, taxes, inventory, and so on directly into the Net.Commerce database
and does not change the behavior of the API set.

For performance - an API task may be quite slow because it incurs repeated
overheads and it may improve performance if data like prices were directly
available in the Net.Commerce database.
The following methods can be used for database synchronization:
1. Mass import,as discussed in 10.4,“Popul ati ng the Net.Commerce Database”
on page 172, can be used to update the Net.Commerce database.Some
code needs to be written to generate an Input file of the required format from
the backend data.Mass import can then be run against this file periodically
using the job scheduler.This is the recommended method.
2. Synchronization Tools such as Data Propagator or Data Mi rror.In this case,
one has to consider if the replication is one-way or both-ways - can the tool
handle updates being done at both ends?Also, replicating tools such as
data propagator generally update identical tables or columns, so it may be
necessary to create a large number of definitions if your backend data does
not match Net.Commerce data closely in structure.If the definitions are in
place, however, these tools can provide reliable and usually very efficient
replication.
3. Custom Daemons that copy data peri odi cal l y from one set of tables to
another.This requires you to invest more heavily in programming and
maintenance of code and is not easily upgraded.This approach is not
recommended unless there are special requirements like a stockbroker
reading prices from an online information service.
Important
It is strongly recommended that you use APIs to update information wherever
possible; otherwise maintaining and upgrading the Net.Commerce product
may become difficult.
184
AS/400 e-commerce: Net.Commerce

Chapter 12.Building an e-commerce Site
Net.Commerce provides a full front-end for an interactive electronic shopping
experience. Hoever, it requires the following additional components to be a fully
functional site for electronic commerce that provides a secure environment for
shoppers to order, pay for, and receive products from the site:

A connection to the Internet, so that shoppers can access the site.

Firewall protection, to prevent unauthorized access to the site and its
resources.

Backend systems, to provide payment, accounting and order fulfillment
functions.
12.1 Connecting to the Internet
A Net.Commerce server must be connected to the Internet so that shoppers can
access it.The AS/400 must have a physical connection to the shopper (usually
via an Internet Service Provider) and a valid unique TCP/IP address that is
visible to persons in the Internet.Also, you must have a host name for the
AS/400, usually of the form
www.<hostname>.com so that shoppers can easily
locate your site.
12.2 Firewall Protection
A firewall is a blockade between a secure private network and another
non-secure network, such as the Internet (see Figure 135 on page 186).
Although most companies use a firewall to connect a private network safely to
the Internet, you can also use a firewall to secure one private network from
another private network on an intranet.
A firewall provides a controlled single point of contact (called a chokepoint)
between your secure internal network and the non-secure network.The firewall:

Lets users in the internal network use authorized resources that are located
on the outside network.

Prevents unauthorized users on the outside network from using resources in
the internal network.
©
Copyright IBM Corp. 1999
185

Figure 135. Firewall:ProtectingYour Internal NetworkfromOutsideUsers
When you use a firewall as your gateway to the Internet (or other network), you
considerably reduce the risk to your private, internal network.Using a firewall
also makes administering network security easier, since most of your security
policy is put into effect by functions provided by the firewall.
Implementing a firewall has a performance penalty as the firewall forces all
access to the trusted network to pass through a series of validations.The more
comprehensive the rules, the greater the impact on performance.Also, the
fewer the facilities offered to the untrusted network, the more the security.
Hence, a firewall represents a trade-off between functionality, performance and
security.
A firewall can be set up to perform:
Address concealment The addresses of the internal trusted network cannot be
seen outside the firewall by members of the external network.
Packet filtering Allowing or restricting packets based on the services requested
and originating address.
Proxy serving Carrying out functions like FTP or HTTP to the untrusted side on
behalf of users inside the trusted network.
Socks serving A protocol independent way similar to Proxy of protecting the
connection between a trusted client and an unsecure server.
Mail relay Relaying mail from unsecure external network to internal network.
Split DNS Providing a DNS that is split into two parts, one for internal addresses
only accessible by the trusted side, and one for external addresses
linked to external Domain Name Servers on the untrusted side.
In the following scenarios, any firewall product will work.Firewall for AS/400 has
an advantage over other products in that it can be administered from the same
set of menus as the Net.Commerce Configuration.Some functions of a firewall,
such as packet filtering, can be provided by a router as well.However, routers
186
AS/400 e-commerce: Net.Commerce

do not generally produce activity logs, which can be crucial in tracing
unauthorized activity.
Note
Firewalls protect only TCP/IP traffic.If you are using SNA or TCP/IP over
AnyNet or any other protocol, the firewall will not protect or monitor that.It
is strongly recommended that you use only TCP/IP to communicate across
the firewall.In particular, database access should use DRDA over TCP/IP,
which is available with OS/400 V4R2.
It is possible to set up secure APPC networks also, but a good deal of work
must be done to ensure the same level of security that is provided by the
firewall on TCP/IP.
In the case of Net.Commerce, there are three components that can be put on
separate machines, each of which can either be in front of or behind the firewall.
The components are:

The Net.Commerce servers including the Web server, the Director and the
Daemon

The Net.Commerce database

The backend systems that service Net.Commerce
Depending on the trade-off between performance and security that you decide
on, there can be various firewall scenarios.Note that the Web server and the
Net.Commerce server should be on the same machine.Also, while only single
machine scenarios are discussed here, it can be applied equally well to multiple
machine scenarios.Any of the three components can be on one or more
machi nes.It is also possible to have, for example, multiple database machines -
some inside and some outside the firewall.These special case scenarios are
not discussed here because they can be very complex, involve other issues like
distributed database management and require expert configuration.
The scenarios we discuss here are:

Everything behind the firewall

Net.Commerce server in front of the firewall

Backend applications behind the firewall

Firewall issues
12.3 Everything behind the Firewall
In this approach, the Net.Commerce server, the database and the backend
systems are all behind the firewall, and all accesses from the untrusted network
must go through it (see Figure 136 on page 188).The immediate advantage is
better security, but there is a possibility that the firewall will become a
bottleneck for high capacity serving.
Chapter 12.Bui l di ng an e-commerce Si te
187

Figure 136. EverythingbehindaFirewall
To implement such a firewall, you must make the TCP/IP address of the
Net.Commerce server public even though behind the firewall.This scenario
makes the machine running Net.Commerce a little more open to potential attack,
so we call it semi-secure.It is recommended that a router be placed between
the semi-secure Net.Commerce machine and the rest of the internal network, so
that the addresses of the rest of the network are kept private.
188
AS/400 e-commerce: Net.Commerce

12.4 Net.Commerce Server in front of the Firewall
The Net.Commerce server essentially consists of static HTML pages and CGI-bin
programs accessing the database.These can be protected by allowing only
HTTP access to the server outside the firewall.The database that contains price
data, etc. can be secured behind the firewall, and accesses can occur via DRDA
over TCP/IP.The database can be any DRDA complaint database, such as
DB2/6000, but the appropriate connectivity utilities (DDCS, Data Hub) have to be
installed if the database is not DB2/400.This protects the data from untrusted
users while allowing the Net.Commerce server to function without the overhead
of a firewall (see Figure 137).Note, however, that many Net.Commerce pages
require database access so the performance gains may not be very substantial
depending on the activities a shopper performs.Database access will now incur
the overheads of a remote DRDA call.
Figure 137. Net.CommerceinFront of theFirewall
If the Net.Commerce server is in front of the firewall, then in addition to database
access, any APIs you write to connect the Net.Commerce server to backend
legacy applications (that are behind the firewall) have to be firewall aware.
Chapter 12.Bui l di ng an e-commerce Si te
189

12.5 Backend Applications behind the Firewall
In this scenario (see Figure 138), only the backend applications that service
payment, inventory and other functions are behind the firewall, and the
Net.Commerce server as well as the database tables associated with the
Net.Commerce instances are in front of the firewall, protected by a router and
protocol restrictions.Generally, you would allow read-only HTTP access to the
server in front of the firewall, and disable all other services like FTP, TFTP,
Telnet, BootP, RPC or AS/400 login screens.This provides adequate security
from unauthorized access, but without Telnet and login access you will not be
able to use the AS/400 for anything else.
Figure 138. BackendApplicationsbehindtheFirewall
This scenario would mean that all routine Net.Commerce tasks are conducted in
front of the firewall and do not incur any overhead.Only backend accesses,
which are relatively infrequent, are required to go through the firewall.
12.6 Firewall Issues
When a firewall is implemented between the Net.Commerce server and the
backend database, you must program with the firewall in mind.This involves
programming only with TCP/IP.This means that you should use SQL with DRDA
over TCP/IP.You cannot use SNA based native database calls like Open
Physical File or DDM calls to access data on the other side of the firewall.While
it is possible to circumvent the firewall using SNA based commands, it is
strongly suggested that you do not.
For interprocess communication, you can use TCP/IP-based system functions
like RPC or a product like MQ Series.MQ Series, in particular, takes care of the
housework related to establishing the connection and makes it easy to write
applications that address multiple machine architectures.
An exception to not using SNA is when Opticonnect is used.Opticonnect only
supports DDM, which means there isn′t any scope for illegal access by another
190
AS/400 e-commerce: Net.Commerce

SNA application when using this to connect systems.Opticonnect provides a
very fast connection between systems.
Chapter 12.Bui l di ng an e-commerce Si te
191

192
AS/400 e-commerce: Net.Commerce

Chapter 13.Shopping Trip in the Demo Mall
Net.Commerce includes a demonstration shopping mall.It is useful to install this
mall prior to implementing a live mall such that Net.Commerce can be
experienced prior to implementing a live mall.Experience gained from this may
provide useful input to the implementation of the live mall.The demonstration
mall is installed by selecting to install the demo mall from Figure 29 on page 59
or by using the mass import utility (see 10.4.1, “Mass Import” on page 172).
In this chapter we go on a shopping trip in the Net.Commerce Demomall.
Ensure that the following steps are performed before starting the shopping trip.
1. Net.Commerce is installed and configured.
2. The demomal l is installed.
3. The QNETCOMM Web Server instance is running.See 9.1.3,“Starti ng the
Net.Commerce Web Server Instance” on page 116.
4. The Net.Commerce Server instance is running.See 9.1.5,“Starti ng the
Net.Commerce Server” on page 118.
The following figure illustrates the steps we are going to perform during our
shopping trip.
©
Copyright IBM Corp. 1999
193

Figure 139. Net.CommerceShopper Activities
194
AS/400 e-commerce: Net.Commerce

13.1.1 Mall Front
To start the shopping trip, enter the following URL from your browser
http://<hostname>/demomall/basemall.htm.The following mall front page is
shown.
Figure 140. Net.CommerceMetropolitanMall Front Page
From any mall page you can go directly to any of the following links:
Home This is the mall directory, that is, a list of all stores in the
mal l.
Register Register yourself to be a registered shopper allowed to do
shopping from the mall.
Address Book Define your contact information including your address and
any other address to which you have products sent.
Search You can search products by categories in all stores in the
mal l.
Shopping Cart Every item you choose is added to this shopping cart; this
does not mean that you have to buy all these items at
once.
Prepare Orders From your shopping cart, you choose the items you want
to buy now, then you enter the quantities of each item.
Chapter 13.Shopping Trip in the Demo Mall
195

Place Orders At the end of your shopping trip, place the order by
entering your credit card number.A reference number for
your order is assigned to you only if it is a valid credit card
and accepted by the store.
Check Order Status At any time you can check your order status and if you
have more than one order, all of them are shown with their
reference numbers.
13.1.2 Entering the Mall
You may enter the mall as a registered shopper or just as a guest.As a guest,
you are only allowed to surf the site and display the products but you cannot
actually buy.As a registered shopper you can surf, choose, place orders, buy,
and even track your order status.
To enter the mall as
Guest, just click on the highlighted guest shopper link.You
can surf and choose; if you decide to
register yourself, just click on the
highlighted Register link.After registration, you become a
registered shopper
and from now on you click on the highlighted registered shopper to shop.
13.1.3 Guest Shopper
When the guest shopper link is selected, a page is shown (Figure 141 on
page 197) that lists all of the stores in the mall that you can surf as a
guest
shopper
.You can then click on the store you want to visit, or click on the
highlighted word here to see the specially featured products in the mall
(Figure 142 on page 198).
196
AS/400 e-commerce: Net.Commerce

Figure 141. Net.CommerceMetropolitanMall DirectoryList
Chapter 13.Shopping Trip in the Demo Mall
197

Figure 142. Net.CommerceMetropolitanMall Special Products
13.1.4 Register
Before you can buy anything from the mall, you must be a registered shopper.
You can register by clicking on the highlighted word Register and filling in the
registration forms shown in Figure 143 on page 199, Figure 144 on page 200,
and Figure 145 on page 201.You have to describe your contact information
such as frequently used addresses, your telephone number, optional
demographic information, and a password to keep your information confidential.
Note that currently the session is unsecure as indicated in Netscape 4 by the
open padlock in the browser lower left-hand corner (see Figure 142).Having
clicked on the register button the server will now establish a secure session.If
the certificate being used by the server was created by a Certificate Authority
that the browser does not trust (is not one of its trusted roots), a series of panels
will ask you to confirm that you wish to establish a secure session with this
server.This is the case if the certificate is issued by an AS/400 acting as a
Certificate Authority in an intranet environment.
198
AS/400 e-commerce: Net.Commerce

Figure 143. Net.CommerceRegistrationScreen-Personal Information
Fill in the registration form as in Figure 143, Figure 144 on page 200 and
Figure 145 on page 201.Click on the Submit Registration button in Figure 145
on page 201 to send your registration for approval.
Note
Only the bold fields are mandatory.Both the ID and password are case
sensitive.
The ID and password entered are stored in the validation list associated with the
Net.Commerce server instance.
Note that the session is now secure as indicated in Netscape 4 by the
closed
padlock in the browser lower left-hand corner (see Figure 143).
Chapter 13.Shopping Trip in the Demo Mall
199

Figure 144. Net.CommerceRegistrationScreen-Contact Information
200
AS/400 e-commerce: Net.Commerce

Figure 145. Net.CommerceRegistrationScreen-Shopper Demographics
Enter your User Name and Password when prompted (as entered on the
registration form in Figure 143 on page 199).
When the registration is correctly created, Figure 146 on page 202 is shown.
Write down your ID and password in a safe place and click the highlighted
Proceed to the Mall Directory link.Later you may change any of your
registration fields by choosing the Register link from any of the mall pages.Al l
of the fields are shown for you to update (your password is hidden; however you
can change it).
Chapter 13.Shopping Trip in the Demo Mall
201

Figure 146. Net.CommerceRegistrationSuccess
13.1.5 Address Book
Whether you are a guest or a registered shopper, you can edit your address
book simply by clicking on the Address Book icon from any of the Mall pages.If
you are a registered shopper, the address book already contains the address
that you entered at registration time.You can add as many addresses as you
wish to use when placing orders; for example, you might be frequently sending
presents to your parents so you add their address to the address book to save
having to enter their address each time you place an order.Net.Commerce
allows you to save nicknames and corresponding addresses to facilitate the
order placing process.
The following figures are for a registered shopper; if you are a guest, you
receive a similar screen.However, it shows
Unregistered Shopper instead of
your name.
Click on Address Book to display your address book; see Figure 147 on
page 203.
202
AS/400 e-commerce: Net.Commerce

Figure 147. Net.CommerceAddressBookfor RegisteredShopper -1
Let us assume that we want to add the address of Santa Claus at the North Pole,
and give him a nickname of Noel.Enter Noel in the first field of Figure 147 and
click on the Add button.Figure 148 on page 204 is shown.Fill in all fields as
shown and scroll down to add more information such as address, telephones,
e-mail, and so on.Then click on the Add button to confirm the addition.
You may clear all fields by pressing the CLEAR button to restart.
Chapter 13.Shopping Trip in the Demo Mall
203

Figure 148. Net.CommerceAddressBook-AddNicknames
204
AS/400 e-commerce: Net.Commerce

Figure 149. Net.CommerceAddressBook-2
You may update any nickname in your address book by choosing it from the
drop down list of the second field in Figure 149 and then clicking on the Update
button.
You may Delete any nickname from your address book by choosing it from the
drop-down list of the third field on Figure 149.Then click on the Delete button.
Chapter 13.Shopping Trip in the Demo Mall
205

13.1.6 Search a Specific Product or Category
From the Mall directory, click on any store you want to visit, or click on the
search icon at the top of the screen.You can search by store name, category,
product name, or description or even price range.
If you want to search through the products offered by the ″Basi cs″ store, select
the radio button against the Merchant Name field in Figure 150, select Basics
from the drop-down list, fill in the other fields as appropriate and click on the
Search button.You may search by:

Product name or description

Price range

Category name

Merchant name
Figure 150. Net.CommerceMetropolitanMall SearchScreen
A list of all products offered by Basics is shown in Figure 151 on page 207. You
can scroll up and down in the list, so scroll down once.
206
AS/400 e-commerce: Net.Commerce

Figure 151. Net.CommerceMetropolitanMall SearchResult Screen
You can either view more description on any of the listed items by clicking on
the highlighted word View or if you plan to buy it, just add it to your shopping
cart by clicking on the highlighted word Add.For our shopping trip, click on Add
to add ″Crew Neck Sweater″ to our shopping cart; see Figure 152 on page 208.
Chapter 13.Shopping Trip in the Demo Mall
207

13.1.7 Shopping Cart
Figure 152. ShoppingCart Contents
Whatever you choose is added to your shopping cart.You can display your
shopping cart contents at any time during your shopping trip just as in a normal
shopping trip.You can also add or remove from it at any time; even if you log
off and still have some items left in your shopping cart they are not automatically
removed.They will be waiting for you next time you shop.
In a mall environment, the shopping cart contains all the items selected from all
stores, however the store name is indicated near each item.Our shopping cart
displays only the ″Crew Neck Sweater″ we chose from Figure 151 on page 207.
208
AS/400 e-commerce: Net.Commerce

13.1.8 More Shopping
The following front pages are for different stores in the Metropolitan Mall.The
first one is a men′s fashion shop and the second store is a travel agent offering
different vacation trips.The two front pages are designed differently; for
example, the menu which contains the Home, Register, Address Book, and so on
is shown at the bottom of the ″
Basics″ store page and to the left of the ″Netaway″
store page and with different images also.
Figure 153. SampleMen′sFashionShopFront Page
Chapter 13.Shopping Trip in the Demo Mall
209

Figure 154. Travel Agent SampleHomePage
Let′s assume that you chose the ″Netaway″ store to start surfing its offerings.
The Netaway travel agent decided to categorize his offerings by the trip place
such as St. Martin, Aruba, and Barbados.As shown on his front page, the only
offered package is the
Barbados offer and all the other packages are already
sold out.
Let′s discover more details about the Barbados offer by clicking on the
Barbados
i mage.
210
AS/400 e-commerce: Net.Commerce

Figure 155. Travel Agent SampleCategoryPage
The store decided to sub-categorize its packages by trip date (October 5, 1997
and November 9, 1997).We click on November 9, 1997 to explore this trip.
Chapter 13.Shopping Trip in the Demo Mall
211

Figure 156. Travel Agent SampleSub-CategoryPage
The November 9, 1997 option is further detailed by another level of
sub-categorization, which is the travel option.For our shopping trip, we just
click on Basic Package (Airfare Only) to add it to our shopping cart.
212
AS/400 e-commerce: Net.Commerce

13.1.9 Preparing Order
From any point on the mall pages, you can click on Prepare Order to specify the
quantities for all the items you want to buy and to indicate the shipping
addresses.
Figure 157. PreparingOrder Screen-1
For each of the items in your shopping cart, choose the nickname to whom you
want to send this item (nicknames are entered from the address book that you
can access from any of the mall pages; refer to Figure 147 on page 203) and
click on Add near each item you want to buy.After each addition, you will find
the items added into your current order list as per Figure 158 on page 214.
Note:You have to click on the Add button near each item you want to buy.
Chapter 13.Shopping Trip in the Demo Mall
213

Figure 158. PreparingOrder Screen-2
In Figure 158, we entered Dalia as the nickname to send items to.Now we click
on the Details button.
Note:Our order will be fulfilled from two different shops and hence we should
expect to receive two order numbers.
214
AS/400 e-commerce: Net.Commerce

Figure 159. PreparingOrder Screen-3
The items you decide to buy are sorted by store.Enter the quantity required of
each item.You may also change the shipping address and you may choose
from different shipping carriers the store or the mall is offering.You still have a
chance to remove an item from your order by clicking on the Remove button.If
you decide to place the order, click on the Place orders button at the end of your
screen (scroll down, then click on the button).
Chapter 13.Shopping Trip in the Demo Mall
215

13.1.10 Placing an Order
You may also click on Place order from any of the mall pages at any time.Here
you enter your credit card information.Once the credit card is accepted, the
system assigns a reference number to each of your orders.You have a
separate reference number for each store.
Note:You must prepare an order before being able to place it.
Figure 160. PlacingOrder Screen-1
Up to this moment you can still change your order, remove items from an order,
or process it.If you decide to process it, click on the Process Order button for
each of your orders.For our shopping trip, we click on Process Order for order
number 1 from the Basics store.See Figure 161 on page 217.
216
AS/400 e-commerce: Net.Commerce

Figure 161. PlacingOrder Screen-2
Details of the order are shown along with shipping and tax details. Scroll down
to display Figure 162 on page 218 and enter your credit card type, number, and
expiry date, then press the Purchase button.
Chapter 13.Shopping Trip in the Demo Mall
217

Figure 162. PlacingOrder Screen-3
Note:You have to click Process Order for each order you have on your list in
Figure 160 on page 216.
In our shopping trip, we placed order number 1 only and order number 2
is still pending.
218
AS/400 e-commerce: Net.Commerce

13.1.11 Checking Order Status
From any point on the mall pages, you can click on Check Order Status to check
the status of any of your placed orders.
Figure 163. CheckingOrder StatusScreen
Only the store administrator can change the Order Status (see Figure 133 on
page 171), which can be:

P Pending orders (non-processed orders)

C Completed (placed orders)

X Canceled (deleted orders)
Chapter 13.Shopping Trip in the Demo Mall
219

13.1.12 Placing Pending Orders
Now if you click on Place Orders, you receive Figure 164, which lists all the
orders that you have prepared but not yet placed.In our case, we prepared
order numbers 1 and 2 but processed order 1 only (refer to the note on page
218).
Figure 164. PlacingPendingOrders
Please refer to 13.1.10, “Placing an Order” on page 216 for more information on
how to place an order.
220
AS/400 e-commerce: Net.Commerce

Appendix A.SSL Configuration for V4R3
The SSL configuration on the V4R3 AS/400 is done through the Digital Certificate
Manager (DCM), which is one of the AS/400 Tasks on a browser.
This appendix shows you the overview of the V4R3 DCM, and the SSL
configuration steps necessary to run Net.Commerce on the secured Web
session.First, we describe the implementation of the DCM in V4R3.Second, we
describe the detailed configuration steps of SSL through the DCM.
The steps described in this appendix should be applied in place of step 15 in 7.1,
“Confi gurati on Process” on page 55 for a V4R3 system.
A.1 AS/400 Implementation of Digital Certificate Management
Digital Certificate Manager (DCM) is a browser-based administration facility that
allows you to create, manage, and use certificates within an enterprise and with
partners of an enterprise.You can use DCM to request digital certificates from
Internet Certificate Authorities like VeriSign and Thawte.
DCM allows you to create your own intranet Certificate Authority (CA).You can
then use the CA to dynamically issue digital certificates to servers and users
(client certificates) on your intranet.When you create a server certificate, DCM
automatically generates the private key and public key for the certificate.You
can also use DCM to register and use digital certificates from VeriSign or other
commercial organizations on your intranet or the Internet.
Digital Certificate Manager is option 34 of OS/400 (5769-SS1 option 34). You must
install this option to use DCM.DCM is a link in the AS/400 Tasks page which
runs in the *ADMIN HTTP server instance.Therefore,you must have i nstal l ed
IBM HTTP Server for AS/400 (5769-DG1) and use it to access DCM.In addition,
you must install IBM Cryptographic Access Provider licensed program
(5769-AC1,or AC2, or AC3) to create certificate keys. These cryptographic
products determine the maximum key length permitted for cryptographic
algorithms on your AS/400 system.Government export/i mport regul ati ons
determine which version is available in your country.
To use all the options available in DCM, you must have *SECOFR and *SECADM
authority.
To access the Digital Certificate Manager, click on the hyperlink for Digital
Certificate Manager from the AS/400 Tasks page. When using Digital Certificate
Manager, you can click the
Help button on any page at any time to access online
help.
A.1.1 Configuring a Digital Certificate Environment
You can use your AS/400 system to configure a digital certificate environment.
You can also configure the HTTP server to use digital certificates and run over
SSL.
Perform the following series of steps to configure an intranet digital certificate
environment using AS/400 as CA:
1. Use DCM to create an i ntranet CA i n one or more AS/400 systems.
©
Copyright IBM Corp. 1999
221

2. Using DCM,the i ntranet CA i ssues server certificates that can be used i n the
local server (same AS/400 system where the CA is configured) or exported
to a remote server.
3. For the cl i ents to recogni ze and trust the server certificates issued by the
intranet CA, the CA certificate must be installed in the clients′ browsers and
designated as a trusted root.
4. If the server wi l l request client certificates for client authentication,the
users must request and install client certificates in their browsers.
5. The HTTP server must be confi gured to enabl e SSL (SSL On) and specify
the key ring file where the server certificate is stored (keyfile).Optionally,
you can configure SSL client authentication (SSL_ClientAuth), add specify
PROTECTION/PROTECT directives for further resource protection.
A.2 Requesting a Server Certificate from an Internet CA
To conduct commercial business on the Internet you should request your server
certificate from an Internet Certificate Authority such as VeriSign or Thawte who
are widely known by client browsers and servers.
For your private Web network within your own company, university or group, or
for testing purposes you can, using Digital Certificate Manager (DCM), act as
your own CA.A.3, “Creating a Self-signed Certificate” on page 230 explains this
procedure.
This section describes how to obtain a server certificate from an Internet
certificate authority.
To use a server certificate issued by an Internet CA you must:
1. Request the server certificate from an Internet CA.
2. Receive a server certificate for this server.
3. Configure the HTTP server to use SSL and Server Authentication.
A.2.1 Request a Server Certificate from an Internet CA
To use SSL for secure Web serving, your server must have a digital certificate.
You can use an intranet certification authority (CA) to issue a server certificate
(see A.3, “Creating a Self-signed Certificate” on page 230), or you can use an
Internet CA.
When you choose to use an Internet CA to issue a server certificate, you must
first request the certificate. Follow these steps:
1. Start the HTTP *ADMIN server on your AS/400 system.From the command
line enter the command:
STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN)
2. Access the AS/400 Tasks page from your browser by enteri ng the URL:
http:// System_name:2001
3. You wi l l be prompted to enter a user name and password.Sign on wi th a
user that has *SECOFR and *SECADM authority.The AS/400 Tasks page is
displayed as shown in Figure 165 on page 223.
222
AS/400 e-commerce: Net.Commerce

Figure 165. AS/400TasksPage
4. Click Digital Certificate Manager.
5. From the Digital Certificate Manager (DCM) page,click Server Certificates i n
the left-hand frame to display an extended list of server tasks.
6. Click Create a server certificate from the list to di spl ay the Select a
Certificate Authority page.
7. Select VeriSign or other Internet Certificate Authority as shown i n
Figure 166.
Figure 166. RequestingaCertificatefromVeriSignor other Internet CertificateAuthority
Click OK to display the Create a Server Certificate form.
Appendix A.SSL Configuration for V4R3
223

8. Complete the Create a Server Certificate form as shown i n Figure 167 on
page 224 replacing the field values with your organization information.
The options for the key size are determined by the IBM Cryptographic
Access Provider (5769-ACx) licensed program installed in your system. This
is the key size that will be used to generate your public and private keys.
Figure 167. Request aServer CertificatefromanInternet CA
By default, the system inserts the fully qualified name of the AS/400 system
into the Server name field. Do not change this name.This is the name used
to describe your server. You can give the server any name, although the fully
qualified TCP/IP host name is usually used for the server name.
Click OK to process the Create a Certificate Request form.
You will receive the Server Certificate Request Created page as shown in
Figure 168 on page 225.
224
AS/400 e-commerce: Net.Commerce

Figure 168. ServerCertificateRequest GeneratedbyDCM
Note
Do not click done or close the browser yet.You will need to cut and
paste the certificate request when you submit the Certificate Signing
Request to the Internet CA.
9. Copy the Server Certificate Request to your cl i pboard.Start at -----BEGIN
NEW CERTIFICATE REQUEST-----
and end at -----END NEW CERTIFICATE REQUEST-----
Click Done to close the page.
10.Follow your Internet CA procedures to paste the certificate request.For
example, to request a certificate from VeriSign, follow the instructions that
are described on the following URL:
http://www.verisign.com
When VeriSign is satisfied that you meet all of its requirements, it will e-mail
the secure server certificate to you.You should receive it in 3 to 5 business
days.Other certificate authorities will have their own procedures.
A.2.2 Receive a Server Certificate for this Server
After you receive the certificate from the Internet CA, you need to copy the
signed server certificate to a text file that DCM can access when you perform the
Receive server certificate task.Perform the following steps:
1. Copy the si gned server certificate presented to you by the Internet CA to
your cl i pboard.
Start at -----BEGIN CERTIFICATE REQUEST-----
and end at -----END CERTIFICATE REQUEST-----
Appendix A.SSL Configuration for V4R3
225

2. Paste the si gned server certificate i n your cl i pboard i nto a.txt file.Use a text
editor of your choice, for example Notepad, to create a txt file and paste the
server certificate issued by the Internet CA.
3. Save the file i n your AS/400 system IFS.Use a mapped network dri ve and
save the txt file that contains the server certificate issued by the Internet CA
in the following path (enter a file name of your choice):
/QIBM/USERDATA/ICSS/CERT/SERVER/rcvcert.txt
4. Back i n DCM,click Receive a server certificate and compl ete the Recei ve a
Server Certificate page (Figure 169).
Figure 169. ReceivingaServer CertificateIssuedbyanInternet CA
5. The Certificate Received page is displayed.You have the option to use the
received certificate with the ADMIN or LDAP server. Do not select these
options. Click OK.
6. You should recei ve a Server Configurati on Status message i ndi cati ng the
server certificate operations are complete.Click Done.
7. You must now set the key as the default key.Back i n DCM,click Key
management. Complete the Key Management page and select Work with
keys (see Figure 170 on page 227).
226
AS/400 e-commerce: Net.Commerce

Figure 170. KeyManagement Page
8. Select the key wi th the l abel correspondi ng to the certi fi cate you recei ved
from the Internet CA (VeriSign_Cert in our example), select Set key to be the
default and click OK.
A.2.3 Configure the HTTP Server to Use SSL
The Web server must be configured to run over SSL and use the certificate you
received in A.2.2, “ Receive a Server Certificate for this Server” on page 225.
To configure your HTTP server to run over SSL and use a certificate, you must
perform the following tasks:
1. From Digital Certificate Manager click Return to AS/400 Tasks.The AS/400
Tasks page is displayed (see Figure 174 on page 231).
2. Click IBM HTTP Server for AS/400.
3. Click Configuration and Admi nistrati on.
4. Click Configurations i n the left frame.
5. Select your HTTP configuration file from the drop-down box i mmedi atel y
beneath the Configurations link as shown in Figure 171 on page 228.
Appendix A.SSL Configuration for V4R3
227

Figure 171. HTTPServer Configuration
6. Click Security configuration.Fill i n the Security configuration page (see
Figure 172 on page 229).
Check Allow SSL connections.
Accept the default SSL port (443) or specify the port you wish to use for SSL.
Deselect Enable SSL client authentication.
Add the key ring path and file name. If you copied it to the clipboard
you can paste it now.
/QIBM/USERDATA/ICSS/CERT/SERVER/DEFAULT.KYR
228
AS/400 e-commerce: Net.Commerce

Figure 172. SecurityConfigurationPage
Click Apply.You should see this message at the top of the screen:The
configuration file was successfully updated.Server instances that are using
this configuration must be stopped and started for the changes to take affect
.
You should also see your key ring file added in the Key rings box.
7. You should now stop the server i nstance and start it again.In the left pane
of the window click Server Instances.
8. Click Work with server instances.
9. From the drop-down box,select your server i nstance (see Figure 173 on
page 230).
Appendix A.SSL Configuration for V4R3
229

Figure 173. WorkwithServer Instances
Click Stop.
Wait until you see this message at the top of your window:
The server
instance was successfully stopped
.
10.From the drop-down box select your server instance (see Figure 173).
Click Start.
You should see this message:
The server instance was successfully started.
You have now successfully configured your Web server to use SSL with
server authentication.
A.3 Creating a Self-signed Certificate
This section describes how to create a self-signed certificate using your AS/400
system as an intranet Certificate Authority.
Because self-signed certificates are not recognized by visitor′s browsers as
coming from a trusted third party, they should not be used in customer
transaction situations over the Internet. Use them only on your test and
development systems, and for demonstration purposes.You can also use a
self-signed certificate for intranet applications.
230
AS/400 e-commerce: Net.Commerce

To obtain a self-signed certificate, you will do the following:
1. Create an intranet Certificate Authority.
2. Create a server certificate wi th your i ntranet CA.
3. Configure your HTTP server to use the server certificate.
A.3.1 Create an Intranet Certificate Authority
Digital Certificate Manager (DCM) allows you to create your own intranet CA in
your AS/400 system and use it to issue server and client certificates for testing
purposes or applications within your organization.
This section outlines the steps you must perform to create a CA on your AS/400
system. You only need to perform this task, if the system administrator has not
previously created an intranet Certificate Authority and if you wish to use your
AS/400 system to issue intranet server certificates.
To create an intranet CA in your AS/400 system, follow these steps:
1. Start the HTTP *ADMIN server on your AS/400 system.From the command
line enter the command:
STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN)
2. Access the AS/400 Tasks page from your browser by enteri ng the URL:
http:// System_name:2001
3. You wi l l be prompted to enter user name and password.Sign on wi th a user
that has *SECOFR and *SECADM authority.The AS/400 Tasks page is
displayed as shown in Figure 174.
Figure 174. AS/400TasksPage
4. Click Digital Certificate Manager.
Appendix A.SSL Configuration for V4R3
231

5. Click Certificate Authority (CA).
6. Click Create a Certificate Authority.
Note
If a Certificate Authority (CA) has previously been created on your
system, the Create a Certificate Authority link is not displayed.
7. Complete the Create a Certificate Authority form as shown i n Figure 175.
Replace the field values as appropriate with your organization information.
Figure 175. CreateanIntranet CertificateAuthority
Click OK.
8. After DCM processes the form,it stores a copy of the CA certificate i n the
CA default key ring file:
/QIBM/USERDATA/ICSS/CERT/CERTAUTH/DEFAULT.KYR
At this point, you can install the CA certificate in your browser so that it
recognizes the certificates issued by the intranet CA. DCM displays the page
shown in Figure 176 on page 233.
232
AS/400 e-commerce: Net.Commerce

Figure 176. CACertificateCreatedSuccessfully
Click Receive Certificate if you wish to install the CA certificate in your
browser now.Otherwise, click OK to proceed to the next setup window, and
install the CA certificate in your browser at a later time.Notice the default
path and file name where the intranet CA key ring file is stored.
9. Complete the CA Policy Data form to set the client certificate policy for your
CA. See Figure 177.
Figure 177. CertificateAuthorityPolicy
This is where you define whether your CA can issue and sign client
certificates. If the CA can issue client certificates, indicate the length of time
for which the certificates will be valid.
10.
The policy data for the Certificate Authority was successfully changed
message will appear.At this point, you can continue to create a server
certificate signed by your Certificate Authority.This will allow server
authentication by clients that use this system as a server.
Appendix A.SSL Configuration for V4R3
233

A.3.2 Create a Server Certificate with Your Intranet CA
Immediately after creating the intranet CA, DCM leads you to create a server
certificate.
To use Secure Sockets Layer (SSL) for secure Web serving, your server must
have a digital certificate.When you create a server certificate in DCM, the
server certificate and keys are stored in the following default directory and file:
/QIBM/USERDATA/ICSS/CERT/SERVER/DEFAULT.KYR
Note
When you create a server certificate, Digital Certificate Manager (DCM)
stores a copy of the CA certificate in the server′s key ring and designates it
as a trusted root.
Complete the Create a Server Certificate form as shown in Figure 178 replacing
the field values with your organization information.
The options for the key size are determined by the IBM Cryptographic Access
Provider (5769-ACx) licensed program installed in your system. This is the key
size that will be used to generate your public and private keys.
Figure 178. CreateaServer CertificatePage
By default, the system inserts the fully qualified name of the AS/400 system into
the Server name field.Don′t change this name. This is the name used to
234
AS/400 e-commerce: Net.Commerce

describe your server. You can give the server any name, although the fully
qualified TCP/IP host name is usually used for the server name.
Click OK.
The Server Certificate Created Successfully page displays (see Figure 179).
Figure 179. ServerCertificateCreatedSuccessfullyPage
From this page, you can select whether the HTTP ADMIN server or the Directory
Services server (LDAP) will use this server certificate for SSL connections.Do
NOT select any of these options.
Copy the file and path name where the server certificate is stored to the
clipboard. It is:
/QIBM/USERDATA/ICSS/CERT/SERVER/DEFAULT.KYR
Click OK.
Click Done.
A.3.2.1 Create a Server Certificate with an Existing Intranet CA
The steps to create a server certificate described above assume you are
creating the intranet CA for the first time.If your administrator has already
created an intranet CA and server certificate, you can use the existing server
certificate in your HTTP server configuration.
If you wish to create a new server certificate using an existing intranet CA, start
by clicking Create a server certificate under Server Certificates in DCM (see
Figure 180 on page 236).
Appendix A.SSL Configuration for V4R3
235

Figure 180. CreateaServer CertificatewithanExistingIntranet CA
Select Local Certificate Authority and Click OK.
The Create Server Certificate page is displayed next (see Figure 178 on
page 234).
A.3.2.2 Authorizing QTMHHTTP to the Key Ring File
You may need to give QTMHHTTP (or the user profile under which your HTTP
server runs) authority to the key ring and stash files. The key ring and stash files
are created with *PUBLIC authority *EXCLUDE. QTMHHTTP (or the user profile
under which the HTTP server runs) must have at least read rights to those files.
To authorize QTMHHTTP to the key ring and stash file enter the command:
WRKLNK ′/QIBM/UserData/ICSS/Cert/Server′
1. Enter 5,Next level,to display the files i n the directory.
2. Enter 9,Work wi th authority,by the key ri ng file (DEFAULT.KYR).
3. Enter 1,Add user,User=QTMHHTTP,Data Aut hori t y=*R.
4. Repeat steps 1 through 3 to authori ze QTMHHTTP to the stash file
(DEFAULT.sth).
A.3.3 Configure the Web Server to Use SSL with Server Authentication
The Web server must be configured to run over SSL and use the server
certificate you created in A.3.2, “Create a Server Certificate with Your Intranet
CA” on page 234.The configuration task is described in A.2.3, “Configure the
HTTP Server to Use SSL” on page 227.
236
AS/400 e-commerce: Net.Commerce

A.4 Additional Resources
For additional information, check out the following resources:

HTTP Server for AS/400 Webmaster′s Guide, GC41-5434

Securing Your AS/400 from Harm on the Internet, SG24-4929

http://publib.boulder.ibm.com/pubs/html/as400/ic2924/info/index.htm
Cl i ck Internet -> Di gi tal certi fi cate management

http://www.software.i bm.com/webservers/

http://www.i bm.com/securi ty

http://www.i cs.ral ei gh.com

http://www.i nternet.i bm.com/commercepoi nt/regi stry/

http://www.veri si gn.com/products/doc.html

http://home.netscape.com/assi st/securi ty/ssl/i ndex.html

http://www.rsa.com
Appendix A.SSL Configuration for V4R3
237

238
AS/400 e-commerce: Net.Commerce

Appendix B.Special Notices
This publication is intended to help Technical Specialists who are working with
Net.Commerce to understand the support provided by, install and configure
Net.Commerce for AS/400 V4R2.The information in this publication is not
intended as the specification of any programming interfaces that are provided by
AS/400 for Net.Commerce, 5798-NC2.See the PUBLICATIONS section of the IBM
Programming Announcement for AS/400 for Net.Commerce, 5798-NC2 for more
information about what publications are considered to be product documentation.
References in this publication to IBM products, programs or services do not
imply that IBM intends to make these available in all countries in which IBM
operates.Any reference to an IBM product, program, or service is not intended
to state or imply that only IBM′s product, program, or service may be used.Any
functionally equivalent program that does not infringe any of IBM′s intellectual
property rights may be used instead of the IBM product, program or service.
Information in this book was developed in conjunction with use of the equipment
specified, and is limited in application to those specific hardware and software
products and levels.
IBM may have patents or pending patent applications covering subject matter in
this document.The furnishing of this document does not give you any license to
these patents.You can send license inquiries, in writing, to the IBM Director of
Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785.
Licensees of this program who wish to have information about it for the purpose
of enabling:(i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact IBM Corporation, Dept.
600A, Mail Drop 1329, Somers, NY 10589 USA.
Such information may be available, subject to appropriate terms and conditions,
including in some cases, payment of a fee.
The information contained in this document has not been submitted to any
formal IBM test and is distributed AS IS.The use of this information or the
implementation of any of these techniques is a customer responsibility and
depends on the customer′s ability to evaluate and integrate them into the
customer′s operational environment.While each item may have been reviewed
by IBM for accuracy in a specific situation, there is no guarantee that the same
or similar results will be obtained elsewhere.Customers attempting to adapt
these techniques to their own environments do so at their own risk.
Any pointers in this publication to external Web sites are provided for
convenience only and do not in any manner serve as an endorsement of these
Web sites.
The following terms are trademarks of the International Business Machines
Corporation in the United States and/or other countries:
AIX AnyNet
Apt i va AS/400
DATABASE 2 DB2
DRDA I BM
©
Copyright IBM Corp. 1999
239

The following terms are trademarks of other companies:
C-bus is a trademark of Corollary, Inc.
Java and HotJava are trademarks of Sun Microsystems, Incorporated.
Microsoft, Windows, Windows NT, and the Windows 95 logo are trademarks
or registered trademarks of Microsoft Corporation.
PC Direct is a trademark of Ziff Communications Company and is used
by IBM Corporation under license.
Pentium, MMX, ProShare, LANDesk, and ActionMedia are trademarks or
registered trademarks of Intel Corporation in the U.S. and other
countries.
UNIX is a registered trademark in the United States and other
countries licensed exclusively through X/Open Company Limited.
Other company, product, and service names may be trademarks or
service marks of others.
MQ Mul ti pri se
Net.Data OS/390
OS/400 RS/6000
S/390 S/390 Parallel Enterprise Server
System/390 400
IBM Payment Server IBM Payment Regi stry
IBM Payment Gateway I BM Regi stry
240
AS/400 e-commerce: Net.Commerce

Appendix C.Related Publications
The publications listed in this section are considered particularly suitable for a
more detailed discussion of the topics covered in this redbook.
C.1 International Technical Support Organization Publications
For information on ordering these ITSO publications see “How to Get ITSO
Redbooks” on page 243.

AS/400 e-commerce: Internet Connection Servers, SG24-2150

Integrating Net.Commerce with Legacy Applications, SG24-4933

Secure Electronic Transactions: Credit Card Payment on the Web in Theory
and Practice
, SG24-4978

Safe Surfing: How to Build a Secure World Wide Web Connection, SG24-4564

Securing Your AS/400 from Harm on the Internet, SG24-4929
C.2 Redbooks on CD-ROMs
Redbooks are also available on CD-ROMs.Order a subscription and receive
updates 2-4 times a year.
CD-ROM Title Subscription
Number
Collection Kit
Number
System/390 Redbooks Collection SBOF-7201 SK2T-2177
Networki ng and Systems Management Redbooks Col l ecti on SBOF-7370 SK2T-6022
Transacti on Processi ng and Data Management Redbook SBOF-7240 SK2T-8038
Lotus Redbooks Collection SBOF-6899 SK2T-8039
Tivoli Redbooks Collection SBOF-6898 SK2T-8044
AS/400 Redbooks Collection SBOF-7270 SK2T-2849
RS/6000 Redbooks Collection (HTML, BkMgr) SBOF-7230 SK2T-8040
RS/6000 Redbooks Collection (PostScript) SBOF-7205 SK2T-8041
RS/6000 Redbooks Collection (PDF Format) SBOF-8700 SK2T-8043
Appl i cati on Devel opment Redbooks Col l ecti on SBOF-7290 SK2T-8037
C.3 Other Publications
These publications are also relevant as further information sources:

IBM Net.Commerce for AS/400: Installation and Operations Guide, GC09-2509
1

IBM Net.Commerce Basics: Open for Business, SC09-2372

IBM Net.Commerce: Customization Guide and Reference, SC09-2370

IBM Net.Commerce Administrator
1

IBM Net.Commerce Template Designer
1

IBM Net.Commerce Utilities
1

IBM Net.Commerce Commands, Tasks, APIs and Database Tables
1

Webmaster′s Guide, GC41-5434

AS/400 Database Programming, SC41-5701
©
Copyright IBM Corp. 1999
241

1
These manuals are available online, see 7.4, “Printable Net.Commerce
Book Files” on page 87.
242
AS/400 e-commerce: Net.Commerce

How to Get ITSO Redbooks
This section explains how both customers and IBM employees can find out about ITSO redbooks, redpieces, and
CD-ROMs.A form for ordering books and CD-ROMs by fax or e-mail is also provided.

Redbooks Web Site
http://www.redbooks.ibm.com/
Search for, view, download or order hardcopy/CD-ROMs redbooks from the redbooks Web site.Also read
redpieces and download additional materials (code samples or diskette/CD-ROM images) from this redbooks
site.
Redpieces are redbooks in progress; not all redbooks become redpieces and sometimes just a few chapters
will be published this way.The intent is to get the information out much quicker than the formal publishing
process allows.

E-mail Orders
Send orders via e-mail incl udi ng information from the redbook order form to:

Telephone Orders
This information was current at the time of publication, but is continually subject to change. The latest information
for customers may be found at
http://www.redbooks.ibm.com/
and for IBM employees at
http://w3.itso.ibm.com/
.
IBM Intranet for Employees
IBM employees may register for information on workshops, residencies, and redbooks by accessing the IBM
Intranet Web site at
http://w3.itso.ibm.com/
and clicking the ITSO Mailing List button.Look in the Materials
repository for workshops, presentations, papers, and Web pages developed and written by the ITSO technical
professionals; click the Additional Materials button.Employees may also view redbook, residency and
workshop announcements at
http://inews.ibm.com/.
I BMMAI L Internet
In United States:usi b6f pl at i bmmai l usi b6f pl @i bmmai l.com
I n Canada:cai bmbkz at i bmmai l l manni x@vnet.i bm.com
Outsi de North Ameri ca:dki bmbsh at i bmmai l bookshop@dk.i bm.com
United States (toll free) 1-800-879-2755
Canada (tol l free) 1-800-IBM-4YOU
Outsi de North Ameri ca (l ong di stance charges appl y)
(+45) 4810-1320 - Dani sh
(+45) 4810-1420 - Dutch
(+45) 4810-1540 - Engl i sh
(+45) 4810-1670 - Fi nni sh
(+45) 4810-1220 - French
(+45) 4810-1020 - German
(+45) 4810-1620 - Ital i an
(+45) 4810-1270 - Norwegi an
(+45) 4810-1120 - Spani sh
(+45) 4810-1170 - Swedi sh
©
Copyright IBM Corp. 1999
243

IBM Redbook Fax Order Form
Fax your redbook orders to:
Please send me the following:
United States (toll free) 1-800-445-9269
Canada 1-403-267-4455
Outsi de North Ameri ca (+45) 48 14 2207 (l ong di stance charge)
Title Order Number Quantity
Fi rst name Last name
Company
Address
Ci ty Postal code Country
Tel ephone number Telefax number VAT number
• Invoice to customer number
• Credit card number
Credit card expiration date Card issued to Si gnature
We accept American Express, Diners, Eurocard, Master Card, and Visa.Payment by credit card not
available in all countries.Signature mandatory for credit card payment.
244
AS/400 e-commerce: Net.Commerce

Index
Special Characters
*ADMIN 29
A
Access control 133
Acqui rer 7
Add 27
Addrbk 27
Address book 148, 169, 202
Address, IP 25
AddType QNETCOMM Web server configuration file
di recti ve 94
ADMIN Web server 115
Admi ni strator, Net.Commerce 17, 29, 83
Advanced confi gurati on 97
Advisor, e-busi ness 45
Advi sory Servi ces 41
API Signatures 182
API tasks 181
AUDIT_ADDR_BOOK 181
AUDIT_REG 181
CHECK_INV 181
DO_PAYMENT 181
EXT_ORD_PROC 181
EXT_SHIPTO_PROC 181
EXT_SHIPTO_UPDATE 181
GET_BASE_SPE_PRC 181
GET_BASE_UNIT_PRC 181
GET_ORD_PROD_TAX_TOT 181
GET_ORD_PROD_TOT 181
GET_ORD_SH_TOT 181
GET_SUB_ORD_PROD_TAX_TOT 181
GET_SUB_ORD_PROD_TOT 181
GET_SUB_ORD_SH_TOT 181
UPDATE_INV 181
APIs 139, 179
APIs, Net.Commerce 22
AS/400 Tasks Administration Page 58, 62
AUDIT_ADDR_BOOK API task 181
AUDIT_REG API task 181
Authori ty, certi fi cati on 7
B
Backup, Database 124
Bankcard 7
Basic Configuration 55
Bi bl i ography 241
Bi ndspeci fi c Web Server Di recti ve 110
C
Cache 97
Caching 97
CACHLOG tabl e 122
Cancel 27
Cart,shoppi ng 7
Category 27
Certi fi cati on authori ty 7
Cgi-bin 27
CHECK_INV API task 181
CHGTCPDMN Command 47
Chokepoi nt 185
Cleanup, Database 120
Client pull 112
Coexistence 110
Command syntax, Net.Commerce di rector 26
Command_group 27
Commerce 7
Confi gurati on fi l e, mserver 88
Confi gurati on, Advanced 97
Configuration, Basic 55
Confi gurati on, Net.Commerce Server 88
Creating a Net.Commerce Store 125
Customer detai l s 170
Customer i nformati on 168
D
Daemon, Net.Commerce 24
Daemon, Synchroni zati on 98
Database 2 for AS/400 30
Database backup 124
Database cl eanup 120
DB_RETRY_INTERVAL Net.Commerce server
confi gurati on fi l e di recti ve 88
DB_RETRY_LIMIT Net.Commerce server configuration
fi l e di recti ve 88
DB2 Relational Database 22
DB2WWW file 103
DB2WWW initialization file 75
DBMS 60
DefaultFsCCSID QNETCOMM Web server
confi gurati on fi l e di recti ve 94
DefaultNetCCSID QNETCOMM Web server
confi gurati on fi l e di recti ve 94
Del ete 27
Demo mal l 60
Demomal l 193
Desi gner, Template 84
Di rector, Net.Commerce 26
Di rector, Server 16
Di scounts 163
Di spl ay 27
©
Copyright IBM Corp. 1999
245

DLTNCDBE Command 51,124
DO_PAYMENT API task 181
Document root 103
DRDA 35
DTW_SQL_DEFAULT_EDITMASK Net.Data
confi gurati on fi l e di recti ve 92
E
e-busi ness Advi sor 45
End Net.Commerce Server 51, 119
End Net.Commerce Web server 118
End Web server command 116
ENDNETCSVR Command 51, 119
ENDTCPSVR Command 56, 116, 118
ENVIRONMENT (DTW_SQL) Net.Data configuration file
di recti ve 92
ENVIRONMENT (DTW_SYSTEM) Net.Data configuration
fi l e di recti ve 92
Error macros 140
Exec QNETCOMM Web server configuration file
di recti ve 94
Execmacro 27, 28
EXT_ORD_PROC API task 181
EXT_SHIPTO_PROC API task 181
EXT_SHIPTO_UPDATE API task 181
F
File System, IFS Root 52
Fi rewal l 185
Footers 39
Form 27
G
Gateway, Payment Gateway 10
GET_BASE_SPE_PRC API task 181
GET_BASE_UNIT_PRC API task 181
GET_ORD_PROD_TAX_TOT API task 181
GET_ORD_PROD_TOT API task 181
GET_ORD_SH_TOT API task 181
GET_SUB_ORD_PROD_TAX_TOT API task 181
GET_SUB_ORD_PROD_TOT API task 181
GET_SUB_ORD_SH_TOT API task 181
GIF images 40
Graphics and colors 39
H
Hardware requi rements 36
Headers 39
Help, On-line 87
Host name 60
Host_name 27
Hostname Web server di recti ve 110
HTML 39
HTML path 60
HTML root 25
HTTP 3
HTTPS 4
I
IBM Gl obal Servi ces 40
IBM HTTP Server for AS/400 37
IBM Net.Commerce Start 7
IBM Payment Regi stry 11
ICAPI 97
IFS Root File System 52
Images 39
Images, GIF 40
Images, JPEG 40
IMPNCDATA Command 51, 175
Import fi l e 173
Import, Mass 172
INCLUDE_PATH Net.Data configuration file
di recti ve 92
Instal l ati on 47
Instances, Net.Commerce Server 24
Integrati ng data 182
Internet 3, 185
Internet Connecti on Secure Server 37
IP address 25
I t em 27
J
JAVA 5
JPEG images 40
K
keyfile QNETCOMM Web server configuration file
di recti ve 94
L
Legacy appl i cati on 179
Legacy data 179
Library, QNETCOMM 51
Library, QSYSCGI 52
Li st 27
M
Macro path 60
MACRO_PATH Net.Commerce server configuration file
di recti ve 88
MACRO_PATH Net.Data configuration file
di recti ve 92
Mal l di rectory 132
Manual s 87
Map QNETCOMM Web server configuration file
di recti ve 94
Mass i mport command 175
246
AS/400 e-commerce: Net.Commerce

Mass i mport uti l i ty 172
Merchant key 59
MERCHANT_KEY Net.Commerce server configuration
fi l e di recti ve 88
Modi fy 27
MS_CGIBIN_PATH Net.Commerce server configuration
fi l e di recti ve 88
MS_DBINST Net.Commerce server configuration file
di recti ve 88
MS_DBNAME 101
MS_DBNAME Net.Commerce server configurati on fi le
di recti ve 88
MS_DBPASS Net.Commerce server configuration file
di recti ve 88
MS_HOSTNAME Net.Commerce server configuration
fi l e di recti ve 88
MS_HTADMIN Net.Commerce server confi gurati on fi l e
di recti ve 88
MS_HTML_MAX Net.Commerce server confi gurati on
fi l e di recti ve 88
MS_HTPASS Net.Commerce server configuration file
di recti ve 88
MS_LOGPATH Net.Commerce server configuration file
di recti ve 88
MS_NUM_CHILD Net.Commerce server confi gurati on
fi l e di recti ve 88
MS_PORT Net.Commerce server configuration file
di recti ve 88
MS_SYNCHD 98, 109
MS_TRANS_COUNT Net.Commerce server
confi gurati on fi l e di recti ve 88
Mserver confi gurati on fi l e 88
Mserver.i ni 103
MSERVERD 25, 79
Msprotect 27
Mul ti -home 25
Mul t i home 102
Mul ti pl e Net.Commerce server i nstances 102
Mul ti pl e system setup 42
Mul ti pl e systems 108
N
NC_DMN_CACHE 1 98
NC_DMN_CACHE Net.Commerce server configuration
fi l e di recti ve 88
NC_DMN_SLP_SEC 15 98, 110
NC_DMN_SLP_SEC Net.Commerce server
confi gurati on fi l e di recti ve 88
NC_DMN_SYNCH 1 109
NC_DMN_SYNCH Net.Commerce server configuration
fi l e di recti ve 88
NC_INST_PATH Net.Commerce server configuration
fi l e di recti ve 88
NC_LANG Net.Commerce server configuration file
di recti ve 88
NC_TEDITOR_PATH Net.Commerce server
confi gurati on fi l e di recti ve 88
NCOMMERCE.PGM 26
Net.Commerce Admi ni strator 17, 29, 83
Net.Commerce APIs 22
Net.Commerce Daemon 24
Net.Commerce Di rector 26
Net.Commerce di rector command syntax 26
Net.Commerce Instance Properties 59
Net.Commerce Pro 7
Net.Commerce Server 16, 24
Net.Commerce Server confi gurati on 88
Net.Commerce server confi gurati on fi l e di recti ve 88
DB_RETRY_INTERVAL 88
DB_RETRY_LIMIT 88
MACRO_PATH 88
MERCHANT_KEY 88
MS_CGIBIN_PATH 88
MS_DBINST 88
MS_DBNAME 88
MS_DBPASS 88
MS_HOSTNAME 88
MS_HTADMIN 88
MS_HTML_MAX 88
MS_HTPASS 88
MS_LOGPATH 88
MS_NUM_CHILD 88
MS_PORT 88
MS_TRANS_COUNT 88
NC_DMN_CACHE 88
NC_DMN_SLP_SEC 88
NC_DMN_SYNCH 88
NC_INST_PATH 88
NC_LANG 88
NC_TEDITOR_PATH 88
WWW_HTML_PATH 88
Net.Commerce Server Instances 24
Net.Commerce server i nstances, Mul ti pl e 102
Net.Commerce Si te Manager 17
Net.Commerce Store Manager 19
Net.Commerce Templ ate Desi gner 20
Net.Commerce Version 2 7
Net.Commerce Version 3 7
Net.Data 22
Net.Data configurati on fi le di rective 92
DTW_SQL_DEFAULT_EDITMASK 92
ENVIRONMENT (DTW_SQL) 92
ENVIRONMENT (DTW_SYSTEM) 92
INCLUDE_PATH 92
MACRO_PATH 92
Net.Data for AS/400 30, 37
Net.Data initialization file 75
New 27
Normalmode QNETCOMM Web server configuration
fi l e di recti ve 94
O
On-line help 87
Operati ons, System 115
Index
247

Order 27
Order i nformati on 171
Order status 219
Orders macros 141
P
Page desi gn 38
Pass QNETCOMM Web server configuration file
di recti ve 94
Payment Server 9
Payment Suite 7
Gateway 10
Payment 8
Payment Server 9
Wal l et 9
Payment, Payment Suite 8
Pending orders 220
Placing an order 216
Planning 33
Populating 172
Port 60
Port 2001 116
Port 2010 116
Port 443 29, 65, 78, 110
Port 80 29, 78, 110
Prepari ng order 213
Process 27
Processes 60
Product categories 157
Product i nformati on 159
Product shipping codes 165
Protect QNETCOMM Web server configuration file
di recti ve 94
Q
QATMHHTTPC 75
QATMHINSTC 75
QATMHTTPC 93
QNEADDTR 97
QNEADDTR Command 51
QNERMVTR 100
QNERMVTR Command 51
QNETCOMM Library 51
QNETCOMM validation list 75
QNETCOMM Web server 25, 29, 61, 75, 77, 93, 105,
110
QNETCOMM Web server configuration file
di recti ve 94
AddType 94
DefaultFsCCSID 94
DefaultNetCCSID 94
Exec 94
keyfi l e 94
Map 94
Normal mode 94
Pass 94
Protect 94
QNETCOMM Web server configuration file directive
(continued)
Search 94
ServerIni t 94
Servi ce 94
Ssl mode 94
Ssl port 94
QSYSCGI Library 52
QSYSWRK subsystem 79
QTMHHTTP 116
R
Regi ster 27, 198
Regi ster macros 142
Rel ati onal database 60
Requi rements, hardware 36
Requi rements, software 37
Root File System, IFS 52
Root, Document 103
Root, HTML 25
S
Scri ptTi meOut 55
Search QNETCOMM Web server configuration file
di recti ve 94
Secure Sockets Layer 24
Secure Web Server 21, 29, 37
Server confi gurati on, Net.Commerce 88
Server Di rector 16
Server Instances, Net.Commerce 24
Server, Net.Commerce 16, 24
ServerInit QNETCOMM Web server configuration file
di recti ve 94
Servi ce Offeri ngs 40
Service QNETCOMM Web server configuration file
di recti ve 94
SET 7, 10
SET, IBM Registry 11
Setting up a mall 126
Shipping details 166
Shi ppi ng provi ders 149
Shi ppi ng servi ces 164
Shi pto 27
Shi pto macros 143
Shopcart 27
Shopcart macros 144
Shopper 29
Shopper groups 167
Shopper i nformati on 146
Shoppi ng cart 7, 83, 208
Single system setup 42
Si te Manager 129
Si te Manager, Net.Commerce 17
Software requi rements 37
Sslmode QNETCOMM Web server configuration file
di recti ve 94
248
AS/400 e-commerce: Net.Commerce

Sslport QNETCOMM Web server configuration file
di recti ve 94
Start Net.Commerce Server 51, 118
Start Net.Commerce Web server 117
Start Web server command 115
Store authori ti es 135
Store i nformati on 154
Store manager 152
Store Manager, Net.Commerce 19
Store records 136
STRNETCSVR Command 51, 118
STRTCPSVR Command 56, 115, 117
Synchroni zati on daemon 98
Synchroni zing the Net.Commerce database 183
Syntax, Net.Commerce di rector command 26
System operati ons 115
Systems, Mul ti pl e 108
T
Task assignment 145
Task management 137
Templ ate Desi gner 84, 150
Templ ate Designer, Net.Commerce 20
Templ ates 39
U
Unl ock 27
Update 27
UPDATE_INV API task 181
V
Validation list 109
Validation list QNETCOMM 75
Version 3, Net.Commerce 7
W
Wallet, Payment Suite 9
Web server, ADMIN 115
Web server, QNETCOMM 29, 77, 93
WEBCONFIG 52
WRKRDBDIRE Command 47
WWW_HTML_PATH Net.Commerce server
confi gurati on fi l e di recti ve 88
Index
249

250
AS/400 e-commerce: Net.Commerce

ITSO Redbook Evaluation
AS/400 e-commerce: Net.Commerce
SG24-2129-00
Your feedback is very important to help us maintain the quality of ITSO redbooks.Please complete this
questionnaire and Fax it to: USA International Access Code + 1 914 432 8264 or:

Use the onl i ne eval uati on form found at http://www.redbooks.i bm.com

Send your comments in an Internet note to redbook@us.i bm.com
Which of the following best describes you?
__Customer __Business Partner __Solution Developer __IBM employee
__None of the above
Please rate your overall satisfaction with this book using the scale:
(1 = very good, 2 = good, 3 = average, 4 = poor, 5 = very poor)
Overall Satisfaction ____________
Please answer the following questions:
Was thi s redbook publ i shed i n ti me for your needs?Yes____ No____
If no, please explain:
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
What other redbooks woul d you l i ke to see publ i shed?
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
Comments/Suggestions:(THANK YOU FOR YOUR FEEDBACK!)
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
©
Copyright IBM Corp. 1999
251

SG24-2129-00
Printed in the U.S.A.
AS/400 e-commerce: Net.CommerceSG24-2129-00
IBML
First page image
We are pleased to offer a download of this document free of charge.
Files available for download:
  • a representative PDF of the primary file (contains all the relevant information for most users)
To obtain the file, please enter the "captcha" below and click the Download button.
Avoid entering CAPTCHAs! Sign In or Create a Free Account.

Challenge image
  • Please enter letters and numbers only; no spaces.
  • Cannot read this one? Click the image.
  • Difficulty with captchas? Contact us with the URL of this page and we will email it to you.