Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Senior Member


Joined: 14 Mar 2007
Posts: 10697
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: 1789
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: 1789
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: 7312

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 Required Date Format in Include Sort ... vivky_vivek DFSORT/ICETOOL 4 Fri Aug 14, 2020 6:52 am
No new posts Trying to add current date in place o... shub2204 DFSORT/ICETOOL 8 Wed Aug 12, 2020 4:14 pm
No new posts Populating Date and Sequence numer in... PORYES SYNCSORT 11 Thu Jul 16, 2020 5:01 pm
No new posts How to filter out certain records bas... manugeorge2004 JCL & VSAM 5 Wed Jun 17, 2020 10:05 pm
No new posts reffering the filename with date and ... skbk JCL & VSAM 9 Sat Jun 06, 2020 4:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us