I know the offset and format of the count, and I certainly can compare it to a literal. The problem is not knowing the maximum value the count could have in any group of records (and each record can have a different value for the count). I could for example, code the IFTHEN statement to handle 9 segments, but have a record show up with 10. I could, I suppose, make one pass through the file to determine the maximum number of segments, then create control statements to process them. I guess what I was looking for would be more of an iterative loop processing of the record segments.
---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html