|
Don't think you can take a character field with a packed number and do a testn on it. For example, one sample 2 character field representing a valid packed number would be char2=x'001F'; // Note: the x'...' means hex I don't think testn would fly against that. While this may test fine char5='0123J'; // Certain letters in the last position may indicate a "sign" (plus, minus) over a number. This may test fine with TESTN but be totally meaningless in your application. You could try reading the flat record into a datastructure. Then with judicious use of MONITOR and ON-ERROR test each field D recds D name 20a D wage 5p 2 ... read file ....; // use the option to read into a data structure. monitor; wage=wage+0; On-error; // wage ain't right End-mon; Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.