Michael_Pirson_282

Is there a report I could execute to retrieve the dates listed in the UC4 Static Calendars only

Discussion created by Michael_Pirson_282 on Dec 8, 2014
Latest reply on Dec 9, 2014 by Peter WIRFS
!The CALE.NAME and STATIC_KEYWORD will need to be updated to match the system.


!These must be updated by user (can also be put in a prompt)
:set &calendar# = 'CALE.NAME'
:set &keyword# = 'STATIC_KEYWORD'
:set &start_date# = '20140101'
:set &number_of_days_to_look_forward# = 100
:set &date# = &start_date#

!initialize count
:set &count# = 0
!loop through days starting at start date and going forward by "number of days to look forward"
:while &count# <= &number_of_days_to_look_forward#
!See if this day is a valid date in the keyword
: set &flag# = valid_cale('YYYYMMDD:&date#', '&calendar#', '&keyword#')
!increment count and date
: set &count# = add(&count#, 1)
: set &date# = add_days('YYYYMMDD:&date#', 1)
!if the date is a date in the keyword, print to log and set flag back to "n"
: if &flag# = 'Y'
: p &date# is a day
: set &flag# = 'N'
: endif
:endwhile

Outcomes