MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Converting date into days and days into date.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
venkata
Beginner


Joined: 31 Dec 2002
Posts: 16
Topics: 8
Location: India

PostPosted: Fri Jan 17, 2003 1:48 am    Post subject: Converting date into days and days into date. Reply with quote

Hi Friends,

I have used in my program this command to convert the date into number of days. i.e. FUNCTION INTEGER-OF-DATE . But after compilation I got the error saying that "FUNCTION" was not defined as a data-name and "INTEGER-OF-DATE" was invalid.

Can anybody tell, what is the function we can use to convert date into number of days?

Thanks,
Venkata
Back to top
View user's profile Send private message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Fri Jan 17, 2003 4:46 am    Post subject: Reply with quote

Hi Venkata,

Which COBOL compiler are you using? I think that VS COBOL II does not support these functions. COBOL/370 and COBOL for MVS support these functions.
The following link talks about a similar problem -

http://www.mvsforums.com/helpboards/viewtopic.php?t=19&highlight=function


If you are compiling with Language Environment, then you can have a look at the following LE callable services to accomplish your task -

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEA8030/4.2?DT=20000630130727


Regards,
Manas
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
venkata
Beginner


Joined: 31 Dec 2002
Posts: 16
Topics: 8
Location: India

PostPosted: Mon Jan 20, 2003 8:38 am    Post subject: Reply with quote

Hi Manas,

Thanks for your valuable suggestion.
But Still I am getting error. According to your suggestion I have modified the code to convert date into days like below.
WS-DAYS = CEEDAYS(YYYYMMDD) and error message is "=" was invalid. Skipped to the next verb, period or procedure-name definition.

Can you tell me, whether my code is correct or not?


Thanks,
Venkata
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Mon Jan 20, 2003 8:51 am    Post subject: Reply with quote

Venkata,

CEEDAYS is a language environment CALLABLE service. So Check this for a "callable" Examples of CEEDAYS. The second example is a COBOL example

I would also suggest you read the following manual for a better understanding of language environment callable services.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEA3010/CCONTENTS

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group