Initialize block of memory in CIN

Hello, I am having quite a time trying to initialize a block of memory and then hand a pointer to that memory back to LabVIEW.
1. I pass an uInt8 Array of 3000 elements (6kB) into my LabVIEW CIN
2. I prepare a block of memory in the CIN.
3. I initialize the memory by loading a static table into the block of memory
4. I WANT to move the initialized memory space into the uInt8 Array, starting at index[0]
The code below compiles, but when I run the CIN in labview, LV crashes.  
What am I doing wrong?
Thank you for any help,
Victor
/* Typedefs */
typedef struct {
    int32 dimSize;
    uInt8 globalData2[1];
    } TD1;
typedef TD1 **TD1Hdl;
typedef struct _LANGUAGE_ENTRY
        UCHAR           Language;
        PVOID             pTable;
    } LANGUAGE_ENTRY;
extern LTABLE LANGUAGE_TABLE
void *memPtr;
extern "C"{
MgErr CINRun(TD1Hdl globalData);
MgErr CINRun(TD1Hdl globalData)
    uInt16 usSize;
    LANGUAGE_ENTRY MyLanguages[2];
    usSize = 5576; //GlobalDataSize
    memPtr = malloc( usSize );
    memset( memPtr, 0, sizeof(memPtr) );
    MyLanguages[0].Language = ENGLISH;
    MyLanguages[0].pTable = (void*)LTABLE LANGUAGE_TABLE;
    MyLanguages[1].Language = 0;
    MyLanguages[1].pTable = 0;
    Initialize ( MyLanguages, memPtr);
    MoveBlock(memPtr, (*globalData)->globalData2, usSize);
    return noErr;

Hi Victor,
I think the reason LabVIEW is crashing is because it isn't happy with the pointer you are giving it or the way you are giving it. I personally am not that familiar with C code, but my suggestion would be to use the malloc function. The LabVIEW help on the Memory Manager (Fundamentals » Calling Code Written in Text-Based Programming Languages » Concepts » CINs » LabVIEW Manager Routines) is a great place to start. It describes the functions to use to pass pointers as parameters and links to the Memory Manager page which talks about Using Pointers for Dynamic Memory Allocation. You could also create the array and specify the memory to use for it rather than the other way around and then move the array there. I hope this helps!
Stephanie

Similar Messages

  • Initialization Blocks -- Practical Example.

    I am curious about I topic that I have just recently learned about and would like to post it for discussion.
    Does anyone know of a practical example of the use of an initialization block? Why would one want to use an initialization block? What can be accomplished with an initialization block that you cannot accomplish with a constructor that doesn't accept any parameters?

    Hi Robert,
    Initializers are used in initialization of object and classes. They can also be used to define constants in Interfaces.
    Here I am explaning by corelating the Constructor with Initialization.
    In what order is initialization code executed? What should I put where ?
    Instance variable initialization code can go in three places within a class:
    In an instance variable initializer for a class (or a superclass).
    class C {
    String var = "val";
    In a constructor for a class (or a superclass).
    public C() { var = "val"; }
    In an object initializer block. This is new in Java 1.1; its just like a static initializer block but without the keyword static.
    { var = "val"; }
    The order of evaluation (ignoring out of memory problems) when you say new C() is:
    1.Call a constructor for C's superclass (unless C is Object, in which case it has no superclass). It will always be the no-argument constructor, unless the programmer explicitly coded super(...) as
    the very first statement of the constructor.
    2.Once the super constructor has returned, execute any instance variable initializers and object initializer blocks in textual (left-to-right) order. Don't be confused by the fact that javadoc and
    javap use alphabetical ordering; that's not important here.
    3.Now execute the remainder of the body for the constructor. This can set instance variables or do anything else.
    In general, you have a lot of freedom to choose any of these three forms. My recommendation is to use instance variable initailizers in cases where there is a variable that takes the same value
    regardless of which constructor is used. Use object initializer blocks only when initialization is complex (e.g. it requires a loop) and you don't want to repeat it in multiple constructors. Use a constructor
    for the rest.
    Here's another example:
    Program:
    class A {
    String a1 = ABC.echo(" 1: a1");
    String a2 = ABC.echo(" 2: a2");
    public A() {ABC.echo(" 3: A()");}
    class B extends A {
    String b1 = ABC.echo(" 4: b1");
    String b2;
    public B() {
    ABC.echo(" 5: B()");
    b1 = ABC.echo(" 6: b1 reset");
    a2 = ABC.echo(" 7: a2 reset");
    class C extends B {
    String c1;
    { c1 = ABC.echo(" 8: c1"); }
    String c2;
    String c3 = ABC.echo(" 9: c3");
    public C() {
    ABC.echo("10: C()");
    c2 = ABC.echo("11: c2");
    b2 = ABC.echo("12: b2");
    public class ABC {
    static String echo(String arg) {
    System.out.println(arg);
    return arg;
    public static void main(String[] args) {
    new C();
    Output:
    1: a1
    2: a2
    3: A()
    4: b1
    5: B()
    6: b1 reset
    7: a2 reset
    8: c1
    9: c3
    10: C()
    11: c2
    12: b2
    When should I use constructors, and when should I use other methods?
    The glib answer is to use constructors when you want a new object; that's what the keyword new is for. The infrequent answer is that constructors are often over-used, both in when they are called and
    in how much they have to do. Here are some points to consider
    Modifiers: As we saw in the previous question, one can go overboard in providing too many constructors. It is usually better to minimize the number of constructors, and then provide modifier
    methods, that do the rest of the initialization. If the modifiers return this, then you can create a useful object in one expression; if not, you will need to use a series of statements. Modifiers are
    good because often the changes you want to make during construction are also changes you will want to make later, so why duplicate code between constructors and methods.
    Factories: Often you want to create something that is an instance of some class or interface, but you either don't care exactly which subclass to create, or you want to defer that decision to
    runtime. For example, if you are writing a calculator applet, you might wish that you could call new Number(string), and have this return a Double if string is in floating point format, or a Long if
    string is in integer format. But you can't do that for two reasons: Number is an abstract class, so you can't invoke its constructor directly, and any call to a constructor must return a new instance
    of that class directly, not of a subclass. A method which returns objects like a constructor but that has more freedom in how the object is made (and what type it is) is called a factory. Java has no
    built-in support or conventions for factories, but you will want to invent conventions for using them in your code.
    Caching and Recycling: A constructor must create a new object. But creating a new object is a fairly expensive operation. Just as in the real world, you can avoid costly garbage collection by
    recycling. For example, new Boolean(x) creates a new Boolean, but you should almost always use instead (x ? Boolean.TRUE : Boolean.FALSE), which recycles an existing value rather than
    wastefully creating a new one. Java would have been better off if it advertised a method that did just this, rather than advertising the constructor. Boolean is just one example; you should also
    consider recycling of other immutable classes, including Character, Integer, and perhaps many of your own classes. Below is an example of a recycling factory for Numbers. If I had my choice, I
    would call this Number.make, but of course I can't add methods to the Number class, so it will have to go somewhere else.
    public Number numberFactory(String str) throws NumberFormatException {
    try {
    long l = Long.parseLong(str);
    if (l >= 0 && l < cachedLongs.length) {
    int i = (int)l;
    if (cachedLongs[i] != null) return cachedLongs;
    else return cachedLongs[i] = new Long(str);
    } else {
    return new Long(l);
    } catch (NumberFormatException e) {
    double d = Double.parseDouble(str);
    return d == 0.0 ? ZERO : d == 1.0 ? ONE : new Double(d);
    private Long[] cachedLongs = new Long[100];
    private Double ZERO = new Double(0.0);
    private Double ONE = new Double(1.0);
    We see that new is a useful convention, but that factories and recycling are also useful. Java chose to support only new because it is the simplest possibility, and the Java philosophy is to keep the
    language itself as simple as possible. But that doesn't mean your class libraries need to stick to the lowest denominator. (And it shouldn't have meant that the built-in libraries stuck to it, but alas, they
    did.)
    I have a class with six instance variables, each of which could be initialized or not. Should I write 64 constructors?
    Of course you don't need (26) constructors. Let's say you have a class C defined as follows:
    public class C { int a,b,c,d,e,f; }
    Here are some things you can do for constructors:
    1.Guess at what combinations of variables will likely be wanted, and provide constructors for those combinations. Pro: That's how it's usually done. Con: Difficult to guess correctly; lots of
    redundant code to write.
    2.Define setters that can be cascaded because they return this. That is, define a setter for each instance variable, then use them after a call to the default constructor:
    public C setA(int val) { a = val; return this; }
    new C().setA(1).setC(3).setE(5);
    Pro: This is a reasonably simple and efficient approach. A similar idea is discussed by Bjarne Stroustrop on page 156 of The Design and Evolution of C++. Con: You need to write all the little
    setters, they aren't JavaBean-compliant (since they return this, not void), they don't work if there are interactions between two values.
    3.Use the default constructor for an anonymous sub-class with a non-static initializer:
    new C() {{ a = 1; c = 3; e = 5; }}
    Pro: Very concise; no mess with setters. Con: The instance variables can't be private, you have the overhead of a sub-class, your object won't actually have C as its class (although it will still be an
    instanceof C), it only works if you have accessible instance variables, and many people, including experienced Java programmers, won't understand it. Actually, its quite simple: You are defining a
    new, unnamed (anonymous) subclass of C, with no new methods or variables, but with an initialization block that initializes a, c, and e. Along with defining this class, you are also making an
    instance. When I showed this to Guy Steele, he said "heh, heh! That's pretty cute, all right, but I'm not sure I would advocate widespread use..."
    4.You can switch to a language that directly supports this idiom.. For example, C++ has optional arguments. So you can do this:
    class C {
    public: C(int a=1, int b=2, int c=3, int d=4, int e=5);
    new C(10);
    Common Lisp has keyword arguments as well as optional arguments, so you can do this:
    (defstruct C a b c d e f) ; Defines the class
    (make-C :a 1 :c 3 :e 5) ; Construct an
    instance
    What about class initialization?
    It is important to distinguish class initialization from instance creation. An instance is created when you call a constructor with new. A class C is initialized the first time it is actively used. At that time,
    the initialization code for the class is run, in textual order. There are two kinds of class initialization code: static initializer blocks (static { ... }), and class variable initializers (static String var =
    Active use is defined as the first time you do any one of the following:
    1.Create an instance of C by calling a constructor;
    2.Call a static method that is defined in C (not inherited);
    3.Assign or access a static variable that is declared (not inherited) in C. It does not count if the static variable is initialized with a constant expression (one involving only primitive operators (like +
    or ||), literals, and static final variables), because these are initialized at compile time.
    Here is an example:
    Program:
    class A {
    static String a1 = ABC.echo(" 1: a1");
    static String a2 = ABC.echo(" 2: a2");
    class B extends A {
    static String b1 = ABC.echo(" 3: b1");
    static String b2;
    static {
    ABC.echo(" 4: B()");
    b1 = ABC.echo(" 5: b1 reset");
    a2 = ABC.echo(" 6: a2 reset");
    class C extends B {
    static String c1;
    static { c1 = ABC.echo(" 7: c1"); }
    static String c2;
    static String c3 = ABC.echo(" 8: c3");
    static {
    ABC.echo(" 9: C()");
    c2 = ABC.echo("10: c2");
    b2 = ABC.echo("11: b2");
    public class ABC {
    static String echo(String arg) {
    System.out.println(arg);
    return arg;
    public static void main(String[] args) {
    new C();
    Output:
    1: a1
    2: a2
    3: b1
    4: B()
    5: b1 reset
    6: a2 reset
    7: c1
    8: c3
    9: C()
    10: c2
    11: b2
    I hope the above will help you.
    Thanks
    Bakrudeen

  • Session variable and initialization block issues

    We are using OBIEE 10.1.3.3 and utilizes built in security features. (No LDAP or other single sign on). The user or group names are not stored in any external table. I have a need to supplement Group info of the user to the usage tracking we implemented recently as the NQ_LOGIN_GROUP.RESP column contains username instead of group name. So I created a session variable and associated with a new initialization block and also had a junk default value set to the variable. In the initialization block, I wrote the following query and as a result it inserted correct values into the table when the TEST button was clicked from the initialization block form.
    insert into stra_login_data (username, groupname, login_time) values ('VALUEOF(NQ_SESSION.USER)', 'VALUEOF(NQ_SESSION.GROUP)', SYSDATE)
    My intention is to make this execute whenever any user logs on. The nqserver.log reports the following error and it doesn?t insert values into the table.
    [nQSError: 13011] Query for Initialization Block 'SET_USER_LOGIN_BLOCK' has failed.
    [nQSError: 23006] The session variable, NQ_SESSION.USER, has no value definition.
    [nQSError: 13011] Query for Initialization Block 'SET_USER_LOGIN_BLOCK' has failed.
    [nQSError: 23006] The session variable, NQ_SESSION.GROUP, has no value definition.
    When I changed the insert statement as below, this does get populated whenever someone logs in. But I need the values of GROUP associated with the user as defined in the repository.
    insert into stra_login_data (username, groupname, login_time) values ('TEST_USER', TEST_GROUP', SYSDATE)
    Could someone help me out! As I mentioned above, I need the GROUP info into the usage tracking. So, if there is another successful approach, could you please share?
    Thank you
    Amin

    Hi Amin,
    See [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=3376946&#3376946]. You can't use the GROUP session variable in an Init Block unless it has been seeded from an Init Block first. There isn't an easy solution for what you want, but here are some options:
    1) Create a copy of your User => Groups assignments in your RPD in an table so you can use it in your Usage Tracking Subject Area. But this means you will have to replicate the changes in two places so it's not a good solution.
    2) As the GROUP session variable is populated when you login you could theoretically use it a Dashboard and pass it a parameter to write the value to the database. But as I am not sure how can you make fire only once when the user logins it sounds like a bad idea.
    3) Move your User => Groups assignments from your RPD to a DB table. Use OBIEE Write Back or something like Oracle APEX to maintain them.
    I think 3) is the best solution to be honest.

  • Can you prevent a block of memory from being swapped?

    I'm wondering if there's a way to "lock" a section of memory in Java so that it will not be written out to the swap file by the OS.
    Let's say you're writing a client application that will connect to a server, and allow the user (after authentication, of course) to download sensitive information to the client machine and view it. Because the client machine may be in an unsecure environment (i.e. public library terminal, cybercafe, etc), it is desirable to ensure that no trace of the information remains, even in the swap file. The data in question is largely text, so it wouldn't be more than a few hundred KB, therefore I can't imagine it would be a problem to reserve this memory (i.e. it's not like we're starving out other applications running on the same client machine by reserving ALL physical memory).
    Basically I'm looking for something in the API that lets me say to the OS: "don't swap out this block of memory, no matter what". Is there a way to do this?
    I found this in the bug database but it doesn't sound entirely like what I'm looking for (and it's marked as "will not fix" anyway):
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4852696

    The simple answer is "no".
    This is a valid concern about the use of crypto libraries in Java.
    Because Java has garbage collection, and can copy anything to any memory region during garbage collection, in practice the crypto library writers choose not to bother about non-swapped memory.
    Implementing non-swapped memory in some operating systems like Windows is not a simple task: I believe that in Windows you need to write a device driver and a Windows Service, like the "Protected Storage Service" that you can find in Windows. The "Protected Storage" is not very used in Windows - it implements only the CryptEncryptData and CryptDecryptData APIs. The real crypto work is done in normal memory, if you check the CryptoAPI Providers that come with Windows.

  • Override the GROUP system session variable within an initialization block

    Hi,
    We're trying to override the GROUP system session variable and having no luck. We've created an initialization block to return the semicolon-separated list we're looking for but when a user logs in, it seems like it is overridden with the default. When we change the name of the variable to something other than GROUP, it works great and we get the expected value. Is there something we're missing with overriding the particular value?
    Here is the query we're attempting to use for the variable:
    Select 'GROUP',
       ListAgg(OBI_ROLE, ';') Within Group (Order By USER_EMAIL)
    From CSS_OBI_USER_ROLE
    Where USER_EMAIL In (':USER')
    We also tried:
    Select
       ListAgg(OBI_ROLE, ';') Within Group (Order By USER_EMAIL)
    From CSS_OBI_USER_ROLE
    Where USER_EMAIL In (':USER')
    We made sure that the variable name was 'GROUP' as well.
    Not sure if it's important to note or not, but the returned values do correspond to existing applications groups already defined within OBI.
    Any help is greatly appreciated!
    Thanks,
    Jas

    since you have value as OpsReviewViewer;OpsReviewAuthor:BIAdministrator
    my not help row wise setting
    try to handle ; part using sql query so that you get those number of records to use row-wise
    so this
    Select 'GROUP',
       ListAgg(OBI_ROLE, ';') Within Group (Order By USER_EMAIL)
    From CSS_OBI_USER_ROLE
    Where USER_EMAIL In (':USER')
    with row-wise show work

  • Calling of function in initialization block

    Hi,
    Could anyone please tell whether calling of function in initialization block occurs in what manner?
    Please answer by selecting from below options:
    Option 1. SEQUENTIAL (e.g USER 1 & USER 2 concurrently logged in, Now USER 1 calls the function through initialization block first and after completion releases it for USER 2)
    Option 2 THREADING (e.g USER 1 & USER 2 concurrently logged in, Now USER 1 and USER 2 calls the function through initialization block simultaneously)
    Regards,
    Varun
    Edited by: Varun Malhotra on 17-Dec-2009 01:07
    Edited by: Varun Malhotra on 17-Dec-2009 01:57

    Hi Varun,
    Based upon my previous Dashboard Prompt Execution Order, most things in OBIEE happen asynchronously.
    That being said, I would think that your second scenario is the most likely. If both users login at the same time, the function gets called simultaneously (or close to it).
    Hope that helps.
    -Joe

  • Resizing a block of memory

    I need to be able to resize a block of memory. Is there a function in java simmilar to realloc in C ?

    I need to be able to resize a block of memory. Is
    there a function in java simmilar to realloc in C ?Java memory management is completely different from C...
    no untyped memory allocation is possible, so there's nothing
    quite like malloc or realloc.
    The closest thing there is, is to use byte arrays... and when
    you need to 'resize' such an array, to allocate a new (bigger)
    byte array, and then copy contents from existing one, usually using
    System.arraycopy(). So, something like:
    static byte[] realloc(byte[] orig, int newSize)
    if (newSize <= orig.length) {
    return orig;
    byte [] newArray = new byte[newSize];
    System.arraycopy(orig, 0, newArray, 0, orig.length);
    return newArray;

  • HOW TO FIND UNUSED initialization blocks  IN OBIEE RPD

    Hi Gurus,
    I have a task to remove unused initialization blocks and subject areas from RPD.
    how to find them ?how to check whether any reports are using these initialization blocks?
    Please reply me. I need to complete this task.Pls help me
    Regards,
    siva

    Unused Subject Areas -
    Use Catalog Manger - Tools - Create a report to with report name and subject area. You will get what are being used.
    Use RPD - Tools - Utilities export your RPD to CSV and check the Subject area.
    Compare both and remove unwanted subject areas.
    Initialization Blocks - We do not use these blocks directy but use Variables that are associated with it. Go to RPD - online - Mangesession - You will see the Variables tab in the window which give list of all variables thats get initialised with the session. --- Session Blocks
    Use Report Tools - Query Repository for searching.
    Try like this.

  • OBIEE 11g  Initialization Block problem with WLS User

    Hello,
    a brief description of my environment:
    - I have one machine with all OBIEE 11.1.1.6.2 components (build 120604.0813 BP1 64bit) and Oracle Database 11gR2;
    - In a separate machine I have the OID - Oracle Internet Directory where I have all business users with access to OBI Presentation Services;
    - In Weblogic Console I created a user named "weblogic" and this one is the administrator of all BI environment, this user is member of BIAdministrator and Administrators group, also this user is used to perform the communication between Fusion Middleware and Weblogic;
    - In weblogic Console I created a second user named "init_test" and he have the BIAuthor Role like the users that come from OID;
    - I have no problem logging in with all users OID and weblogic.
    Problem:
    - I created a simple Initalization Block and a variable to contain the result of the follow sql: SELECT region FROM adm_test_region WHERE city='Lisboa'
    - Initialization Blocks for Session variables are not working for "weblogic" user. For all other users everything is working as expected (users from OID and "init_test").
    Question:
    - There is any restriction in terms of Initialization Blocks for Session variables regarding the user that is linking Oracle Fusion Middleware with Oracle Weblogic?
    Thank you in advance,

    950780 wrote:
    Hello,
    a brief description of my environment:
    - I have one machine with all OBIEE 11.1.1.6.2 components (build 120604.0813 BP1 64bit) and Oracle Database 11gR2;
    - In a separate machine I have the OID - Oracle Internet Directory where I have all business users with access to OBI Presentation Services;
    - In Weblogic Console I created a user named "weblogic" and this one is the administrator of all BI environment, this user is member of BIAdministrator and Administrators group, also this user is used to perform the communication between Fusion Middleware and Weblogic;
    - In weblogic Console I created a second user named "init_test" and he have the BIAuthor Role like the users that come from OID;
    - I have no problem logging in with all users OID and weblogic.
    Problem:
    - I created a simple Initalization Block and a variable to contain the result of the follow sql: SELECT region FROM adm_test_region WHERE city='Lisboa'
    - Initialization Blocks for Session variables are not working for "weblogic" user. For all other users everything is working as expected (users from OID and "init_test").
    Question:
    - There is any restriction in terms of Initialization Blocks for Session variables regarding the user that is linking Oracle Fusion Middleware with Oracle Weblogic?
    Thank you in advance,When you say they are not working:
    1) You are using the session variables in a data filter in the RPD and for weblogic, the filter does not get applied?
    2) When trying to display the value of the sessoin variable in an analysis query, it errors out saying no value?
    As a BI Administrator, no data filters gets applied to the reports from the RPD unless you explicitly add them in the front end to the reports.
    You can also open the RPD in online mode, and go to sessions and kill everything, login using weblogic and monitor the sessions to see if a session is being created and the list of variables getting intilialized upon weblogic's entry into analytics.
    Thanks,
    -Amith.

  • RPD: How to use multiple-value variables in initialization blocks ?

    Hi all,
    I have a set of initialization blocks required for authentication, two of which are running row-wise. The first one sets a multi-valued variable, and the second one uses this variable.
    Or at least, should use, because it actually fails. The NQServer log says
    [nQSError: 13011] Query for Initialization Block 'My_Init_Block_2' has failed.
    [nQSError: 23006] The session variable, NQ_SESSION.MY_VAR_1, has no value definition.
    My first variable is initialized in a basic row-wise initialization block. What's more, if I say my 2nd block isn't required for authentication, and I read in a narrative the contents of my first variable, it contains the set of value I expect it to have.
    can anybody please advise?
    thanks in advance!
    Cedric..

    There is an example in the OBIEE Server Administration manual that looks very similar to your code except that the whole of the valueof string is quoted:
    select
    NAME, VALUE from RW_SESSION_VARS
    where USERID='VALUEOF(NQ_SESSION.USERID)' {code}<br /><br /><br /><br />Pete                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to use session variables in initialization blocks

    Hello,
    I want to use a session variable in a initialization block. Here is what I was doing to see this working
    I created a init block called name_parameter and associated with a variable target named name_parameter_v. The init string for this block is "select 'Hello' from dual".
    i created another init block name_parameter2 and associated with a variable target named name_parameter2_v. The init string is "select :name_parameter_v from dual".
    I have selected name_parameter in the edit execution precedence for name_parameter2.
    The result set is empty. Could you please explain why I am not able to see Hello when i test name_parameter2.
    Thanks.

    to obtain the value contained in a session variable this is the syntax.
    select 'VALUEOF(NQ_SESSION.VARIABLE_NAME)' from dual
    mind the single quotes, they are necessary

  • Row wise initialized variable in WHERE clause of other initialization block

    Hi,
    i've following problem.
    I've created a initialization block (called A) that initializes a row wise session variable.
    Ex: SELECT X,Y from Z
    Select statement returns 3 rows (it's a row wise initialization block!!!)
    Then i want to create another initialization block that uses in its WHERE cluase the previous row wise variable
    Ex: SELECT W,T from R where F = VALUEOF(NQ_SESSION.A)
    I have following error: DB2-UDB: SQL10104 Token ; was not valid, valid tokens: ....
    I believe that this error is caused by the fact that VALUEOF(NQ_SESSION.A) is translated by OBIEE in IN (a list of values separated by ; and not by ,).
    Can you suggest me a solution?
    Thanks
    Giancarlo
    P.S. I'm using OBIEE 10G

    You could avoid this by rewriting it as
    select w, t
    from r
    where f in (select y from z where x = 'A')
    Regards,
    Robert

  • Row-Wise Session Variable Initialization Block (Max Rows)

    Hi, we have a problem with Row-Wise Session Variable.
    We'll try to implemented the security with a External Query and a Row-Wise Initialization Block. But when we'll try to open the Web Obiee and the rows of result of the query is more than 3000 rows, the browser is broken. The access is very slowly.
    When the result of Query to Row-Wise Variable is more than 3000 rows and we'll try to open the Web Obiee, we have to close NQServer.EXE process of Obiee Server.
    Is there a best practise or a limit rows in the Row-Wise Initialization Block?.
    Thanks.

    You're Right, the people can't be in 3000 groups.
    Is possible I don't explain my problem correctly.
    We use this Row-Wise Variable for implement Data Level Security. .
    For Example :
    I have a fact table with Offices and Office's Sales.
    And each Obiee User can see many Offices according to their level of security.
    I want filter the fact table using a external SQL table implemented in a Session Row-Wise Variable and a User can have X Offices (In the worst case, 3000 Offices).

  • Error in repository variables use in initialization blocks on Solaris 64

    Hello,
    I noticed a strange problem on OBIEE 10.1.3.4.1 installed on Solaris 64: it seems that it cannot convert the string 'VALUEOF(+repository variable+)' into the actual value of the parameter.
    For example, this is an initialization block to populate current fiscal project date variables (from NQQuery.log):
    +++Administrator:fffe0000:fffe0c3e:----2010/04/12 12:29:29
    -------------------- An initialization block named 'Current Project Variables', on behalf of a Session Variable, issued the following SQL query:
    select C.MCAL_PERIOD_NAME as MCAL_PERIOD_NAME
    ,C.MCAL_PERIOD as MCAL_PERIOD
    ,C.MCAL_PER_NAME_QTR as MCAL_QTR_NAME
    ,C.MCAL_PER_NAME_YEAR as MCAL_YEAR_NAME
    ,PAGO.MCAL_PERIOD_NAME as MCAL_PERIOD_AGO
    ,QAGO.MCAL_PER_NAME_QTR as MCAL_QTR_AGO
    from
    VALUEOF(OLAPTBO).W_MCAL_PERIOD_D C
    ,VALUEOF(OLAPTBO).W_MCAL_PERIOD_D PAGO
    ,VALUEOF(OLAPTBO).W_MCAL_QTR_D QAGO
    where C.adjustment_period_flg = 'N'
    and C.W_CURRENT_MCAL_PERIOD_CODE = 'Current'
    and C.MCAL_CAL_WID=valueof(NQ_SESSION.MCAL_CAL_WID_PROJ)
    and C.mcal_period_ago_wid= pago.row_wid
    and C.mcal_qtr_ago_wid=qago.row_wid
    and c.mcal_cal_wid= pago.mcal_cal_wid
    and c.mcal_cal_wid=qago.mcal_cal_wid
    Returned 0 rows. Query status: Failure
    As you can see, VALUEOF(OLAPTBO) should be substituted by the repository session variable, but instead it seems that the BI Server simply issues to the database the initialization block statement as-is!
    Any idea?
    Thanks in advance for the help,
    Vincenzo Maggio

    As a test, I tried to add the filter to the individual user first. In the Repository I went under Manage-Identity. Clicked on my User and hit permissions button.
    I created the filter of:
    "Testing and Assessments"."Student SOL Testing"."Teacher Employee Number" = VALUEOF(NQ_SESSION."VAR_EMPLOYEE_NUMBER")
    That didn't work. I still see all data when I log in as that user. If I hard-code it to the users Employee Number (see below), it does work. What now?
    "Testing and Assessments"."Student SOL Testing"."Teacher Employee Number" = '19983758'

  • Instance initializer and static initializer blocks

    Hi guys,
    I read about the above mentioned in the JLS and also in a book before, but I still don't quite understand, what is the use of these. I sort of have a rough idea, but not exactly. I mean, what is the purpose of the instance initializer and static initializer blocks, how can it be useful? I understand I can execute pieces of code that will initialize instance and static variables accordingly, but how is it different then to using a constructor to initialize these fields? Are these pieces of code executed before any constructor is executed, or when otherwise?
    Sorry for my noob, I'm learning.
    PR.

    Static initializers are useful for initializing a class when the initialization is more complex than simply setting a single variable, or when that initialization can throw a checked exception.
    public class Foo {
      private static final Bar bar;
      static {
        try {
          bar = new Bar();
          bar.doSomeInitializationStuff();
        catch (SomeCheckedExceptionThatBarThrows e) {
          throw new ExceptionInInitializerError(e);
    }Here we could not do the two-step new Bar() + doSomeInit() stuff in the line where we declare the bar variable. Additionally, assuming that one or both of those can throw a checked exception, we could not do that on the declaration line; we need the static initializer to wrap that in the appropriate unchecked exception.
    This allows us to do more complex class initialization when the class is loaded than we could do with a simple variable initialization.
    Instance initializers are useful if you want to perform the same steps in every constructor and don't want to have to repeat the code in each constructor. Instance initializers are executed as the first step of each constructor (or maybe it's after any super() calls, I forget).

Maybe you are looking for

  • Send as email doen't work in my Acrobat 9 Pro

    I use the desktop version of Windows Live Mail but my Acrobat 9 Pro is not able to connect with it to be able to send as email an open pdf. Can anyone help? Many thanks in advanced. Francisco De La Chesnaye [email protected]

  • How can I get a Album with multiple artists to appear as a single album with all of the tracks?

    How can I get a Album that contains multiple artists to appear as a single album with multiple tracks?  Also when I sync iTunes with my iPhone or iPad the Album appears as multiple albums with each artist.  The Album title is the same on each of the

  • IPad 2 Wifi Problems after upgrading to iOS 6

    I Updated my iPad 2 to ios6 then day iOS6 was released, ever since then i have been unable to connect to the wifi. I've reset the network setting and the wifi works for about 5 minutes until i go on any apple app ( itunes, app store, maps etc). I've

  • HP Recovery Disc Creation Error

    I just bought a new HP Pavilion 500 desktop AMD Elite Quad Core A8-6500 8GB memory 2TB hd, and I am trying to create recovery discs as recommended by the system using DVD+R (Memorex Brand) discs to complete this process. The program comes up, checks

  • Rework process order without price calculation

    Hi friends, Our client at present rework process order done through edit or change or add the a BOM manually from the T.code COR1, because of that my costing has been changed hugely it will hit my price diff account, After Costing run price will chan