A 1099 Express source record for 1098-Q looks like this:
B|Q|SSN|Cor|ForeignAdr|Reserved|CS|Name1|Name2|Addr|City|State|Zip|Acct|Amt1|Amt2|...Amt13
Field 1: Capital "B", This is the Record Identifier.
Field 2: Holds the character "Q", indicating 1099-Q Payments from Qualified Educaton Programs (Under Sections 529 and 530).
Filed 3: Recipient's Social Security Number.
Field 4: Correction Indicator.
Field 5: Set to "1" if recipient is Foreign (outside USA).
Field 6: Reserved.
Field 7: Combined State Code.
Field 8: Student Name 1 Field.
Field 9: Student Name 2 Field, usually empty.
Field 10: Student Address.
Field 11: City.
Field 12: State Code.
Field 13: Zip Code.
Field 14: Account Information. Must be unique to distinguish corrections for duplicate recipients.
Field 15: Amt01-Box 1 Gross distributions.
Field 16: Amt02-Box 2 Earnings.
Field 17: Amt03-Box 3 Basis.
Field 18: Box 4 Required. A Checkbox. Contains "1" if checked, else empty.
Field 19: Box 5 Required. 0=Private, 1=State, 2=Coverdell, else empty.
Field 20: Box 6 Required. A checkbox. Contains "1" if checked, else empty.
Field 21: No Box number. Comments, printed but used by the IRS, not present in IRS file.
Fields 22 and higher and not used, and the delimiters need not be present. Amt means a dollar field.
All Fields are normal Ascii strings, without a Ascii Zero trailer. Each record is terminated by a carriage return, line feed sequence, when resident on disk.