|
What happens if you define the field as a time field? ( T = Time)? Does the following work for output, too?
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzahg/icmain.htm
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzahg/icmain.htm
Example
The following example shows how to specify the TIMFMT keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A
00020A R RECORD
00030A TIMFLD1 T B 5 2TIMFMT(*ISO)
00040A TIMFLD2 T B 5 22TIMFMT(*USA)
00050A TIMFLD3 T B 5 42TIMFMT(*HMS) TIMSEP(',')
A
If you want to display 2 o'clock p.m., the following values are displayed where RECORD1 appears.
TIMFLD1 14.00.00
TIMFLD2 02:00 PM
TIMFLD3 14,00,00
RWMunday wrote:
Greetings from Sunny Florida.
With my RPG /Free program, I am attempting to use MAPVAL on a time field
which is output only. The IBM website does not describe its use with time,
only date. I've been using the date version for years. Now I have an
application which will generate the time throughout the day. I don't want
to see ` 5` but would rather see `0:00:05`. The compile error I get
on my screen indicates that the keyboard value on my time field is invalid.
I have tried:
6Y 0 O
6S 0 O
6 0 O
It was suggested that I could make the output field character and move an
%EDITW value into it, but I would rather keep the numeric times with
editing.
Do any of you know the secret to overcoming this error?
Thanks,
Robert Munday
Munday Software Consultants
Montgomery, AL
On assignment in Jacksonville, FL
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.325 / Virus Database: 270.12.28/2113 - Release Date: 05/13/09 18:04:00
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.325 / Virus Database: 270.12.28/2113 - Release Date: 05/13/09 18:04:00
As an Amazon Associate we earn from qualifying purchases.
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.