Execution of loop :Splitting a single file into multiple .dat file

hdr=$(cut -c1 $path$file|head -1)#extract header�H�
trl=$(cut -c|path$file|tail -1)#extract trailer �T�
SplitFile=$(cut -c 50-250 $path 1$newfile |sed'$/ *$//' head -1')# to trim white space and extract table name 
If[�$hdr' ='H']; then  # start loop if it is a header
While read I   #read file
Do
$parh$file>${splitfile}.dat  #create new file with table name as present in header
If[$�trl=�='T'];then
#Continue loop for next iteration to create next table
if If[$�trl=�='T'];then #reached EOF
exit 0
fi
fi
done<�path1$newfile�

Please help with execution of loop
Start loop if 'H' found
Loop through Untill it finds a 'T'
Start next iteration of file continue
Stop loop if it encounters next 'T'

It looks like you have edited this script in word. starting lines with upper case is not valid as shell is case sensitive and keywords like While Do and If will not work.

Also quotes are incorrect and again it looks like word has changed them to sloping version eg �T� instead of "T"

Please notify what your target OS and shell are and provide a sample input file.
Also describe in English what processing you want along with sample output file(s) as appropriate.

Some more comments on top of what Chubler_XL said:

Just from looking at the snippet one can see many syntax errors, maybe sloppy typing. Make sure your variables are correctly expanded with the "$" sign in front. Surround "[", "]", and "=" with spaces. When quoting variables, make sure the "$" is inside the quotes, and don't use single quotes when you want expansion. "if If" will not work. And, some proper indentation will make the code more readable and safer.

input file:
H|123|45555|4555|FILE1.DAT   WHITE SPACE   |33|444
D|123|45555|4555|45T55|33|444
D|FF|676|YTYYU|878
T|GFG|GFGF|7879|
H|123|45555|4555|FILE2.DAT   WHITE SPACE   |33|444
D|123|45555|4555|45T55|33|444
D|FF|676|YTYYU|878
T|GFG|GFGF|7879|
H|123|45555|4555|FILE3.DAT   WHITE SPACE   |33|444
D|123|45555|4555|45T55|33|444
D|FF|676|YTYYU|878
T|GFG|GFGF|7879|3434

output Files:
File1.dat
H|123|45555|4555|FILE1.DAT   WHITE SPACE   |33|444
D|123|45555|4555|45T55|33|444
D|FF|676|YTYYU|878
T|GFG|GFGF|7879|223
File2.dat
H|123|45555|4555|FILE2.DAT   WHITE SPACE   |33|444
D|123|45555|4555|45T55|33|444
D|FF|676|YTYYU|878
T|GFG|GFGF|7879|
H|123|45555|4555|FILE3.DAT   WHITE SPACE   |33|444
D|123|45555|4555|45T55|33|444
D|FF|676|YTYYU|878
T|GFG|GFGF|7879|3434

program flow
We have to split the input file into multiple new file as shown in output file file1.dat,file2.dat,file3.dat

loop through the input file
create a new file (file name as present in header) as present in table header.
New file should contain all the lines starting from a table header H to Table trailer
H ....T>File1.dat when it encounter next H ....T>file2.dat and so on
Let me know if need more info
input file should split number of H present in file

Your file names don't match the strings in the sample file. Try

awk '$1=="H" {FN=substr($5, 1, index($5," ")-1)} {print > FN}' FS="|" file
cf FIL*
FILE1.DAT:
H|123|45555|4555|FILE1.DAT   WHITE SPACE   |33|444
D|123|45555|4555|45T55|33|444
D|FF|676|YTYYU|878
T|GFG|GFGF|7879|
FILE2.DAT:
H|123|45555|4555|FILE2.DAT   WHITE SPACE   |33|444
D|123|45555|4555|45T55|33|444
D|FF|676|YTYYU|878
T|GFG|GFGF|7879|
FILE3.DAT:
H|123|45555|4555|FILE3.DAT   WHITE SPACE   |33|444
D|123|45555|4555|45T55|33|444
D|FF|676|YTYYU|878
T|GFG|GFGF|7879|3434