|
Here's how we generally handle date and time in my shop. It's probably more than you need, but here it is: First we create a data structure with the necessary parts of the date and time we need, like so: I DS I 1 140#TMDT I 1 60#TIME I 7 140#DATE I 7 80#MM I 7 100#MMDD I 9 100#DD I 11 140#CEYR I 11 120#CENT I 13 140#YEAR Then in the *INZSR (or wherever you need it) we code the following two lines: C Z-ADD0 #TMDT C TIME #TMDT We always initialize the #TMDT field. Then you can use any part of the system time or date that you have formatted in your data structure. By the we, the use of a '#' at the start of the field name indicates a work field (as opposed to a parm, file field name, screen field name, etc.). Hope this helps and good luck;-) -----Original Message----- From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On Behalf Of paula Pickle Sent: Wednesday, May 24, 2000 7:45 AM To: RPG400-L@midrange.com Subject: Retrieve system time Hi Folks Im new to RPG and after attending a course a week ago Im now writing my first program - wish me luck :) I am trying to update a file and one field requires the current system time. Im sure this is easy to obtain when you know how. Ive used *TIME keyword in the DDS and this displays the time on the screen OK, but RPG doesnt like it. So is there a keyword to get the time or do I need to do something else to get it into the RPG. Im using RPG400 BTW. Look forward to your replies. Thanks Paula ===== Join AllAdvantage.com and get paid to surf the Web! Please use my ID (ibo595) when asked if someone referred you. Thanks! http://www.alladvantage.com/go.asp?refid=ibo595 __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.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 +--- +--- | 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 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.