|
"Peter, did you see my response on how to do this?"
Yes Bob, I am sorry...I guess I was answering other postings as well...
"One line of code in RPGIV. Of course if your original value is character, you
need to first move it into a TIME field in RPG."
To help you all visualize what I have, here it is the pgm:
* Entry parameters
D CurDate s 6
D CurTime s 6
D millisec s 8T
* Work fields
D CurDateLong s 10
D CurTimeLong s 8
D ds
D SysDateTime Z INZ(*LOVAL)
D SysDate 1 10D DATFMT(*ISO)
D SysTime 12 19T TIMFMT(*ISO)
*-----------------------------------------------------
D* Calculations
D*-----------------------------------------------------
D*
D* Entry parameters
*entry plist
D parm CurDate
D parm CurTime
D*
*
* Pull system date and time
C Time SysDateTime
C *ISO move SysDate CurDateLong
C *ISO move SysTime CurTimeLong
C Eval CurDate = %subst(CurDateLong:6:2) + Month
C %subst(CurDateLong:9:2) + Day
C %subst(CurDateLong:3:2) Year
C Eval CurTime = %subst(CurTimeLong:1:2) + Hours
C %subst(CurTimeLong:4:2) +
Minutes
C %subst(CurTimeLong:7:2)
Seconds
*
* Convert time from HHMMDD to milliseconds
C Eval Millisec = ????
>>>
>>> Bob's recommendation
C MyTime SUBDUR T'00:00:00' Mili:*MS
>>>
>>>
C endif
C eval *inlr = *on
What should be "MyTime"? SysTime? CurTimeLong?
Is "Mili" the equivalent of my "milisec" variable?
What is the equivalent coding if I want to use an EVAL statement?
Peter Vidal
Pall Aeropower Corp.
SR Programmer Analyst
WWW.Pall.com / 727-539-8448, x2414
"A good player makes himself look good; a great player makes the team look
good."
Author unknown
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.