Chapter 2 of GIM is nice and clear about what the encounter history file should look like, so after reading that you should have a target for your .INP creation process. However, I think there is still a need for (somewhere) a more detailed description of how to get to that point with common software. Alas, I can't do that here and now, but I'll point you to some _free_ software I find handy for this purpose...
1.) A good database program, like OpenOffice.org BASE (MS Access is good too, but it ain't free).
OR, if your data set is relatively small,
2.) A good spreadsheet program, like OpenOffice.org CALC (which in my view has a number of features that make it superior to MS Excel).
Both of the above programs are free from, you guessed it --
www.openoffice.org
3.) A good plain text editor for checking the final file, like Notepad++ (available from
http://notepad-plus.sourceforge.net/ -- beware of on-the-fly encoding changes that MS Notepad makes).
One of the common PITAs to be aware of is that spreadsheet software may strip the leading zeros from your encounter histories unless the column/field is designated as text when the file is opened.
Hope this helps.