6 Replies Latest reply on Jul 23, 2012 2:48 PM by 783124

    Problems using upsShell.exe

    783124
      I would like to be able to run batch scripts to automate the FDM load process. However, I am experiencing problems when trying to make use of upsShell.exe from the command line.

      Following the admin guide example:
      D:\Oracle\Middleware\EPMSystem11R1\products\FinancialDataQuality\SharedComponents\upsShell.exe CustomScriptEx=*******~ admin ~*******~~*******~ \\*******\AppFiles_Flash\Logs~FDMAPP_LOAD.uss~LanguageCode(Default=1033)~EncodeUnicode(1)

      Replacing LanguageCode(Default=1033) and EncodeUnicode(1) with the respective specific values:
      D:\Oracle\Middleware\EPMSystem11R1\products\FinancialDataQuality\SharedComponents\upsShell.exe CustomScriptEx=*******~ admin ~*******~~*******~ \\*******\AppFiles_Flash\Logs~FDMAPP_LOAD.uss~1033~1

      Added full path to custom event script:
      D:\Oracle\Middleware\EPMSystem11R1\products\FinancialDataQuality\SharedComponents\upsShell.exe CustomScriptEx=*******~ admin ~*******~~*******~\\*******\AppFiles_Flash\Logs~\\*******\fdmdata\*******\Data\Scripts\Custom\FDMAPP_LOAD.uss~1033~1

      Added domain (does not seem to be required when using FDM Workbench or FDM Task Manager):
      D:\Oracle\Middleware\EPMSystem11R1\products\FinancialDataQuality\SharedComponents\upsShell.exe CustomScriptEx=*******~ admin ~*******~ domain.net ~*******~\\*******\AppFiles_Flash\Logs~\\*******\fdmdata\*******\Data\Scripts\Custom\FDMAPP_LOAD.uss~1033~1

      With the previous example, an error now occurs:


      admin.err
      ** Begin Runtime Error Log Entry [2012-07-20 10:59:11] **
      -------------------------------------------------------------
      ERROR:
      Code............ 2007
      Description..... Security authentication failure!
      Procedure....... modupsShell.ExecuteCustomScriptEx
      Component....... upsShell
      Version......... 1112
      Process ID...... 3080
      Thread.......... 3432

      IDENTIFICATION:
      User............ admin
      Domain.......... domain.net
      Computer Name... *******
      App Name........ *******

      PROCEDURE STEPS:
      1-Split Arguments
      2-Create Load balancer=*******
      3-Authenticate
      4-Step was not reached, a previous step failed
      5-Step was not reached, a previous step failed
      6-Step was not reached, a previous step failed
      7-Step was not reached, a previous step failed


      Added domain to end of load balancer name:
      D:\Oracle\Middleware\EPMSystem11R1\products\FinancialDataQuality\SharedComponents\upsShell.exe CustomScriptEx=*******~ admin ~*******~ domain.net ~*******.domain.net~\\*******\AppFiles_Flash\Logs~\\*******\fdmdata\*******\Data\Scripts\Custom\FDMAPP_LOAD.uss~1033~1

      The same error occurs:


      admin.err
      ** Begin Runtime Error Log Entry [2012-07-20 11:00:15] **
      -------------------------------------------------------------
      ERROR:
      Code............ 2007
      Description..... Security authentication failure!
      Procedure....... modupsShell.ExecuteCustomScriptEx
      Component....... upsShell
      Version......... 1112
      Process ID...... 3736
      Thread.......... 2884

      IDENTIFICATION:
      User............ admin
      Domain.......... domain.net
      Computer Name... *******
      App Name........ *******

      PROCEDURE STEPS:
      1-Split Arguments
      2-Create Load balancer=*******.domain.net
      3-Authenticate
      4-Step was not reached, a previous step failed
      5-Step was not reached, a previous step failed
      6-Step was not reached, a previous step failed
      7-Step was not reached, a previous step failed



      Can anyone please suggest where I am going wrong? (Please ignore the extra spaces either side of the username "admin" and "domain.net" etc in the examples above - the interpretation of tilde's either side of a word in this text editor makes it subscript).

      Edited by: JamesD on Jul 20, 2012 11:14 AM
        • 1. Re: Problems using upsShell.exe
          SH_INT
          Did you try it without the domain. You shouldn't need it if you don't require it when logging into the Web or Workbench client
          • 2. Re: Problems using upsShell.exe
            783124
            Yes - the third example is without the domain. However, although no "admin.err" file was generated, the load process (APP_LOAD.uss) did not appear to be executed at all, and the data file remained in the OpenBatch folder.
            • 3. Re: Problems using upsShell.exe
              SH_INT
              Add the following 3 lines of code at the top of your batch script if you have not already done so. They are required to call successfully execute a batch script with upsShell

              Dim BATCHENG
              Set BATCHENG = CreateObject("upsWBatchLoaderDM.clsBatchLoader")
              BATCHENG.mInitialize API, SCRIPTENG
              1 person found this helpful
              • 4. Re: Problems using upsShell.exe
                783124
                Hi SH,

                I have added this to the batch script, however this gives the following error (when executing the batch script from the command prompt):

                C:\AppFiles_Monthly\Scripts>BATCHENG.mInitialize API, SCRIPTENG
                'BATCHENG.mInitialize' is not recognized as an internal or external command,
                operable program or batch file.
                • 5. Re: Problems using upsShell.exe
                  783124
                  I presume you meant for me to add this to the VBScript FDM custom script? I generated the below using FDM Workbench, so presume the required code to initialise is already in place?


                  Sub *******_LOAD()
                  '------------------------------------------------------------------
                  'FDM CUSTOM Script:
                  '
                  'Created By:      *******
                  'Date Created:      18/05/2012 11:58:37
                  '
                  'Purpose:     Execute a Batch Loader task.
                  '
                  '------------------------------------------------------------------

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

                  'Use Serial Processing
                  '--------------------------
                  '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



                  Does anyone please have a working example of how to run an FDM batch load from a Windows command line batch script? The documentation (FDM admin guide) leaves a lot to be desired on this topic.
                  • 6. Re: Problems using upsShell.exe
                    783124
                    I have managed to get this working. SH - you were right, but it was required in the FDM VBScript custom load script. I also discovered that if one includes the script extension in the calling script, it wont work(!) I also had to ensure the domain was not included as part of the login, but was included in the load balancer server name(!)

                    The working solution is as follows:

                    Custom FDM Script (auto-generated by FDM Workbench and updated with code from SH above):
                    Sub *******_LOAD()
                    '------------------------------------------------------------------
                    'FDM CUSTOM Script:
                    '
                    'Created By:      *******
                    'Date Created:      18/05/2012 11:58:37
                    '
                    'Purpose:     Execute a Batch Loader task.
                    '
                    '------------------------------------------------------------------

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

                    'Use Serial Processing
                    '--------------------------
                    'Declare Local Variables
                    Dim lngProcessLevel
                    Dim strDelimiter
                    Dim blnAutoMapCorrect
                    Dim BATCHENG

                    'Initialize batch engine
                    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



                    Windows CMD command prompt batch script (ignore the extra spaces either side of tildes):
                    D:\Oracle\Middleware\EPMSystem11R1\products\FinancialDataQuality\SharedComponents\upsShell.exe CustomScriptEx=*******~ admin ~ ******* ~~ <loadbalancer>.domain.net ~ \\<servername>\<sharename>\Scripts~*******_LOAD ~ 1033 ~ 1