Jython FDMEE script problem

Hello

I have a custom jython script to convert table data into a text file. This works for a table. But I tried to use lists and tables so that I can have several files of several tables. This script, by creating multiple files, retrieves only the data of the last file. All other files remain as 0 KB files with no data. I see here only data for CH, AC in the file is a 0 KB file. If I have the list with "AC" Member, then I see data for AC. Can someone let me know what I'm missing here in logic.


List = ['AC', 'CH']

Conn = sql. DriverManager.getConnection (strJDBCURL, strUserName, strPassword)
for the list item [:]:

Represented = fdmContext ["INBOXDIR"] + "/" + item + "export.txt"
SRC = open (represented, "w")
SqlString = conn.createStatement)

sqlstmt = 'SΘlectionner the SOURCE, TARGET of TEST_' + point + 'EXPORT '.
result = sqlstring.executeQuery (sqlstmt)

While (result. Next()):
SOURCE = result.getString ("SOURCE")
TARGET = result.getString ("TARGET")

Print > > src, SOURCE, TARGET

CBC. Close()
Conn.Close)

Hi, I skimmed the code last night and missed the second loop. I think that the problem actually comes from your indentention that is the while loop is not currently incorporated in the for loop runs but after the because the loop is complete, the code must be

List = ['AC', 'CH']

Conn = sql. DriverManager.getConnection (strJDBCURL, strUserName, strPassword)
for the list item [:]:

Represented = fdmContext ["INBOXDIR"] + "/" + item + "export.txt"
SRC = open (represented, "w")
SqlString = conn.createStatement)

sqlstmt = 'SΘlectionner the SOURCE, TARGET of TEST_' + point + 'EXPORT '.
result = sqlstring.executeQuery (sqlstmt)

While (result. Next()):
SOURCE = result.getString ("SOURCE")
TARGET = result.getString ("TARGET")
print > src, SOURCE, TARGET

CBC. Close()

Conn.Close)

Only try.

Tags: Business Intelligence

Similar Questions

  • Call the Essbase Calc of custom Script FDMEE script

    Hi Experts,

    In my reuirement, I must run Essbase calc script to export the perticular accounts data and then import these data into FDMEE to load in another planning application.

    I know we can run the Application Esbase calc script fromTarget page and after load. but in my case, executing the script should happen prior to importation.

    Aanybody may suggest an example if I can call the script to calc Essbase to a custom event BefImport script or FDMEE script? an example of the syntax would be useful

    Thank you!

    Hello

    are what version of FDMEE you?

    You have an example document to support FDMEE sample scripts (Doc ID 1613836.1)

    You can have a MAXL command in your batch file to perform the extract

    Example 5

    An example script to calc to perform an Essbase excerpt and then load the file extracted with FDMEE.

    1. Create a batch (.bat) file that performs extract Essbase.
    2. Call the scriptimport BefImport event operating system batch file
      import of subprocesses
      Import shutil
      OS.chdir ("D:\temp\\BatchFiles")
      command = ' D:\temp\BatchFiles\helloworld.bat > helloworld.out '
      p = subprocess. Popen (Command)
      RETCODE = p.wait)
    3. Load using FDMEE HelloWorld.out

    The Jython script can be created in the BefImport Script.

    Then you can have a rule of data loading with a file in it name (Ex: Essbase_Extract_XXXX) where XXXX is that five-year period.

    Your jython script should create this file, so in the case of import, the data is imported

    Keep in mind that it is an output of feature 11.1.2.4 box so if you are in 11.1.2.3.x I wouldn't put a lot of effort in a complex solution

    I hope that this puts you on the right track

  • FDMEE SCRIPT - replacement FDM VB functions with the methods in the API FDMEE

    Hi all


    I'm trying to convert FDM Scripts scripts that would support FDMEE (using Jython as language) and the FDMEE API. However, when I tried it making I came across a few functions in scripts FDM for which I couldn't find replacement functions in FDMEE API.


    How a supposed to change functions VB in FDM as farsTableAppend while it is supported in the FDMEE scripts?

    I generated documentation of the API of the FIA FDMEE - APIs.jar (this jar is supposed to have all the API of FDMEE in there I guess) but I don't see alternative for functions such as farsTableAppend, fExpTRx, PstrClientType, VB, but I can see other methods in the documentation for example, getEPMOracleHome() etc... (All these functions that you can view by using eclipse as editor-in-Chief of Dev FDMEE).


    Is there another method/function in the FDMEE API should I use to replace these functions to support FDMEE?


    I have another question about the AIF file - CUSTOM.jar, what is the purpose of this pot, do we get additional methods in this file


    Please advise...


    Thanks in advance

    Sam

    Hello

    1 API map is not 1 to 1. My suggestion is to define what you want to do and then design your solution in jython (using the api or not). So what you're trying to do exactly?

    For example, you need not PstrClientType more (there is no windows client)

    2 AIF - CUSTOM.jar allows you to enter your custom java classes. then you can use it from your jython scripts.

    Regarrds

  • Notification by E-mail FDMEE script error! Invalid Argument or procedure call

    Hello FDM gurus.

    I tried to write a script to set e-mail notifications when the FDMEE process fails on step validate. I tried to recreate my script as much as possible, but I am unable to know is wrong with the script. The FDMEE script notification by e-mail administrator's guide is not correct, as most of the APIs mentioned FDM and not for FDMEE. Ask you please check the below script and him point that does not.

    I put the script in the AftValidate event below. I don't know if I should not be implemented as event scripts.

    I am currently getting an error "Invalid procedure call or argument: «objFDMAPI.API.MaintenanceMgr.fProcessStatus»»

    My script:

    '************************************************************************************

    ' REVIEW OF THE INPUT PARAMETERS

    '************************************************************************************

    If WScript.Arguments.Count <>5 then

    WScript.Echo "You must provide 5 DURATION variables." & vbNewLine & "use: HFM_LOAD.vbs LoadID CSS_Token OracleInstancePath JavaHomePath OLE_DB_PROVIDER.

    WSCript.Quit - 1

    On the other

    LoadID = WScript.Arguments.Item (0)

    CSSToken = WScript.Arguments.Item (1)

    OracleInstancePath = WScript.Arguments.Item (2)

    JavaHomePath = WScript.Arguments.Item (3)

    Provider = WScript.Arguments.Item (4)

    End If

    '************************************************************************************

    'Initialize FDMEE VB API.

    '************************************************************************************

    Set objFDMAPI = CreateObject ("fdmapi.clsAppServerDM")

    WScript.Echo 'FDMEE VB API created.'

    blnInit = objFDMAPI.fInitializeMainAPI (CStr (LoadID), CStr (CSSToken), CStr (OracleInstancePath), CStr (JavaHomePath), CStr (Provider))

    If blnInit then

    WScript.Echo "FDMEE VB API initialized."

    On the other

    WScript.Quit - 1

    WScript.Echo "fInitializeMainAPI failed."

    End If

    WScript.Echo CBool (True)

    '************************************************************************************

    Dim objProcessStatus

    Dim lngStateCheck

    Dim strFromAddress

    Dim strToAddress

    Dim strSubject

    Dim strEmailMsgLine

    Dim objMsg

    Dim objConfig

    Dim intSendUsing

    Dim strSMTPServer

    Dim intSendPort

    ' Message content Variables

    strToAddress = " " [email protected] ; [email protected] "" "

    strFromAddress = " " [email protected] " " "

    strSubject = "FDMEE Validation failed"

    strEmailMSGLine = 'Failure of Validation - Log of process FDMEE Check - for Details'

    "Check for location

    If objFDMAPI.API.State.LocName = "United States" or objFDMAPI.API.State.LocName = "Canada" or objFDMAPI.API.State.LocName = "Mexico" Then

    strLoc = objFDMAPI.API.State.LocName

    ' Initialize process status

    ' lngStateCheck = 12 ' Validation failed

    "Check the status of LoadID

    Set objProcessStatus = objFDMAPI.API.MaintenanceMgr.fProcessStatus (objFDMAPI.API.State.LocName, objFDMAPI.API.State.CatName, objFDMAPI.API.State.Period)

    If objProcessStatus.blnTBVal = false Then

    strSubject = strSubject & strLoc

    strEmailMSGLine = strEmailMSGLine & strLoc

    strSMTPServer = 'mail.abc.com '.

    ' CdoSendUsing enumeration-1 = use smtp on the local computer, 2 = use smtp via network

    intSendUsing = 2

    ' SMTP port on the server

    intSMTPPort = 25

    'Create the CDO configuration object '.

    Set objConfig = CreateObject ("CDO. Configuration")

    "Set the parameters of the Config object

    With objConfig.Fields

                    . Agenda ("http://schemas.microsoft.com/cdo/configuration/sendusing") = intSendUsing

                    . Agenda ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPServer

                    . Agenda ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = intSMTPPort

                    . Agenda ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10

    . Update

    Ends with

    'Create the CDO message object '.

    Set objMsg = CreateObject ("CDO. Message")

    'Assign to the configuration of the message config object object property.

    Set objConfig = objMsg.Configuration

    "Set the Message subject and send mail

    With objMsg

    . To = strToAddress

    . From = strFromAddress

    . Subject = strSubject & strLoc

    . TextBody = strEmailMsgLine & strLoc

    . Send

    Ends with

    On the other

    WScript.Echo "Success Validation".

    End If

    ' End with

    End If

    'Destroy objects of message '.

    Set objMsg = Nothing

    Set objConfig = Nothing

    objFDMAPI.Dispose

    Set objFDMAPI = Nothing

    I am able to receive notifications by e-mail without the API. Ask you to help and guide me. Thanks in advance

    Vikram

    Delete this line

    strPer = FormatDateTime (strPer, 2)

    just use the name of period and do not scan.

    In any case, I would say that you start with simple code. I just joined the code for AftValidate.

    If you start with simple code that troubleshoot you more quickly.

  • Configure the Essbase Calc of FDMEE Script

    Is there a way to launch this clear FDMEE script before export?  I tried to go through the steps in the admin guide, but not luck.

    If anyone can offer a quick, installation step by step in the context of this little script, would be appreciated!

    ESS_LOCALE English_UnitedStates.Latin1@Binary

    /*******************************************************************************************

    / * Parameters of calculation

    ********************************************************************************************/

    UPDATECALC OFF SET;

    SET CACHE HIGH;

    SET CALCPARALLEL 3;

    SET AGGMISSG

    / * Perform calculations

    ********************************************************************************************/

    FIX (& CurYr, "Can be", "Final")

    CLEARDATA "real."

    ENDFIX

    Hello

    What version are you?

    Of PSU100 FDMEE offers new features to run Scripts before and after loading calculation and after consolidating.

    You can pass parameters to your calculation script using new Variables of Substitution Essbase Runtime. In any case, I recommend having the latest patch that you are able to switch next year as a parameter to the calculation script.

    In case you want to use the period and year as parameters to your POV in FDMEE, your script could be built as:

    ESS_LOCALE English_UnitedStates.Latin1@Binary

    /*******************************************************************************************

    / * Runtime Substitution variables

    /*******************************************************************************************

    SET RUNTIMESUBVARS

    {

    &CurYr;

    &CurPe;

    };

    /*******************************************************************************************

    / * Parameters of calculation

    ********************************************************************************************/

    UPDATECALC OFF SET;

    SET CACHE HIGH;

    SET CALCPARALLEL 3;

    SET AGGMISSG

    / * Perform calculations

    ********************************************************************************************/

    FIX (& CurYr & CurPe, 'Final')

    CLEARDATA "real."

    ENDFIX

    You can configure your script with other parameters such as the scenario or Version and their past as POV or static values.

    The administration guide has all the details for the Use of calculation Scripts section

    There are a few details in the following post: fishing with FDMEE: FDMEE 1st exit (11.1.2.3.100)

    Hope that helps

  • How do reference a value in the ATTR5 column from a mapping FDMEE Script?

    OK, I think I thought about it:

    In Jython his:

    fdmRow.getString ("ATTR5")

    Post edited by: Robb Salzmann - figured it out.  I thought I want to leave here in case someone else had the same question.  Still available for other answers and suggestions :) points

    Hello

    There are a few points not specified in your question:

    * How to reference the ATTR5 column in the strRecord mapping FDMEE Import Script argument?

    -There are no FDMEE mapping import Scripts. You have FDMEE mapping of Scripts and Scripts to import FDMEE. They are different types of scripts

    -strRecord is used in the Import Script. Is the 2nd parameter of the import script works... def funcname (param1, param2):

    -ATTR5 is a column in table TDATASEG. It is accessible in the FDMEE mapping using fdmRow.getString("ATTR5") or simply ATTR5 scripts if you use #SQL mappings

    If it was your original question, or you have any other problem?

    Concerning

  • I'm built with script problems. I Yes Script and it doesn't help. Is there another suggestion... 20 for a website it madness.

    In addition to what I said. I even uninstalled and install a fresh Firefox. Always be flooded to the script. I spend more time trying to put an end to those that I can on a Web site.

    I left Chrome after 3 years because of the questions on the page does not have in the hope that by returning to Firefox, everything would be good.

    My cache is empty and I've done everything suggested that Firefox and still unable to go to a Web site with this question.

    Have you added any of these sites to the block list in YesScrpt?

    This extension is not a bitch at all until the user configures the blocking for each Web site where they get this message.

    I think that your problem is with a script that take too long to run, and that Firefox is you say that. You can try changing that 'time' a script is allowed to run before the message is triggered with this preference.

    http://KB.mozillazine.org/DOM.max_script_run_time

    Try 15 or 20 and see how it works.

  • Firefox can't open my webpage iGoogle due to script problems, but other browsers can open it without problem.

    I try to open iGoogle on Firefox and it still freezes because of too many scripts. This is the only site that I have a problem with. If I use IE or Chrome, they can open the site all the time.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • NHL 2004 Script problems

    Hello

    I have problems with this classic game on Windows Vista.

    Long explanation:

    I just installed this game according to remember how it was a few years ago. Looks like it uses, for some reason, the HTML and JScripts files create menu interfaces. When I start the game, it loads fine (everything works etc.) until I get to the menu. The menu music begins, and after a second or so, an error message is displayed. Like this: http://ronin.viuhka.fi/i/nhlscriptfail.png

    The game crashes once I close the box of message - music is playing very well, and follow the changes of Jukebox, stops, etc. However, the exit button calling another message like that box, and all the other buttons do absolutely nothing. I have to switch to Windows and complete the process.

    The real problem:

    How can I switch to a script engine that works? The game uses IE or parts of it, and scrrun.dll and possibly also jscript.dll. I have Internet Explorer installed 7.0.6000.16764 atm and my scrrun.dll and jscript.dll all appear both to be version 5.7.0.6000.

    An upgrade would work? Or rather a downgrade? The script engine, I have now doesn't seem to be backward compatible.

    Thanks a lot, I really do if someone can help me.

    Hi Xurs,
     
    You can follow the steps in this article that can help solve your problem of script with Internet Explorer. She can relate to the issues with IE script.
     
    How to resolve script errors in Internet Explorer on Windows computers
    http://support.Microsoft.com/kb/308260

    Aziz Nadeem - Microsoft Support
  • Java script problems

    I have a website that just recently, will not allow me to log-in to it. Whenever I try, I get the alert shown in the attachment. I googled activate Java and followed the instructions in the link MS. Java script was enabled already.

    When I try to log-in to this site using Chrome, no problems.

    No idea why I get the Java script error?

    You have a problem. Tried to download an overview of the error, after navigation and selection of the snapshot and clicking on download, nothing happens. If I have up and down arrows I get the alert - cannot display this Page.

    Says that the error is "your browser is not able to view this site as it does not support Java or Java script is not enabled."

    Java script is enabled under Internet, security options, and the site is on my allowed list.

    What is the problem?

    Hello

    Thanks for the reply.

    Please perform the steps suggested in the previous post and reply here with the results.

  • Witz CPL Script problem

    Hello world

    I wrote a script to allow some special calls and reject all other calls.

    Looks like,

    "http://www.Tandberg.net/Cpl-extensions" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "urn: ietf:params:xml:ns:cpl cpl.xsd" > "

    ....................

    My problem is, I need these two rules to allow (matches originally auth.) of SIP and H323 (matches Informati. - origin).

    Why is this? Or I have a problem of anywhere?

    Greetings

    Jens

    Hi Jens,

    My guess would be that the SIP call contains a stated P - a header - them he hits the VCS who this CPL is ongoing, and that authentication to the zone settings, the call is received on is configured as "do not check the credentials. This would lead to an incoming SIP being classed as authenticated, while incoming H323 call would not.

  • FDMEE - LCM problem

    Hi all

    We are having a problem exporting our rules of loading data FDMEE for our largest application in LCM.  When we click on export, it still fails (all other elements are able to export successfully).  The SharedServices_LCM.log file contains the following error message:

    Unable to connect to 'FDM Enterprise Edition' during application export. Received status code - with "500" error message - "Error 500 - Internal Server Error Error 500 - Internal Server Error of RFC 2068 Hypertext Transfer Protocol - HTTP/1.1: 10.5.1 500 Internal Server Error the server encountered an unexpected condition which prevented him from meeting the demand.". " Does not cause possible error no server available for connection.

    We have the DLR 2 224 so I don't know if the size has nothing to do with it.  Export of our other small application of the DLR works very well.

    Any ideas?

    THX,

    Mike

    This problem is solved now.  Open a SR with Oracle ran newspaper and came across this line in the ERPIntegrator log:

    oracle.jbo.TooManyObjectsException: Houston-25013: too many objects correspond to the oracle.jbo.Key [4019 primary key 9]

    We went in the AIF_BALANCE_RULES table and saw 4019 was a number RULE_ID.  We have removed this rule and then tried to export rules in loading data via LCM again.  Then we had another error in the log:

    oracle.jbo.TooManyObjectsException: Houston-25013: too many objects correspond to the oracle.jbo.Key [4110 primary key 5]

    We have removed the table AIF_BALANCE_RULES, and then re-run LCM 4110 and magically it worked.  So it was clearly something on both of the DLR LCM disliked about the primary key.

    This problem is solved for us... for now.

    THX,

    Mike

  • FDMEE scripts

    Hi all

    I have created an environment for Jython scripts using the guide of the erpi in this setup of Jython, Eclipse a Python

    My question is that I'm trying to run the initialization code that is in the guide, but my database is MSSQLSERVER, so my code is as below: -.

    import Java.Math.BigDecimal BigDecimal

    import java.sql SQL

    import com.hyperion.aif.scripting.API API

    fdmAPI = API()

    Conn = None

    Conn = sql. DriverManager.getConnection ("jdbc:sqlserver://localhost \\MSSQLSERVER;user=sa;password=pass;") SelectMethod = cursor; databaseName = FDM_H");

    conn.setAutoCommit (False)

    fdmAPI.initializeDevMode (conn);

    Print "CONNECT to DB of SUCCESS"

    fdmContext = fdmAPI.initContext (BigDecimal (1720))

    Print "Hello".

    Here, when I run this code in eclipse as run as Jython RUN, I'm getting below error

    Traceback (most recent call changed):

    File "C:\Users\trnadmin\workspace\Testing\HelloJython.py", line 12, in < module >

    Conn = sql. DriverManager.getConnection ("jdbc:sqlserver://EPM:1433;" + "databaseName=FDM_H;user=sa;password=hyperion@14 ;");

    at java.sql.DriverManager.getConnection (unknown Source)

    at java.sql.DriverManager.getConnection (unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    java.sql.SQLException: java.sql.SQLException: no suitable driver found for jdbc:sqlserver://EPM:1433;databaseName=FDM_H;user=sa;password=hyperion@14;

    Note:-J' have 3 JAR files are added as external libraries

    Thank you

    Pratik

    The JDBC connection should be as follows for MSSQL 2005

    JDBC URL = SqlServer: / /: 1433; selectMethod = cursor; databaseName =; integratedSecurity = false; user =; password =

  • Card FDMEE script depends on the location

    Hello. Try to do a mapping of Jython script in 11.1.2.3.510 (a place is a parent of another and need a few lines to be unique between them) based on the location (partition key):

    x = fdmRow.getString ["PARTITIONKEY"]

    If x is 11:

    fdmResult = "USD".

    Elif x is 10:

    fdmResult = "CAD".

    When I try to import a file, I get this message:

    File '< string >", line 1, in < module >

    TypeError: 'instancemethod' object is unsubscriptable

    Any thoughts?

    Eric

    Replace the brackets in the first line with normal brackets namely x = fdmRow.getString ("PARTITIONKEY")

  • How to hide the password in the event FDMEE script

    Hello

    I have a script of the event (AftImport.py) implemented in FDMEE. In the script, I have a line to connect to the base:

    sourceConn = sql. DriverManager.getConnection ("jdbc:oracle:thin:@abcd1234.vci.att.com:1521:FCMTEST", "SWUSER", "pw5678");

    In this example, pw5678 is the password of the user SWUSER to connect to the base. For safety reason is there a way to hide the password pw5678 in this script?

    Thank you!

    Hongfei (AT & T)

    Hello

    your security policies are too strong?

    There are different ways to do this. Some of them:

    -Use of Base64 encode/decode (you have the details on our google friend)

    -Store the password in the system environment variable and get this value from the script

    -With the help of related SQL Server/Oracle DB Link + synonyms. Using this approach avoid you opening connections of the scripts as we shall delete your database / tables as objects of FDMEE and the FDMEE databases is accessible from scripts without having to open the connection.

    Different solutions, different ways of hacking password if someone has access to the script. So based on your security policies, you need to find the best solution.

    See you soon

    Francisco

Maybe you are looking for