Using #include or EXEC SQL include

Hi
I havent much worked with Pro C so I have question
I need to modify a Pro C file to include a new lib,
So is it better to use:
EXEC SQL INCLUDE multibyte_chars.ph;
OR
#include "multibyte_chars.ph"Are both basically doing the same thing?
Please reply

Hi,
Pro C is not a Sun Studio product.
Searched google.com, found this Oracle FAQ: Pro *C:
http://www.db.cs.ucdavis.edu/public/oracle/faq/proc.html
Rose

Similar Messages

  • How to use INSERT in EXEC SQL ...... ENDEXEC ?

    Hi,
    The following code;
    DATA: BEGIN OF str_insert,
            a(3) TYPE c,
            b(3) TYPE c,
          END OF str_insert.
    EXEC SQL.
      SET CONNECTION DEFAULT
    ENDEXEC.
    str_insert-a = 'a'.
    str_insert-b = 'b'.
    EXEC SQL.
    INSERT INTO ZSAP  VALUES :str_insert
    ENDEXEC.
    The Structure of the ZSAP table (There is no data in ZSAP);
    A CHAR 3 (Primary Key)
    B CHAR 3
    I cannot instert a record to this table it throughs the following error;
    Runtime Errors         DBIF_DSQL2_SQL_ERROR  
    Exceptn                CX_SY_NATIVE_SQL_ERROR
    How could use a structure to insert values into ZSAP?
    Thanks,
    Kishan

    Hello..
      loop at T_PC.
        loop at T_PCD .
          at new NUMREFERENCIA.
            exec sql.
             INSERT INTO tblPolizaContableR3
                (LibroMayor, PeriodoContable, Prefijo, NumReferencia,
                Fecha, FuenteDiario, ComentarioPoliza, Moneda,
                TipoCambio, RefExternaID1, RefExternaID2, RefExterna1,
                RefExterna2, DescRefExterna)
             VALUES (:T_PC-LIBROMAYOR, :T_PC-PERIODOCONTABLE,
              :T_PC-PREFIJO, :T_PC-NUMREFERENCIA, :T_PC-FECHA,
              :T_PC-FUENTEDIARIO, :T_PC-COMENTARIOPLIZA, :T_PC-MONEDA,
              :T_PC-TIPOCAMBIO, :T_PC-REFEXTARNAID1, :T_PC-REFEXTERNAID2,
              :T_PC-REFEXTERNA1, :T_PC-REFEXTERNA2, :T_PC-DESCREFEXTERNA)
            endexec.
          endat.
            exec sql.
             INSERT INTO tblPolizaContableDetR3
                (LibroMayor, PeriodoContable, Prefijo, NumReferencia,
                Partida, Cuenta, CuentaIMSA, CCostoIMSA,
                Cargo, Abono, ComentarioPartida)
             VALUES (:T_PCD-LIBROMAYOR, :T_PCD-PERIODOCONTABLE,
              :T_PCD-PREFIJO, :T_PCD-NUMREFERENCIA, :T_PCD-PARTIDA,
              :T_PCD-CUENTA, :T_PCD-CUENTAIMSA, :T_PCD-CCOSTOIMSA,
              :T_PCD-CARGO, :T_PCD-ABONO, :T_PCD-COMENPARTIDA)
            endexec.   
        endloop.
    Hope this help you.
    Regards, Gustavo Estrada

  • Exec sql help

    Hi,
    I have this abap/exec sql code to extract data from as400/db2.
    I am getting data by a "select" statement and i am trying to append the records with append statements.
    but, not works.
    EXEC SQL.
        CONNECT TO 'SATDBR'
      ENDEXEC.
      EXEC SQL.
    --->(HERE THE PROBLEM)  OPEN C1 FOR.
          SELECT A,B,C,D
          FROM SAPTEST.XX1
      ENDEXEC.
        EXEC SQL.
          OPEN C1
          FETCH NEXT C1 INTO
         :ZTABLE.AA, :ZTABLE.BB, :ZTABLE.CC, :ZTABLE.DD 
    ENDEXEC.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
          APPEND ZTABLE.
        ENDIF.
      ENDDO.
    EXEC SQL.
      CLOSE C1
    ENDEXEC.
      EXEC SQL.
        DISCONNECT 'SATDBR'
      ENDEXEC.
    I need to declare the cursor??? whats wrong in my code :S
    the runtime error is "A SQL mistake has appeared by the execution of Native SQL."
    i would appreciate your help.
    thanks
    vicky

    hi,
    I recommend you, make the select and test it first in the DB2 console.
    Only delcare your internal tables, your variable with abap code.
    To extract the data with the select statement is enough, to fill the table with several records use this code:
    EXEC SQL.
    CONNECT TO 'DB2' " the name of the connection
    ENDEXEC.
    EXEC SQL.
    OPEN C1 FOR
    SELECT A,B,C,D
    FROM SAPTEST.XX1
    ENDEXEC.
    DO
    EXEC SQL.
    OPEN C1
    FETCH NEXT C1 INTO
    :ZTABLE
    ENDEXEC.
    IF sy-subrc <> 0.
    EXIT.
    ELSE.
    APPEND ZTABLE.
    ENDIF.
    ENDDO.
    EXEC SQL.
    CLOSE C1
    ENDEXEC.
    EXEC SQL.
    DISCONNECT 'DB2'
    ENDEXEC.
    The ZTABLE must have the same order in which you put on the fields in the "select"
    DATA:   BEGIN OF  ztable OCCURS 0,
    A(1) TYPE c
    B(8) TYPE c
    C(17)TYPE N
    D(19 TYPE c
            DATA:   END   OF ZTABLE.
    I HOPE THIS INFORMATION HELPS YOU!!
    REGARDS
    VICKY
    Message was edited by: Victoria León

  • Exec SQL statement from BW to MS SQL

    Hi Experts,
    I need to execute sql statement from BW on MS SQL Server.
    I want to do it in process chain. There is a so called ABAP Program Component.
    How to implement such a program or function module that will execute on MS SQL Server an sql statement such as for instance:
    "Create view SOME_VIEW as select * from XTABLE".
    I have already configured database connection using DBCO transaction.
    Waiting for response.
    Krzysztof

    Thanks, but that is not what I was asking for.
    I just need to send some SQL statement from BW to MS SQL Server using ABAP program (exec sql or something like this).
    Could you provide me a pattern of such an ABAP program?
    The sql statement is not importent here, I have already extracted data from MS SQL to BW, I have configured dataflow, process chains and so on.
    No I need to determine DELTA on MS SQL Server. I've got some ideas but I need to know how to send SQL statement from BW to MS SQL Server using ABAP program.
    Please any help will be appreciated

  • Error EXEC SQL

    hello people,
    I'm using the connection DBCOMM to connect a external BD, using this connection:
      EXEC SQL.
        SET CONNECTION :vg_con_name
      ENDEXEC.
      IF NOT sy-subrc IS INITIAL.
        EXEC SQL.
          CONNECT TO :vg_con_name
        ENDEXEC.
      ENDIF.
       I verified the connection and before i maked a select in the table EKKO
    kind of this:
    EXEC SQL.
          SELECT EBELN
             FROM EKKO
             INTO :P_EBELN
             WHERE EBELN = :W_EBELN
        ENDEXEC.
    sometimes i lost the connection, but here in the project I use the version of R/3, 4.6c and don't have the command TRY to catch the problem.
    The Dump is:
    DBIF_DSQL2_SQL_ERROR
    "ORA-03113: end-of-file on communication channel#"
    anyone here can help me,
    waiting
    Wille

    HI,
    •Cause: There is an SQL error during execution of a Native SQL command.
    Runtime Error: DBIF_DSQL2_SQL_ERROR
    •If you want to select into a work area in a SELECT statement, and not into a list of host variables, the host variable must be a structure. If you cannot determine statically (at compilation time) whether the target area is a structure at runtime, then there is a runtime error, depending on the database system. Or only the first selected column is placed into the target area. In this case, one can be certain, using INTO STRUCTURE (instead of only INTO), that at runtime a structure really is available as target area.
    •Please the connection which you have specified is existing in the DBCON TABLE.
    Regards
    Anitha

  • What component is included with Microsoft SQL Servers that can be used to perform a broad range of data migration tasks?

    What component is included with Microsoft SQL Servers that can be used to perform a broad range of data migration tasks?
    a. Full Text Search service
    b. SQL Notification Server
    c. SQL Reporting Server
    d. SQL Server Integration Services

    d.
    Are you having a test and trying to cheat?
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to make sure that schema name is not included with generated sqls

    How to make sure that schema name is not included with generated sqls with tableadapter wizard.
    What should I use? Oledb, ODT.NET, where can set that I want "pure" sqls, not schemas, not ", or anything like this
    I want
    "Select a,b from t1" ,not "select "a","b" from schema.t1"
    Also schema name is put in all parameters, all over the place... What if schema name changes. (b1test to b1prod)
    . I now manually edit XML files of dataset. It works but....
    thanks

    The full hardware :
    Processor Intel core due 3.00 MHz
    RAM:1.5GB
    psu:650 Watt (but i baught i cheap one so it may be actually about 400 watt)
    HD Disk:160 GB
    But about the power supply if it not able to run the VGA card ,Is it will not show any screen or it will not able to run the computer??

  • Getting core dump when using EXEC SQL CLOSE

    In my pro*c program , i have used a cursor to fetch the set of accounts.Once cursor is opened , code will perform set
    of operation using fetched data and then cursor is closed. Between open and closing of cursor , i have used 23 EXEC
    SQL CLOSE. For example i am copying the value of a to b using strlcpy between fetch and close cursor statement.If
    returned value from strlcpy is greater than size of destination variable, then flow should not proceed , in that case I will
    close the cursor using EXEC SQL CLOSE and return the flow to calling program. Similarly i have closed the cursor at
    another 22 locations.
    When i compile the code and run binary the core dump occurs. On analyzing the core it shows
    t@null (l@8) terminated by signal SEGV (no mapping at the fault address)
    0xffffffffffffffff: <bad address 0xffffffffffffffff>
    dbx: core file read error: address 0xfc4ffe48 not in data space
    Current function is dbMtBaseClass::Pswd_Change
    7860 sqlcxt(&_dbMtCtx, &sqlctx, &sqlstm, &sqlfpn);
    if I remove any of the three EXEC SQL CLOSE commands , core dump does not occurs.
    It looks strange.Please help me to resolve the issue.

    In my pro*c program , i have used a cursor to fetch the set of accounts.Once cursor is opened , code will perform set
    of operation using fetched data and then cursor is closed. Between open and closing of cursor , i have used 23 EXEC
    SQL CLOSE. For example i am copying the value of a to b using strlcpy between fetch and close cursor statement.If
    returned value from strlcpy is greater than size of destination variable, then flow should not proceed , in that case I will
    close the cursor using EXEC SQL CLOSE and return the flow to calling program. Similarly i have closed the cursor at
    another 22 locations.
    When i compile the code and run binary the core dump occurs. On analyzing the core it shows
    t@null (l@8) terminated by signal SEGV (no mapping at the fault address)
    0xffffffffffffffff: <bad address 0xffffffffffffffff>
    dbx: core file read error: address 0xfc4ffe48 not in data space
    Current function is dbMtBaseClass::Pswd_Change
    7860 sqlcxt(&_dbMtCtx, &sqlctx, &sqlstm, &sqlfpn);
    if I remove any of the three EXEC SQL CLOSE commands , core dump does not occurs.
    It looks strange.Please help me to resolve the issue.

  • Use Of "#EC CI_EXECSQL in ABAP with EXEC SQL. Statement giving Syntax Error

    Dear Gurus,
    I have encountered an issue while trying to remove warning for using Native SQL statement using pseudo comment "#EC CI_EXECSQL
    The thing is like this -- i have used follwing native sql command in abap.
    EXEC SQL.
        CONNECT TO 'SURROUND_DB'
      ENDEXEC.
    Now when i am checking this code in code inspector it is showing a warning with information below
    CA CL_CI_TEST_CRITICAL_STATEMENTS0006
    Code Inspector
    Critical Statements
    Use of Native SQL
    Authorization checks cannot be appropriately run using EXEC SQL and should be carried out at program level.
    The message can be hidden using the pseudo-comment "#EC CI_EXECSQL
    Use of exceptin handling section for that warning showing me to use :
    The message can be hidden using pseudo
    comment      "#EC CI_EXECSQL
    Now when I am using "#EC CI_EXECSQL in the abap like below :
    EXEC SQL. "#EC CI_EXECSQL
        CONNECT TO 'SURROUND_DB'
      ENDEXEC.
    It is giving syntax error
    The text literal ""#EC CI_EXECSQL        " is longer than 255
    characters.Check whether it ends correctly.
    Please provide the guideline to resolve this issue.
    Thanks & regards
    Saifur Rahaman.

    Hi Saifur,
    You can remove the warning using the following syntax:
    EXEC "#EC CI_EXECSQL
      SQL.
        CONNECT TO 'SURROUND_DB'
      ENDEXEC.
    At least, it worked fine for me when using OPEN CURSOR, SELECT, FETCH and so on statements.
    The way to use the pseudo comment is not very intuitive, but at least for my examples worked fine.
    I hope this may help you.
    Best regards,
    Edgardo G. König

  • What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it

    hi,
    What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?
    regards.

    sorry, question resolved.

  • I cant seem to find any of the previous fx textures that i used to have before. Including the nature ones such as water, wall and moon textures.

    I cant seem to find any of the previous fx textures that i used to have before. Including the nature ones such as water, wall and moon textures.

    Please give us some more information: Photoshop version and OS version (First two lines of Help > System Info).
    Did these textures come with your install or are they from a third party?
    How did you access them before? Usually Textures are Presets you load into your Patterns dialog. If you install a new version of Photoshop or Reset Photoshop, you have to go into the Patterns Panel menu and reload them.

  • Memory Allocated using EXEC SQL VAR in ProC

    For a table that stores resumes, I have a ProC program which outputs LONG column values into a host variable. Here is the table definition:
         create table resume (resume_id number(5),
                   resume_size number(15),
                   resume_text LONG)
    The size of the resume_text can be vary from 0 bytes up to 90K bytes. We use the column "resume_size" to store the size of the resume_text in bytes. Since most of them are smaller than 8K, we don't want to allocate 90K memory for every resume SELECT call. Before we do the SELECT on the resume_text, a host variable pointer is used to allocate memory according to the size of the resume_text:     
         char *resume_buffer;
    len = get_resume_size(id); /* A SELECT statement to fetch the resume_size for this resume from the table */               
         resume_buffer = malloc(len); /* Allocate memory for the resume according to the resume_size. For example, len could be 6000 */
         EXEC SQL VAR resume_buffer IS LONG (100000);      /* without using a constant number will lead to a compiler error */
         EXEC SQL SELECT resume_text INTO :resume_buffer FROM resume WHERE resume_id = :id;
    Is 100000" the size actually allocated in memory (either OS level or Oracle data buffer cache) every time it runs or is it just the maximum possible size needed to satisfy the precompiler?
    Any help greatly appreciated.

    You have to use 'BEGIN procedure_name END' in the execute statement while calling PL/SQL Procedures
    EXEC SQL EXECUTE
    DECLARE
    BEGIN
    END;
    END-EXEC;

  • Using Pages, how do I include occasional "landscape"-formatted pages into a "portrait"-formatted document?

    Using Pages, how do I include occasional "landscape"-formatted pages (for large tables) into a long "portrait"-formatted document?
    I have not been able to find the solution on Pages Help.

    triplebrook wrote:
    Using Pages, how do I include occasional "landscape"-formatted pages (for large tables) into a long "portrait"-formatted document?
    I have not been able to find the solution on Pages Help.
    It can't be done in  Pages, hence you don't find the solution in Pages help!
    You can rotate the table on the page instead. Press Cmd and drag the right lower corner 90 degrees

  • Is a mini iPad Wi-Fi + Cellular ready to be used with any telephone company including companies from other countries?

    Is a mini iPad Wi-Fi + Cellular ready to be used with any telephone company including companies from other countries?

    Different countries have different mobile phone systems which work on different standards.  An iPad sold in country C will work with whatever phone systems in country C support it.  It is not guarenteed to work with every mobile phone system all over the world.

  • How to use bean:write inside jsp:include ?

    I got a problem about JSP's syntax. The following is my code:
    <%@ include file="<bean:write name="HelloForm" property="target" />"%>
    The double quotes inside bean:write is my problem. Could you please teach me how to use bean:write within JSP's include? Thank you!

    http://java.sun.com/products/jsp/syntax/1.2/syntaxref12.html
    Include Directive vs <jsp:include>
    The include directive <%@include %> is done at page translation/compile time.
    It effectively pastes in a static file, and then compiles the JSP as if it was all one file.
    As such, you cannot provide a runtime expression to it.
    To do runtime inclusion, you need to use the <jsp:include> tag which does except runtime parameters.
    <%String test = request.getParameter("pageInfo");%>
    <%String link = test + ".jsp"; %>
    <jsp:include page="<%= link %>" %>Unfortunately you can't use the tag with a bean:write tag as well, you can only use runtime expressions, not tag. So you have to do the include with
    <jsp:include page="<%= HelloForm.getTarget() %>" />
    Cheers,
    evnafets

Maybe you are looking for

  • Passing generics between DAL and WCF

    Hi, I have a solution with layers including wcf. UI calls the WCF. I am getting an error when calling a List in Service1.svc from the DAL layer. How can I fix it? Thanks var client = new ServiceReference1.PizzaAPIClient(); var customer = new ServiceR

  • Communication channel - Variable Substitution error,.

    Hi, I am having the following mesage type used in messag emapping as a target structure mt_data    -> Variable1 I am having a validation on mt_data node in message mapping for generating it, if condition is satisfied mt_data will be generetaed. Under

  • Motorola Surfboard SBG6590 installation cd says "Problem installing Adobe Air"

    When I attempt to install the software which came on the installation cd for my Motorola Surfboard SBG6590, it gives the following message: "Problem installing Adobe Air. There was a problem installing Adobe Air". After I saw this message the first t

  • When posting, please post a new topic if you don't have an answer!

    Occasionally you may be tempted to add your voice to a chorus of complaints. Unfortunately, if what you are here for is to get assistance for a problem which you can't find an answer for, trailing an existing thread with a second complaint, is usuall

  • Client Proxy Error in UAT System

    Hi, I am having a Client Proxy - PI - File Scenario. The Client proxy is working perfect in Development and Test system, but its raising exception "CX_AI_SYSTEM_FAULT" in UAT system. Please advice. Is there any setting/configuration missing. Thanks,