Looping in Maxl Script - To load multiple files

Hi,
I am using Essbase 11.1.2 on UNIX.
I have maxl script which will load 20 to 30 extraction file. Number is inconsistent. Extraction files will grow each month. Extraction files are with same name with the suffix _1,_2...(2 Gb thing). My previous script was hard coded to load file by file to load up to 50 files. I am trying to remove these hard coded lines, and try to loop the “load” statement. I have tried several ways using while loop in shell to call maxl /msh , but no luck. Any ideas?
Thanks

A very similar question was asked recently (but for Windows): Re: Maxl to import datafolders
What have you tried? Maybe someone here can show you what's wrong with your script.
The approach I usually take with this type of problem is to write a script that dynamically builds one single MaxL script with the appropriate number of files, rather than calling MaxL multiple times.
I am generally too ashamed to share my Unix scripts, but at it's most basic, non-error-trapped, probably-inadvisable-and-full-of-holes-for-all-kinds-of-reasons, you could include something like this to build your load script:
ls filename*.txt | awk {'print "import database etc... "$1" ...on error etc;"'} > scriptname.mshSince you can nest MaxL scripts, you can then reference scriptname.msh from a static 'master' script which handles login / spool on / spool off / logout as appropriate. See http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_tech_ref/maxl_commands_nesting.html or Cameron's 2009 K'scope presentation: http://odtug.com/apex/f?p=500:575:526121996615242::NO::P575_CONTENT_ID:4605

Similar Messages

  • Unable to load multiple files to Essbase using MaxL and wildcards

    I have multiple data files to load:
    Files:
    Filename.txt
    Filename_1.txt
    Filename_2.txt
    According to the following link, Essbase is able to load multiple files to BSO databases via MaxL by using wildcards:
    http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?launch.html
    However, when I try to run the following I receive the following error:
    MaxL:
    import database MyApp.DB data from server text data_file "../../MyApp/Filename*.txt" using server rules_file "L_MyRule" on error append to "\\Server\Folder\L_MyRule.err";
    Error:
    ERROR - 1003027 - Unable to open file [DB01/oracleEPM/user_projects/epmsystem2/EssbaseServer/essbaseserver1/app/MyApp/DB/../../Filename*.txt].
    ERROR - 1241101 - Unexpected Essbase error 1003027.
    I can run the following fine without any problem, but this only deals with the first of several files, and I’d rather not hard-code multiple files since the number might vary in the future:
    MaxL:
    import database MyApp.DB data from server text data_file "../../MyApp/Filename.txt" using server rules_file "L_MyRule" on error append to "\\Server\Folder\L_MyRule.err";
    Any ideas? And how about ASO databases?

    JamesD wrote:
    According to the following link, Essbase is able to load multiple files to BSO databases via MaxL by using wildcards:
    http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?launch.html
    That is the tech ref for 11.1.2.2, are you on 11.1.2.2?
    Import Data
    11.1.2.2 - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?maxl_imp_data.html
    11.1.2.1 - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref_1112100/frameset.htm?maxl_imp_data.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Load multiple files using the same data load location

    has anybody tried loading multiple files using the same load locations. I need to do this as the data in these multiple files will need to be exported from FDM as a single export file. the problem i am facing is more user related. since these files will be received at different points of time, users will need a way to tell them what has been loaded and what is yet to be loaded.
    is it possible to throw a window on the web broser with OK and Cancel buttons from an event script?
    any pointers to possible solutions will be helpful

    was able to resolve this. the implementation method is as follows
    take a back up of previously imported data in the befcleardata event script. then in the beffileimport event append the data to the import file. there are many other intricacies but this is the broad implementation logic. it allowed my users to load multiple files without worrying about append or replace import type choices

  • Loading multiple files with SQL Loader

    Hello.
    I will appreciate your recommendation about the way to load multiple files (to multiple tables) using SQL Loader with only one Control file.
    file1 to load to Table1, file2 to load to Table2 etc.
    How the Control file should look like?
    I was looking on Web, but didn't find exactly what I need.
    Thanks!

    Ctl File : myctl.ctl
    ---------- Start ---------
    LOAD DATA
    INFILE 'F:\sqlldr\abc1.dat'
    INFILE 'F:\sqlldr\abc2.dat'
    INTO TABLE hdfc1
    (TRANS_DATE CHAR,
    NARRATION CHAR,
    VALUE_DATE CHAR,
    DEBIT_AMOUNT INTEGER,
    CREDIT_AMOUNT INTEGER,
    CHQ_REF_NUMBER CHAR,
    CLOSING_BALANCE CHAR)
    INTO TABLE hdfc2
    (TRANS_DATE CHAR,
    NARRATION CHAR,
    VALUE_DATE CHAR,
    DEBIT_AMOUNT INTEGER,
    CREDIT_AMOUNT INTEGER,
    CHQ_REF_NUMBER CHAR,
    CLOSING_BALANCE CHAR)
    -----------End-----------
    Sqlldr Command
    sqlldr scott/tiger@dbtalk control=F:\sqlldr\myctl.ctl log=F:\sqlldr\ddl_file1.txt
    Regards,
    Abu

  • SQL Loader - Load multiple files in UNIX

    HI all, I'm looking for a bit of help with using SQL LOADER to load multiple files into one table. I've had a look on the forums but still struggling with this one.
    What I want to do is basically upload everything thats in /home/ib. I know you can use INFILE for several files in the control file but I have several hundred files to upload so this isn't practical. Can I pass the directory name as an INFILE parameter?
    Any help would be appreciated.

    On Unix you shouldn't worry about that. See this example :
    [ora102 work db102]$ cat test11.dat
    aaaaa,bbbbb
    ccccc,ddddd
    eeeee,fffff
    [ora102 work db102]$ cat test12.dat
    ggggg,hhhhh
    jjjjj,kkkkk
    lllll,mmmmm
    [ora102 work db102]$ cat test13.dat
    nnnnn,ooooo
    ppppp,qqqqq
    rrrrr,sssss
    [ora102 work db102]$ cat load.sh
    CTL=load.ctl
    echo "load data" > $CTL
    for DAT in test1*.dat
    do
            echo "INFILE "$DAT >> $CTL
    done
    echo "replace"                  >> $CTL
    echo "INTO TABLE test1"         >> $CTL
    echo "fields terminated by ','" >> $CTL
    echo "trailing nullcols"        >> $CTL
    echo "( a, b )"                 >> $CTL
    sqlldr test/test control=load.ctl
    [ora102 work db102]$ ./load.sh
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon Oct 2 11:45:44 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 3
    Commit point reached - logical record count 6
    Commit point reached - logical record count 9
    [ora102 work db102]$ sqlplus test/test
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 2 11:45:49 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    TEST@db102 SQL> select * from test1 order by a,b;
    A                    B
    aaaaa                bbbbb
    ccccc                ddddd
    eeeee                fffff
    ggggg                hhhhh
    jjjjj                kkkkk
    lllll                mmmmm
    nnnnn                ooooo
    ppppp                qqqqq
    rrrrr                sssss
    9 rows selected.
    TEST@db102 SQL>                                                                              

  • SQLLDR script to load .xls file to database.

    Hello Experts,
    Please can anyone tell me the sqlldr script to load .xls file to the database.
    I am using Oracle 10g XE as the database, and want to load a .xls file to a schema using the sqlldr script.
    Waiting for your reply...
    Thanks in advance,
    Manoj Indalkar.

    Hello Manu,
    that's what heterogeneous services are made for. With these you can select from XLS files.
    Re: Read CSV/XLS file to insert into Oracle database.
    or
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206
    http://jiri.wordpress.com/2010/01/21/load-ms-excel-file-to-oracle-database/
    Regards
    Marcus

  • Sorry for posting a wrong question Loading multiple files!!

    Sorry for posting a wrong question Loading multiple files!!
    As per my understanding 
    Sorry for posting a wrong question Loading multiple files!!
    As per my understanding only a standard Dat file can be compared with one single dat file.Because Eacg dat file will be containing its own values. So multiple files cannot be compared.
    Am assuming dat files containing time(s) and acceleration values(g). G value for each file differs.
    Thanku!!
    Solved!
    Go to Solution.

    Hi Rash.patel,
    I'm still not sure I follow you.  When you say "Dat" file, do you mean the DIAdem 8.x standard file with the *.dat header and usuall a *.r64 binary file or two that it references, or do you mean some other specific data file with the extension *.dat or do you just mean a generic data file?
    DIAdem can certainly load multiple files into the Data Portal at the same time, so you must be referring to either a limitation of the "*.Dat" file you're talking about or correcting yourself that all the data you want to compare turns out to be in one "Dat" file.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Loading multiple files into a target table parallely

    Hi
    We are building an interface to load from flat files to an Oracle table. The input can be more than one files all of th same format. I have created a variable for the flat file data store. I have created 2 packages
    In package 1
    I have put odi file wait to trigger whenever files come into the directory . The list of files is written to a metadata table table. A procedure is triggered which picks a record from the metadata table and calls the scenario for calls package 2 by passing the selected record as parameter.
    In package 2
    The variable value is set to the parameter passed from package 1 procedure
    The interface runs to load the flat file = to the variable value into the target table
    Now if the directory has more than one flat file , the procedure in package 1 calls the package 2 scenario more than one times. This causes sequential load from each flat file to the target table. Is there a way wherein the multiple flat files can be loaded in parallel to the same target table? At this point ,I am not sure if this is possible as there is only one interface and one variable for the source file

    As per your requirement , your process seems to be always continues like a loop[ reason being as you have mentiond - I dont want to wait for all files to come in. As soon as a file comes in the file has to be loaded.  ] .
    You can solve the issue of file capture using OdiFileWait to let you know when the files have arrived.
    Tell me this what do you plan to when the File loading is complete, will that be in the same folder and when new files come will that update with the same name or different name , becuase irresptive of same file or different if the files are present in the same folder after loading into target , then we might do repetitive loading of files. Please tell me how do you plan to handle this.
    When you have plan to use LKM file to sql , what is the average number of source records coming into each sample files. ?
    Just to add to above question , what is the average numner of parallel loads you are expecting and what is the time interval between each paralled loading you are expecting.

  • Reader XI: how to load multiple files so that I can show them in one instance of full screen mode?

    It is possible to show a pdf file in full screen mode in acrobat reader XI (windows).
    It is indicated that this is also possible with multiple files.
    I do not understand how to accomplish this; How can I load more than one file to show in the full screen mode?
    can anyone explain this to me?
    Thanks in advance!

    frankvanrooij wrote:
    It is indicated that this is also possible with multiple files.
    Where do you see that?

  • How to use BAPIs for Infopackage execution : loading multiple files

    Hello
    I have been told that BAPIs can be used to load multiple csv files at once for which some BAPIs exists (BAPI_IPAK_CREATE_FROM_REF , BAPI_IPAK_CREATE , etc)
    I have users who will be dropping their standard files in a directory (this should be a local one or server one ?) according to one of 3 types of formats defined.
    As they wont be trigering the IP but instead plan to use a Process chain need a way to collect all files and trigger a IP that can process them all
    Can somebody lead me into using the appropriate ones in the right way?
    thanks

    First if you are using process chain then the files should be placed in Application Server only and process chain can not work with IPs which are using Local Files.
    Instead of BAPI in the infopackage there is a feature to select the file using routines. May be you  can pick the necessary file in the routine itself.
    In the extraction tab you can find this option.
    Regs
    Gopi
    Assign points if it is useful

  • How to Load Multiple Files in Oracle Database using Sql Loader

    Hi All,
    I want to import multiple files in my DB using Sql*Loader. Please tell me the Syntax, how can I import multiple files using one Control File?
    Thanks & Regards,
    Imran

    Hi,
    You might get a good response to your post in the forum dedicated to data movement , including SQL*Loader . You can find it here Export/Import/SQL Loader & External Tables
    Regards,

  • Help with AS3, loading multiple files into a movieclip in specific order in scrollbar

    Hello! I am in need of some advice. We are trying to build a site with these features:
    Our site will be built in Actionscript 3.
    1. A navigation menu that, when a button is clicked, will scroll the site quickly to a specific Y position using swfaddress.
    2. The entire site is controlled by a flash scroll bar, which will be scrolling a single movieclip.
        2A. The movieclip will load content corresponding to the navigation categories, all which is organized into zipped files (using this to extract the contents of each section, example: about.zip for the about         section of the site)
        2B. The movieclip will load multiple zipped files one by one that correspond to the navigation, in order, making the site appear to be very tall.
    **What we are in need of is understanding how to load multiple zipped files into a movie clip, in a specific order, and having them scroll between one another through the navigation. The separate navigation categories can be in movieclips instead of zipped files if that is easier.
    Here is a reference of something that works like this: http://swfc-shanghai.com/#/about/

    Hello kglad! I have set aside the idea of using zipped files, and am now just using multiple external swfs that I'd like to load into the movieclip in a specific order. Any thoughts?
    I'm new to AS3, and I'm  attempting to create a scrolling movieclip that will load multiple  external files, in order, into that movieclip. I'm using XML as well. At  this point, nothing is loading into my movieclip (contentMain) and it's  a bit frustrating! Thank you for your help!
    Current error: 1180: Call to a possibly undefined method load.
    AS3:
    //XML Loader
    var myXML:XML = new XML();
    myXML.ignoreWhite = true;
    myXML.load ("master.xml");
    myXML.onLoad =function(sucess) {
       if (sucess) {
    contentMain.loadAll();{
         load("1_Overview.swf")
         load("2_Webcam.swf")
         load("3_Twounion.swf")
         load("4_Oneunion.swf")
         load("5_Retail.swf")
         load("6_Nearby.swf")
         load("7_Courtyard.swf")
         load("8_Map.swf")
         load("9_Conference.swf")
         load("10_News.swf")
         load("11_Sustainability.swf")
         load("12_Contact.swf")
    addEventListener("complete",onLoad)
    onLoad();{
    //load all
         }else {
             trace("ERROR LOADING XML");

  • Failed to load multiple files using theMgr.createLocalFileInputStream

    Hi
    I am using 2.3.8 and having trouble with putting multiple files to the container using XmlInputStream.
    I have hundreds of documents in 'output' folder from my project root, and I was able to load them by using other signature - reading each line from each file via BufferedReader.
    However, if I switch to XmlInputStream, the first putDocument() is successful but I get an error an XmlException at the second iteration.
    container = theMgr.createContainer(theContainer, config);
    XmlUpdateContext updateContext = theMgr.createUpdateContext();
    Transaction dbtxn = environment.beginTransaction(null, null);
    txn = theMgr.createTransaction(dbtxn);
    Iterator filesIterator = files2add.iterator();
    while (filesIterator.hasNext()) {
    File file = (File) filesIterator.next();
    String docName = fileNameToDocName(file);
    XmlInputStream theStream = theMgr.createLocalFileInputStream(file.getName());
    container.putDocument(docName,
    theStream,
    updateContext,
    null);
    com.sleepycat.dbxml.XmlException: Error: The resource does not exist: malformed or non-existent stream source, errcode = INVALID_VALUE
         at com.sleepycat.dbxml.dbxml_javaJNI.XmlContainer_putDocument__SWIG_5(Native Method)
         at com.sleepycat.dbxml.XmlContainer.putDocument(XmlContainer.java:405)
         at com.sleepycat.dbxml.XmlContainer.putDocument(XmlContainer.java:77)
         at com.expd.arch.persistence.BerkeleyTestCase.loadXmlFilesViaStream(BerkeleyTestCase.java:85)
    The second document failing looks like this - nothing wrong
    <?xml version="1.0" encoding="UTF-8"?>
    <consol version="0">
    <import-file-number>21345</import-file-number>
    <ownership-location>LAX</ownership-location>
    <id>0</id>
    </consol>
    Can someone tell what's wrong in my code?

    Hello,
    The error is indicating something wrong with the file name or location, not the content. Try verifying that the file name passed to createLocalFileInputStream() is in good shape and refers to a regular file with permission to read. If that looks OK, there's a small chance you need to explicitly delete the XmlInputStream between calls. That should not be necessary, because the putDocument() call should consume it, but it does not hurt.
    Regards,
    George

  • Sql loader multiple files

    How can I load multiple input files ( monthwise 200601 to 200907) using sqlloader and a batchfile into tables like xxxx200601 etc
    any suggestions are welcome,
    thanks in advance
    Edited by: sunnysmiles on Jul 10, 2009 2:14 PM

    sunnysmiles wrote:
    How can I load multiple input files ( monthwise 200601 to 200907) using sqlloader and a batchfile
    LOAD DATA
      INFILE mon200601.dat
      INFILE mon200602.dat
      INFILE mon200603.dat
      INFILE mon200604.dat
      INFILE mon200605.dat
      INFILE mon200606.dat
      INFILE mon200607.dat
      APPEND
      INTO TABLE emp
      ( empno  POSITION(1:4)   INTEGER EXTERNAL,
        ename  POSITION(6:15)  CHAR,
        deptno POSITION(17:18) CHAR,
        mgr    POSITION(20:23) INTEGER EXTERNAL
    any suggestions are welcome,[loading data from multiple files|http://www.orafaq.com/wiki/SQL*Loader_FAQ#Can_one_load_data_from_multiple_files.2F_into_multiple_tables_at_once.3F], [official documentation|http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_concepts.htm#i1004677]
    thanks in advance

  • Script to load multiple linked smart objects to stack

    Hi
    we have a workflow where we work with exr images, and load about 15 of them at a time into a stack, then from there convert them into smart objects.
    As the linked smart objects is out this means we can replace a folder full of images and update them which would save opening up the psd and having to replace conent on all smart objects.
    but can't seem to find a way to load multiple smart linked objects in with out having to do 1 by 1.
    Is there a simple script to do this?
    Thanks

    I had asked Adobe about a modified script to do this, but at this time, they didn't seem interested in developing it.  Perhaps if more people ask for it they would add this feature, which would be extremely handy.  Don't know if anyone has come up with their own script for this yet, but I'm sure someone will.

Maybe you are looking for