Unfortunately, you cannot use the number of fields to determine which type of record a specific line matches. This is, in part, due to the fact that “detail” record could have optional fields at the end – and in that case the count of fields will change and might match a different record type. So you must specify a field in each record that can unambiguously serve as a record type identifier.
In the case you shared, the file could be:
H,12345678
D, Irfan,3500,03214198008
D, Afzal,1200,03214133188
D, Asif,1400,03214143188
With field 1 defined as the record identifier, using ‘H’ for the header record type and ‘D’ for the detail record type. You can use any value desired. The identifier can be a specific field or can be at a specific character positiion.
If a record identifier is not used (often the case for single record type files) you specify a doc type as the default record type.
Refer to the service development help for details. HTH.
#webMethods