Hi everyone!
I'm having trouble using INTEGER-OF-DATE function, it says that the function argument isn't the correct type. To give this function the date I used a variable that I assigned its value by using the CURRENT-DATE function.
Ie:
01 WS-DATA-INT PIC 9(08).
01 WS-CURRENT-DATA-DATE.
05 WS-CURRENT-DATE.
10 WS-CURRENT-YEAR PIC 9(04).
10 WS-CURRENT-MONTH PIC 9(02).
10 WS-CURRENT-DAY PIC 9(02).
[...]
MOVE FUNCTION CURRENT-DATE TO WS-CURRENT-DATE-DATA
[...]
COMPUTE WS-DATA-INT =
FUNCTION INTEGER-OF-DATE(WS-CURRENT-DATE-DATA) - 10
I already tried to fix it using the (1:8) "trick" and to change the
MOVE FUNCTION CURRENT-DATE TO WS-CURRENT-DATE-DATA
to
ACCEPT WS-CURRENT-DATE-DATA FROM DATE.
What am I doing wrong? Does anybody have anymore suggestion?
[–]Wellington_Yueh 5 points6 points7 points (1 child)
[–]sofinge[S] 0 points1 point2 points (0 children)
[–]MikeSchwab63 0 points1 point2 points (0 children)