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



Our newer apps do handle the date and time differently, especially when there is no budget to update the older apps. That code would work, but how would it handle a box that runs software for multiple clients across multiple time zones. Each client must have the time/date correct for their time zone.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Friday, September 25, 2009 8:53 AM
To: RPG programming on the IBM i / System i
Subject: Re: differences between RPGLE and SQLRPGLE

No. But why are you using numerics for dates and times and why are you still using MOVE? And why are you using a program that needs two
parameters: System time and date, and system date?


D sysdatetime S Z
D systime s t
D sysdate s d
D Month s 5i 0
D Day s 5i 0
D Year s 5i 0
D hh s 5i 0
D mm s 5i 0
D ss s 5i 0
D NumberDate s 8p 0
/free
*inlr=*on;
sysdatetime=%timestamp(); // retrieve current timestamp
systime=%time(sysdatetime); // get time part of timestamp
sysdate=%date(sysdatetime); // get date part of timestamp
Month=%subdt(sysdatetime : *months);
Day=%subdt(sysdatetime : *days);
Year=%subdt(sysdatetime : *years); // yyyy
hh=%subdt(sysdatetime : *hours);
mm=%subdt(sysdatetime : *minutes);
ss=%subdt(sysdatetime : *seconds);
NumberDate=%dec(sysdate); // yyyymmdd
return;
/end-free

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
George Van Eaton <gvaneaton@xxxxxxxxx>
To:
"rpg400-l@xxxxxxxxxxxx" <rpg400-l@xxxxxxxxxxxx>
Date:
09/25/2009 08:41 AM
Subject:
differences between RPGLE and SQLRPGLE
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx



I have an interesting issue. Take a look at this snippet of code from a
program in RPGLE:
d sys_timdat s 12 0
d sys_datusa s 8 0
D DS
D TimeDate 14 0
D Time 6 0 OVERLAY(TimeDate)
D MM 2 0 OVERLAY(TimeDate:7)
D DD 2 0 OVERLAY(TimeDate:9)
D YYYY 4 0 OVERLAY(TimeDate:11)

C Call 'TO0P07'
C Parm sys_timdat
C Parm sys_datusa
C Movel sys_timdat Time
C Move sys_datusa TimeDate


Now take a look at the same section of code in a SQLRPGLE program

d sys_timdat s 12 0
d sys_datusa s 8 0
D DS
D TimeDate 14 0
D Time 6 0 OVERLAY(TimeDate)
D MM 2 0 OVERLAY(TimeDate:7)
D DD 2 0 OVERLAY(TimeDate:9)
D YYYY 4 0 OVERLAY(TimeDate:11)

C Call 'TO0P07'
C Parm sys_timdat
C Parm sys_datusa
C Movel sys_timdat Time
C Move sys_datusa TimeDate

By the way this code is from the same program.
My issue is that the SQLRPGLE program errors out with a data decimal error
on this line C Move sys_datusa TimeDate

The RPGLE program does not error out. Program TO0P07 just returns the
time and date for systems that support multiple time zones.
So after TO0P07 run sys_timdat = 073141092509 and sys_dateusa = 09252009.
This is correct in both programs.

Any ideas as to the root cause of this error?


Thanks

George






George Van Eaton

Clinical Programmer Analyst

Healthcare Management Systems, Inc.

3102 West End Avenue
Suite 400

Nashville, Tennessee 37203

(615) 383-7300 Ext.7007

Fax (615) 386-6662

gvaneaton@xxxxxxxxx

www.hmstn.com<http://www.hmstn.com>



HMS welcomes your feedback on our service. If there are any areas we can
improve, please email our Quality Service Department at
hmsquality@xxxxxxxxx<mailto:hmsquality@xxxxxxxxx>. If you receive STAR
service, please email hmsstar@xxxxxxxxx<mailto:hmsstar@xxxxxxxxx> and tell
us about your experience. We appreciate your business.





CONFIDENTIALITY STATEMENT: The documents accompanying this transmission
may contain confidential health information that is legally privileged.
This information is intended only for the use of the individual or entity
named above. The authorized recipient of this information is prohibited
from disclosing this information to any other party unless required to do
so by law or regulation and is required to destroy the information after
its stated need has been fulfilled. If you are not the intended recipient,
you are hereby notified that any disclosure, copying, distribution, or
action taken in reliance on the contents of these documents is strictly
prohibited. If you have received this information in error, please notify
the sender immediately and arrange for the return or destruction of these
documents.




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.