× 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: "extract" command enhancement
  • From: Paul Jackson <paulgjackson@xxxxxxxxx>
  • Date: Tue, 21 Sep 1999 10:08:39 -0700 (PDT)

How 'bout the following %BIF's. They seem like a good
choice but maybe they've been discounted earlier in
this thread:

%DAY
%MONTH
%YEAR
%CEN
%DATE
%TIME
- %HOUR
- %MIN
- %SEC
- %MSEC

Eg:
Eval  Day = %Day(Timestamp)
Eval  %Day(Timestamp) = 31

or

Eval %Date(Timestamp) = ISODate
Eval CurTime = %Time(Timestamp)

etc.

This seems pretty intuitive but obviously I do not
have the whole picture from the language development
point of view.

Comments?

-Paul Jackson

--- Jim Langston <jlangston@conexfreight.com> wrote:
> Well, how about a time field and retrieving Hours,
> Minutes, Seconds?
> It would be useful there.  And I vote for %subfld
> also (sub field).
> 
> Regards,
> 
> Jim Langston
> 
> boldt@ca.ibm.com wrote:
> 
> > Jon wrote:
> > > >> The name we're currently leaning towards is
> "%subdtz".
> > > >> As in, the sub-part of a date, time, or
> timestamp value.
> > >
> > >Not wild about that one Hans - for one thing I
> don't think I'd ever be able to
> > >remember it <bg>.  It's just too arcane. One of
> the things I was trying to
> > >suggest with %Part - %Segment - %Subfld - %Item
> was that the portion extracted
> > >depended on the *D or whatever that was coded - I
> don't see that the BIF needs
> > >to have a strong association with
> date/time/timestamp per se.  Who knows -
> > there
> > >may be other things we want to extract components
> from in future - why tie it
> > to
> > >DTZ?
> >
> > I agree that "%subdtz" is a bit awkward.  How
> about "%subd" or
> > "%subdt"?  (I'm currently leaning towards
> "%subdt".)
> >
> > I sympathize with what you're saying about making
> it general,
> > but in the absence of specific scenarios, it's
> hard to picture
> > the usefulness.  Furthermore, different compound
> objects have
> > different characteristics which make the design of
> a common
> > extract bif difficult.  Look at the current
> precedent, "%subst".
> > The attributes of a component of a string
> (position, length)
> > are different than the attributes of a component
> of a date,
> > time, or timestamp value (year, month, etc.).  For
> some other
> > possible compound type, the attributes of a
> component will
> > likely be different again.
> >
> > Cheers!  Hans
> >
> > Hans Boldt, ILE RPG Development, IBM Toronto Lab,
> boldt@ca.ibm.com
> >
> > +---
> > | 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
> > +---
> 
> +---
> | 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
> +---
> 

===
Paul G. Jackson
IBM Certified Specialist - AS/400 RPG Programmer
Home: (425) 401-5016   pgjackson@ibm.net
                       paulgjackson@yahoo.com
Work: (425) 313-8594   pjackson@costco.com
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
+---
| 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 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.