Skip to content

Instantly share code, notes, and snippets.

@pdemby
Last active August 29, 2015 14:25
Show Gist options
  • Save pdemby/f15ad3439987715529f2 to your computer and use it in GitHub Desktop.
Save pdemby/f15ad3439987715529f2 to your computer and use it in GitHub Desktop.
ACCEPT WS-CCYYMMDD FROM CENTURY-DATE.
MOVE 30 TO WS-DAYS.
MOVE 0 TO WS-DATE-TEMP.
MOVE FUNCTION INTEGER-OF-DATE (WS-DATE-IN-NUM) TO WS-DATE-TEMP.
COMPUTE WS-DATE-TEMP = WS-DATE-TEMP + WS-DAYS.
MOVE FUNCTION DATE-OF-INTEGER (WS-DATE-TEMP) TO WS-DATE-OUT-NUM.
MOVE WS-DATE-OUT TO OUTPUT-DATE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment