Using current date in if statement

Author
Messages
Jessica M
Advanced Member
Posts: 34
Advanced Member

    I am hoping someone can help me with a COBOL statement.  I haven't touched cobol in quite a while and my co-worker that usually works with our custom cobol is out of the office for a bit.

    I have a custom program that was excluding any employee with a term date in a file.  They now want to change it to include anyone termed that day. 

    The current statement is:

    IF (EMP-TERM-DATE > "00000000")
                GO TO 1040-NEXT-EMPLOYEE.

    How do I change this to "GO TO 1040-NEXT-EMPLOYEE" when "EMP-TERM-DATE" is before the current date?

    I would greatly appreciate any assistance with this.

    Ragu Raghavan
    Veteran Member
    Posts: 468
    Veteran Member
      IF (EMP-TERM-DATE NOT = ZEROES)
      AND (EMP-TERM-DATE < WS-SYSTEM-DATE-YMD)
      GO TO 1040-
      Jessica M
      Advanced Member
      Posts: 34
      Advanced Member
        Thank you so much. That appears to have worked.
        ---