10-17-2008 8:04 AM
Hi All,
I need to parse the entries from an input text file format of Fixed Format. How can i split the entries?. If possible, explain wht fixed format means?
Thanks,
Neslin.
10-17-2008 8:22 AM
Fixed format means you know how many characters stand for particular data. The customer has to deliver you the format which he uses. i.e you have such entry
50002231100003344X10172008
First 8 char stand for pernr - 50002231
Next 10 char stand for Cost Center - 100003344
Another 1 char is a flag for something - X
The rest 8 chars stand for a date - 10172008
It is always up to customer what fixed format he/she uses.They must told you how to interpret the data inside the file (how many chars are used for certain data element)
To read the file create a table with string line, then read the file to it, and parse each line depending on the format (requirement) it was delivered to you. That's all.
10-17-2008 8:22 AM
Fixed format means you know how many characters stand for particular data. The customer has to deliver you the format which he uses. i.e you have such entry
50002231100003344X10172008
First 8 char stand for pernr - 50002231
Next 10 char stand for Cost Center - 100003344
Another 1 char is a flag for something - X
The rest 8 chars stand for a date - 10172008
It is always up to customer what fixed format he/she uses.They must told you how to interpret the data inside the file (how many chars are used for certain data element)
To read the file create a table with string line, then read the file to it, and parse each line depending on the format (requirement) it was delivered to you. That's all.
10-17-2008 8:29 AM