Is there an equivalent of 'FORMATFILE' in MySQL? I'm looking for a way to import data from a text file to a MySQL database,
the text file used to be imported in a SQL SERVER db via BCP and FORMATFILEs option for exemple : 

BULK INSERT [MyTable] FROM 'myFolder\.txt' 
WITH (
FORMATFILE = 'myFolder\MyTable.fmt', 
ROWS_PER_BATCH = 5000, 
MAXERRORS = 5000, 
CODEPAGE = 'ACP', 
ERRORFILE = 'myFolder\errors.txt'
  )


MyTable.fmt :

7.0
4
1 SQLCHAR 0 3 "" 1 Field1
2 SQLCHAR 0 7 "" 2 Field2
3 SQLCHAR 0 3 "" 3 Field3
4 SQLCHAR 0 2 "" 4 Field4


Fields (or columns) in the source file are not separated, the only thing to distinct data is the number of character by each column as mention in the  formatfile MyTable.fmt e.g. : 


Field1 the first          3 characters form the left
Field2 the first (3+)     7 characters form the left
Field3 the first (3+7+)   3 characters form the left
Field4 the first (3+7+3+) 2 characters form the left


Any ideas how to proceed in MySQL ?
It seems to me this case cannot be handle in the same way used in SQL Server. However, I found another alternative to do that (i.e., importing data based-on the number of character by each column) :

LOAD DATA  INFILE 'xx.txt' INTO TABLE MyTable
 LINES TERMINATED BY '\n' (@L) 
 SET    
    Field1 = SUBSTR(@L, 1, 3), -- field1 : Position = 1 ,length = 3 
    Field2=  SUBSTR(@L, 4, 7),  -- field2 : Position = (1+3) ,length = 7    
    Field3=  SUBSTR(@L, 11, 3), -- field3 : Position = ((1+3)+7) ,length = 3 
    Field4=  SUBSTR(@L, 14, 2) -- field4 : Position = (((1+3)+7)+3) ,length = 2 
 ;