|
View previous topic :: View next topic
|
| Author |
Message |
Uday Kumar R
New User
Joined: 07 Nov 2007 Posts: 27 Location: Hyderabd
|
|
|
|
Hi team,
I am trying to understand how multiple specific location updates with specific information, more or less like encryption format.
i have file with 20 bytes where it consist of 9-13 five digits with account information. so i would like to mask this account information every time.
so i have followed one dequece. Replace 1->a,2-b,3-c,4-d,5-e,6-f,7-g,8-h,9-i,0-j. Some thing encryption formation. so i need to do it for the coloumns 9,10,11,12,13. While i am trying to if then clause it works for one colunm and coming out, i need to replicate the same sort step for 5 times to do this. Is it possible to have in one step. This is what i have followed.
| Code: |
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'1',),OVERLAY=(9:C'A')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'2',),OVERLAY=(9:C'B')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'3',),OVERLAY=(9:C'C')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'4',),OVERLAY=(9:C'D')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'5',),OVERLAY=(9:C'E')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'6',),OVERLAY=(9:C'F')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'7',),OVERLAY=(9:C'G')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'8',),OVERLAY=(9:C'H')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'9',),OVERLAY=(9:C'I'))).
|
Like wise i have done for column 10->13 steps by including each step for one parm. Is there any key words so that i can try more research to complete in a single STEP. thanks for all for giving a view this query.
INPUT (ONLY 10byes of input file i have written)
| Code: |
1111567890
2222678901
3333789012
4444890123 |
OUTPUT:
| Code: |
1111EFGHI0
2222FGHIJ1
3333GHIJA2
4444HIJAB3 |
|
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
| Back to top |
|
 |
Pandora-Box
Global Moderator
.jpg)
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
This might help
| Code: |
SORT FIELDS=COPY
OUTFIL FINDREP=(INOUT=(C'1',C'A',C'2',C'B',C'3',C'C',
C'4',C'D',C'5',C'E',C'6',C'F',
C'7',C'G',C'8',C'H',C'9',C'I',
C'0',C'J'),STARTPOS=9,ENDPOS=13) |
|
|
| Back to top |
|
 |
Pandora-Box
Global Moderator
.jpg)
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
| Also looks like the syntax you used is wrong (atleast for me) due to duplicate INREC , and due to ,), and also due to ))) in the end |
|
| Back to top |
|
 |
Uday Kumar R
New User
Joined: 07 Nov 2007 Posts: 27 Location: Hyderabd
|
|
|
|
| sorry for that, the INREC should not the there from second line onwards. But he proposed code help me lot. Thank you for all the help. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|