IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get the previous week date ranges in cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 08, 2009 6:29 pm
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Sep 08, 2009 9:03 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 08, 2009 9:32 pm
Reply with quote

a hint on week date calculations
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top