EDTMSK & EDTWRD Question

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.

Matt
nmvfd18Asked:
Who is Participating?
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:
Matt,

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     -     - ')  

https://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/rzakc/rzakcmstdfedwrd.htm
1

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?

Matt
0
nmvfd18Author Commented:
That is 11 digits
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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.
1
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.
0
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
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.