[AIX HP-UX Linux Solaris Windows][z/OS]

Using the XDCGIVT sample

You can install, run, and monitor a batch application that reads and writes files using the XDCGIVT sample.

Before you begin

  1. Augment existing WebSphere® Application Server profiles to support the feature pack or create profiles that include support for the feature pack.
  2. Start the appropriate application servers and any supporting management processes.
  3. Configure the location of the job scheduler.

    The following steps assume that you are setting up a non-clustered application server test environment to explore the capabilities of the feature pack.

    If you are setting up a clustered environment, you must perform additional steps. You must create a network database to support the job scheduler. You must configure related job scheduler database connectivity settings. Read the topic about configuring the job scheduler.

    1. On the administrative console, click System administration > Job scheduler.
    2. Set Scheduler hosted by to the identity of the appropriate application server.
    3. Save the changes.

About this task

Use the following general procedure to set up a database for the XDCGIVT sample, and install and run the sample. Read the topics about the job scheduler, the job management console, and developing applications for detailed information.

Procedure

  1. Set up the IVTDB database for the XDCGIVT sample.

    This database is for the sample itself. The job scheduler has its own database.

    1. Run the java –version command.

      By running the command, you can verify that Java Version 1.6 or later is installed and included in the PATH variable of your operating system.

    2. Create the IVTDB database.

      Use the appropriate CreateIVTTables DDL file that is located in the following directory. Examples of DDL files are CreateIVTTablesDB2.ddl and CreateIVTTablesDerby.ddl.

      [Linux] [HP-UX] [Solaris] [AIX] [z/OS] <app_server_root>/feature_packs/BATCH/longRunning

      [Windows] <app_server_root>\feature_packs\BATCH\longRunning

      For example, to create an embedded Derby database in a stand-alone application server, complete the following steps:
      1. Open a command prompt and change to the Derby database directory:

        [Linux] [HP-UX] [Solaris] [AIX] [z/OS] <app_server_root>/derby/databases

        [Windows] <app_server_root>\derby\databases

      2. Run the following command.
        [Linux] [HP-UX] [Solaris] [AIX] [z/OS]
        java -Djava.ext.dirs=<app_server_root>/derby/lib 
        -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij 
        <app_server_root>/feature_packs/BATCH/longRunning/CreateIVTTablesDerby.ddl
        For example,
        java -Djava.ext.dirs=/opt/IBM/WebSphere/AppServer/derby/lib 
        -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij 
        /opt/IBM/WebSphere/AppServer/feature_packs/BATCH/longRunning/CreateIVTTablesDerby.ddl
        [Windows]
        java -Djava.ext.dirs=<app_server_root>\derby\lib 
        -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij 
        <app_server_root>\feature_packs\BATCH\longRunning\CreateIVTTablesDerby.ddl
        For example,
        java -Djava.ext.dirs=C:\WebSphere\AppServer\derby\lib 
        -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij 
        C:\WebSphere\AppServer\feature_packs\BATCH\longRunning\CreateIVTTablesDerby.ddl
    3. Create the Java Database Connectivity (JDBC) resources.
      1. On the administrative console, click Resources > JDBC > JDBC providers.
      2. Create a JDBC XA provider at the server scope with the following properties.
        Database type
        Derby.
        Provider type
        Derby JDBC Provider.
        Implementation type
        XA data source.
        Name
        XDCGIVT Derby JDBC Provider (XA).
        Description
        Accept the default value.
      3. Click through the remaining panels. On the last panel, click Finish.
      4. On the administrative console, click Resources > JDBC > Data source.
      5. Create a data source with the following properties.
        Data source name
        XDCGIVT data source (XA).
        Java Naming and Directory Interface (JNDI) name
        jdbc/IVTdbxa.
        JDBC provider
        Select the existing JDBC provider XDCGIVT Derby JDBC Provider (XA).
        Database name
        Enter the path to the IVTDB database.
        [Linux] [HP-UX] [Solaris] [AIX] [z/OS]
        <app_server_root>/derby/databases/IVTDB
        For example,
        /opt/IBM/WebSphere/AppServer/derby/databases/IVTDB
        [Windows]
        <app_server_root>\derby\databases\IVTDB
        For example,
        C:\WebSphere\AppServer\derby\databases\IVTDB
        Use this data source in container managed persistence (CMP)
        Selected.
        Security aliases
        Accept the default values.
      6. Click through the remaining panels. On the last panel, click Finish.
      7. Select the new data source and click Test Connection to test the connection to the database.
  2. Install the XDCGIVT sample.
    1. In the administrative console, click Applications > New application > New Enterprise Application.
    2. Specify the full path to the sample.

      [Linux] [HP-UX] [Solaris] [AIX] [z/OS] <app_server_root>/feature_packs/BATCH/installableApps/XDCGIVT.ear

      [Windows] <app_server_root>\feature_packs\BATCH\installableApps\XDCGIVT.ear

    3. In the wizard, select Fast Path - Prompt only when additional information is required, accept default settings, continue through the steps, clicking Finish when you are done.
    4. If you plan to install additional sample applications, do so now.
    5. Restart the application server or start the application.

      If this time is the first time that you are installing an application, restart the server. Otherwise, you can start the application under the Applications > Application Types > WebSphere enterprise applications panel.

  3. Run the XDCGIVT sample.
    1. Edit the appropriate xJCL file.
      The XDCGIVT sample includes the following xJCL files. Each has a different purpose.
      XDCGIVTtxt2txtxJCL.xml
      Copies one text file to another text file and compares the two files.
      XDCGIVTbyte2bytexJCL.xml
      Copies a byte file to another byte file and compares the two files.
      XDCGIVTtxt2db2txtxJCL.xml
      Copies a text file to a database, copies the entries in the database to another text file, and compares the two files.

      You use the xJCL files to submit different types of jobs to the XDCGIVT sample.

      The files are located in the following directory.

      [Linux] [HP-UX] [Solaris] [AIX] [z/OS] <app_server_root>/feature_packs/BATCH/longRunning
      • Modify the inputDatastream and outputDataStream properties to include valid directories.
        <prop name="inputDataStream" value="/tmp/input-text.txt" />
        <prop name="outputDataStream" value="/tmp/output-text.txt" />
      [Windows] <app_server_root>\feature_packs\BATCH\longRunning
        1. Modify the inputDatastream and outputDataStream properties to include valid directories, including double backslashes. For example:
          <prop name="inputDataStream" value="C:\\temp\\input-text.txt" />
          <prop name="outputDataStream" value=" C:\\temp\\output-text.txt" />
    2. Start the job management console.

      In a web browser, type the following web address.

      http://<job scheduler server host>:<port>/jmc

      <job scheduler server host> is the host address and <port> is the WC_defaulthost port of the application server on which the running job scheduler is installed.

      To view on the administrative console the port numbers assigned to a given application server, click Servers > Server Types > WebSphere application servers > server_name > Communications > Ports.

    3. Submit an xJCL file, such as XDCGIVTtxt2txtxJCL.xml.

      On the job management console, click Job Management > Submit a job and specify the path to the xJCL file.

  4. Monitor the submitted job.

    On the job management console, click Job Management > View jobs and view jobs based on characteristics such as the job ID and the job submitter.

    You can determine whether the job completed successfully by going to the second page of the job viewer and scrolling to the bottom. If the job did complete successfully, you see a Job completed successfully message.




In this information ...


Related concepts

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Jun 10, 2013 5:54:48 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v700compg&product=was-nd-mp&topic=tgrid_xdcgivt
File name: tgrid_xdcgivt.html