Tuesday, July 5, 2011

Concurrent Program

In any application, transactions can be created online or in the batch mode. When it is desired to create/update data in real time, we use online processing. However when it is desired to run mass processing, it is better to do in an off-line batch mode.

Concurrent program is a powerful feature in Oracle Applications used for running batch programs. A program is registered to run as a batch program and then is run manually or scheduled to run at the specified time. The program can be launched and then user can work on other screens. The processing of concurrent happens in the background. One can even exit the oracle applications after launching the process.

In Oracle Applications, lot of concurrent programs come seeded which can be scheduled to run periodically. An implementation team can create their custom programs and register them as concurrent programs.

You can register different kind of objects to run as concurrent programs. Some of the examples are PL/SQL procedure, a shell script, a SQL-loader script, a SQL script, Oracle report etc. A concurrent program can be individually scheduled to run at a periodic interval. It is also possible to create a group of individual programs and schedule the full group to run at regular interval.

Executable
First step in creating a concurrent program is to create an executable. Figure 1 shows the screen for registering an executables. The screen has the following fields:

Executable Name:Unique name for the executable which could be understood by user.
Short Name:

Unique Short Name for the Executable.

Application:Name of the Application. Application should already be registered and available in Oracle application. Application selected here is used to derive the path on Unix from where the executable will be picked up at the run-time.
Description:Description of the executable.
Execution Method:

This is a List of Value. Choose Execution method from the List. The list contains the following choices:

Host Shell Script

Immediate It is not used.

Java Stored Procedure Stored procedure in JAVA

Java Concurrent Program Program written in JAVA

Multi Language Function Execution file is an MLS function that supports running concurrent program in multiple languages.
Oracle Reports Report Created in Oracle Reports tool. (The report name should be given without .rdf extension. The report should be placed under Application_Top/reports/US directory.)

PL/SQL Stored Procedure Standalone procedure or a procedure in a package. In case of package, it should be given as .. The package or its synonym should be available in APPS schema

Request Set Stage Function PL/SQL stored function that can be used to calculate the completion statuses of request set stages.
Spawned Pro*C Program. Used by some standard interfaces, like AR interface.
SQL*Loader SQL Loader script. Control file name should be given here without .ctl extension. The file will be picked up from Application_Top/bin directory.
SQL*Plus SQL Script. The SQL script name should be given without .sql extension. The file will be picked up from Application_TOP/SQL directory.
Perl Concurrent Program Program written in CGI Perl

Execution File Name:Name of the executable file. The file should be available in the correct location as described above.
Subroutine Name:This field is used only when execution method is spawned or immediate.

Concurrent Program Once an executable is created, we can create a concurrent program using the screen given in figure 2. We associate the executable created in the previous step to the concurrent program. We can also define different parameters to be passed to the executable here.

The various fields used in concurrent program definition are described below:

Program:

Name of the concurrent program.

Short Name

Short Name of the concurrent program.

Application

Choose an Application from the available list

Description

concurrent program Description

Executable

Name: Short Name of the executable which was previously registered in Executable registration screen.

Method This is automatically populated when executable name is selected.

Options This is automatically populated when executable short name is entered.

Priority Priority of the request. It can be kept null for default priority.

RequestType Concurrent program can be associated with a certain request type (defined separately) so that certain concurrent managers will be able to run it.

Incrementor Not used

MLS function This feature allows program to be submitted once but run multiple times for each language automatically.

Use in SRS This is checked by default. When it is checked, the program is available to run from the standard request submission screen.
Allow Disabled Values When checked, user can enter disabled values of the value-sets linked to the concurrent program parameter.

Run Alone Indicates that when this program is running, no other program is allowed to be run.

Restart on System Failure

Enable Trace When it is checked, Program generates a trace file when run.

NLS Compliant

OutputFormat Format of the output to be produced.

Save Indicates that output should be automatically saved in Operating system.

Print If checked, output will be automatically sent to printer.

Columns/Rows Number of columns and Rows in the output.

Style Printer Style

Style Required

Printer

Concurrent Program Parameters

Concurrent program can have parameter values which can be entered by the user at run time. All the parameters to be passed to a concurrent program need to be defined with the concurrent program. Screen 3 shows the parameter screen, which can be invoked from Concurrent program definition screen (Figure 2).

Parameter screen contains the following fields:

Sequence Sequence Number. It can be given as 1,2,3 or 10,20,30 etc.

Parameter Name of the Parameter

Description Description of the Parameter

Enabled When checked, parameter is enabled.

Validation

Value Set Each Parameter should have a value set. It can be user defined value set or one of the standard valueset available in Oracle Apps.

Description This is defaulted when Value Set is selected

Default Type and Default Value

When it is required to default value of the parameter, the fields default type and default values can be selected. The possible values of default type field are:

Constant

Current Date

Profile

SQL Statement

Segment

When Constant is selected in Default Type, any constant value can be entered in Default value field.

When Current Date is selected in Default Type, then default value will be non-enterable. The current date will be automatically defaulted when running the program.

When Profile is selected in Default type, the profile option name should be entered in the default value field. For example, for getting operating unit, we can enter ORG_ID in the default value field.

When SQL Statement is selected in Default type, any SQL statement can be written in the default value field. For example, to get a particular value from a table, we can write a statement like 'SELECT set_of_books_id FROM ar_system_parameters'.

Required When this is checked, the parameter is mandatory and must be entered during program submission.
Enable Security

Range

Display Check-box When checked, the parameter will be displayed during program submission.

Display Size Size of the Display field.

Description Size

Concatenated description Size

Prompt Prompt for the parameter that will appear for parameter name when running
the concurrent program.

Token Name of the token. This is used when registering Oracle Report
as a concurrent program.
The name of this field is same as the token defined in the report.

Request Group

In order to secure the running of the concurrent program, we define a request group. Usually, we would like only people having certain responsibily to run a particular concurrent program. So we create a request group and associate it with a responsibility.

Once a request group is defined, we can add any number of concurrent program to it. The concurrent programs to be added to a request group can belong to any application.

Request Set

Request set is a collection of concurrent program which are run together. In an implementation, we may have requirement to run multiple concurrent programs together one after another. In that case, those concurrent programs can be made part of a request set and then request set can be run as a whole.

No comments:

Post a Comment