Guys, you would have gotten similar questions before, nevertheless, here it comes:
I need to process a file with different record types, and manipulate strings found at certain character positions within the file, by:
- converting to upper case;
- replacing any character not in the character set with a space
The rest of the record needs to be written back to file as is.
The processing varies depending on record type, which is in positions 1-2 of the record
The valid character set is: 0-9 A-Z a-z / - & . * and 'space'
Example:
- for record type '02', need to:
- process string in positions 34-433 by replacing non-standard characters with spaces and by converting all lower case to upper case
- process string in positions 600-1229 against the character set
- for record type '03', need to process string in position 57-229 the character set
Can anyone supply some sample code? Thanks
I need to process a file with different record types, and manipulate strings found at certain character positions within the file, by:
- converting to upper case;
- replacing any character not in the character set with a space
The rest of the record needs to be written back to file as is.
The processing varies depending on record type, which is in positions 1-2 of the record
The valid character set is: 0-9 A-Z a-z / - & . * and 'space'
Example:
- for record type '02', need to:
- process string in positions 34-433 by replacing non-standard characters with spaces and by converting all lower case to upper case
- process string in positions 600-1229 against the character set
- for record type '03', need to process string in position 57-229 the character set
Can anyone supply some sample code? Thanks