I did the same. I moved final field to temp variable and then using "UNSTRING TEMP delimited by spaces" got expected output. But I am expecting some simple logic instead of doing it in 2 different steps.
The file is .CSV file which will be received using FTP. So I dont think the commas will be in between names or any other fields.
There are more than 20 fields not 4. I just gave an example so that the problem can be understand easily.
The counts are main in this program because the length of each field should be validated and if it fails length validation, that record is considered as error record.
Or the reverse/inspect already suggested. Or by "counting backwards" on the final field until you get a non-blank. Etc. Lots of ways to do it.
can you please tell me how this can be done by above quotes.