6.6 Building the Subfile Component
Before building this component
you must first save it. You must also tell the GUI Designer which AS/400 server you want
to connect to before you can use the database reference information.
Saving the COMPLIST Component
Follow these steps:
- Select Project > Save.
The Save window appears.
- For the Application Name
specify Customer List Component.
- Change the Source File
and Source Directory to COMPLIST. Click OK
to save the project.
Defining the AS/400 Server and
Database File
Next you must tell the GUI Designer which AS/400 server you want to connect to before
you can use the database reference information.
Follow these steps:
- Select Server
from the menu bar.
- Select Define AS/400
information. The Define AS/400 Information notebook appears.
- Click Add. The
Add Server Alias Name window appears.
- Enter your AS/400 Server alias
name.
- Select the correct remote location
name from the combination box. Make sure the TCP/IP radio button is
selected.
- Click OK to leave
the Add Server Alias Name window.
- Go to the Files
page.
- Click Add to add
a new file definition. The Add File Alias Name window appears.
- In the File alias
Entry field, type the name of the file you specified on the file specification (CUSTOML1).
- In the Remote file
Entry field, type the actual file name (ADTSLAB/CUSTOML1).
- From the Server Alias
drop-down combination box, select the server alias name you defined in a previous step.
- Click OK to add
this file definition.
- Click OK to save
and close the notebook.
Building the CustList
Component
Last, you can now build and test the component.
Follow these steps:
- Now build the project by selecting
Project > Build > Windows NT/95/98. If you receive any errors, you
will need to fix the errors before you can continue.
- Finally, test the component by
selecting Project > Run and either Windows NT/95/98
or Java. The subfile displays with a list of all customers from the data
base.
- Close the Subfile display.
Click on
to indicate that you've done all the steps.
This completes exercise 6. You now have a finished Customer List
component window for your application. Next you need to enhance your application to use
this new window.
But before you do, we recommend
you do the Quiz.