/***************************************************************/ /* Cozzi RPGIV Includes | (c) 1996 by Robert Cozzi, Jr. /* ——————————— /* PC Filename(zTOOLS.RG4) AS/400 Filename(ZTOOLS) TYPE(RPGLE) /* This source file contains enhancements to the RPGIV language. /* These enhancements are provided as is without warrenty of /* any kind. If you choose to use these enhancements, you do so /* at your own risk. Further, you agree to hold the author of /* these enhancements, the copyright holder, and its agents, /* harmless for any results from the use or misuse of these /* enhancements. No warranty is expressed or implied and /* none is given. /***************************************************************/ 0001 H NOMAIN DATFMT(*ISO) 0002 /COPY ZINCLUDE ** Return the day of the week ordinal .....PProcName+++++++..B...................Functions++++++++++++++++++++++++++++ 0003 P DayOfWeek B EXPORT .....DName+++++++++++EUDS.......Length+TDc.Functions++++++++++++++++++++++++++++ 0004 D DayOfWeek PI 10I 0 0005 D InDate D CONST DATFMT(*ISO) ** BASEDATE is the day the calendar changed. 0006 D BaseDate S D INZ(D'1582-10-14') 0007 D STATIC 0008 D nDayOfWeek S 10I 0 STATIC 0009 D nDays S 10I 0 .....CSRn01Factor1+++++++OpCode(ex)Factor2+++++++Result++++++++Len++DcHiLoEq.... 0010 C TEST InputDate 73 0011 C If *IN73 0012 C Return -1 0013 C Endif 0014 C InDate SubDur BaseDate nDays:*Days 0015 C CALLB 'CEEDYWK' 73 0016 C Parm nDays 0017 C Parm nDayofWeek 0018 C return nDayOfWeek .....PProcName+++++++..B...................Functions++++++++++++++++++++++++++++ 0019 P DayOfWeek E