You can now build (compile) your application, view a compiler listing and run your application. You have already defined the AS/400 server and file that is needed to build the application in a previous lesson.
Building Your Application
Follow these steps:
Click Save to continue.
The VisualAge RPG-Build Windows NT/95/98 window appears while the build is being performed. A Sign-on to Server window appears. Enter your user ID and password. Click OK.
Shortly afterwards, you are informed if the application was built successfully or if there were any problems. You will need to fix any errors before you can run the application. You should only receive Information messages which means the build should complete successfully.
Viewing the Compiler Listing
Remember that the
RPG compiler resides on the workstation. The application logic and the presentation
interface runs on the workstation. At any time, it is possible to view the files that make
up your project including the compiler listing on your workstation.
Follow these steps:
The compiler listing displays. Note the similarities between the VisualAge RPG compiler listing and the compiler output produced by the AS/400 RPG compiler.
Running and Testing Your Application
You are now ready to run and test the application.
Follow these steps:
If you enter a wrong customer number, nothing
happens since you did not provide any code to handle errors. In the next exercise you will
add some error handling code.
Click on to indicate that you've done all the steps.
This completes exercise 4.
You have just added code to access AS/400 files and data and created a new window to
display the AS/400 data. Now you are ready to add some error handling code to deal with
the case where a wrong part number is entered.
But before you do, we recommend you do the Quiz.