|
Richie, >I need to have the hypen protected using only 1 field, but the EDTWRD >does not work on characters. As others have mentioned, EDTMSK is designed for this. But unfortunately it is designed to only support numeric fields, so it is not usable in your case. I only know of one other method of doing what you want -- but I hesitate to recommend it. It works by taking advantage of how multiple display formats can overlay each other using CLRL(*NO), and retain input fields from an underlaying format. Basically you first WRITE a format with two separate input fields (plus the other input fields), then WRITE a format with CLRL(*NO) and no input fields, but with a formatted output field spanning the input fields and showing the "-" in the attribute position between the underlying input fields. Then you READ the first format. You cannot use EXFMT. This technique was published by Midrange Computing in Aug '94, and I suspect the sample code is on their web site. But again, the method is a little unorthodox, so if you use it make sure you document what you are doing in the source for the sake of future maintenance programmers. Doug +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.