Results 1 to 5 of 5

Thread: echo command?

  1. #1
    Join Date
    Aug 2003
    Location
    austin,tx
    Posts
    104

    Unanswered: echo command?

    Stupid question from a DB2 newcomer.

    I can't figure out how to print out comments in a script.

    I tried
    echo 'RA'
    and
    echo 'RA';

    and I tried it in caps.

    I've looked through my documentation and can't even find echo listed, although I have seen it in some online documentation.


    I get this error when I execure the command:
    Error: SQL0104N An unexpected token "ECHO" was found following "BEGIN-OF-STATEMENT". Expected tokens may include: "<values>". SQLSTATE=42601
    (State:42601, Native Code: FFFFFF98)

    This is with version 8.1

    Thanks.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Simplest way I can think of is VALUES

    eg :

    VALUES('Creating a Table ... ') ;

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Aug 2003
    Location
    austin,tx
    Posts
    104

    Smile

    Originally posted by sathyaram_s
    Simplest way I can think of is VALUES

    eg :

    VALUES('Creating a Table ... ') ;

    Cheers
    Sathyaram
    That works. Thanks a bunch.

  4. #4
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    You could also use...

    !echo RA @

    (where @ is the SQL delimiter)

    You might find this link useful.

    http://www7b.boulder.ibm.com/dmdd/li...p/0203yip.html

  5. #5
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    The default delimiter is character ;

    Sample for Windows/Unix/Linux
    !echo Hello word;


    You can also add blank line (new paragraph):

    Sample for Windows/Unix/Linux
    !echo.;

    You can also clear the screan:
    Sample for Windows
    !cls;

    Sample for Unix/Linux
    !clear;

    etc.

    Hope this helps
    Grofaty

Posting Permissions

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