Forums & Discussions Home

    A place for members, communities, and committees to have discussions online and via e-mail.
    Click a category or topic to below to start the conversation...

    You are currently in view only mode for this forum. Please click the appropriate below to login as a member and participate. If you are not a member, please CLICK HERE for more information.


    Feb 14
    2001

    C/DB2 Precompiler & compiler

    warren homer
    [CSC]
    Hi all,

    I have been trying to set up JCL to Precompile & Compile a 'C' (not C++)
    program to use DB2. I managed to get the C++ one running but the
    programmers require one for 'C'. I was wondering if anyone out there could
    offer any ideas.

    We have DB2 V4, OS/390 V1.2

    C Precompiler program used : CBCDRVR
    C Precompiler options used : PPONLY

    DB2 Precompiler program used : DSNHPC
    DB2 Precompiler options used :
    XREF,SOURCE,DATE(ISO),STDSQL(NO),HOST(C)

    C Compiler program used: CBCDRVR
    C Compiler options used : LIST,SOURCE,OF,EXP,LONG,RENT,DLL


    The C Precompiler and the DB2 Precompiler steps run successfully. However
    the compile step is failing due to the following lines (error message in
    blue) :

    SQLELTS_PTR1->SQLIND = NULL;
    *=ERROR===========> a - CBC3045 Undeclared identifier NULL.

    extern "OS" long int dsntiar(void*, void*, void*);
    *=ERROR===========> a - CBC3275 Unexpected text string literal encountered.

    These lines appear to be added by the C precompiler/DB2 precompiler because
    they do not exist in the original C source. Therefore I was wondering if
    the options I am using listed above are correct, or maybe I need more
    options included.

    Any help would be much appreciated. Thanks.

    Regards,
    Warren



    James Campbell
    Warren

    1) This line is generated by the precompiler. We use
    #include <stdio.h>
    which brings in the declaration of NULL

    2) Are you _quite quite_ certain that you don't include the
    extern "OS" long int dsntiar(void*, void*, void*);
    yourself. This is the C++ format (except that dsntiar should be a _short_
    int - but due to the actual linkage mechanism used in OS/390, this
    discrepancy doesn't make a material difference). For C
    #pragma linkage (dsntiar,OS)
    would be used.

    /* standard disclaimer */
    James Campbell
    DBA
    Hansen Corporation, Doncaster
    +61 3 9843 8442
    [login to unmask email]

    -----Original Message-----
    From: Warren Homer [mailto:[login to unmask email]
    Sent: Thursday, February 15, 2001 12:55 PM
    To: [login to unmask email]
    Subject: [DB2-L] C/DB2 Precompiler & compiler


    Hi all,

    I have been trying to set up JCL to Precompile & Compile a 'C' (not C++)
    program to use DB2. I managed to get the C++ one running but the
    programmers require one for 'C'. I was wondering if anyone out there could
    offer any ideas.

    We have DB2 V4, OS/390 V1.2

    C Precompiler program used : CBCDRVR
    C Precompiler options used : PPONLY

    DB2 Precompiler program used : DSNHPC
    DB2 Precompiler options used :
    XREF,SOURCE,DATE(ISO),STDSQL(NO),HOST(C)

    C Compiler program used: CBCDRVR
    C Compiler options used : LIST,SOURCE,OF,EXP,LONG,RENT,DLL


    The C Precompiler and the DB2 Precompiler steps run successfully. However
    the compile step is failing due to the following lines (error message in
    blue) :

    SQLELTS_PTR1->SQLIND = NULL;
    *=ERROR===========> a - CBC3045 Undeclared identifier NULL.

    extern "OS" long int dsntiar(void*, void*, void*);
    *=ERROR===========> a - CBC3275 Unexpected text string literal encountered.

    These lines appear to be added by the C precompiler/DB2 precompiler because
    they do not exist in the original C source. Therefore I was wondering if
    the options I am using listed above are correct, or maybe I need more
    options included.

    Any help would be much appreciated. Thanks.

    Regards,
    Warren







    **********************************************************************
    This email and any files transmitted with it are confidential and
    intended solely for the use of the individual or entity to whom they
    are addressed. If you have received this email in error please notify
    the system manager.

    This footnote also confirms that this email message has been swept by
    MIMEsweeper for the presence of computer viruses.

    www.mimesweeper.com
    **********************************************************************



    warren homer
    [CSC]
    Hi all,

    I was wondering if anyone could provide some sample C or PL1 code for :

    a dynamic varying-list select (as specified in sect. 6.1.4 in the DB2 V4
    application programming guide)
    an insert
    a delete

    Thanks.
    Warren



    James Campbell
    SDSNSAMP(DSNTEP2)

    /* standard disclaimer */
    James Campbell
    Hansen Corporation

    -----Original Message-----
    From: Warren Homer [mailto:[login to unmask email]
    Sent: Tuesday, 27 February 2001 15:26
    To: [login to unmask email]
    Subject: [DB2-L] C/DB2 Precompiler & compiler


    Hi all,

    I was wondering if anyone could provide some sample C or PL1 code for :

    a dynamic varying-list select (as specified in sect. 6.1.4 in the DB2 V4
    application programming guide)
    an insert
    a delete

    Thanks.
    Warren









    All Times America/New_York

    Copyright © 2014 IDUG. All Rights Reserved

    All material, files, logos and trademarks within this site are properties of their respective organizations.

    Terms of Service - Privacy Policy - Contact