Implementing Column Masks is not as trivial, you should read the following
redpaper first:
https://www.redbooks.ibm.com/redpapers/pdfs/redp5110.pdf
There is also an example in chapter 3.4 for only masking a part of the whole
column content.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
Modernization ? Education ? Consulting on IBM i
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Code 1109
via RPG400-L
Sent: Mittwoch, 29. Juni 2022 23:58
To: RPG Programming On IBM I. <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: Code 1109 <code1109@xxxxxxxxx>
Subject: How to mask a variable size value
Hello all, I'd like to seek a suggestion on how using SQL mask a numeric
value, the value can be of different sizes so I'd like to only list the last
4 numbers and mask '*' the rest, sample:
I'd use a Select statement and select the field but before displaying it I
want to mask it and only allow for the last 4 digits to be readable
1234567890 mask as ******7890 (six asterisks from the beginning)12345678 as
****5678 (four asterisks) thanks in advanceRamon S.
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.