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



As started a file is better.

But the code you wrote will work. It is an older style of coding and I don't think works in free format, add in your "c" for the specs. In free format I would just update the existing code to.

If CurrentUser = 'SIMONG' or CurrentUser = 'ALEYB';
Write ctlrb;
Endif;

When you need a change you have to update the program, after doing that a time or two, you (or they) will see the advantage to the file version.

Would you rather change and recompile, then handle testing and implementing to production, something that could be finished by adding or removing a record in a file.

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Keith McCully
Sent: Thursday, April 07, 2016 7:46 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: more bad RPG code question

And what if both of them were on holiday together or even quit? You're looking at a code change and all else that goes too.
As Bradley says, best control from a table.

On 7 April 2016 at 13:27, Bradley Stone <bvstone@xxxxxxxxx> wrote:

Wouldn't it be better to great at least a table with users that can
have access that you could CHAIN to? Hardcoding is rarely a good idea.

Brad
www.bvstools.com

On Wed, Apr 6, 2016 at 3:46 PM, Hoteltravelfundotcom <
hoteltravelfun@xxxxxxxxx> wrote:

Is this acceptable ?
CurrentUser ifeq 'SIMONG'
CurrentUser oreq 'ALEYB'
WRITE CTLRB
END

They want to limit who can update rebates.

The other way would be to make a file with such permissions.

But they said to just hard code it. is this syntax ok? We only want
to allow 2 people to update the rebates table.
--
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.c
om_mailman_listinfo_rpg400-2Dl&d=CwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1
odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=85
9CjI4G8nY5tmKaTUtQxucJ_XsDQoZL_enHoUL0grs&s=6ffJtmCrFahrqV8EBePsALDg
I2FkmobLfwQvKSH2BVs&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=CwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=859CjI4G8nY5tmKaTUtQxucJ_XsDQoZL_enHoUL0grs&s=585l3J0alN9L5gsQsSixCEgXVu7jpDfhpF4ohSB-QKU&e= .

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
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=CwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLu
nI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=859CjI4G
8nY5tmKaTUtQxucJ_XsDQoZL_enHoUL0grs&s=6ffJtmCrFahrqV8EBePsALDgI2FkmobL
fwQvKSH2BVs&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=CwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=859CjI4G8nY5tmKaTUtQxucJ_XsDQoZL_enHoUL0grs&s=585l3J0alN9L5gsQsSixCEgXVu7jpDfhpF4ohSB-QKU&e= .

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
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=CwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=859CjI4G8nY5tmKaTUtQxucJ_XsDQoZL_enHoUL0grs&s=6ffJtmCrFahrqV8EBePsALDgI2FkmobLfwQvKSH2BVs&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=CwICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=859CjI4G8nY5tmKaTUtQxucJ_XsDQoZL_enHoUL0grs&s=585l3J0alN9L5gsQsSixCEgXVu7jpDfhpF4ohSB-QKU&e= .

Please contact support@xxxxxxxxxxxx for any subscription related questions.

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.