|
Klein Ron wrote: > > Hi all, > > Since we have a discusion going about the days of the month, how about a > easy routine to find the day of the week? Any one have a solution? There are a number of ways to do this: but the routine I was looking for also does this as a side benefit...
GTOJR1
Transfer Program
0001 C *ENTRY PLIST
C PARM G$MM 20
C PARM G$DD 20
C PARM G$YYYY 40
C PARM G$JD 50
C*
0002 C Z-ADD0 G$JD
0003 C G$MM SUB 3 G$MMWK 20
0004 C Z-ADDG$MMWK GMWKSV 20
0005 C G$MMWK IFLT 0 LVL-01
0006 C ADD 12 G$MMWK
0007 C END END-01
0008 C GMWKSV IFNE 0 LVL-01
0009 C G$MMWK MULT 30.6 G$JD H
0010 C END END-01
0011 C ADD G$DD G$JD 50
0012 C G$YYYY SUB 1900 G$YYWK 30
0013 C G$YYWK IFNE 0 LVL-01
0014 C GMWKSV IFLT 0 LVL-02
0015 C SUB 1 G$YYWK
0016 C END END-02
0017 C END END-01
0018 C G$YYWK MULT 365.25 G$JYD 70
0019 C ADD G$JYD G$JD
0020 C G$JD DIV 7 G$WK7 70
0021 C MVR G$DW 10
C RETRN
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.