Since you are changing the file add an extra field, updated yes/no.
Then depending on the flag, condition the edit code to be a zero or blank
Cheers Chris

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob Cagle
Sent: Thursday, February 23, 2017 7:25 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: RE: Show nulls on display file?

Doesn't look like the BLANKS keyword solves the issue. The user wants to enter a 0 and then have that 0 be displayed the next time she pulls up the record. Or for it to still be blank if she hasn't keyed in any 'value' yet.

Looks like the BLANKS keyword would only work the first time around.

What I am thinking now is that I'll just make the default value of the field a negative 1. The I can condition the display field to show a reverse image blank if the value is -1. It'll be updated when the user enters a 0 or otherwise.

Thanks

Bob Cagle
IT Manager
Lynk

-----Original Message-----
From: Charles Wilt

All you're really doing with a Y/N flag is rolling your own NULL bit...

Take a look at the BLANKS keyword for DDS DSPF fields...
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ibm.com_support_knowledgecenter_ssw-5Fibm-5Fi-5F72_rzakc_rzakcmstdfblank.htm&d=DwICAg&c=tjPg1sbLxZ1bjgTYa5hhdw&r=7M4eRq8YljOOcoOqXV_2mviIafI_EUkaG05dOFQGDVE7bKYU4SIcYe0vi3WEUzIK&m=ahSUWRA0uH0op7120AyxFjen1autw5wjMIRakZz_tsg&s=i7t5NmxzTxyzCeTD_PYnSnITaB-TSW_xkhI8fsETS88&e=

Charles

On Wed, Feb 22, 2017 at 9:12 AM, Bob Cagle <bcagle@xxxxxxxxxxx> wrote:

Further background on this: The user asked for a new field to be added
to our item info screen for tracking vendor commissions, so I added a
2 digit numeric field to the file and the screen.

Then when the user went to enter the commissions, she entered all the
commissions that should be 0 first. Yes, she went through several
records and entered zero into a field that she saw as blank. She
expected then to see that 0 to be displayed, but of course it wasn't
since I have it zero-suppressed. I explained to her how that works
and that she wasn't really changing the value and offered to remove
the zero suppress from the field. But when I told her that would
display 0 in every field that was 'blank', she said that wasn't going
to work either. Her question was 'How am I to know which items I haven't entered the commission for yet?'

So, yes, the user wants to distinguish between zero and blanks in the
field. I thought maybe a null value would work, but sounds like I
just need to convert it to character. I also briefly considered a
secondary field - a Y/N flag saying the commission had been entered.

Thanks

Bob Cagle
IT Manager
Lynk

-----Original Message-----
From: MichaelQuigley@xxxxxxxxxx

Can you define the situations that could have a null? All I can
think of is a new record? Or perhaps a numeric field for date
terminated sort

of thing? In any event, it seems to me that knowing how that null
field

will be used might pretty well define how you handle it?

I do like the idea of a a mark, perhaps underline a null? It still
confuses me though. How will the user key a blank/null into a
numeric field?


I'm not clear, but I think the OP is not really looking for genuine
null fields. It sounds like they just want to distinguish between
actually having blanks or zeroes in the field. If so, edit codes should work.

If they're really after distinguishing true null values, I like how
DBU does it. They condition the field to use column separators (and
yellow) when the value is null.

Michael Quigley

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DwICAg&c=tjPg1sbLxZ1bjgTYa5hhdw&r=7M4eRq8YljOOcoOqXV_2mviIafI_EUkaG05dOFQGDVE7bKYU4SIcYe0vi3WEUzIK&m=ahSUWRA0uH0op7120AyxFjen1autw5wjMIRakZz_tsg&s=WnHpwEhKg-K6-aNikR1a4ghVEgpzciDJxEczj0u_4ss&e=
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=http-3A__archive.midrange.com_rpg400-2Dl&d=DwICAg&c=tjPg1sbLxZ1bjgTYa5hhdw&r=7M4eRq8YljOOcoOqXV_2mviIafI_EUkaG05dOFQGDVE7bKYU4SIcYe0vi3WEUzIK&m=ahSUWRA0uH0op7120AyxFjen1autw5wjMIRakZz_tsg&s=m9I99gRjf8ipY5QYiHj9bRt269vztGXbmaPZgvQNvRU&e= .

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://urldefense.proofpoint.com/v2/url?u=http-3A__amzn.to_2dEadiD&d=DwICAg&c=tjPg1sbLxZ1bjgTYa5hhdw&r=7M4eRq8YljOOcoOqXV_2mviIafI_EUkaG05dOFQGDVE7bKYU4SIcYe0vi3WEUzIK&m=ahSUWRA0uH0op7120AyxFjen1autw5wjMIRakZz_tsg&s=rfEZIjlNbFHxdhLTFbxEiilyIpY4wITes_kbNcrJoVs&e=


**************************
This email message may contain confidential or privileged information. If you are not the intended recipient, please delete the message and any attachments and notify the sender by return email. You should not retain, distribute, disclose or use any of the information in this message.
**************************

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.