Executing Essbase Clear Script through FDM event scripts

Hi,
Is it possible to access and execute essbase clear script through FDM event scripts? I know one method is to modify Load action, but was wondering if can be done any other way.
Thanks in advance.

The Essbase client is installed on the FDM application server so yes. You can create a batch file that calls a calc script via the Essbase Client and execute this from your Event script

Similar Messages

  • FDM event scripts firing twice during data loads

    Here's an interesting one. I have added the following to three different event scripts (one at a time, ensuring only one of these exists at any one time), to clear data before loading to Essbase:
    Event Script content:
    ' Declare local variables
    Dim objShell
    Dim strCMD
    ' Call MaxL script to run data clear calculation.
    Set objShell = CreateObject("WScript.Shell")
    strCMD = "D:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient\bin\startMAXL.cmd D:\Test.mxl"
    API.DataWindow.Utilities.mShellAndWait strCMD, 0
    MaxL Script:
    login ******* identified by ******* on *******;
    execute calculation 'FIX("Member1","Member2") CLEARDATA "Member3"; ENDFIX' on *******.*******;
    exit;
    However, it appears that the clear is carried out twice, both before and after the data has been loaded to Essbase. This has been verified at each step by checking the Essbase application log:
    No event script:
    - No Essbase data clear in application log
    Adding above to "BefExportToDat" event script:
    - Script is executed once after clicking on Export in FDM Web Client (before the "Target System Load" modal popup is displayed). Entries are visible in Essbase Application log.
    - Script is then executed a second time when clicking on the OK button in the "Target System Load" modal popup. Entries are visible in Essbase Application log.
    Adding above to "AftExportToDat" event script:
    - Script is executed once after clicking on Export in FDM Web Client (before the "Target System Load" modal popup is displayed). Entries are visible in Essbase Application log.
    - Script is then executed a second time when clicking on the OK button in the "Target System Load" modal popup. Entries are visible in Essbase Application log.
    Adding above to "BefLoad" event script:
    - Script is NOT executed after clicking on Export in FDM Web Client (before the "Target System Load" modal popup is displayed).
    - Script is executed AFTER the data load to Essbase when clicking on the OK button in the "Target System Load" modal popup. Entries are visible in Essbase Application log.
    Some notes on the above:
    1. "BefExportToDat" and "AftExportToDat" are both executed twice, before and after the "Target System Load" modal popup. :-(
    2. "BefLoad" is executed AFTER the data is loaded to Essbase! :-( :-(
    Does anyone please have any idea how we might execute an Essbase database clear before loading data, and not after we have loaded fresh data? And perhaps on why the above event scripts appear to be firing twice?! There does not appear to be any logic to this!
    BefExportToDat - Essbase Application Log entries:
    +[Wed May 16 16:19:51 2012]Local/Monthly/Monthly/admin@Native Directory/140095859451648/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:19:51 2012]Local/Monthly/Monthly/admin@Native Directory/140095859451648/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:19:51 2012]Local/Monthly/Monthly/admin@Native Directory/140095859451648/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    +...+
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1003037)+
    Data Load Updated [98] cells
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1003024)+
    Data Load Elapsed Time : [0.52] seconds
    +...+
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    AftExportToDat - Essbase Application Log entries:
    +[Wed May 16 16:21:32 2012]Local/Monthly/Monthly/admin@Native Directory/140095933069056/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:21:32 2012]Local/Monthly/Monthly/admin@Native Directory/140095933069056/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:21:32 2012]Local/Monthly/Monthly/admin@Native Directory/140095933069056/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    +...+
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1003037)+
    Data Load Updated [98] cells
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1003024)+
    Data Load Elapsed Time : [0.52] seconds
    +...+
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095928858368/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095928858368/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095928858368/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    BefLoad - Essbase Application Log entries:
    +[Wed May 16 16:23:43 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:23:43 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:23:43 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    +...+
    +[Wed May 16 16:23:44 2012]Local/Monthly/Monthly/admin@Native Directory/140095929911040/Info(1003037)+
    Data Load Updated [98] cells
    +[Wed May 16 16:23:44 2012]Local/Monthly/Monthly/admin@Native Directory/140095929911040/Info(1003024)+
    Data Load Elapsed Time : [0.52] seconds
    +...+
    +[Wed May 16 16:23:45 2012]Local/Monthly/Monthly/admin@Native Directory/140095860504320/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:23:45 2012]Local/Monthly/Monthly/admin@Native Directory/140095860504320/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:23:45 2012]Local/Monthly/Monthly/admin@Native Directory/140095860504320/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+

    Hi Larry,
    As mentioned, our exports do not appear to be generating the "-B.Dat" and "-C.Dat" files at present. However, you are correct with the Export and Load event scripts firing twice (once for the main TB file and again for the journal file). Does this also mean it could continue to fire an additional two times for the "-B.Dat" and "-C.Dat" files?
    On the last run, the output was as follows with the modified scripts:
    After clicking on Export in Workflow, the Target System Load modal popup is displayed, and the first two files have been generated:
    14.24.15.0527_BefExportToDat.txt
    14.24.17.0617_AftExportToDat.txt
    After clicking on OK in the Target System Load modal popup, the actual load to Essbase takes place. A further six files are generated:
    14.24.21.0289_BefLoad.txt
    14.24.22.0117_AftLoad.txt
    *14.24.22.0152_BefExportToDat-A.txt*
    *14.24.22.0414_AftExportToDat-A.txt*
    *14.24.22.0433_BefLoad-A.txt*
    *14.24.22.0652_AftLoad-A.txt*
    This makes a lot more sense, since one can see that the event scripts are being run a second time against the journal files during the data load. Many thanks, this solves my problem as I can now place my script where I want in the process chain. It's just a shame that there are not separate event scripts to distinguish between the various .Dat exports/loads, which are clearly occuring at separate times in the process chain.
    Many thanks! :-)
    P.S. Updated script below if anyone wishes to use it:
    Sub BefExportToDat(strLoc, strCat, strPer, strTCat, strTPer, strFile)
    Dim strF, fso, tf, t, temp, m, miliseconds, strSuf
    t = Timer
    temp = Int(t)
    m = Int((t-temp)*1000)
    miliseconds = String(4 - Len(m), "0") & m
    strF = "D:\TEST\" & Replace(Time, ":", ".") & "." & miliseconds & "_BefExportToDat"
    strSuf = UCase(Left(Right(strFile,6),2))
    If strSuf = "-A" Or strSuf = "-B" Or strSuf = "-C" Then
    strF = strF & UCase(strSuf) & ".txt"
    Else
    strF = strF & ".txt"
    End If
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set tf = fso.CreateTextFile(strF, True)
    tf.WriteLine(strFile)
    tf.Close
    Set fso = Nothing
    End Sub

  • Error trying to display a report file in FDM event script

    Hi
    I am trying to display a file (report) during an event script and receive an error "Object reference not set to an instance of an object" . The process works in version 9.3 but is generating this error during our upgrade testing on 11.1.2.2 (different hardware)
    The file (check report) is getting written correctly the \OutBox\Log directory. The file contains a standard Check Report with a file extension .pdf ( lngFileType = 31)
    We have no issues creating the file
    We try to display the file on the screen for the user using the following code which fails with the "Object reference not set to an instance of an object" error and also a message "Could not load XML file:" with the file name and path
    'Open report file in web client
    RES.PlngActionType = 4
    RES.PstrActionValue = strFileName
    Symptoms:
    We can open the same file as text with RES.PlngActionType = 1
    Everyone has rights to open/read a file in the directory
    File can be opened manually and appears correct
    Any help would be appreciated. I have not found similar issues on the forum. Support has offered no suggestions to date

    Hi and thanks for your response.
    Yes, we have tried all the various type of files ( ScriptActionTypes). The Type = 1 will open the file, but as a text stream without formatting, etc. If we try type = 3 we receive a different error message:
    Error: Invalid Report ID: 0
    Detail: Stacktrace:
    upsAppServerDM._clsAppServerDM.fPublishReport(lngReportID[Int32], lngPubFileType[Int32], strReportSQL[String], strSubReportSQL[String])
    Hyperion.FDM.Pages.ViewReportActionEvent.ExecuteReport(reportID[Int32], sqlStatement[String])
    Hyperion.FDM.Pages.ViewReportActionEvent.PreviewReport()
    Also, the Validation Report is enabled (we are using check with warnings - ID133), I have tried changing the default Web Settings from .PDF to .html and back again and tried the various other default options available under Web Settings.
    If we create a simple test text file, we can open the file as text (Type = 1)
    Here is the complete error message employing Type = 4 (XML)
    Error: Object reference not set to an instance of an object.
    Detail: Stacktrace:
    Hyperion.FDM.Pages.IntersectionSummaryCheck.FillTitleRow()
    Hyperion.FDM.Pages.IntersectionSummaryCheck.Page_Load(sender[Object], e[EventArgs])
    System.Web.UI.Control.OnLoad(e[EventArgs])
    Hyperion.FDM.Pages.BasePage.OnLoad(e[EventArgs])

  • Data access error while running  the script in fdm workbench script editor

    Hello Experts,
    I have been getting the error when i run the script in script editor of fdqm workbench client.this is the error
                              -2147467259 Data access error and it is navigating the error at line 30 about this script "Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)"
    Please revert me asap where i should load the data from peoplesoft to one of my planning database through fdm.
    Thanks in advance...

    Hi,
    Thanks for your suggestion's here i am going to run the datapump script so while i am running in workbench it is throwing data access error.So as you guy's suggested i created one import format and added this script to that import format which is added to one of my location even it is throwing the same error.I am getting the error at this sentence   "strWorkTableName" I want to know what is this where it reflect's?So my question is Is there any difference while running data pump or integration script.Please let me know a detailed navigation steps to run this script's with out data access error to run these kind of scripts.
    Note:Again my target is to load the data to planning database through fdqm which i am doing through sql statement's.
    Suggest your valuable suggestion's
    Thanks in advance...
    I am getting the error at this sentence   "strWorkTableName" I want to know what is this where it reflect's?

  • Essbase clear script is triggered 32 times from FDM

    Hi All,
    I've created a simple clear script in the load action of the Essbase adapter in FDM.
    When loading a short file the clear script runs very fast and no problems occurs.
    When loading a long file (multiload 12 periods, 10.000 rows) the validation alone takes already 4 minutes. But the problem is that the clear script is triggered 32 times.
    Every time exactly the same script (so it only cleares data the first time) but every time takes a few seconds..
    Anybody a clue why this is happening and how i can solve this?
    I'm thinking of triggering the clear script from an event script but not sure which one.
    Thanks in advance,
    Marc

    Marc,
    This is by design. As the FDM Essbase Adapter requires customizations to mirror/match the Essbase Application.
    Importantly is the clear scripts that it executes.
    Without the appropriate changes to the adapter, it will appear* to execute the same script multiple times. But when in-fact if the customizations were done correctly, you would see slight differences each time.
    By default, it will clear based on the combinations of Period and Entity.
    So if your file had 12 periods, and 3 unique Entities, it would do 36 clear statements.
    I would suggest you review your customization for accuracy.
    Hopefully this helps...

  • Rows not deleted after delete in BefExportToDat Script in FDM

    Hi
    I am using FDM ERPI to load data from Oracle eBS GL 1.5 to Oracle Hyperion Planning 11.1.2.1.
    I have to slit data coming from eBS to 2 Essbase applications, using a temporary table :
    Location1 (data to app1) : I have to load data on accounts listed in the temporary table.
    Location2 (data to app2) : I have to load data on accounts not listed in the temporary table.
    For that, I have chosen to use the BefExportToDat script on which I would like to delete from the tdatasegxx table the data I don't want to load into essbase.
    I do my test with the ERPIEBS location.
    The "Delete" sql generated is correct (I have displayed the generated sql and executed it via SQL Developer without problem).
    but when I execute the "Delete" sql through FDM, the result is "True", but rows have not been deleted from the table.
    You can read the script bellow.
    Any idea?
    Thanks in advance
    Fanny
    Sub BefExportToDat(strLoc, strCat, strPer, strTCat, strTPer, strFile)
    'Oracle Hyperion FDM EVENT Script:
    'Created By:       fanny
    'Date Created:       2011-08-30 15:33:42
    'Purpose:
    Set objFileSys = CreateObject("Scripting.FileSystemObject")
    objfilepath = "D:\Oracle\FDMApplication\FDMTEST\Inbox\ERPIEBS\ComptesCA.txt"
    'Vérification de l'existence du fichier
    If objFileSys.FileExists(objfilepath) Then
         Set objReadFile = objFileSys.OpenTextFile(objfilepath)
         'Création de la table temporaire qui stockera les indicateurs de CA à prendre en compte
         strSQL = "CREATE TABLE TMP (Compte NVARCHAR2(75)) "
         API.DataWindow.DataManipulation.fexecuteDML(strSQL)
         'Alimentation de la table avec les lignes du fichier
         Do Until objReadFile.AtEndOfStream
              sText = objReadFile.ReadLine
              strSQL = "INSERT INTO TMP VALUES ('"&sText&"')"
              API.DataWindow.DataManipulation.fexecuteDML(strSQL)
         Loop
         objReadFile.Close
         'Récupération des paramètres du flux
         dtePerKey = RES.PdtePerKey 'Period Key
         strCatKey = RES.PlngCatKey 'Category Key
         strLocKey=RES.PlngLocKey 'Location Key
         strTableName = "tDataSeg" & API.DataWindow.Reports.PlngSegKey 'Location Segment Number (tDataSegxx)
         'S il s'agit du flux CA, on ne garde que les indicateurs listés dans la table
         If strLoc="ERPIEBS" Then
              strSQL = "DELETE FROM " & strTableName
              strSQL = strSQL & " WHERE PartitionKey='" & strLocKey & "'"
              strSQt = strSQL & " AND CatKey = '" & strCatKey & "'"
              strSQL = strSQL & " AND PeriodKey = '" & dtePerKey & "'"
              strSQL = strSQL & " AND ACCOUNTX NOT IN (SELECT Compte FROM TMP)"
              'Show user a message
              RES.PlngActionType = 2
              RES.PstrActionValue = strSQL
              API.DataWindow.DataManipulation.fExecuteDML(strSQL)
         'S il s'agit du flux CR, on supprime les indicateurs listés dans la table
         ElseIf strLoc="ERPIEBSCR" Then
              strSQL = "DELETE FROM " & strTableName
              strSQL = strSQL & " WHERE PartitionKey='" & strLocKey & "'"
              strSQL = strSQL & " AND CatKey = '" & strCatKey & "'"
              strSQL = strSQL & " AND PeriodKey = '" & dtePerKey & "'"
              strSQL = strSQL & " AND ACCOUNTX IN (SELECT Compte FROM TMP)"
              API.DataWindow.DataManipulation.fexecuteDML(strSQL)
         End If
         'Suppression de la table temporaire
         strSQL = "DROP TABLE TMP"
         'API.DataWindow.DataManipulation.fexecuteDML(strSQL)
    Else
         'Show user a message
         RES.PlngActionType = 2
         RES.PstrActionValue = "Impossible de trouver le fichier D:\Oracle\FDMApplication\FDMTEST\Inbox\ERPIEBS\ComptesCA.txt"
    End If
    End Sub

    Hi
    I have done other tests and can see that there is first of all a problem with the strSQL = strSQL & " AND PeriodKey = '" & dtePerKey & "'"
    in the where clause.
    If I execute this SQL request in SQL Developer, I have a non-zero number in the TMP table :
    INSERT INTO TMP (SELECT COUNT(*) FROM tDataSeg3 WHERE PartitionKey='749' AND CatKey = '12' AND PeriodKey = to_date('30/04/10'))If I execute the same request through FDM, I have 0 in the TMP table.
    Thanks for your help
    Fanny

  • Making event scripts generic between environments

    At present we have a couple of FDM event scripts which construct some MaxL statements and then execute them against the Essbase database (to clear data before loading). The problem we have is that the MaxL scripts require hard-coded usernames, passwords and servernames (to log in to ESSMSH). When migrating the scripts between environments, these scripts will have to be manually updated each time for the given environment to which they are being migrated.
    Is there a more elegant solution to this? One idea would be to have the values stored in a single plain text file (in a password-protected share) which would then be accessible by any of the various scripts in a given environment. But I would be interested to learn if there are alternatives to this.

    If you migrate environments, you are going to have to do some configuration pretty much anyway you go about it. The question is what is the easiest/most straight foward so that it doesn't get missed during a migration, IMHO.
    I would go with a well defined/documented "Global" config file that contains all of the information that may change. At a minimum, Usernames and passwords should be obfuscated/encrypted; however, it would be just as easy to do the whole file. Realize, that the decryption routines would be in your script code so this isn't 100% secure; however, it would prevent the casual user from quickly seeing usernames / passwords, etc. Furthermore, if you encrypted the whole file, they may not even realize there is a username/password in the file, etc.
    In my mind this is the way to go...
    Some other thoughts though, depending on what exactly you want to do....
    Option 2
    Username / Password / Server could be some variation on the server name so that the script always knows how to generate them. The negative side is that you would always need to create a new user / password anytime server changes, so you are still not escaping manual labor. (Though maybe you could use an API call to create it, but then you probably need a username/password to create the user... AAaaaahhhhhhhhh)
    While neat, this seems like it would suffer from James Bond syndrome. I'm going to kill you now Mr. Bond, but first I'm going to tell you all my intricate plans for world domination, put you in some ridiculous trap with an semi-obvious flaw, AND leave so that you have time to work on your escape......
    Option 3
    Make a Web Service and then have your scripts make a Web Call (i.e. http://www.mycompany.com/GetConfigInfo.asp?secretcode=12341234123) which would return all the info you need. (username, password, servers, etc). AS LONG AS the webservice machine doesn't move around, this might be a decent way of doing it. Anyone sniffing around the local machines would find the config info; however, anyone looking at the scripts would see the call and could just open it in a web browser. You could of course secure that by looking at the source of the request and if it's not an approved server, not return the requested info; however, now you are getting into more maintenance work........
    The time spent making this and potentially maintaining it probably isn't worth it.

  • URGENT!! NEED HELP IN VB SCRIPTING IN FDM

    Hi Guys,
    I want to write a scipt in the BefImportMap under Events Scipts.
    The reason is when any user imports the mapping table(in my case an excel .xls doc), if the user imports any other excel by mistake then the mapping goes wrong and affects the application.
    So I want to validate the imported excel by putting condition say:
    i) (1, B) must be LOCATION
    ii) (3, B) must be either of these--Account, Entity, Icp, C1, C2, C3 & C4.
    If these conditions satisfy only then the user can import the mapping excel sheet, otherwise the user will see an error.
    Please help me in this, and FYI I am novice in VB scripting.
    Thanks in advance.
    Regards
    Sandy

    I wrote the following script, but when i am importing a file which doesnt have "maploader" string in its name, it gets loaded, doesnt throw the error
    PLESE WRITE BACK, HELPPPPPP
    Sub BefImportMap(strLoc, strType, strFile)
    'Oracle Hyperion FDM EVENT Script:
    'Created By:      hypadmin
    'Date Created:      2011-04-29-14:19:56
    'Purpose:
         'Declare local variables
    Dim lngStartPosition
    Dim strSearchValue
    Dim lngPosition
    'Define starting position and search string
    lngStartPosition = 1
    strSearchValue = "Maploader"
    'Execute the search (Not case sensitive)
    lngPosition = InStr(lngStartPosition, strFile, strSearchValue, 1)
    'Test the Results
    If Not lngPosition > 0 Then
    'String Found
         'Declare local variables
         Dim strMessage
         'Set the message value
         strMessage = "INCORRECT"
         If LCase(API.DataWindow.Connection.PstrClientType) = "workbench" Then
              'Win32 Client (Use Msgbox)
              MsgBox strMessage
         Else
              'Web Client (Set API action properties)
              RES.PlngActionType = 2                    '(See Enumeration: ScriptActionTypes)
              RES.PstrActionValue = strMessage
         End If
    End If
    End Sub

  • Execute Essbase Calc Scripts from FDM

    Hi,
    Can any of you let me know how to execute Essbase Calc Scripts from FDM, these Calc Scripts are on Essbase Server. Any help would be greatly appreciated.
    Thanks

    See the thread below:
    Re: FDM - Script

  • Essbase error 1033, executing a calc script through HAL

    A daily HAL job executes a calc script that returned a 1033 error.
    Any ideas? Essbase 7.1.6, HAL 7.3 build 327
    "error code - 1033: Essbase Error, <full path with calc script name> at ...."

    Sorry, no answer yet.
    Our job that failed which runs about 6 times daily successfully ran on the next scheduled run with zero changes. Some sort of hiccup (unexplainable).

  • Error to execute the script through command prompt

    I tried to execute the script through command prompt. I got some following error. Could you please advice me how to rectify this.
    cscript D:\JS\Test.js
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
    D:\JS\Test.js(1, 1) Microsoft JScript runtime error: 'app' is undefined.
    Thanks,
    Prabudass

    I haven't use CS for quite some time and file associations may not work with the command prompt.
    You can try using Windows Explorer to browse to a .js file then right click on that file. From the popup menu choose Open With. Even if you see Photoshop in the file list choose Browse at the bottom. Browse to Photoshop and make sure to check 'Always use selected program...'
    If that doesn't work you will need to create an action that runs your script and make a droplet from that action. You can then use the droplet in the command prompt. You may also need to create a 'dummy' image file to launch the droplet with if you script doesn't require an open document at startup. See http://www.ps-scripts.com/bb/viewtopic.php?t=967

  • Executing shell script through PL/SQL

    Hi,
    I need some help regarding execution of shell script through Oracle PL/SQL.
    I have a shell script present in /abc/xyz folder with name search.sh , Through a PL/SQL procedure I am creating a file to store the report data.
    I want to execute /abc/xyz/search.sh from the PL/SQL procedure to delete all files created before 3 mins .
    1.     At first I took Java route and got following permissions granted for RECON user.
    GRANT USER SYS java.io.FilePermission <<ALL FILES>> execute ENABLED 351
    GRANT USER SYS java.lang.RuntimePermission readFileDescriptor * ENABLED 350
    GRANT USER SYS java.lang.RuntimePermission writeFileDescriptor * ENABLED 349
    2.     Then I created a simple java class for execution of OS command as below
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "OSCommand" AS
    import java.io.*;
    import java.util.*;
    public class OSCommand{
    public static String Run(String Command){
    try{
    Process proc = Runtime.getRuntime().exec(Command);
    int ext=proc.waitFor();
    return ("0");
    catch (Exception e){
    System.out.println("Error running command: " + Command +
    "\n" + e.getMessage());
    return(e.getMessage());
    3.     And a wrapper function as below to use this class
    create or replace
    FUNCTION OSCommand_Run(Command IN STRING)
    RETURN VARCHAR2 IS
    LANGUAGE JAVA
    NAME 'OSCommand.Run(java.lang.String) return int';
    4.     In my PL/SQL proceedure I am using following code to execute the command
    v_Return := OSCommand_Run('/abc/xyz/search.sh');
    to execute the shell script.
    Proceedure executes without any error and generates a new csv file with report data , however shell script does not get executed and hence all csv files created earlier remain as it is in the folder.
    Please help.

    Sven W. wrote:
    What happens if you remove the catch exception block from your java command?
    I asume you still might have a permission issue. But it could be hidden from you, because of the exception is catched and printed into nirvana.Executed the wrapper function OSCOMMAND_RUN as below
    DECLARE
    v_Return VARCHAR2(2000);
    BEGIN
    v_Return := OSCOMMAND_RUN('/recon/html/invoice/search.sh' );
    DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
    END;
    And following is the result
    v_Return = 0
    Process exited.
    In case of exception it would had printed the exception.
    One more thing I noticed, even though I have taken following permissions
    GRANT     RECON     SYS     java.io.FilePermission     /abc/*     execute     ENABLED     347
    GRANT     RECON     SYS     java.io.FilePermission     /abc/xyz/*     execute     ENABLED     351
    GRANT     RECON     SYS     java.io.FilePermission     <<ALL FILES>>      execute     ENABLED     352
    GRANT     RECON     SYS     java.lang.RuntimePermission     readFileDescriptor     *     ENABLED     350
    GRANT     RECON     SYS     java.lang.RuntimePermission     writeFileDescriptor     *     ENABLED     349
    When I create a new search.sh in /abc dir I get following error
    v_Return = the Permission (java.io.FilePermission /abc/search.sh execute) has not been granted to RECON. The PL/SQL to grant this is dbms_java.grant_permission( 'RECON', 'SYS:java.io.FilePermission', '/abc/search.sh', 'execute' )
    Edited by: 960702 on Sep 25, 2012 10:34 AM

  • How we can call or execute a SHELL script through Oracle forms or Reports

    How we can call or execute a SHELL script through Oracle forms or Reports.Its urgent.......

    Use HOST command.

  • Executing crystal reports through a shell script

    We are currently in the processing of building a POC using Crystal reports and was hoping to find a way to execute canned crystal reports via a shell script. The reason being we wanted to schedule the executing of the report through our scheduler where we would build in the dependencies.
    Does anyone have a simple example on how to do that.

    What sort of shell script? Can you provide more info?
    The only CR SDK is for .NET and Java.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • How to get uploaded file name and path in BefExportToDat event script

    I would like to get hold of the uploaded file name and full path in the event script "BefExportToDat", as I need to extract values from particular fields. However I have not yet found a way to do this.
    - The input variable "strFile" returns the .Dat file path in the Outbox, to which it is about to export the data. This is no use to me.
    - The API variable RES.PstrFilename is returning nothing
    I am using RES.PstrFilename in the "BefFileImport" event script in a different FDM application and it works fine, however I need to find a way to get this to work in the "BefExportToDat" event script.
    Please let me know how this might be achieved.

    I am looking through the API calls in FDM Workbench, but cannot see the table (tPOVPartitions) you mentioned listed. Is this the correct name? And do I just use the function listed in the object browser to run the query?
    Furthermore (going back to my initial thoughts of using strFile), it appears that although the variable contains the .Dat filename and path, the actual file is non-existent when "BefExportToDat" is executed:
    Error:
    Error: Export failed.
    Detail: File not found.
    This would make sense, but it does make the variable "strFile" a little pointless since one cannot make use of the file in this particular event script. Do you please have any thoughts on this?

Maybe you are looking for

  • Error while sending email via APEX

    I get the following error message when trying to send an email to a WORKSPACE owner via APEX: ORA-29279: SMTP permanent error: 501 Syntax error, parameters in command "MAIL FROM:" unrecognized or missing This is very weird, when I go to the email que

  • USB Ports on HP Pavilion 15-e087nr Laptop Not Working

    I have a HP Pavilion 15-e087nr Laptop running Windows 8.1. It has 3 USB ports and all of sudden they stopped working. It will not detect my wireless mouse, a USB corded mouse that I have or my phone when I plug it in. I checked Device Manager and und

  • Out of Range devices shown as connected

    I use my MacBook Air in clam-shell mode at home and in the office with the following devices, Apple Wireless Keyboard, Apple Magic Mouse, and Apple LED Cinema Display. Very often my mouse either at home or in the office will fail to connect even afte

  • Is it possible to directly upgrade 15454 M12 TCC2 rel 9.10 to rel 9.221?

    I'm planning to upgrade our client's node an ONS 15454M12 from release 9.10 to release 9.221. Can i directly loadand upgrade it to release 9.221 or do I need to do step upgrade 9.10 to 9.211 then 9.221? Is it service affecting? ...many thanks.... che

  • To print image in Non interactive form

    I have a requirement where image file is attached to QM02 transaction, now i want to print the attached image on QM02 print output. I am planning to use Non interactive form method to print the form output. Can anyone pls guide me how to insert/print