When the desire of a defendant to plead guilty is made known to the court, it shall direct the district attorney of such court to prefer and file an information against such defendant, under the oath of such district attorney or some witness, which information shall accuse the defendant, with the same certainty as an indictment, of the criminal offense for which he is being held.
Ala. Code § 15-15-21 (1975)