To process batch files, you use Batch Loader, which you initiate from FDM Workbench or FDM Task Manager. You run Batch Loader from the Batch Processing screen (accessed from Workbench or Task Manager) or through a script (created manually or in the Batch Processing screen).
Overview of Batch Loader Files
The batch files processed by Batch Loader are of two types:
Standard—Text files that can contain only one month and that are usually loaded through the Import screen
Multiload—Text or Excel files that can contain multiple periods and locations
Name Format for Batch Files
The names of standard batch files consist of the following segments in the following order:
1. File ID—A free-form field that can be used to control load order (Batch files load in alphabetic order by file name. Thus, for example, a file named a_Texas_Actual04_Jan-2004_RR.txt loads before a file named b_Texas_Actual04_Jan-2004_RR.txt.)
2. Location
3. Category
4. Period
5. Load Method—A two-character item (Character 1 = FDM append or replace, and character 2 = target append or replace. Valid values are A and R.
Because Multiload files contain metadata, they do not require a specific file name format.
Running Batch Loader
To initiate the batch load process:
1 Create the batch files, and place them in the appropriate FDM directory.
2 Perform an action:
From Workbench, select Tools > Batch Processing.
From Task Manager, select Start > Programs > Oracle EPM System> Financial Data Quality Management > Task Manager > Task Manager. The Batch Processing screen is displayed.
3 Set the batch controls.
4 Perform an action:
To run the batch with the selected controls, click Execute.
The Batch Monitor section lists the files that Batch Loader is processing and updates with the results for each file.
To create a script with the selected controls, click Create Script. You are prompted for a script name. You can add the script name to a scheduled task and, thus, set the script to run automatically.
Batch Processing Screen Results
As a batch is processed, the Batch Monitor field of the Batch Processing screen provides a graphical display of the batch results. Each completed load displays a symbol that indicates which processes failed and which processes passed:
Auto Corrected—Failed steps are automatically corrected.
Successful—All steps completed successfully.
Failure—One of more steps failed.
Invalid POV—Process is being loaded to an invalid period, category, or location
Scripting for Batch Loader
You can run Batch Loader from within Workbench or from within a script environment— manually or through Task Manager. You can create scripts manually—by copying the following scripts—or by using the Batch Processing screen.
Script for Standard Batch Loads
Sub BatchLoad()
‘-------------------------------------------------------------------------- ---
‘ FDM Custom Script: ‘
‘Created By: ADMIN
‘Date Created: 3/24/2006 09:00 ‘
‘Purpose: Execute a STANDARD Serial Processing FDM Batch
‘-------------------------------------------------------------------------- ---
‘Declare Local Variables
Dim lngProcessLevel
Dim strDelimiter
Dim blnAutoMapCorrect
‘Initialize Variables
lngProcessLevel = 12 ‘Up-To-Check
strDelimiter = “_”
blnAutoMapCorrect = 0
‘Create the file collection Set BATCHENG.PcolFiles = BATCHENG.fFileCollectionCreate(CStr(strDelimiter)) ‘Execute a Standard Serial batch
BATCHENG.mFileCollectionProcess BATCHENG.PcolFiles, CLng(lngProcessLevel), , CBool(blnAutoMapCorrect)
End Sub
After a script is created, you can create a FDM Task Manager event to run Batch Loader on a scheduled basis.
Script for Parallel Batch Loads
Because FDM supports parallel processing of batch files, multiple files (up to 50) can run simultaneously. FDM groups files into processes. The files within each process run sequentially (requiring that one file complete its run before the next file starts its run), and the processes run simultaneously.
Sub ParallelBatch()
‘------------------------------------------------------------------
‘ FDM Custom Script:
‘
‘Created By: Admin
‘Date Created: 3/23/2006 13:50
‘
‘Purpose: Execute a FDM Batch Loader with parallel processing
‘------------------------------------------------------------------
‘Declare Local Variables
Dim lngProcessLevel
Dim strDelimiter
Dim blnAutoMapCorrect
Dim lngParallelProcessCount
Dim strLoadBalanceServerName
‘Initialize Variables
lngProcessLevel = 12 ‘Up-To-Check
strDelimiter = “_”
blnAutoMapCorrect = 0
lngParallelProcessCount = 5
strLoadBalanceServerName = “LocalHost”
‘Create the file collection
Set BATCHENG.PcolFiles = BATCHENG.fFileCollectionCreate(CStr(strDelimiter))
‘Execute a Standard Parallel batch
BATCHENG.mFileCollectionProcessParallel BATCHENG.PcolFiles, CLng(lngProcessLevel), CLng(lngParallelProcessCount),
CStr(strLoadBalanceServerName), , CBool(blnAutoMapCorrect)
End Sub
No comments:
Post a Comment