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



Peter,

You might want to do some testing of your procedure for performance.  Using
the BIF's for date conversion has proven actually slower than some of the
older methods (moves, data structures, etc.) when processing large amounts
of records.  While I agree in principle with your desire to use the BIF's,
if your procedure will be called numerous times the use of BIF's could
actually hurt performance.

Just a thought.

Rick

-----Original Message-----
From: Peter Colpaert [mailto:Peter.Colpaert@xxxxxxxxxxxx]
Sent: Tuesday, July 29, 2003 6:05 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Date conversion



Walter,

while I didn't quite use your three statements (I want to use BIF's to
their fullest), you did point me in the right direction with the *Eur0 date
format.  Here's what I ended up with:

     p EuroIso         b                   export
     d EuroIso         pi             8s 0
     d DateNum                        8s 0 value
      //
      /FREE
       return atoi(%char(%date(DateNum:*Eur):*Iso0));
       //
      /END-FREE
     p EuroIso         e

Thanks for the help.

(groetjes aan Martine ;-)

Peter Colpaert
Application Developer

Honda Europe NV
Langerbruggestraat 104
B-9000 GENT
Belgium
Peter.Colpaert@xxxxxxxxxxxx
Tel: +32 9 2501 334
Fax: +32 9 2501 231
----------
Yoda of Borg are we: Futile is resistance. Assimilate you, we will.
----------






                                     Peter,

                                     Try this:
                                     Not a procedure, but you'll get the
                                     point.


                                         d Indate          s
                                     8p 0
                                         d OutDate         s
                                     8p 0
                                         d IsoDate         s
                                     d
                                         d CharDate        s
                                     8a
                                         c     *Entry        Plist
                                         c                   Parm
                                     outdate

                                          /free

                                            Indate = 20030729;
                                            Monitor;
                                             IsoDate = %Date(Indate:*ISO);
                                             CharDate = %Char(IsoDate:
                                     *Eur0);
                                             OutDate =  %Int(CharDate);

                                            // Any Error returns Zero

                                            On-error;
                                              OutDate = 0;
                                            EndMon;

                                              Return;

                                          /end-free

                                     Groetjes,

                                     Walter

                                     Walter Hesius
                                     Senior Application developer Iseries
                                     (as/400)
                                     Walter_Hesius@xxxxxx




      ______________________________________________________________________
   The information contained in this communication is confidential and may
   be legally privileged. It is intended solely for the use of the
   individual or the entity to whom it is addressed and others authorised
   to receive it. If you have received it by mistake, please let the sender
   know by e-mail reply and delete it from your system.
   If you are not the intended recipient you are hereby notified that any
   disclosure, copying, distribution or taking any action in reliance of
   the contents of this information is strictly prohibited and may be
   unlawful.
   Honda Europe NV is neither liable for the proper and complete
   transmission of the information contained in this communication nor for
   any delay in its receipt.



_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

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.