This is part one of a three-part series on building an IBM DB2 for z/OS mobile application by using IBM MobileFirst. Read part two.
Because of its quality of service, high availability, security and performance, many organizations rely on IBM DB2 for z/OS to store critical transactional data. Now that we've entered a new era in which we increasingly use our phones and tablets for all types of transactions—everything from shopping and banking to social interaction and research—mobile access to DB2 for z/OS transactional data is more critical than ever.
The IBM MobileFirst Platform is ideal for developing and testing mobile applications that access DB2 for z/OS transactional data. IBM MobileFirst combines multiple tools, frameworks and code bases into a single development environment, which means only one code base to develop and maintain.
In Figure 1, a mobile application, shown on the left, accesses the IBM MobileFirst server, which provides a set of adapters for server-side development.
Figure 1: Simplified View of the IBM MobileFirst Architecture
This post is the first of three that will show you how to build a DB2 for z/OS mobile application by using IBM MobileFirst. This post shows you how to set up an IBM MobileFirst Platform environment. Two subsequent posts are based on two common development scenarios:
- How to retrieve a string from a string ID from the SYSIBM.SYSXMLSTRINGS table by using regular SQL statements
- How to execute RUNSTATS for a database and table space by calling a stored procedure
To set up an IBM MobileFirst Platform environment that will enable you to write applications that access DB2 for z/OS data, complete the following steps.
1. Install IBM MobileFirst Developer Studio
, which is part of IBM MobileFirst Developer Edition.
2. Locate and record the location of db2jcc.jar and db2jcc_license_cisuz.jar, which are included with DB2 Connect. You'll need this information to complete step 4.
3. If you want to develop native Android applications or if you want to test your applications in an Android emulator, complete these steps:
a. Install Oracle JRE 7 (JRE 8 is not yet supported)
b. Install the Android SDK.
Scroll to Other Download Option > SDK Tools only.
c. Install the ADT Eclipse plug-in and Inside Eclipse:
i. Click Help > Install New Software.
ii. Click Add, and enter the location https://dl-ssl.google.com/android/eclipse/
iii. Select Developer Tools and follow the installation prompt.
d. Add the SDK. From within Eclipse, click Window > Android SDK Manager. By default, the latest API level is installed, but it's recommended that you also install API level 19.
e. Add a virtual device (emulator). In Eclipse, click Window > Android Virtual Device Manager. Click Create to create a new Android Virtual Device (AVD). Figure 2 shows the AVD that we used.
Figure 2: Android Virtual Device Information
4. Edit MobileFirst Development Server > servers > worklight > server.xml and add