Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    Location
    Denver,co
    Posts
    8

    Unanswered: Urgent : Days elapsed

    I am trying to find the number of days elapsed a certain date using DB2 in a COBOL program.

    The query is as follows,

    SELECT DAYS(WS-DATE-DIFF)
    FROM SYSIBM.SYSDUMMY1

    I need to pass the date to WS-DATE-DIFF in the required format. I am getting an error while binding the program with an error -206.

    Can anyone help please.

    Thanks,
    Anil

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Urgent : Days elapsed

    In your statement, DB2 will assume WS-DATE-DIFF as a column of SYSIBM.SYSDUMMY1.

    WS-DATE-DIFF is a host variable, isn't it ? So I believe you need to use a colon before it ... DAYS(:WS-DATE-DIFF)

    HTH

    Cheers

    Sathyaram

    Originally posted by anilc
    I am trying to find the number of days elapsed a certain date using DB2 in a COBOL program.

    The query is as follows,

    SELECT DAYS(WS-DATE-DIFF)
    FROM SYSIBM.SYSDUMMY1

    I need to pass the date to WS-DATE-DIFF in the required format. I am getting an error while binding the program with an error -206.

    Can anyone help please.

    Thanks,
    Anil
    Last edited by sathyaram_s; 09-20-02 at 20:16.

Posting Permissions

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