Could you please help me in getting the desired output.
Explanation:
The input is a comma delimited and want the output to be written as replacing comma with * as shown below. Also the field STATUS and its value in all the records and header should be written as %, The EMPNO should be written as the second field in the output whereas the first field will be DEPT. The FIXLENGTH of each field can be taken as 10.
Code: Select all
Input:
EMPNO,DEPT,DESG,SAL,GENDER,NAME,AGE
00001,001,SP,MONTHLY,MALE,JACK TORO,27
002,02,AP,YEARLY,FEMALE,BILLIE GILLS,38
03,003,AP,HALF,MALE,STUART H JACK,23
0004,04,SP,QUARTELY,MALE,YACK SUNOKI,35
00005,005,AP,MONTHLY,FEMALE,LARA MIDDLE,26
Output:
DEPT*EMPNO*%*SAL*GENDER*NAME*AGE
001*00001*%*MONTHLY*MALE*JACK TORO*27
02*002*%*YEARLY*FEMALE*BILLIE GIL*38
003*03*%*HALF*MALE*STUART H J*23
04*0004*%*QUARTELY*MALE*YACK SUNOK*35
005*00005*%*MONTHLY*FEMALE*LARA MIDDL*26
Kunnu.