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



This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
Hi Dean,

I have only used it the once - we have only just gone to V5R1.

a brief example,

FfileA          IF   E                   K DISK

/COPY prototypes

D prDeleteOldData       PI
D mdWeekEndDate         10D

...
C               READ    FileARec
 *   If record is more than 60 days old, delete it
C               IF      NOT %EOF(FileA) AND
C                       %DIFF(ASATDATE:mdWeekEnd:*DAYS) > 60
C               DELETE FileARec
C               ENDIF
...

Cheers,
        Martin
> -----Original Message-----
> From: Dean Bathke [SMTP:dbathke@Quintrex.com]
> Sent: 21 May 2002 16:21
> To:   'rpg400-l@midrange.com'
> Subject:      RE: Calculating Duration in days/hours from  timestamp field
>
> Thanks Martin
>
> I couldnt find much info on %DIFF although it DOES roll off the tongue
> rather nicely, LOL
> In any case I found this little sample and modified it to work as I needed
> it to.
> If you have any info or examples you want to share concerning the %DIFF
> BIF,
> Id love to see it..
> Thanks
>
>
> Dtimenow          S               T   inz(*sys)
> Dtimethen         s               t   inz(T'16.30.27')
> Ddatenow          s               d   inz(*sys)
> Ddatethen         s               d   inz(D'2002-02-27')
> Dmin              s             10i 0
> Dtotalmin         s             10i 0
> Ddays             s             10i 0
> Dhrs              s             10i 0
> C     timenow       subdur    timethen      min:*mn
> C     datenow       subdur    datethen      days:*d
> C                   eval      totalmin = days * 1440 + min
> C                   eval      hrs = %div(totalmin:60)
> C                   eval      min = %rem(totalmin:60)
> C                   dump
> C                   eval      *inlr = *on
>
> > -----Original Message-----
> > From:       Hillier, Martin [SMTP:Martin.Hillier@Mattel.com]
> > Sent:       Tuesday, May 21, 2002 9:48 AM
> > To: 'rpg400-l@midrange.com'
> > Subject:    RE: Calculating Duration in days/hours from  timestamp field
> >
> > This message is in MIME format. Since your mail reader does not
> understand
> > this format, some or all of this message may not be legible.
> > --
> > [ Picked text/plain from multipart/alternative ]
> > Hi Dean
> >
> > Have you looked at the %DIFF BIF.
> >
> > That rolls of the tongue nicely :-)
> >
> > Cheers,
> >     Martin
> >
> > > -----Original Message-----
> > > From:     Dean Bathke [SMTP:dbathke@Quintrex.com]
> > > Sent:     21 May 2002 15:35
> > > To:       'rpg400-l@midrange.com'
> > > Subject:  Calculating Duration in days/hours from  timestamp field
> > >
> > > Good morning, I am trying to calculate duration and it just seems that
> I
> > > am
> > > jumping through alot of hoops. We have dates stoerd as YYYYMMDD and
> TIme
> > > values as HHMMSSss. I was under the impression that I build 2
> timestamps
> > > and
> > > then subdur but I am unsure if this is the way to go anyone have any
> > > pointers to gewt me in the right direction? I have been looking at the
> > > archieves at http://archive.midrange.com/rpg400-l.
> > >
> > >
> > > Thanks all
> > > >
> > > _______________________________________________
> > > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
> > list
> > > To post a message email: RPG400-L@midrange.com
> > > To subscribe, unsubscribe, or change list options,
> > > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> > > or email: RPG400-L-request@midrange.com
> > > Before posting, please take a moment to review the archives
> > > at http://archive.midrange.com/rpg400-l.
> > _______________________________________________
> > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
> list
> > To post a message email: RPG400-L@midrange.com
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> > or email: RPG400-L-request@midrange.com
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/rpg400-l.
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> 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 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.