How can i append the variable to filename in import statement?

how can i append variable(substitution variable) to file name in import command for maxL?
example : For suppose there is a file like "dataload.txt" and a variable like cur_month(august).How can i rename the file like daload_august in import statement.
Edited by: 788996 on Aug 22, 2010 11:18 PM

Are you saying you want to use an OS level environment variable in a MaxL statement to substitute for an entire file name? I am going to illustrate Windows, but do it your own way in *nix if you want.
YourCallingCode.cmd
REM Note the \\ and then the \\, you had \\ and \
SET curmon=c:\\ABC\\datafile_21_AUG.txt 
REM Call MaxL with a paramenter
startMaxL.cmd DoItForTheCurrentMonth.msh %curmon%DoItForTheCurrentMonth.msh
login blah blah for blah ;
import database appname.dbname data from local text data_file $curmon using server rules_file "rulefile"
     on error abort ;The trick is to change whatever's in % and % and replace it with a $ in the MaxL script.
I gave a presentation last year on MaxL at ODTUG Kaleidoscope. If you go to http://www.odtug.com, then Tech Resources, then Essbase, then search on my name, you'll find "Master Essbase with MaxL Automation". More than you could ever want to know about MaxL, variables (parameter, environment, and explicitly declared), scripting, etc., etc., are all there for the taking. If you're not already a member, you'll have to join, but an associate membership is free. You can then download my presentation and all of the others. It is a treasure chest of technical tips and knowledge.
Yes, I am a fan a member of the Hyperion SIG, so I am ever so slightly biased. Regardless, it is good information, for free.
Regards,
Cameron Lackpour
Edited by: CL on Aug 24, 2010 5:33 AM
If you want to substitute part of the data file name, you can do that too:
set curmon=21_AUG
Your MaxL statement would look like:
import database appname.dbname data from local text data_file "c:\\ABC\\datafile_$curmon.txt" using server rules_file "rulefile"
     on error abort ;

Similar Messages

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • How can I convert the variable expression stored as string back to variable expression

    How can I convert the variable expression stored as string back to variable expression?
    I am storing the expression enterd in the TSExpresssionEditControl as simple string and want to convert back to expression since I want to get the data type of that expression.

    pritam,
    I'm not sure what you're trying to do exactly. If you are trying to get the value of a variable and you only have the name of value in a string, then you can use Evaluate() to get its value. If you want the data type, my advise is to use the GetPropertyObject() API method and just pass in the loop up string. Then you'll have a handle to the data object and then proceed from there.
    Regards,
    Song D
    Application Engineer
    National Instrument
    Regards,
    Song Du
    Systems Software
    National Instruments R&D

  • How can i view the variables of the session memory

    Hi experts
       How can i view the variables of the session memory.Such as I want display the variables of memory which id is 'BULRN' in ABAP debug.
    In program i can use import from memory id visit the momery of session,but i don't know the name of variables which store in momery of my session.

    Its not possible to view in the debug mode..
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens
    SAP global memory retains field value through out session.
    set parameter id 'MAT' field v_matnr.
    get parameter id 'MAT' field v_matnr.
    They are stored in table TPARA.
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    ABAP memory is temporary and values are retained in same LUW.
    export itab to memory id 'TEST'.
    import itab from memory Id 'TEST'.
    Here itab should be declared of same type and length.

  • How can I use the Variable Delay VI (From DSP Module) to Deploy Variable Delay on Speddy-33

    Dears,
    I dont Understand How Can I Use the Variable Delay to Deploy Variable Delay on a Speedy-33 Kit

    Hello,
    Thank you for posting to the NI Forums!! You should be able to incorporate the Variable Delay.vi into your vi and then build as normal and the functionality of the vi should translate to the build. What type of build are you doing? Are you receiving any specific errors? Thanks!
    Regards,
    Margaret Barrett
    National Instruments
    Applications Engineer
    Digital Multimeters and LCR Meters

  • How can i insert the variable value in MS ACCES Query

    i am creating one Query (query1) in MS ACCESS ( like we creaate Tables, Forms and Reports in MS ACCESS ) in this Query i have given 2 constent value in BETWEEN CLAUSE , after that i Created a CROSS QUERY which is based on the privious Query (query1).
    Now i want to insert the variable value using JSP and HTML in to Query(query1).
    Doing this i want to execute the Query (query1) with variable perameters and
    wants to get the risponce form CROSS QUERY.
    In this matter how can i insert the value in Query(query1) using JDBC and JSP.

    The query is
    Select ZMSGMAP.GROUP_CODE as 'group', ZMSDSTATE.STATE_DESC as 'state', ZMSTRN.YRMON, sum(ZMSTRN.CMAQTY) as 'qty' from ZMSDSTATE,ZMSGMAP,ZMSTRN Where ZMSTRN.STATE=ZMSDSTATE.STATE and ZMSTRN.PLANT=ZMSGMAP.PLANT_CODE and ZMSTRN.YRMON between "+p1+" and "+p2+" Group by ZMDGMAP.GROUP_CODE, ZMSDSTATE.STSTE_DESC, ZMSTRN.YRMONUsing this query i m trying to display the risult but the YRMON is displaying in a single column, i want to display it ia seperat columns. here p1 and p2 is YRMON(it is the yer month like 200102), for this solution i have created Cross table Query which is based on uper Query (query1) and design it column wise Display, it is givng the right display, but the problem is this i m not getting the technique throw which i can insert the variable values in to the query1 (which is designed in MS ACCESS).
    u can contact me on [email protected] for more details.

  • How can I define the variable "UITableViewScrollPositionNone" in Applescript-Objc?

    I'm trying to select a row in a Table View using the following code:
    NavigationTable's selectRowAtIndexPath_animated_scrollPosition_((IndexHandler's indexPathWithIndex_(1)), true, UITableViewScrollPositionNone)
    (IndexHandler is the NSIndexPath class)
    But when I run the code, I get the error:
    The variable UITableViewScrollPositionNone is not defined.
    How do I define "UITableViewScrollPositionNone", in Applescript-Objective-C?

    For some strange reason, after admitting that I'm utterly lost, and after literal days of endless searching, I've found the proper snippet of code.
    For those who need to select an NSTableView row in Applescript-Objc:
    property IndexSetHandler : class "NSIndexSet"
    set DefaultRow to (IndexSetHandler's indexSetWithIndex_(1))
    NavigationTable's selectRowIndexes_byExtendingSelection_(DefaultRow, false)
    Thank you both for all the help you've given me as well, and sorry for bothering you with previous response.

  • How can I Append the same (altered) web page to the same Acrobat 9 Pro PDF file more than once

    The Acrobat 9 Pro utility in IE 8 of the Windows 7 Pro OS has a selection to "Append to Existing PDF," however it only allows appending the same web page one time only.  if the majoriety of the page data content is changed by selecting list item at the top of the page, I need to (re-)add the page with new content to the same (selected) PDF file, however the utilitiy does not allow this due to its maintaining a special index of each page base on the page URL or name.  Can the this index or the page itself be changed whenever the page is altered to make Acrobat think it is a new page? 

    I don't use IE, but I would suspect you can clear the cache or such to reset this option. You could also just open the web site directly in Acrobat and play the game there.

  • HT1766 After restoring yesterdays icloud back up one of my Apps has lost all its data.  How can I get the data back as its important to me.

    I accidentally added a passcode to my ipad mini after yesterdays IOS7 update.   I then promptly forgot the passcode (I think apple secretly changed it really).
    Its taken me 2.5hours to figure out how to reset my ipad after discovering there was no other way of getting into my ipad around the passcode.
    Luckily my ipad backs up every evening to icloud so i had a new back up sat waiting for me.
    Annoyingly, itunes wouldnt let me restore the factory settings as the "find my phone" thing was switched on.  The only way to turn it off appeared to be via my ipad which I was unable to get into.
    I eventually figured out how to restore it without this problem, by pressing the home button as I turned it on and then getting itunes to recognise it as a new ipad and restoring its settings that way.
    Following this it was relatively simple to restore my icloud back up.
    Everything appears to be here, my calander, my contacts etc.  All my apps have been restored and Im yet to find any app that has missing data except for one (naturally the one that is most important to me).
    This one app appears to have been returned to my ipad but it no longer has any data attached to it.  I have lost everything.  Payment info, Client info etc.
    Is there any way of recovering the data.  I presume its floating around the ether somewhere given I automatically back up to icloud every night.
    Cheers

    There's one other variable, although it shouldn't really come in to play but worth checking anyway.  Is it possible that the backup was made using a higher version of iOS than the one you are running now?  For example, if you were running the iOS 7 beta, then restored to version 6.1.3, the backup would not be listed as you cannot restore to a backup made on a device running a higher version of iOS.  If that's the case, you would have to update to the same or higher version of iOS in order to access your backup.
    Also, you can redownload apps and certain other purchased media (in most countries) as discussed here: http://support.apple.com/kb/ht2519.

  • How can i delete the variable

    Hi frds,
    Hope all fine. i had create a variable on the 0calday. now i had a problem with that i trying to delete that but i am unable to do it. can any body help me.
    Thanks & Regards
    KK

    While deleting variables you might need references..
    FYIP ..
    Table RSZGLOBV - for finding variables
    Table RSZELTXREF - for queries using variables
    (RSZELTXREF-TELTUID = RSZGLOBV-VARUNIID and RSZELTXREF-laytp = 'VAR').This will give internal id of queries
    Table RSRREPDIR - for finding the name of queries
    (RSZELTXREF-SELTUID = RSREPDIR-COMPUID)
    variable technical name and description  RSZELTTXT with the internal name found in RSZGLOBV
    Hope it Helps
    Chetan
    @CP..

  • How can i get the variable declared in jsp to a javascript function

    Hello all.
    I'm in a trouble.. i was developing a program in jsp oracle. and in some cases i use java scripts.. here in the HR program module i feel a trouble.
    the code here i'm sending is just a trial one.. the jdbc and all are doing in the jsp page itslef.
    egs.. : there is a table with 4 fields
    Empid Empname Empdetails EmpSal
    and in the table there are 100 records. Emp id is the primary key
    here what my problem starts..
    i want to list all the emp id in the combo box
    for that i used jsp program
    now when i select any one emp id i want to display the
    empname emp details and emp salary in another 3 text boxes
    i have successfully placed all the empid in the combo box
    now what i done is i wrote code in java script.. in onchange() for combo
    now i'm not getting the values
    here i'm sending the code.. below..
    please help me
    <html>
    <head>
    <title>DOLOGIN
    </title>
    </head>
    <%@ page language="java" session="true" import="java.sql.*" %>
    <body>
    <form method="POST" name="form1" action="--WEBBOT-SELF--">
         <!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
    <select size="1" name="D1" onchange =xx() >
    <option> Select One</option>
    <%
    String age[] = new String[20];
    String ph[] = new String[20];
    int i=0;     
    try
         try
         {     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         catch(ClassNotFoundException e)
         {     out.println(e);
              String dbURL = "jdbc:odbc:trial";
              Connection dbCon;
              dbCon = DriverManager.getConnection(dbURL);
              String query = "Select * from table1";
              Statement stmt = dbCon.createStatement();
              ResultSet rs = stmt.executeQuery(query);
              while(rs.next())
              {     String name = rs.getString(1);
                   //out.println(name);
                   %>
                   <option value="<%=name%>"><%=name%></option>
                   <%
                   age= rs.getString(2);
                   ph[i] = rs.getString(3);
                   //out.println(age[i]);
                   //out.println(ph[i]);
                   i++;
         %>
         </select>
         <%
              out.println(age[4]);
              dbCon.close();
              stmt.close();
    catch(SQLException e)
    {     response.sendRedirect("error.html");
    %>
    </form>
    </body>
    </html>
    <SCRIPT LANGUAGE=javascript>
    <!--
    function xx()
    {     //alert("aravind")     
         alert(document.form1.D1.selectedIndex)
         alert(document.form1.D1.value)
         alert(age[document.form1.D1.selectedIndex]) //this is not executing//
    //-->
    </SCRIPT>
    here is the code..
    i want the age to run here
    please help me

    To ensure a custom ordering, sort the files in an album and rename the files with a sequentially numbered filename.
    File > Export > Version/Originals
    Then use "Filename > Sequential"
    or "Filename > Album name with index"

  • Imported CD artists not listed individually,  I found them under "various artists".  How can I change the way rs?  thanksthey import and edit the current erro

    Imported CDs are being labeled as "various artists" not by the actual artists name.  Why is this happening and how do I fix it?  Thank you, J

    Highlight a track and press command ( or ⌘ key) and the letter "i" at the same time to enter the editor window.
    Use shift+click to select a range of trakcs, or command+click to select multiple individual tracks.
    Various artists is often used where an album has several artist on it (read links below).  If you don't group them some way then you will find multiple albums listed in iTunes with each one being an artist on the main album.  The individual artists should still appear in the artist window but it is possible the database used to label your CD was incorrect.  CDs do not have the information on them, they get it from an Internet database.  Anybody can submit track names so you don't always get good ones.
    Why aren't songs with the same album art grouped together? - http://support.apple.com/kb/ts1468
    https://discussions.apple.com/thread/4559720 - discussion of using compilation vs. album artist to group tracks

  • How can i Refresh my Variable Screen In WAD templet?

    Hi Experts,
    When i execute a WEB Templet giving Variable Selection Inputs , the Variable input values gets stored in the Variable Tab and will not change untill i Change it.
    Example
    Variable input 0PLANT     5030(this 5030 is the input where i give in the variable selection screen)
    when i  click back on the intrenet Explorer , this 5030 will be there stored in the 0PLANT tab.
    can any one give me solution how can i refresh the variable screen in the WAD
    Santosh Nagaraj

    Tis might be a browser feature - the variable values tend to get stored - you could look at implementing DSM ( through portal ) or try making your template stateless and see if the value changes...

  • How can i see the code of SAP Exit for SAP Defined Variables

    Hi,
       It's very Urgent! How can i see the Source Code of SAP Provided Variables. I need to write code for User Defined Variables. please help me. It's very Urgent.
    Thanks in Advance.
    Nagesh.

    hi Nagesh,
    sample code for variable exit,
    there is 'how to' docs, can't see your email address.
      DATA: L_S_RANGE TYPE RSR_S_RANGESID.
      DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
      CASE I_VNAM.
      WHEN 'CUMMONTH'.
        IF I_STEP = 2.                                  "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'MONTH'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW      = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
            L_S_RANGE-LOW+4(2) = '01'.
            L_S_RANGE-HIGH     = LOC_VAR_RANGE-LOW.   "high value = input
            L_S_RANGE-SIGN     = 'I'.
            L_S_RANGE-OPT      = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
      ENDCASE.

Maybe you are looking for

  • Itunes will not sync with Windows 8.1

    I recently bought a new computer that has Windows 8.1 on it.  I downloaded the latest version of itunes from the itunes website.  All of my itunes account info is there but when I try to sync my iphone 5 or my iPad 4 it does not recognize it.  Howeve

  • Where are my old events in Cal?

    I can no longer see my old events from 2010 and 2011 in iCal? Where are they? I have not deleted them. Any help would be appreciated. Many thanks

  • Problems with v2.0

    I just upgraded my touch to v2.0 and have 2 problems: 1. It doesn't make noise anymore = can't listen to music which is kind of the point of the thing. 2. Despite entering the correct information into my account setup time and time again, my e-mail f

  • Is iDAR 5.0 64 bits application?

    Does anybody know if iDAR 5.0 is a 64 bit application or 32 bit one? I would like to get the bits because the file descriptor has different soft ulimit on 64 and 32 bits application. Thanks!

  • Passage d'un ordi à un autre

    Sympa, je dois tout réécrire!!!! Je possède LR4 installé sur un iMac et sur un portable sous Windows 7. Je vais partir en voyage pour une période assez longue et je compte travailler mes photos sur le PC. Je vais donc importer et créer un nouveau cat