Getting Results for a Batch

In this section:

Once a batch is complete the results can be downloaded to a delimited file that contains one record for each one processed.


Top of page

x
Creating a Flow
  1. Right-click an application directory and select New, then Flow.
  2. Right-click the SQL object and select Add, then Join.
  3. Right-click the Join object and select Add, then Source. Select getbatchresults and click Select.

    The Select synonym panel opens.

  4. Right-click the Join object and select Add, then Source.

    The Select synonym panel opens.

  5. Select the target synonym for the flow you created to load data, such as jobbatch, and click Select.
  6. Double-click the Join object to open it. Under Left Source and Right Source, click JOBID and click the button. Repeat this for BATCHID. When you are done the Join Editor should look like the following image.

    Click OK.

  7. Right-click the SQL object and select Column Selection.

    The Column Selection window opens.

  8. Double-click the GET_BATCH_RESPSONSE field to select it. Then click OK.
  9. Right-click the SQL object and select WHERE Filter. Click the Relational Expressions tab. Double-click FILE. Select Variable for Type and enter ‘&OUTFILE’ as the value. Click OK.
  10. Right-click the workspace to the right of the SQL object and select Add Target, then New.
  11. Right-click the target object and select Properties.

    The target properties window opens.

  12. Select an available adapter, such as Delimited Flat file. Enter an application directory and synonym name, such as salesforce/batchresp.
  13. Enter a location for the table or file, such as salesforce/jobresp.ftm. Enter a comma (,) for the field delimiter and select Yes for the Header.
  14. Click the Save button to save the flow.

    The Save Procedure as window opens.

    Enter a name for the flow, such as get_batch_results. Click Save.


Top of page

x
Running the Flow
  1. In the browser, right-click get_batch_results and select Submit.

    A dialog box opens. Enter a full path and name for the output file to be created, as shown in the following image

  2. Click Run and wait for the flow to complete.

Top of page

x
Creating a Synonym for the Batch Results File
  1. Right-click an application directory and select New, then Synonym.

    The Select adapter… dialog box opens.

  2. Under Delimited Flat File, select <local>.

    The Select Data File… dialog box opens.

  3. For Data File Location, enter the directory you specified above. For Extension, enter txt, as shown in the following image.

  4. Click Next.

    The Select Synonym Candidates… window opens.

  5. Select the checkbox in front of your file. Enter a comma (,) for the field delimiter, select Yes for the Header, and select double quote (“) for Enclosure, as shown in the following image.

    Click Create Synonym.The Create Synonym… Status window opens. Ensure that it says Created successfully.

  6. Click Open First Synonym.
  7. Right-click the segment name BATCHRESULTS and select Sample Data. The Sample Data dialog box opens and shows the status for each records that was processed, as shown in the following image.


WebFOCUS