====== XTRN.DAT ======
The Synchronet v2 External Program Data File (a.k.a. drop file), ''xtrn.dat'' format.

In DOS and OS/2 versions of Synchronet, this file was named ''XTRN.DAT'' but later (in Synchronet v3), the case of the created file was configurable (either all upper or all lower case).

The ''xtrn.dat'' is a plain text file consisting of CRLF-delimited lines of up to 80 characters each, parsed one line at a time.

The file's length varies with the number of external programs configured on the system: line 32 gives that count (//N// in the table below) and the next //N// lines hold their names, so every line after them is numbered relative to //N//. A program the user has no access to is written as a blank line rather than omitted, so //N// always matches the total number of configured programs. //N// may be 0 -- for instance when the drop file is created for an external message editor on a system with no external programs -- in which case no name lines are written at all and the next field follows line 32 directly.

^Line ^ Example                       ^ Description ^
^ 1   | Digital Man			| User's name or alias |
^ 2   | Vertrauen			| BBS name |
^ 3   | Digital Man			| Sysop's name |
^ 4   | The Guru			| System Guru (AI engine) |
^ 5   | c:\sbbs\ctrl\			| Control directory((Paths are written absolute and lower-cased, as configured. For an external program that is not native -- a DOS program running under Windows -- the short (8.3) form of each path is written instead, e.g. ''C:\SBBS\CTRL\''.)) |
^ 6   | c:\sbbs\data\			| Data directory |
^ 7   | 9				| Total nodes on system |
^ 8   | 7				| Current node |
^ 9   | 30000				| Time left (in seconds) |
^ 10  | Yes				| ANSI? (Yes,No, or Mono) |
^ 11  | 24				| Screen lines |
^ 12  | 209087929			| Credits |
^ 13  | 99				| Security level((Referred to in earlier documentation as "Transfer Level" and being obsolete)) |
^ 14  | 99				| Security level (same as above)  |
^ 15  | 12/31/69			| Birth date in MM/DD/YY format |
^ 16  | M				| Gender (e.g. M or F)  |
^ 17  | 1				| User's number |
^ 18  | 714-529-6328			| Phone Number |
^ 19  | 0				| COM Port((''0'' unless the external program is configured to use a FOSSIL driver; a native, stdio or conio program always sees ''0''.)) |
^ 20  | 4				| IRQ (or channel number if FOSSIL/Digi/etc.) |
^ 21  | 3f8				| I/O address (or D:Digi,F:Fossil, P:PS/2 bios) |
^ 22  | 38400				| DTE rate((Synchronet v3 has no modem and reports a fixed 38400 bps, for local and remote callers alike.)) |
^ 23  | Yes				| Hardware flow ctrl (Yes or No) |
^ 24  | Yes				| Locked DTE rate (Yes or No) |
^ 25  | 				| Modem init string((Synchronet v3 writes all six modem strings (lines 25 through 30) as empty lines.)) |
^ 26  | 				| Modem special (additional) init string |
^ 27  | 				| Modem terminal init string |
^ 28  | 				| Modem dial string |
^ 29  | 				| Modem off-hook string |
^ 30  | 				| Modem answer string |
^ 31  | 0				| Address of MSR memory copy (in decimal)((Always ''0'' in Synchronet v3.)) |
^ 32  | 133				| Total external programs (//N//) |
^ 33  | Synchronet BBS List		| Start of the external program name block: //N// lines, one per configured program, in the order SCFG lists them |
^ 33+N | ABCDEFGHIJKLMNOPQRSTUVWXYZ	| Flags from flag set #1 (A-Z)((Every flag field is exactly 26 characters wide, one column per flag A through Z: the flag's letter where it is set, a space where it is not. The example shows a user with every flag set; a user with none yields 26 spaces. Read these fields by position, not by splitting on whitespace.)) |
^ 34+N | ABCDEFGHIJKLMNOPQRSTUVWXYZ	| Flags from flag set #2 (A-Z) |
^ 35+N | ABCDEFGHIJKLMNOPQRSTUVWXYZ	| Exemptions (A-Z) |
^ 36+N | 				| Restrictions (A-Z) |
^ 37+N | 0				| Expiration date (in hex unix format) |
^ 38+N | Po Box 501			| Address |
^ 39+N | Yorba Linda, Ca 		| City, state |
^ 40+N | 92686				| Zip/Postal code |
^ 41+N | 				| Flags from flag set #3 (A-Z) |
^ 42+N |     E				| Flags from flag set #4 (A-Z) |
^ 43+N | 0				| Time slice APIs supported((Always ''0'' in Synchronet v3.)) |
^ 44+N | Rob Swindell			| User's real name or company name |
^ 45+N | 30000				| DCE Rate((Synchronet v3 has no modem and reports a fixed 30000 bps.)) |
^ 46+N | c:\sbbs\exec\			| Executable (exec) directory |
^ 47+N | c:\sbbs\text\			| Text file directory |
^ 48+N | c:\sbbs\node1\temp\		| Temporary file directory |
^ 49+N | VERT				| System QWK ID |
^ 50+N | 88212				| Node toggle options (in hex) |
^ 51+N | 132				| Client socket descriptor((''-1'' when the external program is run in stdio or conio mode, where no socket is handed to it.)) |

===== See Also =====
  * [[:ref:|ref index]]
  * [[ref:files#drop_files]]

{{tag>}}
