× 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.



Charles, Vern,

Thanks for the tips!  At first I thought CEE APIs were off-limits to CL
programs, but I looked at the CEE API docs a little closer and remembered
CALLPRC in CLLE programs!

If anyone's interested, here's a quickie sample program I did to test that
it works.  Buyer beware - there's no error checking or message monitoring
(but there will be in my production app!)

- GA

Pgm

   Dcl     &YYMDstamp   *Char  (    17    )
   Dcl     &ErrorCode   *Char  (    32    )  Value( ' ' )
   Dcl     &YYMDtoday   *Char  (     8    )
   Dcl     &LilDateHex  *Char  (     4    )
   Dcl     &fc          *Char  (    12    )
   Dcl     &LilDateNbr  *Dec   (     8  0 )
   Dcl     &YYMDnxtWk   *Char  (     8    )

/* Using IBM API, get the current system timestamp             */
   Call       QWCCVTDT  Parm( '*CURRENT  '  ' '  '*YYMD     ' +
                                &YYMDstamp  &ErrorCode   )

   ChgVar     &YYMDtoday  Value( %sst( &YYMDstamp 1 8 ))

/* Convert today's date to lilian date, so we can do date math */
   CallPrc    CEEDAYS  Parm( &YYMDtoday  'YYYYMMDD'  &LilDateHex &fc)

/* Convert Lilian date hex value to numeric, add 7 days, +
    and convert back to hex value again.                       */
   ChgVar     &LilDateNbr  Value( %bin( &LilDateHex ))
   ChgVar     &LilDateNbr  Value( &LilDateNbr + 7 )
   ChgVar     %bin( &LilDateHex )  Value( &LilDateNbr )

/* Convert Lilian date back to a normal character date         */
   CallPrc    CEEDATE  Parm( &LilDateHex  'YYYYMMDD'  &YYMDnxtWk &fc)

TEST:   DmpCLpgm

Endpgm


        
                
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.