View previous topic :: View next topic
|
Author |
Message |
sreeharithag
New User
Joined: 26 Apr 2010 Posts: 9 Location: chennai
|
|
|
|
Hi,
I need to convert the current date to integer of date.
But i am facing the below error
Function argument "WS-CURR-DATE" did not have the correct type for function "INTEGER-OF-DATE". The statement was discarded.
Below is the declaration of variables in working storage
01 WS-CURR-DATE PIC X(08).
01 WS-CURR-DATE-INTGER PIC S9(09) COMP.
.
.
.
.
COMPUTE WS-CURR-DATE-INTGER = FUNCTION INTEGER-OF-DATE (WS-CURR-DATE)
Please let me know how to rectify this.... |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Read the manual to see what the data format of the variables are that the function is expecting and also check that the data within the variables is in the correct format. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Hint: if you are going to convert a date variable to an integer, would it not be a nice thing if the date variable WAS NUMERIC before the conversion occurred? |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
Back to top |
|
|
sreeharithag
New User
Joined: 26 Apr 2010 Posts: 9 Location: chennai
|
|
|
|
Thanks guys.It got resolved.I have changed the alphanumeric date to numeric before converting it into INTEGER-OF-DATE. |
|
Back to top |
|
|
|