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: 7932
Location: Bellevue, IA

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: 10211
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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