Article 7A12 (8-15-05) by Richard Pavlicek

Probably the most notable attempt is PBN (Portable Bridge Notation) which includes some good ideas but is hopelessly bloated. For example, the syntax to state the vulnerability is:
[Vulnerable Both]Really? Do I have to write the word Vulnerable every time? And why are the confusing brackets and quotes needed? If I had a penny for every megabyte of data wasted, Id be richer than Bill Gates in a week.
Another popular format is LIN (Bridgebase) which is excellent for display purposes (e.g., segments of a bridge match) but poor for archiving because of its severely limited file size (16 boards typically). Single matches must be split into multiple files, which is awkward and inconvenient.
RBN format conveniently stores any bridge match (or multiple matches) in a single file. Further, my RBN utilities will verify all data (noting any errors) and can easily convert to other formats (PBN, LIN, plus many others) including options to filter data, correct certain errors and supply missing data on-the-fly. Output can also be split into multiple files, e.g., to create separate LIN files for viewing segments of a match.
RBN format is well-organized, based on many years of experience in handling bridge data. It is compact and easy to parse by software, as well as intuitively coded to be familiar to any bridge player. RBN provides an ideal format to archive deals and maintain bridge databases. Try it! Youll like it.

Whats New?*My RBN tools will still recognize the N# syntax in old files, but output files will dispense with it.
The above change also simplifies the entire RBN structure. The first 10 labels (TDLESFKNBH) repeat automatically if unstated, and the last six (ACPRIM) never repeat. There is no longer the pound-sign (#) option to confuse the issue.
This version also adds a new scoring abbreviation: X = IMP Pairs (think cross IMPs to associate the X). Many pair events now use IMP scoring, so it deserves a separate indicator. This also reduces the burden on I = IMPs, which now refers only to team events.

RBN Labels and Structure
T Title and AuthorBesides the above labels, any single digit (1-9) may be used to label an explanatory note. This pertains to the A (auction) label unless the P (play) label appears first, then it pertains to the play. For example:
D Date and Time
L Location
E Event or Main Heading
S Session, Stage or Subheading
F Form of Scoring
K Team Names and Carryovers
N Names of Players and Room or Table
B Board Number
H Hands (cards held by each player)
A Auction (dealer, vul and call sequence)
C Contract and Declarer
P Play (opening leader and play sequence)
R Result (tricks won) and Score
I Instant Awards
M Makes at Double-Dummy
1 forcing one roundIn addition to labeled fields, free text may be entered at any place using this structure:
2 artificial, spades + diamonds
{Text paragraph}
Each text paragraph must begin on a new line and start with a left curly brace. The paragraph continues (using multiple lines if desired) until terminated by a right curly brace at the end of line, or the end of a deal (double CRLF).To illustrate the RBN format, consider the following article that I wrote in 1993:
Winning is nothing new to Shanbrom, arguably the most successful club player of all time. Her partner has not been playing bridge that long; but she learns fast and has become a sound, reliable player. Carswell has posted a number of wins already.
The diagrammed deal shows the ladies in action, stampeding their opponents to the five level. Shanbrom, West, opened routinely with 1
and Carswell, East, chose a single raise because her hand contained doubtful values good judgment in my opinion. (Norths decision to overcall and Souths 4
bid are not clearly understood, perhaps for the best.)
5
x by North
None Vul![]() | J 4 2 A J 7 6 3 2 J 6 3 2 | |
A 8 7 6 5 Q 10 K 9 A 10 8 7 | ![]() | Q 10 3 8 5 Q 8 6 K Q J 5 4 |
Lead: K | K 9 K 9 4 A 10 7 5 4 3 2 9 |
| West 1 ![]() 4 ![]() Dbl | North 2 ![]() Pass All Pass | East 2 ![]() Pass | South 4 ![]() 5 ![]() |
Shanbroms push to 4
is best explained as It was my turn, but this is the kind of aggressive tactic that a clever player senses to be right at the table. Sure enough, South took the bait and pushed to 5
(actually, North is more the culprit here for the frivolous overcall). Opportunity needs knock only once for Shanbrom, and she wielded the ax.
Watch the defense! Carswell led the
K and Shanbrom followed with the seven a wisely chosen card to de-emphasize the desirability of a spade switch. (The partnership, as do most defenders, indicate suit preference when the dummy has a singleton in the suit led.) Shanbrom figured that her partner would routinely lead a spade if she held Q-J, but in the actual layout a spade shift would be costly.
How many East defenders do you think would come through? This one did! Carswell found the killing play of another club, and declarer actually went down two when he misplayed spades later. If Carswell leads any other suit at trick two, declarer can make the contract by establishing the diamonds.
{Two Florida ladies put together a tremendous score -- 78 percent -- in the continent-wide International Fund Game on May 12. Helen Shanbrom and Julia Carswell played at the Palm Beach Bridge Studio, a popular club owned and operated by Daniel Cohen.}
{Winning is nothing new to Shanbrom, arguably the most successful club player of all time. Her partner has not been playing bridge that long; but she learns fast and has become a sound, reliable player. Carswell has posted a number of wins already.}
{The diagrammed deal shows the ladies in action, stampeding their opponents to the five level. Shanbrom, West, opened routinely with 1 s and Carswell, East, chose a single raise because her hand contained doubtful values -- good judgment in my opinion. (Norths decision to overcall and Souths 4 d bid are not clearly understood, perhaps for the best.)}
T Florida Belles Are Ringers:Richard Pavlicek
D 19930512
L West Palm Beach FL:Palm Beach Bridge Studio
E ACBL International Fund Game
S
F M
K
N :Helen Shanbrom+Julia Carswell
B 8
H W:A8765.QT.K9.AT87:J42.AJ7632.J.632:QT3.85.Q86.KQJ54:
A WZ:1S2H2S4D:4SPP5H:XA
C 5HX:N
P E:CK972:CQ!H483:DA9J6:D2KH28:SJ?QKA:CA
R 9-300:0
{Shanbroms push to 4 s is best explained as It was my turn, but this is the kind of aggressive tactic that a clever player senses to be right at the table. Sure enough, South took the bait and pushed to 5 h (actually, North is more the culprit here for the frivolous overcall). Opportunity needs knock only once for Shanbrom, and she wielded the ax.}
{Watch the defense! Carswell led the c K and Shanbrom followed with the seven -- a wisely chosen card to de-emphasize the desirability of a spade switch. (The partnership, as do most defenders, indicate suit preference when the dummy has a singleton in the suit led.) Shanbrom figured that her partner would routinely lead a spade if she held Q-J, but in the actual layout a spade shift would be costly.}
{How many East defenders do you think would come through? This one did! Carswell found the killing play of _another_club_, and declarer actually went down two when he misplayed spades later. If Carswell leads _any_other_suit_ at trick two, declarer can make the contract by establishing the diamonds.}
Note how the actual placement of free text emulates the text flow around the diagrams; thus the exact article could be reconstructed from the data. Text paragraphs may contain any characters except curly braces and a double CRLF (terminates deal). Paragraphs must be terminated by a right curly brace at the end of a line.**This was optional in the past if not followed by a label. My utilities still interpret the relaxed practice; but paragraphs are always terminated in output files.
Aside from the text, note how each data element is contained on a single line, prefixed by the appropriate label identifier. Labels S and K are not used, so they are indicated as null by the label alone.

Detailed Explanation of Labels
Max len: 128 Valid char: (all)The title of an article about the deal and the authors name, separated by a colon (:). Examples:
T Greed Costs Contract:Richard PavlicekThe last example shows how to handle the rare case of a colon in the actual text. Double it (::) to be treated as a single colon, rather than a separator. This applies only to labels TLES. In all other labels, a colon is interpreted strictly as a separator.
T :Joe Blow (untitled, written by Joe Blow)
T Preempts:: Fact or Fiction?:Marty Bergen
Max len: 18 Valid char: 0123456789C:?When the deal occurred. The date is given in fixed format (yyyymmdd) without separators. Unknown parts may be filled with a question mark (?), and mmdd or dd may be truncated. The letter C may be used after the year (or after the year and month) to mean circa (approximation).
Optionally, the date may be followed by a separator (:) and the time in 24-hour fixed format (hhmmss), of which mmss or ss may be truncated. Midnight may be indicated at the end of a day as 24 (truncated from 240000) or at the start of a day as zero. Time is local to the location the deal occurred. Examples:
D 19980131 (January 31, 1998)
D 199709 (sometime in September, 1997)
D 1996 (sometime in 1996)
D 1955C (not sure but about 1955)
D 20000509:091508 (May 9, 2000, 9:15:08 am)
D 20010704:1930 (July 4, 2001, 7:30 pm)
D 20011130:24 (Nov. 30, 2001, midnight)
D 20011201:0 (same exact time as above)
Max len: 128 Valid char: (all)Where the deal occurred. This may be a single string, or two strings with a separator (:). If two strings, the more general location is given first. Examples:
L Fort Lauderdale FLRecommended style is to use standard two-character codes for states, provinces and countries (as shown). While flawed (e.g., IL = Illinois or Israel), the chance of ambiguity is too remote for concern.
L Toronto ON:Royal York Hotel
L Valkenberg NL:Holland Casino
Max len: 128 Valid char: (all)The name of the event, or a main heading (such as a catalog of lesson deals). This can be a single string, or two strings separated by a colon (:). If two strings, the more general one should be given first. Examples:
E 1999 Grand National Teams
E Southeastern Regional:Flight A Open Pairs
E Beginning Bridge:Lesson 1
Max len: 128 Valid char: (all)This indicates which part of a multisession event, or a subheading (such as a lesson topic). Here also, a separator (:) is permitted for further clarification. If the part after the separator consists of a number only, it is the segment number. Examples:
S 2nd Session
S Semifinal:3 (3rd segment)
S Flight A:Round 12
S Rebids by Opener:Page 1
Max len: 64 Valid char: (all)The kind of scoring in effect. This can be written as a word or phrase, or abbreviated as a single letter. Allowed abbreviations are I = IMPs, B = Board-a-Match (aka Point-a-Board), T = Total Points, X = IMP Pairs, M = Matchpoints, N = Instant Matchpoints, R = Rubber Bridge, C = Chicago, A = Cavendish (Chicago with second and third dealer nonvulnerable) and P = Plus-or-Fishfood (my creation for whichever side goes plus wins; honors dont count). Note that abbreviations I, B and T imply team competition; all others imply pair competition.
Optionally, this may be followed by a separator (:) and modifying information. The word old is assumed to mean prior to the scoring changes of 1987. A year may be entered to indicate the scoring scale in use at that time. Examples:
F I (IMPs)
F N (Instant matchpoints)
F X:Butler (IMP pairs, Butler type)
F I:1952 (IMPs, using scale from 1952)
F M:old (Matchpoints before 1987 changes)
F A:no honors or partials (duplicate style)
Max len: 128 Valid char: (all)The names of two teams in a bridge match, which may be a captains name, country name, etc., separated by a colon. The team given first (Home Team) is North-South for the first of each pair of identical deals.
Optionally, a team name may be followed by a space and a sign (+/-) to indicate a carryover (usually IMPs but dependent on the form of scoring) that applies to the current segment. A plus carryover indicates the running total from a previous segment(s) or qualifying round(s). A minus carryover indicates an assessment made against the current segment, usually based on a penalty (e.g., slow play). Plus and minus may both be used if appropriate. Fractional carryovers with two places (decimal hundredths) are allowed. Examples:
K Nickell:Schwartz
K Italy +999:United States +2
K Meckstroth's Marauders:Rodwell's Rockets
K Iceland +76.33:Bulgaria +91.50
K France:Spain -3 (Spain penalized 3 IMPs)
K GIB +99 -3:Jack 97 (Jack ahead by 1)
Max len: 128 Valid char: (all)The names of the players in the specific sequence: North+South:West+East. Partners are separated by a plus sign (+) and pairs by a colon (:). West is given before East to keep the left-right relationship. Names may be first or last names (or both) or even non-human names such as computers. If a name is unknown, just leave it empty. Optionally, this may be followed by a second colon (:) and the room (C = Closed, O = Open) or table number (1-250).
Examples:
N Wolff+Hamman:Stansby+Martel
N Soloway (Soloway was North)
N :Jan+Joe:O (Jan and Joe E-W in Open Room)
N :+Norman Kay:6 (Norman Kay East Table 6)
N +Roth:GIB 4.0 (Roth South, computer West)
Max len: 24 Valid char: 0-9 A-Z :.-/The board (or sequence) number of the deal. Optionally, this may be followed by a separator (:) and a second number or letter. This may represent any other numbering such as its location in large catalog of deals. A letter (or letters) may also be used to indicate the section in a large tournament. Examples:
B 7 (Board 7)
B 10:7X01 (Board 10, and RP numbering)
B 15:C (Board 15, Section C)
B 9:97-7-542 (Board 9, and OKbridge number)
B :KK (Board number unknown, Section KK)
Max len: 71 Valid char: 23456789AEJKNQSTW:.;The cards for each player, starting with the direction given and moving clockwise. Each hand begins with a colon (:). Suit holdings are given in descending order (SHDC) separated by a dot (.) and cards in descending rank (AKQJT98765432).
Hands do not necessarily have to form a complete deal. Empty or incomplete hands are fine as long as no card is used twice, and no hand has more than 13 cards. This is useful for storing single hands, paired hands (e.g., only E-W for bidding practice), bridge endings, single-suit layouts, etc.
For full deals, the fourth hand is redundant and may be omitted, but the initial colon must be present (else fourth hand would be assumed not to exist). In other words, three full hands followed by a colon means fourth hand gets the rest.
Various examples follow.
H W:873.A6.KT864.KQ8:96.T54.97.AJ9643:T542.K93.AQ53.52:Full deals (note trailing colon). Regardless of the distribution, any full deal requires the same number of characters (55), which is a visual aid in data entry.
H S:9.AK6.AKT982.K87:K7654.J73.Q65.T6:QT2.T94.J4.AQ953:
H N:AKQ72..AKQ72.753::.AKQ72.753.AKQ72North and South hands only. Note that North is void in hearts and South is void in spades. Also note the extra colon to indicate the East hand is missing.
H E:T4.8642.AKT8.K65Only the East hand.
H W:K9.K9.9:3.A3.Q.4:Q82..J.A:A7.7.K8A five-card end position. Note that West and South are void in clubs, and East is void in hearts.
H W:43:KJ2:Q976:AT85Only the spade suit is given for each hand.
In the last two examples note that nonessential suit separators (when a hand contains no more cards) may be removed since the hand automatically ends at a colon or the end of the line. Either way is fine with my utilities, however, output files will remove unnecessary dots only for incomplete hands (less than 13 cards); full hands will always include three dots.
Optionally, a semicolon may be used in place of any colon to indicate the hand following should be hidden for normal purposes. This is useful for quizzes, polls, play problems, etc., where only a portion of the diagram should be shown. For example:
H W:A875.632.76.8643;Q632.Q87.J842.Q2:KJT4.KJT4.AQ3.AJ;Above describes a full deal but indicates that only the West and East hands should be shown. Note that the North hand begins with a semicolon, and the trailing semicolon means that South exists (but is hidden).
H W:A8765.QT.K9.AT87;J42.AJ7632.J.632;QT3.85.Q86.KQJ54;Again a full deal, but only the West hand should be shown, as for an opening-lead problem.
H E;K5.T.KQJT98.KQJT:A876.A2.765.A876;32.KQJ9876543..9:The above examples show the exact same deal and hidden status (only N-S hands should be shown) and are included to emphasize that any hand may be given first. My output utilities select the starting hand as the first non-hidden hand with cards in the priority WNES; so the last example would be used.
H S:A876.A2.765.A876;32.KQJ9876543..9:QJT94..A432.5432;
H W;32.KQJ9876543..9:QJT94..A432.5432;K5.T.KQJT98.KQJT:
H N:QJT94..A432.5432;K5.T.KQJT98.KQJT:A876.A2.765.A876;
Max len: 128 Valid char: 123456789ABCDEHNPRSWXYZ:!?*^The dealer (NESW) and vulnerability (ZNEB), then each bidding round is preceded by a colon. No other separators are used in the sequence of calls.
Normal calls are indicated as: P = Pass, X = Double, R = Redouble, 1C = One Club, 3N = Three Notrump, A = All Pass. Further, the letter Y may be used as a query point (multiple times are allowed) to mean Your call? as in a bidding quiz or poll. Partial or incomplete auctions are allowed (just stop writing). Complete auctions must end in A or PPP.
Any call (except A and Y) may by followed by a notation: ! = good, ? = poor, !! = very good, ?? = very poor, !? = speculative, ?! = questionable, * = conventional (no explanation follows), ^1 = see Note 1.
Examples:
A SZ:1SP2SP:4SA (South deals, none vul)In the last example Wests 3 NT bid was poor and South made a good double. The ^1 after the redouble means a note follows, and the next line might say:
A EN (East deals N-S vul, no auction given)
A WE:A (West deals E-W vul, passed out)
A NB:1SXY (your call as South?)
A S:1SP2CP:2D (vul unknown, incomplete)
A EB:3CP3N?P:PX!R^1A (East deals, both vul)
1 Apparently lost his mind
Max len: 9 Valid char: 0123456789CDEHMNPRSWX:The final contract and direction of the declarer, separated by a colon (:), or the single letter P if passed out. Optionally, the declarer may be immediately followed by a number (or M = maximum) to state a goal. This goal is necessary for end positions (contract is just a suit or notrump with no level) and is useful when the object is to win a certain number of tricks rather than to make a contract, such as a sacrifice. Examples:
C 5D:N (Five diamonds, North declarer)The last example is appropriate for a sacrifice bid of four spades at equal vulnerability; i.e., object is to go down two (at most).
C P (Passed out)
C 6HR:W (Six hearts rdbld, West declarer)
C 4SX:S8 (true goal to win 8 tricks)
C N:S6 (Notrump, South declarer, win 6)Above are endings (partial deals) stating the strain, declarer and the number of tricks required (M stands for maximum). The player on lead would be indicated in the P (play) label.
C C:EM (Clubs, East declarer, win maximum)
Max len: 128 Valid char: 123456789ACDEHJKNQSTWY:+-!?*^The direction of the opening leader and the play sequence. Each trick is preceded by a colon (:) but no other separators are used. The play sequence is exactly as it would occur at the table; each trick starts with the lead and is followed by the next three plays in order. The play can end at any time (just stop writing).
Plays are shown by suit and rank, except if following to the suit led, then only the rank is given. When a play is insignificant its rank may be indicated with a minus sign (-) to mean the lowest card, or a plus sign (+) to mean the highest card.
The letter Y may be used as a query point to mean Your play? but no further plays may follow (hence it can be used only once at the end).
Any play (except Y) may be followed by a notation: ! = good, ? = poor, !! = very good, ?? = very poor, !? = speculative, ?! = questionable, * = conventional (no explanation follows), ^1 = see Note 1. Examples:
P N:SK54T:SA87H3:HA245:HKQ8JIn the last example the opening lead of the queen is conventional but not explained. The club discard at Trick 4 is noted, and the next line might say:
P W:DA762:Y (your lead at trick two?)
P S:HQ*3J2:HK47A:DJA53:HT68C7^1
1 A subtle falsecard
Max len: 16 Valid char: 0123456789P:+-=.The result is the number of tricks won by declarer (or the letter P if passed out). This may be followed immediately by a sign (+/-) and the actual raw score.
Optionally, this may be followed by a separator (:) and the effective score. This may be an equal sign (=) to indicate a push or tie, a sign (+/-) and a number of IMPs (+1 or -1 for board-a-match), or a plain number to indicate a matchpoint percentage. Decimal fractions of two places (hundredths) are allowed. All scores (raw or effective) are relative to North-South. Examples:
R 11 (declarer won 11 tricks)Note that a push at IMPs is shown by an equal sign. If you write a plain zero it means 0 percent.
R 10+620 (declarer won 10 tricks, NS +620)
R 8-300:+4 (8 tricks, EW +300, NS +4 IMPs)
R P:-2 (passed out, EW won 2 IMPs)
R 12-980:-11 (12 tricks, EW +980, +11 IMPs)
R :66.67 (result unknown, NS 66.67 percent)
R 5:-1 (5 tricks won, EW won board if BAM)
R +2140:+12.29 (NS +2140 and +12.29 IMPs)
R 7-750:7 (7 tricks, EW +750, 93 percent)
R 9-100:= (9 tricks, EW +100, tie board)
Max len: 512 Valid char: (all)This label is used for any prepared award scale that applies to the current deal. Awards may be for the call of the player with the pseudo call Y in the A (auction) label, or for the play of the player with the pseudo play Y in the P (play) label.
If there are no pseudo calls or plays, awards are assumed to be instant matchpoints if a full deal exists with no hidden hand. If a hand is missing or hidden, and two partnership hands exist (non-hidden), awards are for that partnership, typically for contracts reached in partnership bidding practice.
Listing is in the form [description]=[award], where description can be a call or contract (3N), a lead or play (SK), a phrase such as Win first trick; lead HK or a bridge score divided by 10. The last is to save space in a long list of scores by omitting trailing zeros (I think Harold Vanderbilt was obsessed with his millions when he invented contract bridge scoring).
Awards must be positive whole numbers (no fractions), and the list must be ordered from best to worst. Except for instant matchpoints, any award scale may be used. My practice is to use a 10 scale for most purposes, as in my monthly polls and contests. Examples:
I 3N=10:4S=7:6S=5:P=4:5S=3:4N=1 (calls)The last listing (declarer-play options) is curtailed. Note that the semicolons are just plain text (colons and equal signs, of course, cannot be in the text).
I SK=10:HK=9:H8=7:HT=4:D3=3:CK=2 (leads)
I Win HA; lead SK=10:Win HA; lead H2=8
For instant matchpoints, scores and awards are given relative to North-South. Scores are assumed to be plus (for N-S) until any score is preceded by a minus sign; then all subsequent scores are also minus. Awards must be given as a percentage (100 scale). Corresponding E-W awards are simply the difference between the N-S award and 100. For example:
I 80=99:98:75=97:95:67=94:92:50=90List is curtailed. Note that awards of 98, 95 and 92 are given without description and equal sign. This signifies a gap award for scores between the score on the left and the score on the right. Also note the implied end gaps; i.e., any score above 80 (800) gets 100, and anything below the last listed score (not shown) gets 0.
I 10=98:95:5=91:88:-40=83:42=75:43=65Note the transition from plus to minus. After the N-S score of 5 (meaning +50) and a gap award, the next score is -40 (-400). All subsequent N-S scores must also be minus, so repeating the sign is unnecessary.
Max len: 36 Valid char: 0123456789ABCDFM:+=!?Indicates the number of tricks declarer can win in the given contract against best defense after the opening lead. This may be followed by a second number, meaning after the lead to trick two; and a third, meaning after the lead to trick three; etc., up to 10 such numbers. All numbers refer to the total number of tricks (including past tricks). Optionally, a letter (M = makes, F = fails) may be used instead of a number if success or failure is known but not the exact number of tricks.
Numbers 10-13 are given in hexadecimal (A-D) to avoid confusion and save space, allowing a one-digit representation of all numbers.
Optionally, this may be followed by a separator (:) and a list of double-dummy makes for N-S without specified leads. Norths makes are given first, followed by a plus (+) sign, then Souths. Makes consist of five numbers, one for each strain in the sequence NSHDC. Unknown makes can be truncated or replaced with a question mark (?) as a placeholder. If Souths makes are the same as North (often true), replace the plus sign with an equal sign (=) and omit the duplicate list.
Optionally, this may be followed by a second separator (:) and a similar listing for West (first) then East. (Note that this structure North+South:West+East is the same as for the N label.) As a further shortcut, if Wests makes plus Norths makes total 13 in all strains (quite common), this may be shown by a logical Not symbol (!). Likewise, if Easts makes plus Souths makes total 13. If a deal is square all around, prefer to use != although !! means the same. Examples:
M 9 (declarer can win 9 tricks after lead)The above indicates a deal with no opening-lead dependencies. North makes 13 tricks in notrump, 12 in either major, and 9 in either minor. South makes the same, and West or East makes the difference (from 13). Note that no plus sign is used when ! or = appears.
M BA (11 after lead, 10 after TR-2 lead)
M F (fails against best defense after lead)
M A:88DAC (10 after lead, North analysis)
M :978A7+979A7:46435+45436 (full analysis)
M :BAB8A+AAA89:22253= (as above E-W same)
M C:DCC99=:!= (12 after lead, equal around)
M :+??A (South can win 10 tricks in hearts)Note that because of the fixed format of the five strains, placeholders (?) are necessary to skip unknown or immaterial values. The last example means that in spades North or South can win 4 tricks; West 8, and East 9. If the actual contract were, say, 3S by West, it also shows that the opening lead was favorable.
M 9:?4=:?8+?9 (9 with lead, spade analysis)

General Database Rules*Technically, this isnt necessary for a single file (unspecified labels are assumed null), but it prevents a problem when joining two RBN files. Without this precaution, the second file might inherit undesired repeats from the first file.
Repetition pattern of the N label (player names) is governed by the K label (team names). If the K label exists (not null), the N label repeats in alternating fashion as established by the previous two occurrences (typically on the first board of a segment). If the K label is null, the N label repeats consecutively like the other repeating labels.
The remaining labels (ACPRIM) do not repeat and are assumed to be null unless explicitly entered.
The order of labels in a deal makes no difference, except for the use of notes (1-9). Notes are assumed to apply to the A (auction) label until the P (play) label is encountered, then they are assumed to apply to the play. All output files created by my RBN utilities order labels TDLESFKNBHACPRIM (most logical I think) regardless of the input order. Notes (if any) are placed immediately after the appropriate A or P label.
Case (upper or lower) is significant only in labels TLESFKNI, which allow all characters. Otherwise, case is insignificant upper and lowercase are interpreted the same. My RBN utilities use uppercase for all case-insignificant output (as shown by examples in this document) but either case is OK for input.
A space character (ASCII 32) is required after each label (except null labels). Otherwise, spaces are permitted only in label data that accepts all characters (TLESFKNI). Spaces are not allowed in the data of labels DBHACPRM.*
*My RBN utilities check each label for valid characters. If an invalid space (or other character) is found, the program will stop processing the current file and exit with an error message, showing the line number of the faulty character.
Free-text paragraphs (starting with a left curly brace) may be placed anywhere, but always at the start of a line. The paragraph continues until (1) a right curly brace is encountered at the end of a line, or (2) a left curly brace is encountered at the start of line to begin a new paragraph, or (3) the deal ends (two CRLFs). Paragraphs before the H label are presumed to appear before the diagram; paragraphs after the H label are presumed to appear after the diagram.

File Signature and Limits
% RBN 2.2Note that there is no blank line between extraneous text and the first label, as two CRLFs terminate a deal. (Adding a blank line would result in an extra deal with all null labels.) For the same reason, you cannot put blank lines in free text. Also note that the last deal in a file also should be followed by a blank line (two CRLFs). This good practice not only avoids confusing software parsers but makes it easy to concatenate two or more RBN files, ensuring proper deal separation.
% Copyright 2004 Richard Pavlicek
% 36 deals, recommended bidding, and awards
T ACBL Instant MP Pairs:Richard Pavlicek
D ... etc.
The maximum line length is shown for each label. Except for the I label (allowing 512) the longest is 128. This length includes the label and space but not the CRLF. In theory, it is possible to have longer auctions, or excessively long names, etc., but in practice Ive never come close. (If you expect to exceed this amount, you need a storybook, not a database.) Note that this limit does not apply to free text, which may have lines of any length, subject to the deal-size restriction.
The maximum size of any single deal is 16,384 bytes. Obviously, this could only be approached by the inclusion of free text. To give you an idea how this relates, the Florida Belles Are Ringers article uses only 2291 bytes; so its hard to imagine needing more than 16K for one deal. There is no limit on the size of an RBN file well, except the DOS file-size limit of 2 gigabytes, but thats hardly a concern.
SummaryThis edition (version 2.2) represents a reasonably finalized format, which has been refined over eight years of continued use. Try it! I think youll find it the best way to incorporate bridge deals into a database. -Richard Pavlicek (e-mail: richard@rpbridge.net)

Copyright © 2005 Richard Pavlicek. All rights reserved.