View previous topic :: View next topic
|
Author |
Message |
rskumar
New User
Joined: 21 Nov 2005 Posts: 35 Location: chennai
|
|
|
|
1) Must read input data from a file. The records will be in the below structure format
01 Input file,
02 Field name1,
02 Field Value.
02 Field name2,
02 Field Value.
02 Field name3,
02 Field Value.
02 Field name4,
02 Field Value.
2) Mask the contents of the Field Value(1-4) as below
a. All Upper Case Letters must be replaced with Upper Case Alphabets starting from A
Eg: RAMMAOO------- ABCDEFGHI
b. All Lower Case Letters must be replaced with Lower Case Alphabets starting from a
Eg: rammaakd ------- abcdefghi
c. All Numeric values must be replaced with numbers starting from 0
Eg: 23451234 ------- 01234567
d) Special characters must be retained as given in input
3) Write the masked data to the output file
Example Conversions
1) ramaaaa*udjduhdduh*shdhndhx*234121 Should be masked to Abcdefghi*Jklmnopqrs*Tuvwxyzab*123456 |
|
Back to top |
|
|
Murali krishna
New User
Joined: 17 Feb 2006 Posts: 9 Location: chennai
|
|
|
|
Hi Kumar,
First you need toc chk is it possible to have a combination of lower and upper letter for field names.If not you can adopt the following procedure.
Declare a structure of above format.
read the input file into the Structure.For all the field names you can find the starting letter using SUBSTR option.if it is lower then find the length of the string and replace with lower case letters.
ex:- let us take the masking for 'ramaaaa'
SUBSTR(FIELDNAME1,1,1) will be 'r' then
Length(Fieldname1) will be '7' so you write 'abcdefg'
like this you can do for reaminig field names as well as 'field values' |
|
Back to top |
|
|
|