Using current date in if statement

 2 Replies
 0 Subscribed to this topic
 18 Subscribed to this forum
Sort:
Author
Messages
Jessica M
Advanced Member
Posts: 34
Advanced Member
New Poster
New Poster
Congrats on posting!

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: 477
Veteran Member
New Poster
New Poster
Congrats on posting!
Engaged Poster
Engaged Poster
Wow, you're on a roll!
Avid Poster
Avid Poster
Seriously, you're a posting maniac!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
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
New Poster
New Poster
Congrats on posting!
Thank you so much. That appears to have worked.