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: 10201
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: 1738
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: 1738
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: 7223

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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am


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