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



I believe in this case "PM" refers to Preventive Maintenance

Gregory A. Garner
Garner Data Systems, Inc.
4270 Grand Teton Parkway
Suwanee, GA 30024
Phone: 770 845 9636
Fax:   770 614 3496







-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of
jstevens@xxxxxxxxxxxxxx
Sent: Wednesday, December 22, 2004 11:10 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Display Files


Doug,

I may not fully undestand what you're doing here, but I don't like using 
indicators, so I try to avoid them as much as possible.  What I'd do is, 
I'd place an output field on the display file of 2A. Then set that field 
value in the RPG program to AM or PM.  Or, in my trucking applications, I 
was usually very tight on screen space, so I usually displayed in 24 hour 
times.  So 3:30pm was displayed as 15:30 (or even 1530, or even sometimes 
as just 15).  Or, if you want to display the AM/PM and want to save the 
space between the actual time and the AM/PM, then you could make a 5a, 6a 
or 7a field and build the display in the RPG so it displays like " 330P", 
" 3:30P", " 3:30PM". Stuff like that.

RPG code could work like this... (assuming that internal storage is in 24 
hour clock)

If Time > 1159;
  DisplayTime = %CHAR(Time) + 'PM';
 else;
  DisplayTime = %CHAR(Time) + 'AM';
Endif;


Or...

If Time > 1159;
  DisplayTime = %SUBST(%CHAR(Time):1:2) + ':' + %SUBST(%CHAR(Time):3:2)  + 
'PM';
 else;
  Displaytime = %SUBST(%CHAR(Time):1:2) + ':' + %SUBST(%CHAR(Time):3:2) + 
'AM';
Endif;


Or...

If Time > 1159;
  AMPM = 'PM';
 Else;
 AMPM = 'AM';
Endif;

DisplayTime = %SUBST(CHAR( Time ) : 1 : 2) + ':' + %SUBST( %CHAR( Time ) : 
3 : 2 ) + AMPM;


Lots of possibilities...

Hope it helps.


Jeff Stevens
Mize, Houser & Co. P.A.
913 451 1882
JStevens@xxxxxxxxxxxxxx





<Rick.Chevalier@xxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
12/22/2004 09:07 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
<rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Display Files







This may not be exactly what you want but one option is to use the DSPATR 
keyword with a system to program field.  Default the field value to x'27' 
which is non-display.  When you want the constant displayed set it to 
x'20'. 

Alternatively you could use DSPATR(ND) conditioned by an indicator being 
off (ex. N30).  When you want the constant displayed turn the indicator 
on.  It's backwards and therefore somewhat confusing but will do what you 
want.

There is more information in the DDS Reference for Display Files manual.

Rick

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Douglas W. Palme
Sent: Wednesday, December 22, 2004 8:33 AM
To: RPG programming on the AS400 / iSeries
Subject: Display Files


I have a quick question about a display file I am working on. 

it is for a truck dispatch inquiry where the dispatcher views the load
information, check call, etc.  However I need to add a couple of constants
that only appear if say the truck is due for a PM, etc.  Now I know I can
just add an indicator to it and when the truck chesks for its PM status it
turns it on or off; my question is there a way with SDA that I can turn it
off by defualt?

I would rather only turn it on if it is needed.



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


Privileged and Confidential.  This e-mail, and any attachments there to, 
is intended only for use by the addressee(s) named herein and may contain 
legally privileged or confidential information.  If you have received this 
e-mail in error, please notify me immediately by a return e-mail and 
delete this e-mail.  You are hereby notified that any dissemination, 
distribution or copying of this e-mail and/or any attachments thereto, is 
strictly prohibited.

-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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-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.