Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
4 replies Latest Post - ‏2012-05-22T12:54:33Z by SystemAdmin
SystemAdmin
SystemAdmin
783 Posts
ACCEPTED ANSWER

Pinned topic more than one bds for step job

‏2012-05-21T13:48:33Z |
i wonder if i can use more than one batch data steam for job step and how can i do this

for exemple for step1 i want get from my database all account and for each account i want to get all priority operations(set 1) and all non priority operations(set 2)
and put each set in bds

tnx for help

in the fil attached more explication

email:s.daouiji@gmail.com
Updated on 2012-05-22T12:54:33Z at 2012-05-22T12:54:33Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    783 Posts
    ACCEPTED ANSWER

    Re: more than one bds for step job

    ‏2012-05-21T16:25:12Z  in response to SystemAdmin
    Sure you can use more than one BDS. You can use any number. The important thing to understand is that the BDS Framework supplies canned patterns, which themselves are built on the WebSphere batch programming model interfaces. The following article describes how to use these interfaces: Introduction to Batch Programming.

    You could extend the example in the preceding article to handled 3 BDSes instead of 2. Basically:
    1. Define your BDSes in your xJCL:
      
      <job-step name=
      "Step1"> <classname>$
      {job-step-impl-classname
      }</classname> <batch-data-streams> <bds> <logical-name>input1</logical-name> <props> ... </props> <impl-class>$
      {supportclassIn
      }</impl-class> </bds> <bds> <logical-name>input2</logical-name> <props> ... </props> <impl-class>$
      {supportclassIn
      }</impl-class> </bds> <bds> <logical-name>output</logical-name> <props> ... </props> <impl-class>$
      {supportclassOut
      }</impl-class> </bds> </batch-data-streams> </job-step>
      

    2. Access them in your batch step implementation:
      
      
      
      public 
      
      void createJobStep() 
      { 
      
      try 
      { JobStepID id = getJobStepID();   _testInputBatchDataStream1= (TestInputBatchDataStream)BatchDataStreamMgr.getBatchDataStream(
      "input1",id.getJobstepid());   _testInputBatchDataStream2= (TestInputBatchDataStream)BatchDataStreamMgr.getBatchDataStream(
      "input2",id.getJobstepid());   _testOutputBatchDataStream= (TestOutputBatchDataStream)BatchDataStreamMgr.getBatchDataStream(
      "output", id.getJobstepid()); 
      } 
      
      catch (BatchContainerDataStreamException e) 
      { 
      
      throw 
      
      new RuntimeException (e); 
      } 
      }
      

  • SystemAdmin
    SystemAdmin
    783 Posts
    ACCEPTED ANSWER

    Re: more than one bds for step job

    ‏2012-05-22T08:25:40Z  in response to SystemAdmin
    THANK U SO MUCH
    • SystemAdmin
      SystemAdmin
      783 Posts
      ACCEPTED ANSWER

      Re: more than one bds for step job

      ‏2012-05-22T09:20:09Z  in response to SystemAdmin
      one more think :)
      in one BDS we can put only one SQL query ?

      email:s.daouiji@gmail.com
      • SystemAdmin
        SystemAdmin
        783 Posts
        ACCEPTED ANSWER

        Re: more than one bds for step job

        ‏2012-05-22T12:54:33Z  in response to SystemAdmin
        There is no explicit restriction. Understand the intent of a BDS is to return a singular, homogenous stream of items. This stream could be formed from the result set of a single SQL query or by the BDS composing items from the result sets of multiple SQL queries, or files, or both, or whatever.