Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Posts
    7

    Smile Unanswered: sample stored procedure??

    Hi all,

    If you have a stored procedure to read a fixedwith file and insert it into a Db2 table one line to one record at a time... please forward it to me at vijay253@yahoo.com.


    thanks

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Try using the LOAD utility.
    Depending on your platform and DB2 version, the syntax may vary slightly.
    E.g., have a look at http://publib.boulder.ibm.com/infoce...e/r0008305.htm

    It contains the following example:
    Code:
    db2 load from ascfile1 of asc
          method L (1 20, 21 22, 24 27, 28 31)
          null indicators (0,0,23,32)
          insert into table1 (col1, col5, col2, col3)
    where table1 at least has the following columns:
    * COL1 CHAR(20) NOT NULL
    * COL2 SMALLINT
    * COL3 CHAR(4)
    * COL5 CHAR(2) NOT NULL
    Last edited by Peter.Vanroose; 01-09-06 at 05:19.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •