Tuesday, January 24, 2012

How to Use the UPSShell.EXE To Launch a Custom Script for FDM



How to Use the UPSShell.EXE To Launch a Custom Script for FDM [ID 1308568.1]

 Modified 17-AUG-2011     Type BULLETIN     Status PUBLISHED 


Applies to:

Hyperion Financial Data Quality Management - Version: 9.3.1.0.00 and later   [Release: 9.3 and later ]
Information in this document applies to any platform.

Purpose

The purpose of this document is to outline how to use the UPSShell.exe to execute a FDM Script using a batch (.bat) file.

Scope and Application

This document is intended for FDM application administrators who wish to setup a scheduled Batch Process that runs with a .bat file using the windows scheduler.

How to Use the UPSShell.EXE To Launch a Custom Script for FDM

How to Use the UPSShell.EXE To Launch a Custom Script for FDM ---

The upsShell.exe is a command shell for Hyperion Financial Data Quality Management that can be used to execute FDM Scripts that are created within an FDM Application at scheduled times.  The example that will be used in this document is going to be the upsShell.exe command launching a FDM batch script.

The upsShell.exe can be found in the Hyperion Home Directory under Products\FinancialDataQuality\SharedComponents.

The command to be used for executing the shell from a batch file can be found by:
a. Double-clicking on the upsshell.exe file
b. Then opening a text editor
c. Choosing to paste the clipboard to paste the command string as seen below:


C:\Hyperion\FDM\SHARED~1\upsShell.exe CustomScriptEx=AppName~UserID~PW~DOMAIN~LoadBalancerName~LogDirectory~ScriptName~LanguageCode(Default=1033)~EncodeUnicode(Default=0)


The command will simply need to be updated with the corresponding variables:


AppName: FDM Application Name
UserID: FDM User who will execute the script
PW: Password for the user who will execute the script
DOMAIN: This can be left blank
LoadBalancerName: Name of the FDM Load Balance Server in the environment
LogDirectory: File system path to where any logs will be written for the shell
ScriptName: Name of the FDM Script to be executed
Language Code: 1033
EncodeUnicode: 0

In the following example, the UpsShell.exe command will be used to execute a standard batch script with the Process Level set to "Up-To-Check" using Serial Processing:


Sub UpsShellBatch()
'------------------------------------------------------------------
'FDM CUSTOM Script:
'
'Created By: xxxxxxx
'Date Created: 3/29/2011 2:27:48 PM
'
'Purpose: Execute a Batch Loader task.
'
'------------------------------------------------------------------

'Execute a STANDARD batch
'--------------------------

'Use Serial Processing
'--------------------------
'Declare Local Variables
Dim lngProcessLevel
Dim strDelimiter
Dim blnAutoMapCorrect
Dim BATCHENG
Set BATCHENG = CreateObject("upsWBatchLoaderDM.clsBatchLoader")
BATCHENG.mInitialize API, SCRIPTENG

'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

Note that the following three lines must be added to the batch script in order to launch it using the upsshell.exe command:


Dim BATCHENG
Set BATCHENG = CreateObject("upsWBatchLoaderDM.clsBatchLoader")
BATCHENG.mInitialize API, SCRIPTENG


Below is the sample of the upsShell.exe command with the variables populated:


C:\Hyperion\FDM\SHARED~1\upsShell.exe CustomScriptEx=SimpleDemo~hypadmin~Password~~FDMServer1~C:\Hyperion\Logs\FDMBatch~UpsShellbatch~LanguageCode=1033~EncodeUnicode=0

This command can then be inserted into a .bat file or saved as a .bat file and scheduled to run using the windows scheduler on the FDM Application server.

No comments:

Post a Comment