Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get the previous week date ranges in cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rajeshwarch

New User


Joined: 24 Mar 2008
Posts: 29
Location: mumbai

PostPosted: Tue Sep 08, 2009 6:26 pm    Post subject: How to get the previous week date ranges in cobol
Reply with quote

Hi everybody,

I have to setup a weekly job. In this program i need to read a file based on from and to dates. the from and to dates are the current week range. for example the job is running on 5th sep 2009(night batch cycle) the date range should be 1st sep 2009 to 5th sep 2009.

Thanks,
vijay
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Tue Sep 08, 2009 6:29 pm    Post subject:
Reply with quote

There is a link to manuals at the top of the page. Click on it, find the COBOL Language Reference manual, and read up on functions INTEGER-OF-DATE and DATE-OF-INTEGER. You can use them to achieve your goal.
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Tue Sep 08, 2009 7:52 pm    Post subject:
Reply with quote

Even if u search the forum you will find post regarding this
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Tue Sep 08, 2009 9:03 pm    Post subject: Reply to: How to get the previous week date ranges in cobol
Reply with quote

Keep in mind that functions INTEGER-OF-DATE, DATE-OF-INTEGER, etc were not introduced until COBOL/370.

If your version/release of COBOL is either OS/VS COBOL or VS/COBOL II, then review the Callable Date routines available in Language Environment (LE).

Note that LE needs to have been loaded into your LPAR by your system's staff.

Bill
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10388
Location: italy

PostPosted: Tue Sep 08, 2009 9:32 pm    Post subject: Reply to: How to get the previous week date ranges in cobol
Reply with quote

a hint on week date calculations
http://ibmmainframes.com/viewtopic.php?t=28353&highlight=week
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us