At any time before the delivery of the transcript to the clerk of the court to which the trial is removed, subpoenas for witnesses must be issued, on the application of either the defendant or the district attorney, by the clerk of the court in which the indictment was found, commanding such witnesses to appear at the court to which the trial is removed, which subpoenas must be executed by the sheriff and returned to the clerk of the latter court; and the clerk of the court to which the trial is removed must, after the delivery of the transcript to him, issue the subpoenas for witnesses.