Running a function with a cursor output

Hi All,
It sounds like this should be easy, but I can't get it to work! I'm trying to run or debug a function in JDev. The function simply calls a Java SP that returns a cursor. This all works fine and it runs in SPL Plus with no problems. The problem is that when I try to run it from within JDev I get presented with the PL/SQL block window, and nothing I do will let me view the contents of the cursor returned - mostly I just get errors and the code doesn't run at all.
The default code it generates is:
DECLARE
v_Return NULL;
BEGIN
v_Return := ALISI.POC.POCCALLSP();
-- Modify the code to output the variable
-- DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
END;
I think this should be modified to say:
DECLARE
v_Return Types.ref_cursor;
BEGIN
v_Return := ALISI.POC.POCCALLSP();
-- Modify the code to output the variable
DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
END;
But the DBMS_OUTPUT.PUT_LINE is expecting a string, not a cursor, and nothing I've tried (I've tried so many things I can't begin to list them - or remember them) will work.
Can anyone point out the error in my ways? Is it anything to do with the fact that I'm using a function and not a procedure? As you can probably tell I'm new to all this!
Many thanks,
John.

With "simple" variables, we are able to display the output using DBMS_OUTPUT. For composite variables (PL/SQL tables, PL/SQL records, cursors, etc), there's no good way for us to directly display the result. DBMS_OUTPUT.PUT_LINE can only take a "String", or something that can be converted to it, and unlike Java, not everything implements a toString method. We would expect in such cases that the user modify the code as desired to output the data.
That being said, you are actually encountering a bug here. With most datatypes that we can't display directly, we generally get enough information that we generate code that at least compiles and runs. I've logged a bug (3124777) to track this.
(For what it's worth, I've tried this in 9.0.5, only to discover that the functionality has regressed a bit to be even less correct than in 9.0.3.)
After the bug is fixed the output should look like this:
DECLARE
  v_Return Types.ref_cursor; -- assuming this is the name of your ref cursor type
BEGIN
  v_Return := ALISI.POC.POCCALLSP();
  -- Modify the code to output the variable
  -- DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
END;The user would then need to modify the part that displays the output. In this example, it might go something like this:
DECLARE
  v_Return Types.ref_cursor; -- assuming this is the name of your ref cursor type
  v_Record v_Return%ROWTYPE;
BEGIN
  v_Return := ALISI.POC.POCCALLSP();
  -- Modify the code to output the variable
  LOOP
    FETCH v_Return INTO v_Record;
    EXIT WHEN v_Return%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE (v_Record.employee_id || CHR(9) || v_Record.last_name
      || CHR(9) || v_Record.salary); -- replace with your field names
  END LOOP;
END;I hope this helps!
-- Brian

Similar Messages

  • 2 functions with one cursor or.. 1 function with 2 cursors?

    Hi friends,
    I hope you help me to decide is this easy question:
    Actually I have 2 functions. Both are the same more or less: Both get data from USERS table. (In the users table there are several columns, I'm interested in "code" and "description")
    Function1 have a cursor which obtain data and orders by code,
    Function2 have a cursor which obtain data and orders by description.
    That's the only difference.
    I want to "optimize" the code so I was thinking on creating only a function.
    To do the same in one only function I thinked on passing a parameter i.e.: p_ordertype to know which would be the order ("C" for code or "D" for description)
    In that function I would have two cursors and I would ask for the parameter to execute one "FOR...." or the other.
    The question: Would it be really effective? I think that if I have 2 cursors in a function... I would cosume more memory than if I would only have one cursor.. (because I think data selected from cursors is parsed to memory when you invoke the function, before the 1st instruction after the BEGIN is executed, isn't it?)
    Would it be better 2 functions with one cursor each one or... one function with 2 cursors?
    Thanks in advance for your opinions.
    Jose.

    Hi again Todd,
    there's a problem with you solution :
    Imagine you have the following users:
    usercode - userdescr
    1 - ALAN
    2 - RICHARD
    3 - DANI
    12 - CHARLIE
    20 - BARRY
    If we pass a 'C' as p_ordertype (to obtain the list like above, ordered by usercode) , the result would be:
    1 - ALAN
    12 - CHARLIE
    2 - RICHARD
    20 - BARRY
    3 - DANI
    Do you understand what i'm trying to explain?... I hope that... I tried with
    ORDER BY DECODE(p_ordertype,'C',usercode,'D',TO_NUMBER(userdescr));
    but it doesn't works...
    More ideas?

  • Create function with a cursor in it

    I need help to create a function called f_Getfeedesc. I want to use a cursor for Loop. The function will return fees description for any folder.
    If a folder has more than one fee description, it will concatenate the fees description.
    The select statement I have here returns the following fees description:
    CO Residential 3+ Units No Entry Penalty Fee
    C of O Initial Fee
    CO Residential 3+ Units Initial Fee
    However when the function is done if you run it using the folderrsn 99999 the result should look like this:
    CO Residential 3+ Units No Entry Penalty Fee / C of O Initial Fee / CO Residential 3+ Units Initial Fee
    If the folderrsn has only one fee description the result should just return that one fee description. e.g CO Residential 3+ Units No Entry Penalty Fee
    I am using the following tables:
    folder table with FOLDERRSN......... NOT NULL  NUMBER(10,0) column.
    accountbillfee table with FEECODE..........NOT NULL  NUMBER(10,0) column.
    validaccountfee table with FEECODE........NOT NULL  NUMBER(10,0) and FEEDESC............NOT NULL  VARCHAR2(80) columns.
    SELECT DISTINCT vaf.feedesc
    FROM folder f, accountbillfee abf, validaccountfee vaf
    WHERE f.folderrsn = abf.folderrsn
    AND vaf.feecode = abf.feecode
    --And f.folderrsn = argfolderrsn
    AND f.folderrsn = 99999 --for a specific folderrsn
    Edited by: user4653174 on Sep 12, 2008 1:31 PM

    Hi,
    What you're trying to do is called "string aggregation".
    There's an excellent page on AskTom with several general solutions.
    I recommend the first one, STRAGG.
    Once you have STRAGG installed, you can get the output you want as simply as this:
    SELECT    feecode
    ,         STRAGG (feedesc)
    FROM      validaccountfee
    GROUP BY  feecode;Edited by: Frank Kulash on Sep 13, 2008 2:56 AM

  • Function with dynamics cursor.

    Hi everybody,
    I'm trying to write a function having as argument as SQL query(or a part of it). This SQL query should generate a cusror within the function. All the way would have the generated cusror always the same structure.
    CREATE OR REPLACE FUNCTION Calcul_avg(Name_Table VARCHAR) RETURN NUMBER
    IS
    TYPE Funct_Cursor_Type IS REF CURSOR RETURN Defined_Table%ROWTYPE;
    Funct_Cursor Funct_Cursor_Type;
    OPEN Funct_Cursor
    FOR SELECT ID, NAME FROM Name_Table ;
    Return Calcul_avg;
    With this function,
    I'm getting the error:
    PLS-00455: cursor 'FUNCT_CURSOR' cannot be used in dynamic SQL OPEN statement
    Thanks for your help!!
    Alex

    The error message measn what it says. We cannot use a strongly typed cursor with dynamic SQL. This is because the typing is enforced at compile time, whereas the cursor is only assembled at runtime. So we must use weakly typed cursors in this situation.
    If you have 9i then you can use an instance of the pre-defined SYS_REFCURSOR. Else
    TYPE Funct_Cursor_Type IS REF CURSOR;Cheers, APC

  • Running a function in a Cursor

    hi. i have an interesting question. i have a cursor that works properly.
    Such as :
    OPEN p_cursor FOR 'select name,surname,age,height,weight .... '
    it works properly.
    My question is, i want to add a pl sql function as a column. My cursor must be :
    OPEN p_cursor FOR
    'select name,surname,age,height,weight,calculate(name,surname,age)' .
    the calculate function is a pl sql function that gets column values of running rows. And return a value.
    how can i write that cursor EXACTLY.. thanx

    Oracle prohibits these things because they potentially voilate data consistency:
    Side Effects of PL/SQL functions in SQL
    A subprogram called from a query or DML statement may not end the current transaction, create or rollback to a savepoint, or ALTER the system or session.
    A subprogram called from a query (SELECT) statement or from a parallelized DML statement may not execute a DML statement or otherwise modify the database.
    A subprogram called from a DML statement may not read or modify the particular table being modified by that DML statement.
    You can think of autonomous functions but in most cases in SQL it's very dangerous approach.
    Rgds.

  • Running a report with large data output, fails with error.

    Hi,
    We have a report that contains a logo (size 60kb) and we have 1000 records that need to be printed and the logo needs to be printed for each record. We are successful in printing 100 records at present.
    While trying to print 1000 records, we are getting an Internal Server Error. What could be the reason? & How do can we overcome this problem?
    We are using Oracle Reports 10g Release 2.
    Thanks & Regards,
    Sairam SP

    May be below is the correct forum to place the question.
    Reports
    Cheers
    Sarma.

  • Execute this pl/sql function with some proper example & syntax

    --program is compiled but how to run this function with some proper example please please help me
    CREATE OR REPLACE
    FUNCTION EMP_GENDER(
    EMP_GEN CHAR)
    RETURN CHAR
    IS
    CUST_GEN CHAR(1) ;
    DTECH1 EXCEPTION;
    BEGIN
    CUST_GEN :=UPPER(EMP_GEN);
    IF CUST_GEN !='M' OR CUST_GEN != 'F' THEN
    RAISE DTECH1;
    ELSE
    RETURN CUST_GEN;
    END IF;
    EXCEPTION
    WHEN DTECH1 THEN
    DBMS_OUTPUT.PUT_LINE('INVALID GEN');
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;

    Or in pl/sql;-
    declare
                v_gender char(1) default 'M';--change M to whatever test scenario
    begin
                v_gender:= emp_gender(v_gender);
                dbms_output.put_line(v_gender);
    end;And remember to set your serveroutput on.... though your errors will be obvious enough...

  • How to call a Stored Procedure with a REF CURSOR output parameter

    I am looking forward an example that call a stored function/procedure with a REF CURSOR output parameter and get the result.
    In other words, I have a stored function/procedure that execute a SELECT statement using the OCI library and then it could get the values of each column and each row.
    I put a code snippet, it have only the main thing to call a simple stored procedure and print the name of each column of the cursor, but I couldn´t to print out the values in the table that call the stored procedure.
    I understand that the next step, it is to call a OCIStmtFetch.
    How to associate the cursor with the OCIStmtFetch?
    If you need more information, only tell me.
    I am using ANSI C with HP-UX Operative System (C for HP-UX) and Oracle 10g.
    Regards.
    Antonio Garcia
    /* callOracleSP */
    #include <stdio.h>
    #include <string.h>
    #include <oci.h>
    #include <stdlib.h>
    char* pConnectChar ="server";
    char* pUsernameChar = "user";
    char* pPasswordChar = "passwd";
    char* sqlCharArray1 = "BEGIN SP_GETCITIES(:s, :c); END;";
    int retval;
    ub4 parmcnt=0;
    ub4 pos2=0;
    text *pcoln[20];
    ub4 namelen[20];
    char state_key[5];
    OCIStmt* pOciStatement;
    OCIStmt* pOciStatCursor;
    OCIError* pOciError;
    OCIEnv* pOciEnviron;
    OCIServer* pOciServer;
    OCISession* pOciSession;
    OCISvcCtx* pOciServiceContext;
    OCIBind* pOciBind[500];
    OCIParam* pOciParam;
    int main()
    retval = OCIEnvCreate(&pOciEnviron, OCI_DEFAULT, NULL, NULL, NULL, NULL,0,NULL);
    retval = OCIEnvInit(&pOciEnviron, OCI_DEFAULT, 0, NULL);
    retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciError, OCI_HTYPE_ERROR, 0, NULL);
    retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciServiceContext, OCI_HTYPE_SVCCTX, 0, NULL);
    retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciStatement, OCI_HTYPE_STMT, 0, NULL);
    retval = OCILogon(pOciEnviron,pOciError,&pOciServiceContext,(unsigned char *)pUsernameChar,
         strlen(pUsernameChar), (unsigned char *)pPasswordChar, strlen(pPasswordChar),
                   (unsigned char *)pConnectChar,strlen(pConnectChar));
    printf("OCILogon retval=%d\n",retval);
    retval = OCIStmtPrepare(pOciStatement, pOciError, (unsigned char *)sqlCharArray1,strlen(sqlCharArray1),
         OCI_NTV_SYNTAX, OCI_DEFAULT);
    printf("StmtPrepare retval=%d\n",retval);
    retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciStatCursor, OCI_HTYPE_STMT, 0, NULL);
    retval = OCIBindByPos(pOciStatement,&pOciBind[0], pOciError, (ub4) 1, (void *)&state_key,
         (sb4) sizeof(state_key), SQLT_STR, (void *) 0, (ub2 *) 0, (ub2 *)0,(ub4)0, (ub4 *)0, (ub4) OCI_DEFAULT);
    printf("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);
    retval = OCIBindByPos(pOciStatement,&pOciBind[1], pOciError, (ub4) 2, (void *)&pOciStatCursor,
         (sb4) 0, SQLT_RSET, (void *) 0, (ub2 *) 0, (ub2 *)0,(ub4)0, (ub4 *)0, (ub4) OCI_DEFAULT);
    printf("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);
    strcpy(state_key,"CA");
    retval = OCIStmtExecute(pOciServiceContext, pOciStatement, pOciError, (ub4)1, (ub4) 0,
         (OCISnapshot *)NULL, (OCISnapshot *)NULL, (ub4) OCI_DEFAULT);
    printf("StmtExecute retval=%d\n",retval);
    /* How to get the values of the cursor? */
    /* Get number of parameters of the Cursor */
    OCIAttrGet((void *) pOciStatCursor, (ub4)OCI_HTYPE_STMT, (void*) &parmcnt,(ub4 *) 0,
         (ub4)OCI_ATTR_PARAM_COUNT, pOciError);
    printf("\nNumber of parameters of the cursor = %d\n",parmcnt);
    for (int pos = 1; pos <= (int)parmcnt; pos++)
         OCIAttrGet((void *) pOciStatCursor, (ub4)OCI_HTYPE_STMT, (void*) &pos2,(ub4 *) 0,
              (ub4)OCI_ATTR_CURRENT_POSITION, pOciError);
         retval = OCIParamGet((void *)pOciStatCursor, (ub4)OCI_HTYPE_STMT, pOciError, (void **)&pOciParam,
              (ub4) pos );
         OCIAttrGet((void*) pOciParam, (ub4) OCI_DTYPE_PARAM,(void*) &pcoln[pos-1],(ub4 *) &namelen[pos-1],
              (ub4) OCI_ATTR_NAME,(OCIError *)pOciError );
    for (int i = 1; i <=(int)parmcnt; i++)
    printf("Column %i\tNAME = %.*s\n",i,namelen[i-1],pcoln[i-1]);
    return 0;
    This is the script that create the table, insert records and create the stored procedure
    CREATE TABLE CITIES (
         STATE_CODE     VARCHAR2(2) NULL,
         CITY_CODE      NUMBER(15,5) NULL,
         CITY_NAME      VARCHAR2(30) NULL
    INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES('CA', 30, 'SAN DIEGO')
    INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES('CA', 40, 'SACRAMENTO')
    INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES('FL', 10, 'MIAMI')
    INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES('FL', 20, 'ORLANDO')
    INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES('NY', 10, 'NEW YORK')
    INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES('NY', 20, 'ALBANY')
    INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES('CA', 10, 'LOS ANGELES')
    INSERT INTO CITIES(STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES('CA', 20, 'SAN FRANCISCO')
    CREATE OR REPLACE PACKAGE globalPkg AUTHID CURRENT_USER AS
    /* The following are T/SQL specific global variables. */
    TYPE RCT1 IS REF CURSOR;/*new weak cursor definition*/
    END globalPkg;
    CREATE OR REPLACE PROCEDURE SP_ADDCITY(
    P_STATE_CODE IN VARCHAR,
    P_CITY_CODE      IN NUMBER,
    P_CITY_NAME      IN VARCHAR2,
    P_RETURN IN OUT NUMBER)
    AS
    StoO_error INTEGER;
    StoO_selcnt INTEGER;
    StoO_rowcnt INTEGER;
    StoO_errmsg VARCHAR2(255);
         BEGIN
    StoO_rowcnt := 0;
    StoO_error := 0;
    StoO_selcnt := 0;
    P_RETURN := 0;
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES (P_STATE_CODE, P_CITY_CODE, P_CITY_NAME);
    StoO_rowcnt := SQL%ROWCOUNT;
    EXCEPTION
    WHEN TOO_MANY_ROWS THEN
    StoO_rowcnt := 2;
    WHEN OTHERS THEN
    StoO_rowcnt := 0;
    StoO_selcnt := 0;
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
              IF StoO_error != 0 THEN
    BEGIN
                   P_RETURN := 1;
         RETURN;
         END;
              END IF;
         END;
    CREATE OR REPLACE PROCEDURE SP_GETCITIES(
    STATE_KEY IN VARCHAR,
    RC1      IN OUT globalPkg.RCT1)
    AS
    StoO_error INTEGER;
    StoO_selcnt INTEGER;
    StoO_rowcnt INTEGER;
    StoO_errmsg VARCHAR2(255);
    BEGIN
    StoO_rowcnt := 0;
    StoO_error := 0;
    StoO_selcnt := 0;
    OPEN RC1 FOR
    SELECT STATE_CODE, CITY_CODE, CITY_NAME
    FROM CITIES
    WHERE STATE_CODE = STATE_KEY
    ORDER BY CITY_CODE;
    StoO_rowcnt := SQL%ROWCOUNT;
    EXCEPTION
    WHEN OTHERS THEN
    StoO_rowcnt := 0;
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
         END;
    /

    Hi Mark,
    Thanks for your recommendations.
    I change the code with OCIDefineByPos, one for each parameter from cursor and then use the OCIStmtFetch.
    I don´t receive a error when call OCIDefineByPos, but when I call OCIStmtFetch receive a -1 error number.
    What is wrong with the code?
    The script is the same.
    I need your help!
    Best Regards!
    Antonio Garcia (Mexico)
    This the new code:
    #include <stdio.h>
    #include <string.h>
    #include <oci.h>
    #include <stdlib.h>
      char*   pConnectChar ="ORAC617";
      char*   pUsernameChar = "C617_005_DBO_01";
      char*   pPasswordChar = "Tempora1";
      char*   sqlCharArray1 = "BEGIN SP_GETCITIES(:s, :c); END;";
      int     retval;
      ub4 parmcnt=0;
      ub4 pos2=0;
      sb2   *c_indp;
      text *pcoln[20], *name,*name2;
      ub4 namelen[20],len;
      ub2 type,size;
      char state_key[5];
      OCIDefine        *pdef;
      OCIBind          *p_bnd;
      ub1          **c_buf;
      OCIStmt*     pOciStatement;      /* Statement handle */
      OCIStmt*     pOciStatCursor;     /* Statement handle */   
      OCIError*    pOciError;          /* Error handle */
      OCIEnv*      pOciEnviron;        /* Environment handle */
      OCIServer*   pOciServer;         /* Server handle */  
      OCISession*  pOciSession;        /* Session handle */
      OCISvcCtx*   pOciServiceContext; /* Service Context handle */
      OCIBind*     pOciBind[500];      /* Bind handle */
      OCIParam*    pOciParam;          /* Param handle */
      int OCI_Fetch(OCIStmt *p_select,OCIError *p_err, int *piOcc)
      int iOcc, rc; 
      rc=OCIStmtFetch(p_select,p_err,1,OCI_FETCH_NEXT,OCI_DEFAULT);
      printf("rc fetch %i",rc);
      if(rc==0&&piOcc!=NULL){
           printf("entro al if");
        iOcc=*piOcc;
        *piOcc=iOcc+1;
      return rc;
    int main()
    int pos,i=0,rc;
      retval = OCIEnvCreate(&pOciEnviron, OCI_DEFAULT, NULL, NULL, NULL, NULL,0,NULL);
      printf("EnvCreate retval=%d\n", retval);
      retval = OCIEnvInit(&pOciEnviron, OCI_DEFAULT, 0, NULL);
      printf("EnvInit retval=%d\n",retval);
      retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciError, OCI_HTYPE_ERROR, 0, NULL);
      printf("HandleAlloc OCI_HTYPE_ERROR retval=%d\n",retval);
      retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciServiceContext, OCI_HTYPE_SVCCTX, 0, NULL);
      printf("HandleAlloc OCI_HTYPE_SVCCTX retval=%d\n",retval);
      retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciStatement, OCI_HTYPE_STMT, 0, NULL);
      printf("HandleAlloc OCI_HTYPE_STMT retval=%d\n",retval);
      retval = OCILogon(pOciEnviron,pOciError,&pOciServiceContext,(unsigned char *)pUsernameChar,
                  strlen(pUsernameChar), (unsigned char *)pPasswordChar, strlen(pPasswordChar),
                    (unsigned char *)pConnectChar,strlen(pConnectChar));
      printf("OCILogon retval=%d\n",retval);
      retval = OCIStmtPrepare(pOciStatement, pOciError, (unsigned char *)sqlCharArray1,strlen(sqlCharArray1),
                 OCI_NTV_SYNTAX, OCI_DEFAULT);
      printf("StmtPrepare retval=%d\n",retval);
      retval = OCIHandleAlloc(pOciEnviron, (void **)&pOciStatCursor, OCI_HTYPE_STMT, 0, NULL);
      printf("HandleAlloc OCI_HTYPE_STMT retval=%d\n",retval);
      retval = OCIBindByPos(pOciStatement,&pOciBind[0], pOciError, (ub4) 1, (void *)&state_key,
                 (sb4) sizeof(state_key), SQLT_STR, (void *) 0, (ub2 *) 0, (ub2 *)0,(ub4)0, (ub4 *)0, (ub4) OCI_DEFAULT);
      printf("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);
      retval = OCIBindByPos(pOciStatement,&pOciBind[1], pOciError, (ub4) 2, (void *)&pOciStatCursor,
                 (sb4) 0, SQLT_RSET, (void *) 0, (ub2 *) 0, (ub2 *)0,(ub4)0, (ub4 *)0, (ub4) OCI_DEFAULT);
      printf("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);
      strcpy(state_key,"CA");
      retval = OCIStmtExecute(pOciServiceContext, pOciStatement, pOciError, (ub4)1, (ub4) 0,
                   (OCISnapshot *)NULL, (OCISnapshot *)NULL, (ub4) OCI_DEFAULT);
      printf("StmtExecute retval=%d\n",retval);
      c_buf=(ub1 **)calloc(sizeof(ub1 *),3);
      c_indp=(sb2 *)calloc(sizeof(sb2 *),3);
      // Get number of parameters of the Cursor
      OCIAttrGet((void *) pOciStatCursor, (ub4)OCI_HTYPE_STMT, (void*) &parmcnt,(ub4 *) 0,
                  (ub4)OCI_ATTR_PARAM_COUNT, pOciError);
      printf("\nNumber of parameters of the cursor = %d\n",parmcnt);
      for (pos = 1; pos <= (int)parmcnt; pos++)
           OCIAttrGet((void *) pOciStatCursor, (ub4)OCI_HTYPE_STMT, (void*) &pos2,(ub4 *) 0,
                (ub4)OCI_ATTR_CURRENT_POSITION, pOciError);
           retval = OCIParamGet((void *)pOciStatCursor, (ub4)OCI_HTYPE_STMT, pOciError, (void **)&pOciParam,(ub4) pos );
           // Get the column name
           OCIAttrGet((void*) pOciParam, (ub4) OCI_DTYPE_PARAM,(void*) &name,(ub4 *) &len, (ub4) OCI_ATTR_NAME,(OCIError *)pOciError );
            // Get the column datatype
           OCIAttrGet((void*) pOciParam, (ub4) OCI_DTYPE_PARAM,(void*) &type,(ub4 *)0,(ub4)OCI_ATTR_DATA_TYPE,(OCIError *)pOciError);      
            // Get the column size
           OCIAttrGet((void*) pOciParam, (ub4) OCI_DTYPE_PARAM,(void*) &size,(ub4 *)0,(ub4)OCI_ATTR_DATA_SIZE,(OCIError *)pOciError);
           printf("Column %i\tNAME = %.*s \ttype %d \tsize %d\n",pos,len,name,type,size);
           // OCIDefine ByPos, one for each parameter
           // c_buf store the STATE_CODE, CITY_CODE and CITY_NAME columns from the cursor
           rc=OCIDefineByPos(pOciStatCursor,&pdef,(OCIError *)pOciError,pos,c_buf[pos-1],size+1,(ub2)type,(dvoid *)c_indp[pos-1],(ub2 *)0,(ub2 *)0,OCI_DEFAULT);     
          printf("OCIDefineByPos retval=%d\n,rc);
      // call OCIStmtFetch. In the next line, I receive the error
      rc=OCIStmtFetch(pOciStatCursor,pOciError,1,OCI_FETCH_NEXT,OCI_DEFAULT);
      printf("rc fetch %i",rc);
      return 0;
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Parallel  piplelined function not parallelizing with ref cursor

    RDBMS 11.2.0.3
    I have a function with the following signature
    function to_file (
      p_source     in  sys_refcursor
    , p_file_name  in  varchar2
    , p_directory  in  varchar2 default 'DD_DUMP'
    return dd_dump_ntt
    pipelined
    parallel_enable ( partition p_source by any )
    authid current_user;The function works in parallel when I use a cursor expression like this
    begin
      for rec in ( select *
                   from table(dd_dump.to_file( cursor(select /*+ parallel(i 4) */ c1||chr(9)||c2 from mytable i), 'f.out' ))
      loop
        dbms_output.put_line(rec.file_name || chr(9) || rec.num_records );
      end loop;
    end;
    f.out_162     276234
    f.out_213     280399
    f.out_230     286834
    f.out_70     289549But when I use a refcursor, it does not run in parallel
    declare
      rc sys_refcursor;
    begin
      open rc for 'select /*+ parallel(i 4) */ c1||chr(9)||c2 from mytable i';
      for rec in ( select *
                   from table(dd_dump.to_file( rc, 'f.out' ))
      loop
        dbms_output.put_line(rec.file_name || chr(9) || rec.num_records );
      end loop;
    end;
    f.out_914     1133016Is this an expected behavior or am I doing something wrong? How can I use the function when the client returns the SQL statement as a character string
    Edited by: Sanjeev Chauhan on Mar 9, 2012 11:54 AM

    Sanjeev Chauhan wrote:
    I am not performing any DML in the pipelined function. If you read the note carefuly it shows parallel_enable works only when you use:
    table(table_function(<font color=red>CURSOR</font>(select...)))and not when you use
    table(table_function(<font color=red>ref-cursor-name</font>))SY.

  • Running SQL Procedure with dg4msql errors: Function sequence error HY010

    I am trying to execute a stored procedure on a SQL database and get the error Function sequence error HY010.
    A simple query on a table returns teh expected result.
    I have a single Win2008R2 server with MSSQL Express 2008 and Oracle 11gR2 (32bit not 64bit version of Oracle)
    Below is the gateway init, listener and tnsnames files and the query I am trying to run:
    -- initORIONWASP.ora --
    HS_FDS_CONNECT_INFO=INGRDB//waspForGIS
    HS_FDS_TRACE_LEVEL=OFF
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    HS_CALL_NAME=dbo.spTest;dbo.spQueryAsset;dbo.spQueryAssetDetails
    HS_FDS_PROC_IS_FUNC=TRUE
    HS_FDS_RESULTSET_SUPPORT=TRUE
    -- Listener.ora -- (partial)
    (SID_DESC =
    (SID_NAME = ORIONWASP)
    (ORACLE_HOME = C:\Oracle\product\11.2.0\dbhome_1)
    (PROGRAM=dg4msql)
    -- tnsnames.ora -- (partial)
    ORIONWASP =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=INGRDB)(PORT=1521))
    (CONNECT_DATA=(SID=ORIONWASP))
    (HS=OK)
    -- Simple Query --
    Running select "Asset_ID" from asset@ORIONWASP; returns the correct result
    Running select * from sys.procedures@ORIONWASP; returns a list of procedures including the procedure I want to run
    -- This pl/sql block returns the error ******* identifier 'spTest@ORIONWASP' must be declared *******
    declare
    begin
    "spTest"@ORIONWASP;
    end;
    -- This passthrough pl/sql block returns ******** [Oracle][ODBC SQL Server Driver]Function sequence error {HY010} ********
    DECLARE
    CRS BINARY_INTEGER;
    RET BINARY_INTEGER;
    v_COL1 VARCHAR2(50);
    v_COL2 VARCHAR2(50);
    BEGIN
    CRS := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@ORIONWASP;
    DBMS_HS_PASSTHROUGH.PARSE@ORIONWASP(CRS, 'exec spTest');
    BEGIN
    RET := 0;
    WHILE (TRUE)
    LOOP
    ret := DBMS_HS_PASSTHROUGH.FETCH_ROW@ORIONWASP(CRS, FALSE);
    DBMS_HS_PASSTHROUGH.GET_VALUE@ORIONWASP(CRS, 1, v_COL1);
    DBMS_HS_PASSTHROUGH.GET_VALUE@ORIONWASP(CRS, 2, v_COL2);
    DBMS_OUTPUT.PUT_Line('Col1:'||v_COL1||' Col2:'||v_COL2);
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    BEGIN
    DBMS_OUTPUT.PUT_LINE('End of Fetch');
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@ORIONWASP(CRS);
    END;
    END;
    END;
    /

    The gateway configuration file contains:
    HS_FDS_PROC_IS_FUNC=TRUE
    HS_FDS_RESULTSET_SUPPORT=TRUE
    This setting commonly causes problems and you need to set
    HS_FDS_PROC_IS_FUNC=TRUE
    HS_FDS_RESULTSET_SUPPORT=FALSE
    for normal procedure calls and
    HS_FDS_PROC_IS_FUNC=FALSE
    HS_FDS_RESULTSET_SUPPORT=TRUE
    when calling the procedure with ref cursors.
    There's a note in My Oracle Support that gives you examples how to call remote SQl Server procedures
         Note.197192.1 Different Methods How To Call MS SQL Server Procedures Using TG4MSQL - DG4MSQL
    and another one for the Sybase gateway but this code is similar for the SQL Server:
    Article-ID: Note 351400.1
    Title: How to Call a Remote Sybase Procedure Using TG4SYBS

  • My macbook pro is running very slow with some strange mouse and window movements. The trackpad is very unresponsive and when responding the cursor moves on its own and/or very erratically. When on safari the window suddenly zooms in or highlights words.

    My macbook pro is running very slow with some strange mouse and window movements. The trackpad is very unresponsive and when responding the cursor moves on its own and/or very erratically. When on safari the window suddenly zooms in or highlights words and looks them up via dictionary. I currently have a wireless mouse connected and I am still having the same problems.
    I fee like I may have a virus or my laptop is perhaps being accessed remotely. All of the sharing options are unchecked.
    HELP PLEASE
    Very worried!!

    Try these in order testing your system after each to see if it's back to normal:
    1. a. Resetting your Mac's PRAM and NVRAM
        b. Intel-based Macs: Resetting the System Management Controller (SMC)
    2. Restart the computer in Safe Mode, then restart again, normally. If this doesn't help, then:
         Boot to the Recovery HD: Restart the computer and after the chime press and hold down the
         COMMAND and R keys until the Utilities menu screen appears. Alternatively, restart the computer and
         after the chime press and hold down the OPTION key until the boot manager screen appears.
         Select the Recovery HD and click on the downward pointing arrow button.
    3. Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the Utilities menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
         Reinstall the 10.9.2 update: OS X Mavericks 10.9.2 Update (Combo).
    4. Reinstall Lion/Mountain Lion, Mavericks: Reboot from the Recovery HD. Select Reinstall Lion/Mountain Lion, Mavericks from the Utilities menu, and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    Reinstall the 10.9.2 update: OS X Mavericks 10.9.2 Update (Combo).

  • I have an app that crashes when I run one function, but no one else I know with the same app experiences the crash.  I checked my Diagnostics

    I have an app called Astrogold that crashes when I run one function, but no one else I know with the same app experiences the crash.  The app writes several different reports, and gives the option of sending them as PDF files.  All the other reports generate fine, but one of them....and that one crashes the app while it is trying to generate the report.
    Note:  it only crashes the display.  If I double click the home button I see the app itself is still running.
    I checked my Diagnostics & Usage data, and noticed that every time the app crashes a LowMemory report is created.  I looked at the LowMemory report and see that the Largest process is Astrogold.  But I don't see any reports with the name of the app itself.
    I have an iPhone 5c, and according to iTunes I have 2.25 GB Free.
    Below is the actual LowMemory report.  Can anyone make any suggestions?
    name":"astrogold","bug_type":"109","os_version":"iPhone OS 7.1.2 (11D257)","bundleID":"com.esotech.astrogold","version":"4.2.4 (4.2)","app_name":"astrogold"}
    Incident Identifier: 257B47E8-3A4D-4C64-8E9F-71D33C905548
    CrashReporter Key:   cfa389285f4559a21d797bfeec6a78c584e798d6
    Hardware Model:      iPhone5,4
    Process:             astrogold [18906]
    Path:                /var/mobile/Applications/D8301675-652C-4472-A168-CF3F141C5F58/astrogold.app/ast rogold
    Identifier:          com.esotech.astrogold
    Version:             4.2.4 (4.2)
    Code Type:           ARM (Native)
    Parent Process:      launchd [1]
    Date/Time:           2014-08-31 13:15:13.616 +0800
    OS Version:          iOS 7.1.2 (11D257)
    Report Version:      104
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Triggered by Thread:  0
    Thread 0 Crashed:
    0   libsystem_kernel.dylib         0x399a51f0 0x39992000 + 78320
    1   libsystem_pthread.dylib        0x39a0d7b2 0x39a0a000 + 14258
    2   libsystem_c.dylib              0x39955ff4 0x3990c000 + 303092
    3   libsystem_malloc.dylib         0x399ccd20 0x399ca000 + 11552
    4   libobjc.A.dylib                0x393f73a4 0x393ed000 + 41892
    5   libobjc.A.dylib                0x393ffb66 0x393ed000 + 76646
    6   astrogold                      0x001be574 0xe2000 + 902516
    7   astrogold                      0x001be774 0xe2000 + 903028
    8   astrogold                      0x001a2910 0xe2000 + 788752
    9   astrogold                      0x001a40fa 0xe2000 + 794874
    10  UIKit                          0x315ba174 0x3147c000 + 1302900
    11  UIKit                          0x315613d6 0x3147c000 + 938966
    12  UIKit                          0x31560c2c 0x3147c000 + 937004
    13  UIKit                          0x314872e0 0x3147c000 + 45792
    14  QuartzCore                     0x31103316 0x310f7000 + 49942
    15  QuartzCore                     0x310feb3a 0x310f7000 + 31546
    16  QuartzCore                     0x310fe9cc 0x310f7000 + 31180
    17  QuartzCore                     0x310fe3e0 0x310f7000 + 29664
    18  QuartzCore                     0x310fe1f2 0x310f7000 + 29170
    19  QuartzCore                     0x310f7f18 0x310f7000 + 3864
    20  CoreFoundation                 0x2ec20ff6 0x2eb81000 + 655350
    21  CoreFoundation                 0x2ec1e982 0x2eb81000 + 645506
    22  CoreFoundation                 0x2ec1ecce 0x2eb81000 + 646350
    23  CoreFoundation                 0x2eb89724 0x2eb81000 + 34596
    24  CoreFoundation                 0x2eb89506 0x2eb81000 + 34054
    25  GraphicsServices               0x33af86ce 0x33aef000 + 38606
    26  UIKit                          0x314ea86c 0x3147c000 + 452716
    27  astrogold                      0x000e9136 0xe2000 + 28982
    28  libdyld.dylib                  0x398eeab4 0x398ed000 + 6836
    Thread 1:
    0   libsystem_kernel.dylib         0x39992804 0x39992000 + 2052
    1   libdispatch.dylib              0x398e1050 0x398d9000 + 32848
    2   libdispatch.dylib              0x398db2de 0x398d9000 + 8926
    Thread 2:
    0   libsystem_kernel.dylib         0x39992a50 0x39992000 + 2640
    1   libsystem_kernel.dylib         0x39992848 0x39992000 + 2120
    2   CoreFoundation                 0x2ec205e4 0x2eb81000 + 652772
    3   CoreFoundation                 0x2ec1ed04 0x2eb81000 + 646404
    4   CoreFoundation                 0x2eb89724 0x2eb81000 + 34596
    5   CoreFoundation                 0x2eb89506 0x2eb81000 + 34054
    6   Foundation                     0x2f57d492 0x2f572000 + 46226
    7   Foundation                     0x2f5ce254 0x2f572000 + 377428
    8   astrogold                      0x00408f30 0xe2000 + 3305264
    9   Foundation                     0x2f63fa0a 0x2f572000 + 842250
    10  libsystem_pthread.dylib        0x39a0c956 0x39a0a000 + 10582
    11  libsystem_pthread.dylib        0x39a0c8c6 0x39a0a000 + 10438
    12  libsystem_pthread.dylib        0x39a0aae4 0x39a0a000 + 2788
    Thread 3 name:  com.apple.NSURLConnectionLoader
    Thread 3:
    0   libsystem_kernel.dylib         0x39992a50 0x39992000 + 2640
    1   libsystem_kernel.dylib         0x39992848 0x39992000 + 2120
    2   CoreFoundation                 0x2ec205e4 0x2eb81000 + 652772
    3   CoreFoundation                 0x2ec1ed04 0x2eb81000 + 646404
    4   CoreFoundation                 0x2eb89724 0x2eb81000 + 34596
    5   CoreFoundation                 0x2eb89506 0x2eb81000 + 34054
    6   Foundation                     0x2f5ca23c 0x2f572000 + 361020
    7   Foundation                     0x2f63fa0a 0x2f572000 + 842250
    8   libsystem_pthread.dylib        0x39a0c956 0x39a0a000 + 10582
    9   libsystem_pthread.dylib        0x39a0c8c6 0x39a0a000 + 10438
    10  libsystem_pthread.dylib        0x39a0aae4 0x39a0a000 + 2788
    Thread 4 name:  com.apple.CFSocket.private
    Thread 4:
    0   libsystem_kernel.dylib         0x399a5434 0x39992000 + 78900
    1   CoreFoundation                 0x2ec244de 0x2eb81000 + 668894
    2   libsystem_pthread.dylib        0x39a0c956 0x39a0a000 + 10582
    3   libsystem_pthread.dylib        0x39a0c8c6 0x39a0a000 + 10438
    4   libsystem_pthread.dylib        0x39a0aae4 0x39a0a000 + 2788
    Thread 5:
    0   libsystem_kernel.dylib         0x399a5c70 0x39992000 + 81008
    1   libsystem_pthread.dylib        0x39a0ac1e 0x39a0a000 + 3102
    2   libsystem_pthread.dylib        0x39a0aad8 0x39a0a000 + 2776
    Thread 6:
    0   libsystem_platform.dylib       0x39a069a6 0x39a05000 + 6566
    1   libobjc.A.dylib                0x393ffad6 0x393ed000 + 76502
    2   CoreFoundation                 0x2eb86140 0x2eb81000 + 20800
    3   CoreFoundation                 0x2eb8c0dc 0x2eb81000 + 45276
    4   CoreFoundation                 0x2eb9f6e4 0x2eb81000 + 124644
    5   astrogold                      0x0019ed06 0xe2000 + 773382
    6   Foundation                     0x2f59a64c 0x2f572000 + 165452
    7   Foundation                     0x2f58a870 0x2f572000 + 100464
    8   Foundation                     0x2f62e740 0x2f572000 + 771904
    9   libdispatch.dylib              0x398de25a 0x398d9000 + 21082
    10  libdispatch.dylib              0x398df684 0x398d9000 + 26244
    11  libdispatch.dylib              0x398df8d8 0x398d9000 + 26840
    12  libsystem_pthread.dylib        0x39a0ac14 0x39a0a000 + 3092
    13  libsystem_pthread.dylib        0x39a0aad8 0x39a0a000 + 2776
    Thread 7:
    0   libsystem_kernel.dylib         0x399a5c70 0x39992000 + 81008
    1   libsystem_pthread.dylib        0x39a0ac1e 0x39a0a000 + 3102
    2   libsystem_pthread.dylib        0x39a0aad8 0x39a0a000 + 2776
    Thread 8:
    0   libsystem_kernel.dylib         0x39992a50 0x39992000 + 2640
    1   libsystem_kernel.dylib         0x39992848 0x39992000 + 2120
    2   CoreFoundation                 0x2ec205e4 0x2eb81000 + 652772
    3   CoreFoundation                 0x2ec1ed04 0x2eb81000 + 646404
    4   CoreFoundation                 0x2eb89724 0x2eb81000 + 34596
    5   CoreFoundation                 0x2ebcd346 0x2eb81000 + 312134
    6   CoreMotion                     0x2f2484fc 0x2f20f000 + 234748
    7   libsystem_pthread.dylib        0x39a0c956 0x39a0a000 + 10582
    8   libsystem_pthread.dylib        0x39a0c8c6 0x39a0a000 + 10438
    9   libsystem_pthread.dylib        0x39a0aae4 0x39a0a000 + 2788
    Thread 9 name:  WebThread
    Thread 9:
    0   libsystem_kernel.dylib         0x39992a50 0x39992000 + 2640
    1   libsystem_kernel.dylib         0x39992848 0x39992000 + 2120
    2   CoreFoundation                 0x2ec205e4 0x2eb81000 + 652772
    3   CoreFoundation                 0x2ec1ed04 0x2eb81000 + 646404
    4   CoreFoundation                 0x2eb89724 0x2eb81000 + 34596
    5   CoreFoundation                 0x2eb89506 0x2eb81000 + 34054
    6   WebCore                        0x36ebfc70 0x36e01000 + 781424
    7   libsystem_pthread.dylib        0x39a0c956 0x39a0a000 + 10582
    8   libsystem_pthread.dylib        0x39a0c8c6 0x39a0a000 + 10438
    9   libsystem_pthread.dylib        0x39a0aae4 0x39a0a000 + 2788
    Thread 10 name:  JavaScriptCore::BlockFree
    Thread 10:
    0   libsystem_kernel.dylib         0x399a4f2c 0x39992000 + 77612
    1   libsystem_pthread.dylib        0x39a0bf62 0x39a0a000 + 8034
    2   libsystem_pthread.dylib        0x39a0cd9c 0x39a0a000 + 11676
    3   JavaScriptCore                 0x2fbb8308 0x2fba6000 + 74504
    4   JavaScriptCore                 0x2fbb5970 0x2fba6000 + 63856
    5   libsystem_pthread.dylib        0x39a0c956 0x39a0a000 + 10582
    6   libsystem_pthread.dylib        0x39a0c8c6 0x39a0a000 + 10438
    7   libsystem_pthread.dylib        0x39a0aae4 0x39a0a000 + 2788
    Thread 11 name:  JavaScriptCore::Marking
    Thread 11:
    0   libsystem_kernel.dylib         0x399a4f2c 0x39992000 + 77612
    1   libsystem_pthread.dylib        0x39a0bf62 0x39a0a000 + 8034
    2   libsystem_pthread.dylib        0x39a0cd9c 0x39a0a000 + 11676
    3   JavaScriptCore                 0x2fd56cb2 0x2fba6000 + 1772722
    4   JavaScriptCore                 0x2fd56d0c 0x2fba6000 + 1772812
    5   JavaScriptCore                 0x2fbb5970 0x2fba6000 + 63856
    6   libsystem_pthread.dylib        0x39a0c956 0x39a0a000 + 10582
    7   libsystem_pthread.dylib        0x39a0c8c6 0x39a0a000 + 10438
    8   libsystem_pthread.dylib        0x39a0aae4 0x39a0a000 + 2788
    Thread 0 crashed with ARM Thread State (32-bit):
        r0: 0x00000000    r1: 0x00000000      r2: 0x00000000      r3: 0x27d1f553
        r4: 0x00000006    r5: 0x3b90118c      r6: 0x0000000b      r7: 0x27d1f5bc
        r8: 0x0000000b    r9: 0x00000001     r10: 0x00626000     r11: 0x00000000
        ip: 0x00000148    sp: 0x27d1f5b0      lr: 0x39a0d7b7      pc: 0x399a51f0
      cpsr: 0x00000010
    Zane B Stein
    ("os_version":"iPhone OS 7.1.2 (11D257)","version":"104","bug_type":"198"}
    Incident Identifier: 3526E805-4C03-4956-83B6-2A4AB95B9EE4
    CrashReporter Key:   cfa389285f4559a21d797bfeec6a78c584e798d6
    Hardware Model:      iPhone5,4
    OS Version:          iPhone OS 7.1.2 (11D257)
    Kernel Version:      Darwin Kernel Version 14.0.0: Thu May 15 23:10:37 PDT 2014; root:xnu-2423.10.71~1/RELEASE_ARM_S5L8950X
    Date:                2014-09-02 14:24:12 +0800
    Time since snapshot: 220 ms
    Free pages:                              1448
    Active pages:                            17896
    Inactive pages:                          9268
    Speculative pages:                       11
    Throttled pages:                         209561
    Purgeable pages:                         261
    Wired pages:                             21682
    File-backed pages:                       26187
    Anonymous pages:                         988
    Compressions:                            456385
    Decompressions:                          85356
    Compressor Size:                         44
    Uncompressed Pages in Compressor:        59
    Largest process:   astrogold
    Processes
         Name                    <UUID>                       rpages       recent_max   fds      [reason]          (state)
    CloudKeychainPro <b9fbb8e4989732709cb18c481dfa61a9>          108              108  200                      (daemon) (idle)
        mediaremoted <051ef8b6e7c93fa49a0a2e15ea6e1f52>          193              193  200                      (daemon) (idle)
    MobileGestaltHel <c3c9c32948fe364f8103dd528164b610>          123              123  200                      (daemon) (idle)
             DuetLST <89027d811bd73931a4d45f71c9bbebc7>          472              472  200                      (daemon) (idle)
        itunesstored <00f47fa85c623cee9d55c9b004ba561d>         1426             1426  200                      (daemon) (idle)
                 lsd <8d2569b7b89033328609c73d07410b55>          149              149  200                      (daemon) (idle)
            sandboxd <712c543459bf3d81b0ec88bba199d802>           96               96  200                      (daemon) (idle)
                geod <6e5e9ae33f8638b7be848eac2c1ef70b>          166              166  200                      (daemon) (idle)
             assetsd <6f28405c4c1b35e9aff946c1c4799c0f>          868              868  200                      (daemon) (idle)
            installd <185a1eaa735b3aa38d98092ba8493ba0>          201              201  200                      (daemon) (idle)
           securityd <47657a3a48573d6a8e52ef4cc868248c>          617              617  200                      (daemon) (idle)
    networkd_privile <234d3717143e3bbba12acc5de334deaf>           81               81  200                      (daemon) (idle)
           accountsd <5a5640b47fe637bebb6254deff26eaee>          438              438  200                      (daemon) (idle)
            routined <d5590a1879153ed284886271907ea8fa>          344              344  200                      (daemon) (idle)
    EscrowSecurityAl <d0a689490be631efac2c764fe93300dc>          166              166  200                      (daemon)
            mstreamd <a2bb6401f1d63c7aa320a817d8839522>          406              406  200                      (daemon)
                tccd <ad9819a843e93a1680335febb52c7cc3>          227              227  200                      (daemon)
                 kbd <eba296f6bd4938688fa16a5e39fa477c>         2319             2319  200                      (daemon)
           CVMServer <c95a902a5ae331c2a5239b6cf98a0617>           89               89  200                      (daemon)
           astrogold <58c53f7c8e8931ec823713195426f59c>       166401           166401  200  [per-process-limit] (frontmost) (resume)
    identityservices <d1b907f8a41e3ebd9f270aa846040b07>          581              581  100                      (daemon)
               wifid <2b4c0ddf1a8439838868bf2be61d8bf1>         1286             1286   25                      (daemon)
             syslogd <5c06b8eec36032b49cc9421348ba47ea>          132              132   50                      (daemon)
           locationd <b813efaa4a6a314cafdbbd9b88c30796>         1732             1732  100                      (daemon)
              powerd <bd077d109d773bcd9041153b30ea034a>          128              129  100                      (daemon)
             imagent <79bd0fedda583ae3822051093f7681b5>          571              571  100                      (daemon)
                 vmd <f44f0a6a37293606865eb8862c10b653>          188              188  100                      (daemon)
       iaptransportd <818588012ed93eb7a10ccb22d8acadfe>          223              223   50                      (daemon)
        mediaserverd <e40c7476d9fe3d759bfd28b8d68dc7ba>         2233             2233  200                      (daemon)
       mDNSResponder <60e905f9582a3090ab6e7a257454389e>          226              226  100                      (daemon)
                apsd <b7e19d27180e34aba845e475eae7d3db>          510              510  100                      (daemon)
         dataaccessd <fdf81960fb903bd68616117fd29ce277>         2563             2563  200                      (daemon)
            sharingd <2c731a1c182637a39b004694b2a5e23d>          508              508   50                      (daemon)
        mobileassetd <08440fa17b3537afb347cf78aa039a67>          565              565  200                      (daemon)
         SpringBoard <f73e83ffc898302394baa2042ca232fd>         9211             9211  100                    
          backboardd <b5d33ca6da9c33d48e2c8ccb9930c3dc>         8716             8716   50                      (daemon)
          aggregated <3e381378eb7f3dd2846920cb5db91265>          523              523   50                      (daemon)
           lockdownd <d998e2bac7663966bd0285c07ed89111>          276              276  100                      (daemon)
             configd <20b29bb0286e347ebe7c42aa8ee421c9>          462              462  100                      (daemon)
           fseventsd <8876b6f5a0c13024a12cb3e148ddab61>          303              303  100                      (daemon)
        fairplayd.H2 <243ccf92ad4d34cbb4fdf7e078d55141>          130              130  100                      (daemon)
       wirelessproxd <47699be4861c30abbb375e1d3b9e15dc>          153              153  100                      (daemon)
            BTServer <51d0d4421dc73abf9d4844e2b155c340>          536              536  100                      (daemon)
           distnoted <7895f761ec323e31a356860060f8713d>          155              155  100                      (daemon)
      UserEventAgent <9aedc371d1c037e7b5d7b5577f0424a8>          756              756  100                      (daemon)
    WirelessCoexMana <f5dcce7805a9308bbbcf2d52751385ef>          132              132  100                      (daemon)
            networkd <148d4512d2c43efc95bafd487fd97f4a>          577              577  100                      (daemon)
    filecoordination <7b1b1b1b4fe0364c8e0adfd90f78b4a9>          207              207  200                      (daemon)
       medialibraryd <fdf252b3fb1a3646a836c0c3b5840464>          634              634  200                      (daemon)
         touchsetupd <0a4f35337aa13e55a3d7e56296499e14>          154              154  200                      (daemon)
                 ubd <30a03e11a5c43c7cbd6ecd1aaef27841>          470              470  200                      (daemon)
          CommCenter <463e099ed64e30ad9433b8ea3f4a4e94>         2039             2039  100                      (daemon)
             notifyd <5b4c0731afd533179b295e4f39e589d6>          335              335  100                      (daemon)
    **End**
    <Post Edited By Host>

    Thank you for your reply.
    >You can double-click the home button and then swipe upwards on the thumbnail of the app to force it closed.
    Did that
    >After that, power the phone off and back on again, test.
    Did that
    >If still a problem, force close the app again and then reset the phone, holding the sleep/wake and home buttons together until you see the Apple logo and then release. The phone will reboot, test.
    Did that
    >If still a problem, then connect the device to iTunes and restore from backup.
    Did that
    >If that does not work, it is possible there is something corrupt in the backup. The final step is restore as new, not from a backup.
    This is the only thing I had not done before I posted my initial request for help.  I will work on that....it's a last resort I was hoping not to do, but it sounds like I've already done everything else.
    Thank you.

  • After their recent upgrade Facebook no longer works for Firefox version 2.0.0.20, what is the most recent version of Firefox that will function with a Mac G3 running OS 10.3.9?

    Facebook (FB) recently restructured their website. After logging on to my FB homepage, some of the graphics are garbled and I am no longer able to post status updates, comment on friend's status updates or pictures, or post pictures using Firefox version 2.0.0.20. I would like to know if there is a newer version of Firefox that will function with a Mac G3 Blue and White desktop running OS 10.3.9 which will be compatible with the new FB? I would upgrade my computer, but have 22+ years of business and tax records that will not function with the newer Mac OS.

    Other browsers that you can look at:
    * Camino: http://caminobrowser.org/download/releases/
    * [http://en.wikipedia.org/wiki/ICab iCab]: http://www.icab.de/dl.php
    * SeaMonkey: http://www.seamonkey-project.org/releases/seamonkey1.1.19

  • Issue with configuration of 'Special Function' to a custom output type

    Hi Experts,
    In my project we have a requirement to configure a custom output type for application V3 (billing) and assign a Special Function to it. I have assigned a custom Program Name and a custom form routine within the custom output type in Processing Routines (in NACE). But when I try to save the Billing document using VF01 / VF02 it gives me an error saying 'Processing Routine XXXXX in program ZXXXXX does not exist'. I have double checked that the Z program is activated. I have declared as follows:
    REPORT ZXXXX.
    FORM XXXX USING return_code us_screen.
    Can anyone please tell me if I am missing something?
    Thanks,
    Avi

    Hi Neil,
    Now this error is resolved. It does not give me that message anymore. But I am getting a new error while saving the billing document with the customized output type. Following is my configuration in NACE:
    Application: V3
    Output Type: ZMAM
    Program: YVRO_TOLLING
    Form Routine: F_FETCH_AND_PREPARE_DATA
    I am trying to place a break-point within the form routine F_FETCH_AND_PREPARE_DATA but it does not stop there. When go back inside the billing document, it shows an error against the ZMAM output type but has nothing in the processing log. Am I missing something?
    Avi

  • BETWEEN FUNCTION WITH IN A DECODE FUNTION IN A CURSOR

    The following below is my query..I have to get the hours,min and seconds from a 'yyyy-mm-dd-24hh.mi.ss' value and check if the time is between 12 am to 6 am , then write it with one value else write an another value..I am trying to use 'BETWEEN' function in decode function but i am getting error.....Can we use BETWEEN function with in decode function or is there any other way
    set serveroutput on
    declare
    cursor cur_dte is select lst_upd_date from EMPLOYESS ;
    begin
    for i in cur_dte loop
    DECODE (substr(trim(i.lst_upd_date),12)) ,between '00.00.00.0000' and '06.00.00.00.0000' ,101,102);
    dbms_output.put_line(i.lst_upd_date);
    end loop;
    end

    First of all. If you are in PL/SQL then CASE is just a more colmplex expression then IF THEN ELSE. I usually prefere If then else, but for some rare cases.
    The other issue is that you convert a datetime value into a string. This is wrong. it opens up all possible kinds of cenversion bugs. Stay with date or timestamp as long as possible.
    The solution depends a little upon the datatype of your lst_upd_date column.
    Here is a pl/sql solution assuming it is DATE.
    The TRUNC function can be used to reduce a datetime to a day or to an hour.
    declare
       cursor cur_dte is select lst_upd_date from employees ;
    begin
       for i in cur_dte loop
         if trunc(i.lst_upd_date,'HH') between trunc(i.lst_upd_date) and trunc(i.lst_upd_date)+6/24 then
            dbms_output.put_line(to_char(i.lst_upd_date,'DD-MON-YYYY HH24:MI:SS'));
         end if;       
       end loop;
    end;
    /But a pure SQL solution is much better.
    Here is how you implement it using CASE in SQL.
    example using pure sql
    select e.*,
            case when trunc(e.lst_upd_date,'HH')
                   between trunc(e.lst_upd_date) and trunc(e.lst_upd_date)+6/24
            then 101
            else 102
            end as "early_morning_check"
    from employees e;And if it is a timestamp column then you could use the EXTRACT function.
    select e.*,
            case when to_number(extract(hour from e.lst_upd_date))
                   between 0 and 6
            then 101
            else 102
            end as "early_morning_check"
    from employees e;You might want to consider if date values like 06:45:00 should be included or not.

Maybe you are looking for

  • Unable to Convert PDF's to Word.

    When attempting to convert a PDF to a Word doc in the export function of Adobe XI I get the following error msg "File Failed to be converted using Adobe Export PDF Online"  is it possible to get more detail than this? I upgraded my subscription to in

  • Retaining Faces "names" on exporting for another Mac

    I'm running Snow Leopard (10.6.6) and iPhoto '09 (8.1.2). I have a folder full of pictures taken at Christmas. I have just titled them with the date and names of people, imported them into iPhoto and done whatever editing was necessary (red eye, enha

  • Can i reinstall isight firmware?

    When I try to use my standalone isight camera a message appears "Your camera is in use by another application" in the ichat camera window. I've tested it in various firewire ports and different computers(G4 and IBooks) with different OS (10.4.9 and 1

  • How to change the line's color?

    In a linechart, if the backgroundColor of Application is not "#ffffff",there will be some white horizontal lines in the linechart. how to change the line's color?? thanks

  • Looking for a link

    Please, Could someone give me a link where I could study cases on how to find out whether the index is selective. Thanks