Focal Point
Masking Characters

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5991043091

October 11, 2006, 11:15 AM
funsutton
Masking Characters
I know this is simple and the mask function is simple, but actual implementation is beyond me at the moment. I simply want to mask a ID field to the last 4 digits.

Report:
 

TABLE FILE TOT_AWRD
BY SPRIDEN_LAST_NAME NOPRINT
BY SPRIDEN_FIRST_NAME NOPRINT
BY SPRIDEN_ID   [B]<<<--------I WANT TO MASK THIS TO BE XXXXX6789[/B] 
BY SPRIDEN_LAST_NAME
BY SPRIDEN_FIRST_NAME
BY RNVAND1_GROSS_NEED
BY RNVAND1_UNMET_NEED
BY TOTAL_AWARD
WHERE SPRIDEN_CHANGE_IND EQ MISSING
WHERE RNVAND1_AIDY_CODE EQ '&AID_YEAR.(FIND ROBINST_AIDY_CODE IN ROBINST).AID_YEAR.'
ON TABLE PCHOLD FORMAT EXL2K
END
 


How do you mask a "by field"


-Brian

Webfocus v7.6.1 on Windows XP
October 11, 2006, 11:24 AM
susannah
Brian,
my reading of the doc says that MASK is a Maintain-only function.
EDIT would be the equivalent function in the reporting world.
I would just create a new variable
SPRIDEN_ID2/A4=EDIT(SPRIDEN_ID,'$$$$$9999');
and if i wanted to display it with X's
then
SPRIDEN_ID2/A9='XXXXX' | EDIT(SPRIDEN_ID,'$$$$$9999');




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 11, 2006, 11:30 AM
Glenda
Brian,

There may be an easier way, but I'd just make a defined field. Hold by the original field (noprint) and then by the defined field.

DEFINE FILE ELGEMP
SSNID/A9 = 'XXXXX'||EDIT(EESSNO, '$$$$$9999');
END

TABLE FILE ELGEMP
PRINT
EEFNAM
EELNAM
EEEFDT
BY EESSNO NOPRINT
BY SSNID
ON TABLE PCHOLD FORMAT EXL2K
END
-EXIT


Glenda

In FOCUS Since 1990
Production 8.2 Windows
October 11, 2006, 11:36 AM
Jim_at_LM
DEFINE FILE FILE TOT_AWRD
XSPRIDEN_ID/A4 =EDIT(SPRIDEN_ID,’$$$$$9999’);
END


:

BY XSPRIDEN_ID


WebFOCUS 7.6.11, WINDOWS, HTML, PDF, EXCEL
October 11, 2006, 12:34 PM
Leah
You may be able to use special characters to create the edit mask properly. Came across it recently in issues we were having with student id. We were having issues with the define mask using the first four rather than the last four characters. So if you want nine characters in all then you need to do the special edit otherwise if four will do, Jim_at_LM suggestion is good. If you want the 'X' then do an edit
EDIT(ID,'$$$$$XXXXX9999') and it will print five 'X' and the last four numbers.


Leah
October 11, 2006, 01:17 PM
funsutton
Thanks everyone for your input.

I used Susannah's define with the pipe command and it works great.


-Brian

Webfocus v7.6.1 on Windows XP
October 11, 2006, 06:13 PM
susannah
quote:
EDIT(ID,'$$$$$XXXXX9999'


i just tried Leah's trick. That is SLICK!!!
Brian, do what Leah suggested.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID