MIDRANGE dot COM Mailing List Archive



Home » RPG400-L » May 2001

Re: Can I get the Day of the week?


  • Subject: Re: Can I get the Day of the week?
  • From: dmosley@xxxxxxxxxx
  • Date: Tue, 15 May 2001 19:48:05 -0400

fixed


Well, I can't beat that one.  I haven't see one shorter than that.  But
here's the source for one using 'CEE*' apis...

h dftactgrp(*no)
d date            s              8a   inz('050501')
d format          s              8a   inz('MMDDYY')
d lillian         s              8b 0 inz
d dow             s              8b 0 inz
d days            s             10a   dim(7) perrcd(7) ctdata
d dayoftheweek    s             10a   inz
 * ---- Edit API Error Data Structure...
d api@err@ds      ds                  inz
d  bytes@rsvd                    9b 0 inz(%size(api@errmsg))
d  bytes@aval                    9b 0 inz
d  api@msgid#                    7a   inz
d  api@rsvrd                     1a   inz
d  api@errmsg                  100a   inz
c                   callb(d)  'CEEDAYS'
Call API to retreive lilian date.
c                   parm                    date
c                   parm                    format
c                   parm                    lillian
c                   parm                    api@err@ds

c                   callb(d)  'CEEDYWK'
Returns day of the week using Lillian
c                   parm                    lillian
c                   parm                    dow
c                   parm                    api@err@ds
c                   eval      dayoftheweek = days(dow)
c                   eval      *inlr = *on

**
Sunday    Monday    Tuesday   Wednesday Thursday  Friday    Saturday



David L. Mosley, Jr.
Systems Analyst
2000 CentreGreen Way
Suite 250
Cary, NC 27513




+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact