Global variable in debugging

Hi,
I want to debug some procedures in a package and I define some global variable in the package body
When procedure exits,the global variable can't be keep,when another procedure starts this variable always be set to null.
How can I keep its value which is generated by procedure,then it can be seen/used by another procedure during DEBUG ?
Thanks
Edited by: [email protected] on Feb 8, 2010 12:26 AM

When debugging, a new, special debugging session is opened. So logically your variable will not be conserved between runs.
I think of 2 possibilities: calling the variable's package from within the other procedure (or call both from a wrapper procedure and debug that) so the variable will be set in the same session, or don't debug (rather just call both within a worksheet).
Have fun,
K.

Similar Messages

  • Global variable in BR

    Hi,
    I have created one global variable (run time prompt) in which Budget admin will pass the scenario member parameter and I have also created a local run time prompt in one rule(which will pick up the scenario member from the input form POV with which the rule attached to) and inside the rule I am checking one condition that if the global variable value is equal to the local variable, then it will execute one calculation.
    As I want that the modify priviledge to change the value of global variable will be only with Budget Admin, so I have defined that at the time of Global variable creation. I chose Member from scenario dimension with the default value 'Budget'.
    I have hidden the local variable in input form. I have set 'run on save' with the 'Use Members on Data form' and 'Hide' option. The default value for local variable is also 'Budget'.
    As I have not hidden the global variable, so at save, pop up coming for the global variable. My problem is that, if I do not hide the global variable, then other user can modify the value, so my purpose is defeated.Otherwise rule is running ok.
    And If I hide the variable, then error is coming "The following value is not valid for the run time prompt it is entered for: ."
    Not understanding what is missing here. Can you please suggest the relevant solution/work around...
    Thanks & Regards.

    Hi John,
    Thanks for the reply and suggestion. But,actually my purpose was to match the budget-admin's scenario with the user-input form's scenario (and depending upon that we will pick up other member intersections and do the calculation for those combination only. So, two set of BR execution seperately will not solve our problem.
    Meanwhile, I tried hardcoding the global variable for debugging, keeping only the local variable picking value from input form. Now getting error that value is not valid for prompt as below---
    "The following value is not valid for the run time prompt it is entered for: ."
    Is my local variable not picking any value from input form....
    Can you please put some light on the issue?
    Thanks & Regards.

  • Set file name by global variable

    Hi,
    I am trying to load data from excel file. I have created batch job with global variable $GV_FileName. When I set a global variable value in a script inside Workflow the data load successfully. When I set a global variable value as a job property I receive the error: "The variable <$GV_FileName> of the is empty. Please initialize the variable to a valid value." But in  debug mode I see that the variable is not empty.
    Thanks in advance.
    Lyudmila

    In the job -> properties -> Global Variables tab you set the default value. The actual value used is set when executing the job. Could it be that?

  • Global Variable in Progress Bar

    I have an existing labview code that is comprised of a main vi, which is the user GUI, and several (approx 70) sub vi's. I am trying to add a progress bar to the front screen (User GUI) that will immediately increment after it hits certain sections of code. I am doing this using a global variable to store the value of the current progress, and then attempting to write to the progress bar on the main screen after each incrementation. Is there a way to link the value of the main progress bar to the global variable so that it updates as soon as the value is incremented? The problem I am facing is that when I update the global variable in a subvi, the progress bar takes the value of the subvi after it is completed, skipping all the numbers in between. I realize this is because I am not correctly writing to the progress bar, but I am unsure how to do so. If this isn't a good method, does anyone have any suggestions?  
    For Example:
    Main Vi           SubVi1        SubVi2
    (1-4)                (5-8)             (8-12)
    Progress Bar: 1 2 3 4 8 12
    (I did try the Progress Bar Library NI provides, but I need a progress bar on the Front Panel, not a pop up, so I can debug while the code runs)
    Thanks- Adam
    Solved!
    Go to Solution.

    I'd go with a Action Engine to update the progress bar VIA vi server referance.  Here's an example using a AE I have for just this type of progress bar.
    If you haven't read Ben action engine nugget, it should be required, you can find it here
    By constructing a "resource module" (a special AE that holds a referance to the resource to act on)  after initializint the AE you can call any "method" on the resorce from any location in the application instance.  These babys really let you do some interesting things to the GUI from wherever the real actions is taking place.
    Jeff
    Attachments:
    Ex AE Slider.vi ‏15 KB
    Progress.vi ‏26 KB
    Progress Meth.ctl ‏11 KB

  • Issue with Global variable in FM

    Hi experts,
    I have created  two functional modules under same function group and declared the internal table (ITAB)as global variable ,
    i have populated the data to to  ITAB n first function module , and  These FM are used in a program , when i debug the program , the data is populated to 1st FM and but in  2nd function module the ITAB is null only internal table structure is available.
    please let me know the reason.
    Thanks NK

    thanks all, the program ( it also an FM)  ,which is calling the 2nd FM is in background mode, i think thats the reason ITAB values are not populated.
    i ts working fine with IMPORT/EXPORT but my lead says it is not advisable and they are obsolete in ECC 6.0,
    ---> declated iTAB as global variable.
    ---> call FM1 --populate itab
    call function " MAIN_FM" in update task.
       ---> fm2 cllaed in side MAIN_FM,   ( here values not populated)
    please suggest global variable not filled incase of background mode.
    thanks
    NK

  • How can I do the CNiReal64Vector as a global variable?

    My problem is with the CNiReal64Vector. Ive tried to define this vector as a global variable in the header file:
    public:
    NI::CNiReal64Vector plotData(50);
    but the debuger flushed error : Syntax error ´constant´.
    Of course,  I used usually square brackets:
     public:
    double plotData[50];
    Is it possible define the array of CNiReal64Vector as a global variable?
    Thank You.
    Best Regards
    Emta

    In the header (.h) file, declare the variable like this:
    extern NI::CNiReal64Vector plotData;
    In a source (.cpp) file, define the variable like this:
    NI::CNiReal64Vector plotData(50);
    This will cause the compiler to generate a single instance of the plotData global variable and a call to the CNiReal64Vector constructor that takes an integer that specifies the initial size. I believe that this is what you are trying to do.

  • Import/export to memory and global variables

    Hi,
    Im working on some functionality using import/export to memory. One of the statements is:
    import gf_memid_exit = g_exit_flag gf_memid_result = t352r from memory id 'ZREV_EXT'.
    Im using global variables to contain the cluster names. But this is not working. When I change the global variables into local variables, it works. It this normal? Because I would like to have global variables (even better I would like to have global constants) to declare in order to use them within the program.
    Any ideas?
    With regards,
    Mike

    Hi Mike...
    I think with import u can use global or local variables..in debug mode pl. check when u r using global variables..whether it is getting cleared or overwritten by some other values or not. Or try with global constants..it should work...
    Regards,
    Joy.

  • How can i find all global variable and parameters in a form?

    I don't know name of global variables and parameters,but i want get their name and value .
    how can i do? who can help me?
    Thank you.
    Daniel Liang
    2007.1.19

    no problem. As Francois said you can't do it programmatic in runtime.
    But when you use the debug-mode you can see each global with name and value.
    By the way: It's not good to not know all the globals in your application. This is one of the most important things you have to write down for your app. Create a wiki for such informations, so that all developer can share their information.

  • Quick question, where to put global variables

    Very quick question:
    where is the best place to put global variables,
    (e.g. a flag that turns on debug mode)
    if they are needed by the entire application?
    I'm guessing they should be placed in their own class.
    But should I make them public static final constants,
    and just do Globals.MYCONSTANT
    OR should i do "implements Globals" in all my other classes?
    The first way seems simpler and more logical,
    but in the examples for JSDT, they use the second technique.
    Any thoughts?
    thanks! =)

    I would suggest either creating a properties file for your globals, or adding them to the system properties at startup. Placing items like debugging tags in your code means that you have to change the code, recompile, and rejar before your change is implemented. Using system properties means that you simply have to change your command-line options (i.e., from -Dmyapp.debug=true to -Dmyapp.debug=false).
    Shaun

  • Change source path in batch Job in global variable in data services

    Hi Experts,
    my organization has created job in data services 3.2 to cleanse the data reading from excel flat files. the folder path was store in the global variable(I think) and now they have changed the directories hence is it throwing me below error.
    Error, Input file  does not exist please confirm existence and restart job, 16 ) >
    failed, due to error <50316>: <>>> Error, Input file  does not exist please confirm existence and restart job>. I want to update the folder path. I am sure it would be easy but I am very new to BODS.
    (12.2) 07-15-14 16:10:08 (14232:12656)  PRINTFN: > 'JOB DEBUG' : '>>> Sleeping for 35.000000 seconds...  '
    (12.2) 07-15-14 16:10:43 (14232:12656)  PRINTFN: > 'JOB DEBUG' : '>>> Waking up......  '
    (12.2) 07-15-14 16:10:43 (14232:12656)  PRINTFN: > 'JOB DEBUG' : 'Starting the timer loop number 6...'
    (12.2) 07-15-14 16:10:43 (14232:12656) WORKFLOW: Work flow <WF_Metadata_Files> is started.
    (12.2) 07-15-14 16:10:43 (14232:12656)  PRINTFN: > 'JOB DEBUG' : '>>> $G_FILENAME_IN : ALL_Metadata_SALES.xls...'
    (12.2) 07-15-14 16:10:43 (14232:12656)  PRINTFN: > 'JOB DEBUG' : '>>> looking for input file name
                                                     \\infra\finance\production\sales\Metadata\ALL_Metadata_SALES.xls'
    (12.2) 07-15-14 16:11:08 (14232:12656)  PRINTFN: > 'JOB DEBUG' : '>>>  Input file Name is '
    (12.2) 07-15-14 16:11:08 (14232:12656)  PRINTFN: > 'JOB ERROR' : '>>> Error, Input file  does not exist please confirm existence and restart job'
    I want to update the folder path\\infra\finance\production\sales\Metadata\ALL_Metadata_SALES.xls to \\Home\BIData\finance\production\sales\Metadata\ALL_Metadata_SALES.xls
    when i investigated WF_Metadata_files i saw there is a global called INPUT_DIR i assume I have to change the path there. I tried to find old directory in the batch job but i cant find it and even When i give value to global variable it is still pointing to old path.
    Can anybody please help me.
    Thanks
    Tim

    Hi Tim,
    If having specified the value in the global variable it is still pointing to the old path there can be a couple of scenarios applicable
    1. There is a different global varaiable being used for the file path
    2. The filepath is hardcoded in the file-format or Excel file definition despite the declaration of the global variable.
    Are you getting this error when running a dataflow within this workflow or in a script? It will be better to run the workflow in debug mode and look through the stages to find out where exactly in the workflow it fails.
    kind regards
    Raghu

  • Setting global variable that are static but I want them to change

    I'm trying to set a global variable so I can let the user change the state in the Plugin Manager.  I've created a checkbox (in PluginManager.lua)
    f:checkbox {
         title = 'Show HTTP response',
         value = _G.showHttpResponse,
    that references the global variable (in PluginInit.lua)
    _G.showHttpResponse = true
    The state of the checkbox accurately reflects the initial value as set.  Everything seems fine but after unchecking the checkbox, the value is always true in my plugin.  I expected _G.showHttpResponse to change to reflect the setting in the checkbox.
    What have I overlooked?  Is this only for setting static globals?
    Abe

    Reading the Lightroom SDK manual seemed to indicate that using globals would be the way to go.  I'm thinking that it is only appropriate for static text.
    I've taken both your suggestions and have used the plugin preferences.  I didn't think you could get and set them in the Plugin Manager but they work just fine.  Now I set my debug flags in the plugin manager screen and they are available to the plugin and are persisted as well.
    Thanks for the suggestion.  Everything is working.

  • Question about global variables in Netbeans 4.1's debugger

    so i can see the local variables, great.
    how do i display the global variables when im debugging? searched help, nothing, searched the netbeans site, nothing.
    anyone know?

    I haven't used the 4.1 version of the debugger (I can't get it to work on a single file/class) but under 3.6 you just put the cursor over them and the values is in the tooltip.

  • Programmatically select global variable object

    Hello all.
    I have a rookie question that may have an easy answer (or perhaps you can direct me to a different method which is fine too).  I’m using a global variable in an instance where it’s controlled by a parent VI and read by multiple children VIs.  The global variable contains Boolean switches, each with a specific name.  
    If possible, I’d like to make the ‘child VI’ more generic and programmatically flexible so that I don’t have unique children.  That way, instead of four children, I just have one (makes debugging easier).  Here’s the crux of my question:  selecting which object is assigned to the global variable on the block diagram is done by clicking on it with the mouse – can I instead do that programmatically?
    More specifically, when using the global in children VIs (as instructed in the “Creating Global Variables” section of the help files), you can select the global vi and add it to your block diagram.  The next step is to select the front panel object to associate the placed variable with the proper data (you do this by mouse clicking the node you just created – see the attached image).  My question is, can I select the object associated with the placed node programmatically instead of needing to mouse click on it?
    Cheers!
    Attachments:
    ForumEX files.zip ‏31 KB

    Steve Chandler wrote:
    There is a better way of doing this as the others have already pointed out.
    Even Single Process Shared Variables with their API Interface would be better as Globals:
    Using this VI to read the variables gives you the ability to reference them with a string (Link to Variable). You may have to add an additional variable in future versions of your code, where you just need to add the new variable to the project and pass the string to the VI without changing the code. Single Process Shared Variables are based on Global Variables, which are usually just a bit faster. Single Process Variables can easily be converted to network variables.
    However, I agree with Damien that Data Value References would probably be the best sulution.
    Btw, there is a good KB talking about Globals: Are LabVIEW Global Variables good or bad, and when is it ok to use them?
    Christian

  • Use of global variables like g_cnt_transactions_transferred in the LSMW

    Hi SapAll.
    when i had a look at the some of the LSMW's whic use IDOC as the object of uploading data into SAP from external Files i have found in the coding under the step "Maintain Field Mapping and Conversion Rules" that they use some of the global variables like below
    .if p_trfcpt = yes or sy-saprl >= '46A'.
      EDI_DC40-DOCNUM = g_cnt_transactions_transferred + 1.
    endif.
    .EDI_DC40-CIMTYP = g_cimtyp.
    .EDI_DC40-MESTYP = g_mestyp.
    .EDI_DC40-MESCOD = g_mescod.
    .if p_filept = yes.
      EDI_DC40-SNDPOR = g_fileport.
    elseif p_trfcpt = yes.
      EDI_DC40-SNDPOR = g_trfcport.
    endif.
    my doubt is where i can find these variables 'g_cnt_transactions_transferred ','g_cimtyp','g_mescod','g_fileport','g_trfcport' in the LSMW and what is the use of the variable  'g_cnt_transactions_transferred ' in the LSMW.
    I have treid to find out the above listed variables looking in step 'Maintain Field Mapping and Conversion Rules' under global variabels list and the other lists also but i couldnt found.
    can any one help me in this ?
    regards.
    Seetha.

    Hi Seetha,
               In the LSMW Workbench go to the option user menu.  And check the option display conversion program.
    Now when you execute with the radio button on dislplay conversion program, you ll see the code that got generated in the background while you built your LSMW.
    The global variables that you have mentioned are bound to be there in this program generated in the background..
    You can put a break point here and see for yourself what the value of these global variables are at runtime.
    File port, TRFC port , no. of transactions executed by one run of the LMSW Idoc program , message type are some of the fields that you have asked for .
    Regards,
    Arun

  • Java Threads vs. Native Global Variables

    A brief description of the problem:
    I am trying to integrate a multi-threaded Java app with legacy Fortran code. The Fortran code in question makes extensive use of global variables in the form of Fortran's Common Block data structure.
    If multiple threads were allowed access to a native routine, they would over write each others data which is stored in global variables.
    If only one thread at a time can have access to the native routine for the duration of the native routine, the whole advantage of using threads is completely nullified.
    These native routines cannot be rewritten (3rd party code) and must be used.
    One solution I envisioned was to load a new copy of the native shared object code for each Java object that used the native code. However, it seems System.loadLibrary() can only be used in a static context.
    Is there any known solution to this problem?

    Here is an elaboration on the earlier suggestions. It's a high overhead solution, because you have to start a bunch of JVMs.
    1. You have a java control program, which will start up a pool of "services", make requests to them, and gather the results.
    2. Each service is a small java program with a native method:
    o java communications front-end.
    o native method declaration.
    o native - in your case fortran - method implementation.
    3. Each service is started using "exec". That puts it in a separate process.
    4, Since each service is a java program, you can use java to do communications between the control program and the service.
    o You could use RMI.
    o You could - perhaps - use java Process communications, i.e., have the services write to stdout, and have the control program capture the output.
    o You could use socket communications.

Maybe you are looking for

  • How Do I update PR 1.3 ?

    I see the PR 1.3 as an Update in My Application Manager, should I update it from there or should I update it Via a P.C ?

  • Irritating mouse behavior - consistently happens with all mouse use anywher

    Is there some way to stop this behavior? Often I will go to click on something, but the OS apparently thinks it's an accident use of the button or something, so it doesn't do what I want to do, and that is click on the item I clicked. I find this par

  • Itunes won't read burned cd-r but applications like vlc does

    Well as the title says I'm having some issues with Itunes not being able to read burned cd's of any brand. The cd's are burned as a red-book in waveburner and works on standard cd-players and for some reason when played through VLC. But when I use th

  • Error while loading metada into HFM Application

    Can any one help me out from this stage in hfm.I am getting these errors frequently.Please send your comments on this . Metadata Scan started at 21:41:36 PASS I - Analyzing Section Headers PASS II - Validating member names and hierarchies Scenario Er

  • EVP88 & Sculpture patches suddenly become staccato

    Anyone else have their EVP88 and Sculpture instruments go stacccato or full "plam-muted" sounding on patch change? This only seems to happen to these two instruments and there's no apprent rhyme or reason regarding the controllers I'm using. Seems co