Not understanding variables correctly

Hello All
I am having trouble with my variables. How do I int or double them with out giving them a value?
public static int monthPop( int bRate, int dRate, int numberMonths, int bunnyThresh, int bunnyStart, int tables )
int growRate, counter, result;
double bunNew, bunOld, popNew,  popOld;
counter = 1;
if(tables == 1)
     System.out.println("Month\t\t\tBunnies");
     while(counter <= numberMonths)
          bunOld = bunnyStart / bunnyThresh;
          bunNew = bunOld + growRate * bunOld * ( 1 - bunOld);
          popNew = bunNew * bunnyThresh;
          int outcome = (int)population;
          System.out.println( counter + "\t\t\t" + outcome );
          counter = counter + 1;
else
     while(counter <= numberMonths)
          bunOld = bunnyStart / bunnyThresh;
          bunNew = bunOld + growRate * bunOld * ( 1 - bunOld);
          popNew = bunNew * bunnyThresh;
          counter = counter + 1;
     int outcome = (int)population;
     System.out.println( "\n\n\n" );
     System.out.println( "So after " + numberMonths + " month(s), the " +
     "     population would be " + outcome + " bunnies." );
return counter;
}So this sub program get fed 6 variables and I am trying to run the program and I get errors for popNew variable not being initialized and the build fails. I am not sure what I am doing wrong and would love to get some help if possible. it is much appreciated.
So I am trying to use a formula
bunNew = bunOld + growRate * bunOld * ( 1 - bunOld)
where
bunNew is relative population ending of the month
bunOld is relative population beginning of the month
popNew is the actual number of bunnies at the end of the month
popOld is the actual number of bunnies at the beginning of the month
bunnyThresh is the threshold of the bunny ranch.
growRate is equal to bRate - dRate
So again I am not sure what is going on based on my code. I think everything looks good, but again I am new and taking java programing class.
So any and all help is much appreciated.
thanks
ed
Edited by: Uprvrndn on Jan 27, 2008 5:49 AM

Ok did some revising of the code
public static int monthPop( int bRate, int dRate, int numberMonths, int bunnyThresh, int bunnyStart, int tables )
          int counter, result;
          double bNew, bOld, pNew,  pOld, growRate;
          pOld = bunnyStart;
          bOld = pOld / bunnyThresh;
          counter = 1;
          growRate = bRate - dRate;
          System.out.println(pOld + "  " + bOld + "  " +
           growRate + "  \n\n\n");
          if(tables == 1)
               System.out.println("Month\t\t\tBunnies");
               while(counter <= numberMonths)
                    bNew = bOld + growRate * bOld * ( 1 - bOld);
                    pNew = bNew * bunnyThresh;
                    bOld = pNew;
                    int outcome = (int)pNew;
                    System.out.println( counter + "\t\t\t" + outcome );
                    System.out.println( counter + "\t\t\t" + pNew );
                    counter++;
          else
               while(counter <= numberMonths)
                    bNew = bOld + growRate * bOld * ( 1 - bOld);
                    pNew = bNew * bunnyThresh;
                    bOld = pNew;
                    counter++;
               int outcome = (int)pNew;
               System.out.println( "\n\n\n" );
               System.out.println( "So after " + numberMonths + " month(s), the " +
               "     population would be " + outcome + " bunnies." );
          return counter;
     }I get the follow error and I quote:
edmac:Program2 erose$ javac Program2.java
Program2.java:180: variable pNew might not have been initialized
               int outcome = (int)pNew;
^
1 error
edmac:Program2 erose$
Also because I am trying to show a table of a month to month I started at 1 instead of 0. So month 1 would be the starting point. Month 0 would be the initial when the farm was first established.

Similar Messages

  • ProC: DESCRIBE INPUT not generating the correct no of bind variables

    Hi
    I'm having an issue with ProC using the ANSI dynamic SQL where after using DESCRIBE INPUT to full the descriptor with the bind variable information, the subsequent call to GET DESCRIPTOR... :bind_count = COUNT returns 0. The SQL statement is a select along the lines of: select col_01 from tab_01 where col_02 = :bind_var.
    Any idea on what the issue could be?
    Dale

    Forgot to add:
    If I attempt to OPEN the CURSOR, I get ORA-01008: not all variables bound. If I force the code to assume there is 1 bind variable (as the select in question has one), when I then assign the c variable to the DESCRIPTOR I get SQL-02122: Invalid OPEN or PREPARE for this database connection.
    The AT command has been used where it is required and the correct connection is specified for each occurance of the AT in the various embedded EXEC SQL statements.
    Dale

  • TABLE(CAST()) function not returning the correct results in few scenarios.

    I am using TABLE(CAST()) operation in PL/SQL and it is returning me no data.
    Here is what I have done:
    1.     Created Record type
    CREATE OR REPLACE TYPE target_rec AS OBJECT
    target__id          NUMBER(10),
    target_entity_id NUMBER(10),
    dd           CHAR(3),
    fd           CHAR(3),
    code      NUMBER(10),
    target_pct      NUMBER,
    template_nm VARCHAR2(50),
    p_symbol      VARCHAR2(10),
    pm_init          VARCHAR2(3),
    target_name     VARCHAR2(20),
    targe_type     VARCHAR2(30),
    target_caption     VARCHAR2(30),
    sort_order      NUMBER (4)
    2.     Created Table type
    CREATE OR REPLACE TYPE target_arr AS TABLE OF target_rec
    3.     Created Stored procedure which accepts parameter of type target_arr and runs the Table(Cast()) function on it.
         Following is the simplified form of my procedure.
         PROCEDURE get_target_weights
         p_in_template_target IN target_arr,
         p_out_count          OUT NUMBER,
         IS
         BEGIN
              SELECT count(*) into p_out_count
         FROM TABLE(CAST(p_in_template_target AS                     target_arr)) arr;
         END;
    I am calling get_target_weights from my java code and passing p_in_template_target with 10140 records.
    Scenario 1: If target_pct in the last record is 0, p_out_count returned from the procedure is 0.
    Scenario 2: If target_pct in the last record is any other value(say 0.01), p_out_count returned from the procedure is 10140.
    Please help me understand why the Table(Cast()) is not returning the correct results in Scenario 1. Also adding or deleting any record from the test data returns the correct results (i.e. if keep target_pct in the last record as 0 but add or delete any record).
    Let me know how can I attach the test data I am using to help you debugging as I don’t see any Attach file button on Post Message screen on the forum.

    I am not able to reproduce this problem with a small data set. I can only reproduce with the data having 10140 records.
    I am not sure if this is the memory issue as adding a new record also solves the problem.
    This should not be the error because of wrong way of filling the records in java as for testing purpose I just saved the records which I am sending from java in a table. I updated the stored procedure as well to read the data from the table and then perform TABLE(CAST()) operation. I am still getting 0 as the output for scenario 1 mentioned in my last mail.
    Here is what I have updated:
    1.     Created the table target_table
    CREATE Table target_table
    target_id          NUMBER(10),
    target_entity_id NUMBER(10),
    dd           CHAR(3),
    fd           CHAR(3),
    code      NUMBER(10),
    target_pct      NUMBER,
    template_nm VARCHAR2(50),
    p_symbol      VARCHAR2(10),
    pm_init          VARCHAR2(3),
    target_name     VARCHAR2(20),
    target_type     VARCHAR2(30),
    target_caption     VARCHAR2(30),
    sort_order      NUMBER (4)
    2.     Inserted data into the table : The script has around 10140 rows. Pls let me know how can I send it to you
    3.     Updated procedure to read data from table and stored into variable of type target_arr. Run Table(cast()) operation on target_arr and get the count
    PROCEDURE test_target_weights
    IS
         v_target_rec target_table%ROWTYPE;
         CURSOR wt_cursor IS
         Select * from target_table;
         v_count NUMBER := 1;
         v_target_arr cws_target_arr:= target_arr ();
         v_target_arr_rec target_rec;
         v_rec_count NUMBER;
         BEGIN
         OPEN wt_cursor;
         loop
              fetch wt_cursor into v_target_rec; -- fetch data from table into local           record.
              exit when wt_cursor%notfound;
              --move data into target_arr
              v_target_arr_rec :=                     cws_curr_pair_entity_wt_rec(v_target_rec target_id,v_target_rec. target_entity_id,
                        v_target_rec.dd,v_target_rec.fd,v_target_rec.code,v_target_rec.target_pct,
         v_target_rec.template_nm,v_target_rec.p_symbol,v_target_rec.pm_init,v_target_rec.template_name,
         v_target_rec.template_type,v_target_rec.template_caption,v_target_rec.sort_order);
              v_target_arr.extend();
              v_target_arr(v_count) := v_target_arr_rec;
              v_count := v_count + 1;
         end loop;
         close wt_cursor;
         -- run table cast on target_arr
         SELECT count(*) into v_rec_count
         FROM TABLE(CAST(v_target_arr AS target_arr)) arr;
         DBMS_OUTPUT.enable;
         DBMS_OUTPUT.PUT_LINE('p_out_count ' || v_rec_count);
         DBMS_OUTPUT.PUT_LINE('v_count ' || v_count);
    END;
    Output is
    p_out_count 0
    v_count 10140
    Expected output
    p_out_count 10140
    v_count 10140

  • Sql statement in a table not accepting variable

    I have the following problem on 10.1.0.3.0 with varialbe in an execute immediate statement
    here is the code that I am using
    declare
    remote_data_link varchar2(25) := 'UDE_DATATRANSFER_LINK';
    FROM_SCHEMA VARCHAR2(40) := 'UDE_OLTP';
    l_last_process_date date := to_date(to_char(sysdate,'mm-dd-yyyy hh:mi:ss'),'mm-dd-yyyy hh:mi:ss') - 1;
    stmt varchar2(4000) := 'MERGE into applicant_adverseaction_info theTarget USING (select * from '||FROM_SCHEMA||'.applicant_adverseaction_info@'||remote_data_link||' where last_activity > :l_last_process_date ) theSource ON(theTarget.applicant_id = theSource.applicant_id) WHEN MATCHED THEN UPDATE SET theTarget.cb_used = theSource.cb_used, theTarget.cb_address = theSource.cb_address, theTarget.scoredmodel_id = theSource.scoredmodel_id, theTarget.last_activity = theSource.last_activity WHEN NOT MATCHED THEN INSERT(CB_USED, CB_ADDRESS, SCOREDMODEL_ID, APPLICANT_ID, LAST_ACTIVITY) values(theSource.cb_used, theSource.cb_address, theSource.scoredmodel_id, theSource.applicant_id, theSource.last_activity)';
    stmt2 varchar2(4000) := 'MERGE into edm_application theTarget USING (select * from '||from_schema||'.edm_application@'||remote_data_link||' where last_activity > :l_last_process_date) theSource ON (theTarget.edm_appl_id = theSource.edm_appl_id) WHEN MATCHED THEN UPDATE SET theTarget.APP_REF_KEY = theSource.APP_REF_KEY, theTarget.IMPORT_REF_KEY = theSource.IMPORT_REF_KEY, theTarget.LAST_ACTIVITY = theSource.LAST_ACTIVITY WHEN NOT MATCHED THEN INSERT (EDM_APPL_ID, APP_REF_KEY, IMPORT_REF_KEY, LAST_ACTIVITY) values(theSource.EDM_APPL_ID, theSource.APP_REF_KEY, theSource.IMPORT_REF_KEY, theSource.LAST_ACTIVITY)';
    v_error varchar2(4000);
    T_MERGE VARCHAR2(4000);
    stmt3 varchar2(4000);
    BEGIN
    select merge_sql
    INTO T_MERGE
    from transfertables
    where table_name= 'edm_application';
    remote_data_link:= 'UDE_DATATRANSFER_LINK';
    FROM_SCHEMA := 'UDE_OLTP';
    --DBMS_OUTPUT.PUT_LINE(SUBSTR(stmt2,1,200));
    --STMT2 := T_MERGE;
    dbms_output.put_line(from_schema||' '||remote_data_link||' '||l_last_process_date);
    EXECUTE IMMEDIATE stmt2 using l_last_process_date;
    --execute immediate stmt3 ;
    dbms_output.put_line(from_schema||' '||remote_data_link||' '||l_last_process_date);
    dbms_output.put_line(substr(stmt2,1,200));
    commit;
    EXCEPTION
    WHEN OTHERS THEN
    V_ERROR := SQLCODE||' '||SQLERRM;
    v_ERROR := V_ERROR ||' '||SUBSTR(stmt2,1,200);
    DBMS_OUTPUT.PUT_LINE(V_ERROR);
    --dbms_output.put_line(substr(stmt2,1,200));
    END;
    This works perfectly
    but if I change it to get the same statement in a db table
    declare
    remote_data_link varchar2(25) := 'UDE_DATATRANSFER_LINK';
    FROM_SCHEMA VARCHAR2(40) := 'UDE_OLTP';
    l_last_process_date date := to_date(to_char(sysdate,'mm-dd-yyyy hh:mi:ss'),'mm-dd-yyyy hh:mi:ss') - 1;
    stmt varchar2(4000) := 'MERGE into applicant_adverseaction_info theTarget USING (select * from '||FROM_SCHEMA||'.applicant_adverseaction_info@'||remote_data_link||' where last_activity > :l_last_process_date ) theSource ON(theTarget.applicant_id = theSource.applicant_id) WHEN MATCHED THEN UPDATE SET theTarget.cb_used = theSource.cb_used, theTarget.cb_address = theSource.cb_address, theTarget.scoredmodel_id = theSource.scoredmodel_id, theTarget.last_activity = theSource.last_activity WHEN NOT MATCHED THEN INSERT(CB_USED, CB_ADDRESS, SCOREDMODEL_ID, APPLICANT_ID, LAST_ACTIVITY) values(theSource.cb_used, theSource.cb_address, theSource.scoredmodel_id, theSource.applicant_id, theSource.last_activity)';
    stmt2 varchar2(4000) := 'MERGE into edm_application theTarget USING (select * from '||from_schema||'.edm_application@'||remote_data_link||' where last_activity > :l_last_process_date) theSource ON (theTarget.edm_appl_id = theSource.edm_appl_id) WHEN MATCHED THEN UPDATE SET theTarget.APP_REF_KEY = theSource.APP_REF_KEY, theTarget.IMPORT_REF_KEY = theSource.IMPORT_REF_KEY, theTarget.LAST_ACTIVITY = theSource.LAST_ACTIVITY WHEN NOT MATCHED THEN INSERT (EDM_APPL_ID, APP_REF_KEY, IMPORT_REF_KEY, LAST_ACTIVITY) values(theSource.EDM_APPL_ID, theSource.APP_REF_KEY, theSource.IMPORT_REF_KEY, theSource.LAST_ACTIVITY)';
    v_error varchar2(4000);
    T_MERGE VARCHAR2(4000);
    stmt3 varchar2(4000);
    BEGIN
    select merge_sql
    INTO T_MERGE
    from transfertables
    where table_name= 'edm_application';
    remote_data_link:= 'UDE_DATATRANSFER_LINK';
    FROM_SCHEMA := 'UDE_OLTP';
    --DBMS_OUTPUT.PUT_LINE(SUBSTR(stmt2,1,200));
    STMT2 := T_MERGE;
    dbms_output.put_line(from_schema||' '||remote_data_link||' '||l_last_process_date);
    EXECUTE IMMEDIATE stmt2 using l_last_process_date;
    --execute immediate stmt3 ;
    dbms_output.put_line(from_schema||' '||remote_data_link||' '||l_last_process_date);
    dbms_output.put_line(substr(stmt2,1,200));
    commit;
    EXCEPTION
    WHEN OTHERS THEN
    V_ERROR := SQLCODE||' '||SQLERRM;
    v_ERROR := V_ERROR ||' '||SUBSTR(stmt2,1,200);
    DBMS_OUTPUT.PUT_LINE(V_ERROR);
    --dbms_output.put_line(substr(stmt2,1,200));
    END;
    I get ora-00900 invalid sql statement
    can somebody explain why this happens
    Thanks

    I agree with jan and anthony. Your post is too long and ill-formatted. However here's my understanding of your problem (with examples though slightly different ones).
    1- I have a function that returns number of records in a any given table.
      1  CREATE OR REPLACE FUNCTION get_count(p_table varchar2)
      2     RETURN NUMBER IS
      3     v_cnt number;
      4  BEGIN
      5    EXECUTE IMMEDIATE('SELECT count(*) FROM '||p_table) INTO v_cnt;
      6    RETURN v_cnt;
      7* END;
    SQL> /
    Function created.
    SQL> SELECT get_count('emp')
      2  FROM dual
      3  /
    GET_COUNT('EMP')
                  14
    2- I decide to move the statement to a database table and recreate my function.
    SQL> CREATE TABLE test
      2  (stmt varchar2(2000))
      3  /
    Table created.
    SQL> INSERT INTO test
      2  VALUES('SELECT count(*) FROM p_table');
    1 row created.
    SQL> CREATE OR REPLACE FUNCTION get_count(p_table varchar2)
      2     RETURN NUMBER IS
      3     v_cnt number;
      4     v_stmt varchar2(4000);
      5  BEGIN
      6     SELECT stmt INTO v_stmt
      7     FROM test;
      8     EXECUTE IMMEDIATE(v_stmt) INTO v_cnt;
      9     RETURN v_cnt;
    10  END;
    11  /
    Function created.
    SQL> SELECT get_count('emp')
      2  FROM dual
      3  /
    SELECT get_count('emp')
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "SCOTT.GET_COUNT", line 8
    ORA-06512: at line 1
    --p_table in the column is a string and has nothing to do with p_table parameter in the function. And since there's no p_table table in my schema function returns error on execution. I suppose this is what you mean by "sql statement in a table not accepting variable"
    3- I rectify the problem by recreating the function.
      1  CREATE OR REPLACE FUNCTION get_count(p_table varchar2)
      2     RETURN NUMBER IS
      3     v_cnt number;
      4     v_stmt varchar2(4000);
      5  BEGIN
      6     SELECT replace(stmt,'p_table',p_table) INTO v_stmt
      7     FROM test;
      8     EXECUTE IMMEDIATE(v_stmt) INTO v_cnt;
      9     RETURN v_cnt;
    10* END;
    SQL> /
    Function created.
    SQL> SELECT get_count('emp')
      2  FROM dual
      3  /
    GET_COUNT('EMP')
                  14
    Hope this gives you some idea.-----------------------
    Anwar

  • Firefox 6.0 is not Displaying Symbols Correctly

    Okay, ever since I updated to Firefox 6.0, it has not been displaying symbols correctly. It '''doesn't''' matter what site I'm on (I just used my twitter account as an example), as I'm having the same issue everywhere.
    Example on Firefox:
    http://i51.tinypic.com/2iifu5f.jpg
    And if I open up Internet Explorer and view it, I see the symbols like I should be. This is what it looks like in Internet Explorer:
    http://i53.tinypic.com/25u74sw.jpg
    So can anyone lend a hand as to why I'm not seeing symbols correctly in Firefox? And what is the way to fix this? I was having absolutely NO problems prior to the Firefox 6.0 update.
    I am also using Windows 7 for my operating system if that helps any!
    Thanks!

    I honestly have no idea. It's what ever font family Twitter uses and I'm unsure of what they use.
    Does anyone know what font settings I should have on Firefox? Or if I'm missing an installed font? I just don't understand why the symbols work perfectly fine on Internet Explorer but not on Firefox. D:

  • Why is Preview not displaying fonts correctly?

    Since the last Snow Leopard upgrade, Preview is not displaying some fonts correctly. I checked to see if the fonts were embedded in the PDF (by resorting to Adobe Acrobat 5... which is not displaying them correctly either) and they are True Type with Windows encoding which as far as I know Preview OS X should be able to handle.
    I tried deleting the Preview preferences in User/Library/Prefeerences and restarting but this made no difference. The same PDF works perfectly though on an old iMac that is running OS X Tiger!!!

    Well I found a few minor font problems which seem to have cropped up since the last system upgrade, but none of those were the font in question. Also, as I understand it, the whole point of PDF documents is that the fonts are embedded in the document so you do not have to have the fonts installed on your computer to view the PDF properly. I use a lot of special fonts and when I save documents as a PDF I can send them to anyone on the internet and they can usually see everything as it is meant to be.

  • Just started using illustrator and do not understand why i cannot fill this trace

    alright so i have my image that i have traced, its all chucnked up into groups (hair, eyes, etc...)  but if i try to select say the hair and try to fill it, it does it really bad
    http://img835.imageshack.us/img835/1310/picture6qs.png
    and here i use the live paint tool which does an okay job but lines show through in places where i dont want them to
    http://img543.imageshack.us/img543/6118/picture7g.png
    i do not understand what important piece of information i missed, i thought i could just trace something and fill in the colors, apparently its not that simple.
    this programs works in shapes right? i dont get why that even though everything looks closed off, and is connected to my knowledge, i cant get it to fill
    (at least correctly)
    cuz it feel like could do this in flash in no time, but i'd like to do this kind of work using programs that are specifically designed for it.
    any sort of help would be greatly appreciated.

    Kristacattack,
    The tracing results in separate paths. The straight lines show where the open filled paths start and end.
    In the first sample, you may drag with the Direct Selection Tool over the top where the straight lines meet and Ctrl/Cmd+J to join the the paths; you may do the same elsewhere to create continuous/closed paths (hopefully, you will only drag over the two endpoints, otherwise you will have to find and delete superfluous Anchor Points).
    This may be better than just cheating with the Live Paint Tool because the artwork becomes more coherent.
    Edit: Hi Monika.

  • Urgent: not all variable bounds in forms 6i

    hi all
    I am using forms 6i
    I am having problem in this cursor query
    SELECT distinct main_item, des_l FROM table(TECH_BOM_TOT_SRNO(:model0,'X','X','X','X','X')) a,item_master b
    where a.main_item = b.ITEM_CODE
    and LOCATION_cD = :line0;
    it does not fetch any records.
    but if i hardcode the values of bind variables as follows
    SELECT distinct main_item, des_l FROM table(TECH_BOM_TOT_SRNO('MDL0000016','X','X','X','X','X')) a,item_master b
    where a.main_item = b.ITEM_CODE
    and LOCATION_cD = 'FRP';
    it works fine
    i have check the following query
    SELECT count(*) fROM table(TECH_BOM_TOT_SRNO(:model0,'X','X','X','X','X')) a,item_master b
    where a.main_item = b.ITEM_CODE ;
    then it gives an error at runtime
    ora-1008: not all variables bound..
    any help to overcome this problem will be highly appriciated.
    thanks......

    Kritika,
    Oracle Forms 6i is TOO old and does not support Pipelined Functions. You will need to create a view on the database and then select from your view in order to use the Pipelined TABLE() construct.
    SELECT distinct main_item, des_l
    FROM table(TECH_BOM_TOT_SRNO(:model0,'X','X','X','X','X')) a, item_master b
    where a.main_item = b.ITEM_CODE
    and LOCATION_cD = :line0;Additionally, I don't believe you can pass a string reference to an object in place of the object name in the TABLE() function.
    Do us all a favor and take a look at Oracle Forums FAQ! It is extremly helpful if you format your post to make it easier to read!
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Date difference is not showing the correct result for date interval

    Hi Expert,
                    I've created two formula variable one for PO date and another for GR date
    while i am taking the date difference of GR and PO date for single PO date selection
    it showing me correct result , but while i am taking the date interval for PO date it not
    showing the correct result.
    eg: PO date: 01.01.2010   for a particular PO and Gr date is suppose 03.01.2010, 06.01.2010
          it showing the result 2 and 5.
    But if i am taking date interval for PO date:
    eg: 01.01.2010 - 31.01.2010
    PO date: 10.01.2010 and GR date are suppose 15.01.2010, 22.01.2010 and 30.01.2010
    it showing me 14, 21 and 29
    Thanks and Regards
    Lalit Kumar

    Hi Expert,
                    Through replacement path.
    Thanks and Regards
    Lalit Kumar

  • Oracle CKM Module not resolving variable values

    Hi,
    I am using ODI 11g.
    I created a database datastore with dynamic table and column names using variables.
    I use this datastore as the target table in an interface but for some reason when the creation of the Error table is attempted (during CKM) the variables do not get resolved correctly and execution fails. (When I trace the variable values I see that they have the correct values).
    The following script is executed:
    create table DAMAN_6020400_DEV."*E$_#TableName*"
         ODI_ROW_ID           UROWID,a
         ODI_ERR_TYPE          VARCHAR2(1 CHAR) NULL,
         ODI_ERR_MESS          VARCHAR2(250 CHAR) NULL,
         ODI_CHECK_DATE     DATE NULL,
         #column1     VARCHAR2(50) NULL,
         #column2     VARCHAR2(200) NULL,
         #column3     VARCHAR2(200) NULL,
         ODI_ORIGIN          VARCHAR2(100 CHAR) NULL,
         ODI_CONS_NAME     VARCHAR2(128 CHAR) NULL,
         ODI_CONS_TYPE          VARCHAR2(2 CHAR) NULL,
         ODI_PK               VARCHAR2(32 CHAR) PRIMARY KEY,
         ODI_SESS_NO          VARCHAR2(19 CHAR)
    If I skip the CMK steps, the following steps are executed successfully and the data are inserted in correctly in the target table.
    Can anyone think of a reason why this is happening?
    Thank you!

    Hi,
    Thanks for the reply Bhabani.
    My variables are Project scope (isn't that correct?)
    From what I see in the previous successful steps when the data is loaded the statements look like:
    create table SCHEMA_NAME.*"I$_#Project_name.TableName"*
    On the other hand during the steps that fail the variables are not prefixed with the project name:
    create table SCHEMA_NAME.*"E$_#TableName"*
    I did not customize the KM's that produce these steps but for some reason the second step produced by Oracle CKM has this problem

  • Report not giving Output correctly

    hi all
    The problem is about Pending invoice report. But this report is not giving output correctly.
    Plz help me to solve the problem.
    Thanks
    Subhasish

    Hi Mishra,
    Invoice output is coming correctly- assuming you have calculation error then check the print program assigned to your invoice output condition type. It must be having some logic error.
    If the issue is with improper formatting then check the layout assigned to your invoice output conditon. You can check both the program and layout assingment to ouput condition at NACE transaction.
    This is regular task which abapers can do with ease. so please take their help. They can just do a simple debug to understand the issue.
    regards
    sadhu kishore

  • Scope of list ALV not defined (please correct) in rm06bkps program

    hi experts,
    i have to add some fields in me5j t-code, for this i have copied the standard program as z prog. But at time of execution it gives an error
    "Scope of list ALV not defined (please correct)
    Message no. ME287"
    At the time of debugging i found gf_factory object is not filled, but im unable to trace that variable
    even i have searhed the same on SDN but the quetion is not answerd.
    please help me out ASAP.
    waiting for ur valuable replies..
    thanks in advance
    Neha

    i got the problem
    in fm
    ME_REP_GET_TABLE_MANAGER  -->   l_factory(object) -->im_service(variable)
    l_active = l_factory->is_active( im_service = l_service  im_scope = im_scope ).
    im_service  variable has programe name, im_scope has "ALV" . then it execution goes in case statement where it checks the im_service with standard prog name.
    as in case im_service has zprog, so it doesnt go to any when case and hence the prob.
    any sugesstion..?????
    Neha

  • I am not understanding this Bonjour photo sharing thing with front row.

    I just finished seting up my media center with a 37 inch Olevia. WOW
    Anyways, what I am not understanding is I have iphoto set up on the other two compuers as sharing photos and the MINI is set to see them. Do I have to have iPhoto RUNNING on the other two computers so that I can RETRIEVE the photos on the mini? That seems so wrong. Can I just access the other computers photos and view them on my wireless network to the mini? I thought this is what this bonjour is all about...or do I have to copy the photos to the mini for viewing?
    Thanks

    You are most welcome.
    I understand the frustration - but when you step back and think about reliability, it makes sense to have one application to do one thing. If front row had to handle the slide show - it would be bulky and whenever a new feature was developed (or bug fixed) - the code would have to be added and tested in both iPhoto and Front Row. By keeping front row thin, simple and intuitive - it gets to market cheaper and more reliably. Isn't that really why we use Mac?
    iPhoto's job is to organize pictures. A lot of sophisticated things happen to add value when you take those "pictures in a flat folder" and import them - color correction, cropping, rotation, grouping into an album, ordering of the photos, settings for the slide show - music, fade effect, ken burns/zoom, etc...
    I have those applications set to launch automagically when I log in and hide themselves so I never see them until needed. They sit there idle once they load until front row tickles them in the correct manner to feed data over the network to front row...
    If you really need some photos to stand alone, you can always export a slide show as a quick time movie. Front Row will play movies remotely with no application running on the other end.

  • Update Row into Run Table Task is not executing in correct sequence in DAC

    Update Row into Run Table Task is not executing in correct sequence in DAC.
    The task phase for this task is "Post Lost" . The depth in the execution plan is 19 but this task is running some times in Depth 12, some times in 14 and some time in Depth 16. Would like to know is this sequence of execution is correct order or not? In the out of the Box this task is executed at the end of the entire load. No Errors were reported in DAC log.
    Please let me know if any documents that would highlight this issue
    rm

    Update into Run table is a task thats required to update a table called W_ETL_RUN_S. The whole intention of this table is to keep the poor mans run history on the warehouse itself. The actual run history is stored in the DAC runtime tables, however the DAC repository could be on some other database/schema other than warehouse. Its mostly a legacy table, thats being carried around. If one were to pay close attention to this task, it has phase dependencies defined that dictate when this task should run.
    Apologies in advance for a lengthy post.... But sure might help understanding how DAC behaves! And is going to be essential for you to find issues at hand.
    The dependency generation in DAC follows the following rules of thumb!
    - Considers the Source table target table definitions of the tasks. With this information the tasks that write to a table take precedence over the tasks that reads from a table.
    - Considers the phase information. With this information, it will be able to resolve some of the conflicts. Should multiple tasks write to the same table, the phase is used to appropriately stagger them.
    - Considers the truncate table option. Should there be multiple tasks that write to the same table with the same phase information, the task that truncates the table takes precedence.
    - When more than one task that needs to write to the table that have similar properties, DAC would stagger them. However if one feels that either they can all go in parallel, or a common truncate is desired prior to any of the tasks execution, one could use a task group.
    - Task group is also handy when you suspect the application logic dictates cyclical reads and writes. For example, Task 1 reads from A and writes to B. Task 2 reads from B and writes back to A. If these two tasks were to have different phases, DAC would be able to figure that out and order them accordingly. If not, for example those tasks need to be of the same phase for some reason, one could create a task group as well.
    Now that I described the behavior of how the dependency generation works, there may be some tasks that have no relevance to other tasks either as source tables or target tables. The update into run history is a classic example. The purpose of this task is to update the run information in the W_ETL_RUN_S with status 'Completed' with an end time stamp. Because this needs to run at the end, it has phase dependency defined on it. With this information DAC will be able to stagger the position of execution either before (Block) or after (Wait) all the tasks belonging to a particular phase is completed.
    Now a description about depth. While Depth gives an indication to the order of execution, its only an indication of how the tasks may be executed. Its a reflection of how the dependencies have been discovered. Let me explain with an example. The tasks that have no dependency will have a depth of 0. The tasks that depend on one or more or all of depth 0 get a depth of 1. The tasks that depend on one or more or all of depth 1 get a depth of 2. It also means implicitly a task of depth 2 will indirectly depend on a task of depth 0 through other tasks in depth 1. In essence the dependencies translate to an execution graph, and is different from the batch structures one usually thinks of when it comes to ETL execution.
    Because DAC does runtime optimization in the order in which tasks are executed, it may pick a task thats of order 1 over something else with an order of 0. The factors considered for picking the next best task to run depend on
    - The number of dependent tasks. For example, a task which has 10 dependents gets more priorty than the one whose dependents is 1.
    - If all else equal, it considers the number of source tables. For example a task having 10 source tables gets more priority than the one that has only two source tables.
    - If all else equal, it considers the average time taken by each of the tasks. The longer running ones will get more preference than the quick running ones
    - and many other factors!
    And of course the dependencies are honored through the execution. Unless all the predecessors of a task are in completed state a task does not get picked for execution.
    Another way to think of this depth concept : If one were to execute one task at a time, probably this is the order in which the tasks will be executed.
    The depth can change depending on the number of tasks identified for the execution plan.
    The immediate predecessors and successor can be a very valuable information to look at and should be used to validate the design. All predecessors and successors provide information to corroborate it even further. This can be accessed through clicking on any task and choosing the detail button. You will see all these information over there. As an alternate method, you could also use the 'All/immediate Predecessors' and 'All/immediate Successor' tabs that provide a flat view of the dependencies. Note that these tabs may have to retrieve a large amount of data, and hence will open in a query mode.
    SUMMARY: Irrespective of the depth, validate
    - if this task has 'Phase dependencies' that span all the ETL phases and has a 'Wait' option.
    - click on the particular task and verify if the task does not have any successors. And the predecessors include all the tasks from all the phases its supposed to wait for!
    Once you have inspected the above two you should be good to go, no matter what the depth says!
    Hope this helps!

  • I can not get the correct anser

    Hi, Please help me.  As the following sch I can not get the correct sqrt value.  if changing resistor of R1 I always get 12v direct flow output.
    Attachments:
    op_divider.zip ‏121 KB

    Thanks for your answers.  I want the sch to do the operation of square root.
     1. in my sch the inverting input is DC -5v, I want to get the square root of 5?
     2. In my feedback path I use a multiplier, I Originally thought it is a negative feedback?
     3. it Already have ground in the sch, I do not understand that you say "did not ground the scope"?
    Thanks again, Could you give me the further pointing. if possible Could you give me a correct sch.
    (in fact, I get the sch from a rough sch in a textbook(the rough sch not for multisim). I just give the values for the all components)

Maybe you are looking for

  • Drawing with double buffering to a JFrame

    I want to create a simple JFrame and draw stuff to it via Graphic object using double buffering. If I create a loop and draw constantly using JFrame.getGraphic().xxx, am i doing double buffering. ( 'cause i read somewhere that swing components automa

  • Making retirement Inactive in OAZ1

    Hi, How do you make changes to transaction OAZ1.Basically I am  Deactivating AA Validation "RETIREM"  (Retirement).I am making transaction type group 20 and 25 "Inactive".How to save the changes and as no transport request is created,how to transport

  • Bug with 3D animations

    I noticed a bug when trying to animate movieclips in 3d space: Basically the bug occurs when trying to tween a movie-clip in 3d space across a z range that is greater than 5000 or so, which then results in very odd behavior (see end of movie above).

  • Thread creation error: Not enough storage space

    Hi,   Recently (the past week or so), my desktop client for Skype has been crashing regularly. This is accompanied by large (over 1.2GB) amounts of memory usage. At semi-regular intervals (say every few hours), Skype will post an error with the text

  • Update Failed, failed and failed...

    Installed Photoshop CC (2014) OK. Update was available Attempted to update Gets to 50% and get an error message that says... Update Failed Unable to extract downloaded files. Press Retry to download again. (U44M1I210) On a IMac OS X 10.7.5 See this h