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
 

 

Exclusion of US Holidays in 'Cancellation effective date'

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

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Fri Sep 18, 2015 3:34 pm    Post subject: Exclusion of US Holidays in 'Cancellation effective date'
Reply with quote

Hello All
I have requirement where Cancellation effective date is falling on weekends or Holidays then it should populate next business date. i.e. if calculated Cancellation eff dt is falls on saturday then we need to populate it to next monday's date in COBOL pgm.

Do I need to create a new copybook where all weekends dates/holidays will be listed and then I will use it in my program, but then I have to update this COPYBOOK every year.. but will this be fine?

How this can be achieved? Can anyone please provide solution? Or is there any other way?

Thanks in advance.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10257
Location: italy

PostPosted: Fri Sep 18, 2015 3:41 pm    Post subject: Reply to: Exclusion of US Holidays and weekends in 'Cancellatn eff dt'
Reply with quote

why not speak to the designers of the application and/or to the application support group
usually calendar issues are dealt by <organisation wide> support routines in a standard way
no reason to re-invent the wheel
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1755
Location: Bloomington, IL

PostPosted: Fri Sep 18, 2015 3:46 pm    Post subject:
Reply with quote

Weekends and holidays, U.S, or otherwise, follow certain rules and are therefore predictable (albeit not always in the goyish calendar). A better solution, IMNSHO, would be to create an external subroutine that returns the next business date.
Back to top
View user's profile Send private message
apandey

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Fri Sep 18, 2015 3:49 pm    Post subject: Reply to: Exclusion of US Holidays and weekends in 'Cancellatn eff dt'
Reply with quote

Hello Akatsukami

What is IMNSHO? and my doubt is that how would i determine which is next business day?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1755
Location: Bloomington, IL

PostPosted: Fri Sep 18, 2015 4:06 pm    Post subject: Re: Reply to: Exclusion of US Holidays and weekends in 'Cancellatn eff dt'
Reply with quote

apandey wrote:
Hello Akatsukami

What is IMNSHO? and my doubt is that how would i determine which is next business day?


IMNSHO = In My Not So Humble Opinion.

The rule here is: if cancellation effective date falls on a weekend (Saturday or Sunday) or a holiday, move it the next business day.

Use intrinsic or LE functions (be aware that they are not compatible) to get a day number, and determine the day of the week from it. If it is a Saturday, add 2; if a Sunday, add 1.

The U.S. holidays that my client celebrates are:

  • New Year's Day: 1 January
  • Memorial Day: last Monday in May
  • Independence Day: 4 July
  • Labor Day: first Monday in September
  • Thanksgiving: fourth Thursday in November
  • Christmas: 25 December


(Your list may be different.)

Check if your modified cancellation date falls on one of these; if so, add 1. Note that New Year's Day, Independence Day, and Christmas may fall on a Friday, so a second round of weekend checking is necessary.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Sep 18, 2015 4:07 pm    Post subject: Reply to: Exclusion of US Holidays and weekends in 'Cancellatn eff dt'
Reply with quote

The Calendar will be designed such that you know these things.

IMNSHO is In My Not-So-Humble Opinion, a more trustworthy version of In My Humble Opinion.
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
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


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