Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
shelu280

New User

Joined: 12 Jan 2009
Posts: 9
Location: chennai

 Posted: Fri Feb 06, 2009 4:42 pm    Post subject: Logic of geting no of days by two given date what will be a logic If i have one date given ,other date is from system how to no days between it

Robert Sample

Global Moderator

Joined: 06 Jun 2008
Posts: 8201
Location: Dubuque, Iowa, USA

 Posted: Fri Feb 06, 2009 4:44 pm    Post subject: Depending on the language, there frequently is a function to generate this difference. If not, you have to write a routine to calculate it.
shelu280

New User

Joined: 12 Jan 2009
Posts: 9
Location: chennai

 Posted: Mon Feb 09, 2009 12:01 pm    Post subject: Logic of geting no of days by two given date IN COBOL I TRIED THE FUNCTION INTEGER OF DATE BUT I DOES'NT WORK SO WHAT WILL BE THE LOGIC
dick scherrer

Site Director

Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

 Posted: Mon Feb 09, 2009 12:08 pm    Post subject: Hello, TURN YOUR CAPS OFF. . . Do not post "it didn't work" - that provides nothing for anyone to use to help you. What happened? An abend? An unexpected result? A syntax error. You need to provide all of the meaningful diagnostic info. Then someone may have a suggestion.
Anuj Dhawan

Senior Member

Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

Posted: Mon Feb 09, 2009 4:10 pm    Post subject:

Hi,

Something like this should have worked
 Code: COMPUTE WS-DAYS = FUNCTION INTEGER-OF-DATE (WS-DATE-1) -                  FUNCTION INTEGER-OF-DATE (WS-DATE-2)
shelu280

New User

Joined: 12 Jan 2009
Posts: 9
Location: chennai

 Posted: Fri Feb 13, 2009 3:11 pm    Post subject: Hi, when i tried above code it give an error 1.FUNCTION WAS NOT DEFINED AS A DATA-NAME 2. INTEGER-OF-DATE WAS INVALID
dick scherrer

Site Director

Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

 Posted: Fri Feb 13, 2009 9:58 pm    Post subject: Hello, When you post error messages, you neet to post the message-id also. If you copy/paste the actual code with the error(s) following it will help (use the "Code" tag to preserve slignment and improve readability). Also, post the version of the compiler you are using (this will be at the top of compiler output).
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us