The positions of phosphorus in B-DNA have the remarkable property of occurring (in axial projection) at well defined points in the three-dimensional space of a projected five-dimensional decagonal lattice, subdividing according to the golden mean ratio τ:1:τ [with τ = (1+\sqrt {5})/2] the edges of an enclosing decagon. The corresponding planar integral indices n1, n2, n3, n4 (which are lattice point coordinates) are extended to include the axial index n5 as well, defined for each P position of the double helix with respect to the single decagonal lattice ΛP(aP, cP) with aP = 2.222 Å and cP = 0.676 Å. A finer decagonal lattice Λ(a, c), with a = aP/6 and c = cP, together with a selection of lattice points for each nucleotide with a given indexed P position (so as to define a discrete set in three dimensions) permits the indexing of the atomic positions of the B-DNA d(AGTCAGTCAG) derived by M. J. P. van Dongen. This is done for both DNA strands and the single lattice Λ. Considered first is the sugar-phosphate subsystem, and then each nucleobase guanine, adenine, cytosine and thymine. One gets in this way a digital modeling of d(AGTCAGTCAG) in a one-to-one correspondence between atomic and indexed positions and a maximal deviation of about 0.6 Å (for the value of the lattice parameters given above). It is shown how to get a digital modeling of the B-DNA double helix for any given code. Finally, a short discussion indicates how this procedure can be extended to derive coarse-grained B-DNA models. An example is given with a reduction factor of about 2 in the number of atomic positions. A few remarks about the wider interest of this investigation and possible future developments conclude the paper.