× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Your solution sounds good Rob!
  I have changed my mind on how Iam going to do it... Now my business people 
want to see the data in different format anyway..
  

rob@xxxxxxxxx wrote:
  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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.