Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 8057
Location: East Dubuque, Illinois, 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: 2502
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: 10256
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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us