db2 command line help for UDB v8.2 Linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Stearns

    #1

    db2 command line help for UDB v8.2 Linux

    I am trying to script a manual operation using DB2's command line.
    Simple commands are working, but the command entered below displays a
    "db2 (cont.) =>" prompt, then fails on any input? I'm missing something
    obvious, but I don't see it.

    P.S. There are no trailing spaces.

    db2 'load \
    from AAA_Auto.TAB of del \
    modified by dateformat=\"m/d/yyyy\" coldel0x09 \
    method p ( 1, 2, 3, 4, 5, 6, 7, 8, 9, \
    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
    20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
    30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
    40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
    50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
    60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
    70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
    80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
    90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
    100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
    110, 111, 112, 113, 114, 115, 116, 117, 118 \
    ) \
    messages AAA_Auto.messag es \
    replace \
    into nullid.AAA_Auto _in \
    nonrecoverable \
    without prompting '
  • The Boss

    #2
    Re: db2 command line help for UDB v8.2 Linux

    Bob Stearns wrote:
    I am trying to script a manual operation using DB2's command line.
    Simple commands are working, but the command entered below displays a
    "db2 (cont.) =>" prompt, then fails on any input? I'm missing
    something obvious, but I don't see it.
    >
    P.S. There are no trailing spaces.
    >
    db2 'load \
    from AAA_Auto.TAB of del \
    modified by dateformat=\"m/d/yyyy\" coldel0x09 \
    method p ( 1, 2, 3, 4, 5, 6, 7, 8, 9, \
    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
    20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
    30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
    40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
    50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
    60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
    70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
    80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
    90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
    100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
    110, 111, 112, 113, 114, 115, 116, 117, 118 \
    ) \
    messages AAA_Auto.messag es \
    replace \
    into nullid.AAA_Auto _in \
    nonrecoverable \
    without prompting '
    I guess it has to do with the use of single and double quotes.
    Try this:
    1) Replace the single quotes surrounding the load statement by double quotes
    and
    2) Add surrounding single quotes to the value part of dateformat=... like
    this:
    dateformat='\"m/d/yyyy\"'

    HTH.

    --
    Jeroen


    Comment

    • Bob Stearns

      #3
      Re: db2 command line help for UDB v8.2 Linux

      The Boss wrote:
      Bob Stearns wrote:
      >
      >>I am trying to script a manual operation using DB2's command line.
      >>Simple commands are working, but the command entered below displays a
      >>"db2 (cont.) =>" prompt, then fails on any input? I'm missing
      >>something obvious, but I don't see it.
      >>
      >>P.S. There are no trailing spaces.
      >>
      >>db2 'load \
      > from AAA_Auto.TAB of del \
      > modified by dateformat=\"m/d/yyyy\" coldel0x09 \
      > method p ( 1, 2, 3, 4, 5, 6, 7, 8, 9, \
      > 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
      > 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
      > 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
      > 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
      > 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
      > 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
      > 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
      > 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
      > 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
      > 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
      > 110, 111, 112, 113, 114, 115, 116, 117, 118 \
      > ) \
      > messages AAA_Auto.messag es \
      > replace \
      > into nullid.AAA_Auto _in \
      > nonrecoverable \
      > without prompting '
      >
      >
      I guess it has to do with the use of single and double quotes.
      Try this:
      1) Replace the single quotes surrounding the load statement by double quotes
      and
      2) Add surrounding single quotes to the value part of dateformat=... like
      this:
      dateformat='\"m/d/yyyy\"'
      >
      HTH.
      >
      That fixed it. Apparently I don't understand *IX command quoting rules
      as well as I thought!

      Comment

      • The Boss

        #4
        Re: db2 command line help for UDB v8.2 Linux

        Bob Stearns wrote:
        The Boss wrote:
        >
        >Bob Stearns wrote:
        >>
        >>I am trying to script a manual operation using DB2's command line.
        >>Simple commands are working, but the command entered below displays
        >>a "db2 (cont.) =>" prompt, then fails on any input? I'm missing
        >>something obvious, but I don't see it.
        >>>
        >>P.S. There are no trailing spaces.
        >>>
        >>db2 'load \
        >> from AAA_Auto.TAB of del \
        >> modified by dateformat=\"m/d/yyyy\" coldel0x09 \
        >> method p ( 1, 2, 3, 4, 5, 6, 7, 8, 9, \
        >> 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
        >> 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
        >> 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
        >> 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
        >> 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
        >> 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
        >> 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
        >> 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
        >> 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
        >> 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
        >> 110, 111, 112, 113, 114, 115, 116, 117, 118 \
        >> ) \
        >> messages AAA_Auto.messag es \
        >> replace \
        >> into nullid.AAA_Auto _in \
        >> nonrecoverable \
        >> without prompting '
        >>
        >>
        >I guess it has to do with the use of single and double quotes.
        >Try this:
        >1) Replace the single quotes surrounding the load statement by
        >double quotes and
        >2) Add surrounding single quotes to the value part of dateformat=...
        >like this:
        > dateformat='\"m/d/yyyy\"'
        >>
        >HTH.
        >>
        That fixed it. Apparently I don't understand *IX command quoting rules
        as well as I thought!
        It's not my favourite topic either, so I am glad it did work :-)
        Thanks for the feedback.

        --
        Jeroen


        Comment

        Working...