Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    4

    Unanswered: DB2 Unload issue

    DB2 Z/OS Version 10

    I am trying perform an unload using the syntax below:

    UNLOAD TABLESPACE SERDB.W99WAIVE
    FROM TABLE SERDB.W99_WAIVER_TAP_DST
    WHEN (W99_UPDATE_YEAR = (YEAR(CURRENT_DATE ) - 3)
    AND (W99_UPD_JUL_DAY < 182))
    OR W99_UPDATE_YEAR < (YEAR(CURRENT_DATE ) - 3)
    PUNCHDDN PUNCHDSN UNLDDN UNLDDSN

    The job fails on a JCL error with the following: INVALID KEYWORD - CURRENT_DATE

    The error occurs whether I use "CURRENT_DATE" or "CURRENT DATE"

    According to UNLOAD manual, use of either parameter is valid.

    Is there another way I should be performing this unload?

    Thank you

  2. #2
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    66
    Provided Answers: 6
    YEAR(CURRENT_DATE) is not a constant or labeled-duration-expression.
    You are not allowed to use such an expression in the UNLOAD statement.
    https://www.ibm.com/support/knowledg...oadsyntax.html
    Regards,
    Mark.

  3. #3
    Join Date
    Jul 2009
    Posts
    4
    Quote Originally Posted by mark.bb View Post
    YEAR(CURRENT_DATE) is not a constant or labeled-duration-expression.
    You are not allowed to use such an expression in the UNLOAD statement.
    https://www.ibm.com/support/knowledg...oadsyntax.html
    Ok, thank you.

Tags for this Thread

Posting Permissions

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