Trying to get a Social Security Number Display for users to enter on the As400. I have the following code -
           P1SSN         11Y 0B 10 48EDTWRD('     -     - ')  
                                                      EDTMSK('     &     & ')  

I would like to know why the dashes do not appear when the display file is executed. Can anyone help with this?

Thanks  you in advance.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:

Assuming the field initially contains zeroes, then the EDTWRD you have specified will display nothing -  all output is suppressed.  You haven't provide it with any zero-fill directive.

If you want to see the dashes when the field contains zeroes, do this:

EDTWRD('0     -     - ')  


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nmvfd18Author Commented:
Thank you , Gary that solved one of the problems. Is there a way to zero fill in the field is the user types less than the 11 characters and presses field exit?

nmvfd18Author Commented:
That is 11 digits
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

Gary PattersonVP Technology / Senior Consultant Commented:
Normally, you'd specify CHECK(RZ), for example, to right-adjust and zero fill with leading zeroes, but that keyword is mutually exclusive with the EDTMSK keyword, so you'd have to make a choice there.
nmvfd18Author Commented:
Gary:  Suppose the field that I am displaying is alpha-numeric, but I still want the function of the EDTMSK meaning that where the '-' are, the user cannot type in that space.  Do you have a solution for that.  An example  - a alpha-numeric field ('1234-HELP-123') is display on the screen and the user can change this field, but I want the program to not be allowed to type over the dashes. when the user changes this field the program should automatically skip over position 5 and position 10.
Gary PattersonVP Technology / Senior Consultant Commented:
Edit word / edit code support is only available on numeric fields.  

One solution is to create a data structure in your program containing three character subfields, and use the subfields on the display with literal "-" marks.  This will approximate the behavior you want.

xxxx - xxxx - xxx
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.