× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


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


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
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.