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



On Wed, 2005-06-15 at 13:54, kristof.anthonis@xxxxxx wrote:
> Don't you think it's strange to provoke an error, when it's not
> necessary??

Not at all: it's only provoking an error if the format is incorrect. 
Using TEST(DE), and then checking %error, and THEN performing the date
conversion or error handling is much more intensive.

Imagine you were looping through 100,000 records and 99,999 of the date
formats are valid.  Why force a test and the following %error if
construct 100,000 times?  Using Monitor, the error conditioning only
processes the one time the format is bad... the other 99,999 times the
condition is never even checked.  At the same time, the date is also
converted!  You get a lot of bang for your buck with Monitor: it is a
very robust form of exception handling and will perform better over time
than a ton of IF conditions.

Joel Cochran
http://www.rpgnext.com


> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joel Cochran
> Sent: woensdag 15 juni 2005 10:26
> To: RPG programming on the AS400 / iSeries
> Subject: RE: TEST Date in free form
> 
> Even better, user MONITOR:
> 
> /free
>   monitor ;
>     testDate = %date( Today : *USA );
>   on-error ;
>     // do some error handling
>   end-mon ;
> /end-free
> 
> For more on dates in RPGIV, read this:
> http://www.midrangeserver.com/fhg/fhg051904-story01.html
> 
> Joel Cochran
> http://www.rpgnext.com
> 
> On Wed, 2005-06-15 at 06:28, Simonse, Arco (CMK) wrote:
> > Hi,
> > 
> > It's not that difficult:
> >  
> > Test(ed) *USA Today ;
> > 
> > Best Regards,
> > 
> > Arco Simonse
> > pgmr
> > -- 
> >  
> > 
> > > -----Oorspronkelijk bericht-----
> > > Van: rpg400-l-bounces@xxxxxxxxxxxx 
> > > [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Namens Chandana Silva
> > > Verzonden: woensdag 15 juni 2005 07:59
> > > Aan: RPG400-L@xxxxxxxxxxxx
> > > Onderwerp: TEST Date in free form
> > > 
> > > I have been searching a way to replace the following code in 
> > > free form..
> > >  
> > > C          *USA                  TEST(DE)                 TODAY    
> > >  
> > > I am sure there are some ideas.
> > >  
> > > Thanks.. 
> > > 
> > > 
> > > --
> > > 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.
> > > 
> > > 
> > DISCLAIMER:
> > This message contains information that may be privileged or
> > confidential and is the property of C.Meijer B.V. It is intended only
> for the person to whom it is addressed. If you are not the intended
> recipient, you are not authorized to read, print, retain,
> copy,disseminate, distribute, or use this message or any part thereof.
> If you
> > receive this message in error, please notify the sender immediately
> and delete all copies of this message. 
> > 
> > This footnote also confirms that this email message has been swept by
> the presence of computer viruses
> > 
> 
> -- 
> 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:
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.