× 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: Fri, 17 Sep 1999 12:22:37 -0700 (PDT)

OK, here's another idea.

Leave EXTRACT as is: add few more bifs:

%DAY
%MONTH
%YEAR
(maybe %CENTURY)

allow for free format use:

D DateField         S            D  DATFMT(*ISO)
D Day               S         2 0

to get portion of date:

Eval Day = %DAY(DateField)

to change portion of date:

Eval %DAY(DateField) = 01

repeat as for %MONTH, %YEAR, (%CEN) etc.

--- boldt@ca.ibm.com wrote:
> 
> 
> Jon wrote:
> >%Component ?  - I kinda like that one
> >
> >%Part - %Segment - %Subfld - %Item ?
> >
> >I agree though that it doesn't make sense to use
> extract on the LHS.
> 
> In a private note to me, someone suggested using
> %subst.
> However, since the "st" in the name means "string",
> we
> don't really want to overload that bif.
> 
> The name we're currently leaning towards is
> "%subdtz".
> As in, the sub-part of a date, time, or timestamp
> value.
> 
> 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
> +---
> 

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