0

I have requirement where I need to construct a file based on control file. The first row of my source file contains column names. The control file contains the columns which I need to output into a file

Source file:

ename|eid|emanger|esal|city|deptid|deptname
peter|10|larry|$2000|melbourne|20|electronics
shaun|11|Peter|$1000|sydney|20|electronics

Control file:

ename
eid
esal
ecity

o/p -- we need output only the columns which are there in the control file and the column order should be the same as in the control file.

Sample Output:

ename|eid|esal|ecity
peter|10|$2000|melbourne
shaun|11|$1000|sydney
cas
  • 78,579
karan
  • 9

0 Answers0