
330 N.E.2d 774 (1975)
Eddie L. SPALDING, Defendant-Appellant,
v.
STATE of Indiana, Plaintiff-Appellee.
No. 2-674A138.
Court of Appeals of Indiana, Third District.
July 15, 1975.
Rehearing Denied September 18, 1975.
*775 Harriette Bailey Conn, Public Defender, Carr L. Darden, Sr. Deputy Public Defender, for defendant-appellant.
Theodore L. Sendak, Atty. Gen., G. Philip Duckwall, Deputy Atty. Gen., for plaintiff-appellee.
HOFFMAN, Judge.
Defendant-appellant Eddie L. Spalding (Spalding) appeals from the denial of his petition for post-conviction relief. Such petition sought the vacation of a conviction in the Criminal Court of Marion County, Division Four, for a violation of the 1935 Uniform Firearms Act.[1]
The relevant facts disclosed by the record before this court which are most favorable to appellee State of Indiana reveal that Spalding pleaded guilty to the violation of the 1935 Uniform Firearms Act mentioned hereinabove. He was sentenced thereon to a determinate term of eight years.
Prior to the time Spalding entered such plea, he had pleaded guilty to a charge of "Commission of Robbery While Armed."[2] Such charge was Count Two of the charging affidavit filed in another cause in another division of the Criminal Court of Marion County. This plea was entered pursuant to an oral plea bargain by and between Spalding and the deputy prosecutor in charge of matters pending in such court.
*776 The terms of such plea bargain were that Spalding would enter a plea of guilty to the armed robbery charge, and the State would dismiss all other charges then pending against him, including the charge now at issue, provided that Spalding receive a nine year determinate sentence as a result of such plea.
After Spalding had entered his plea of guilty, the trial judge sentenced him to an indeterminate term of one to ten years under the provisions of the Minor's Sentencing Act.[3] Thereafter, the prosecutor's office continued to pursue the other charges pending against appellant, which resulted in his guilty plea in the cause which is the basis of the instant appeal.
The question for decision is whether the trial court erred in holding that because Spalding did not receive the nine year determinate sentence required as a term of the plea bargain by the prosecution, the plea bargain between Spalding and the prosecutor's office "was never consummated." Spalding asserts that in requiring him to receive a certain minimum sentence, the prosecutor exceeded his powers, and usurped the sentencing function of the trial court.
It has been held that a prosecuting attorney is not only the State's legal representative, but is also an officer of the court. East v. State (1929), 89 Ind. App. 701, 168 N.E. 28. Further, a prosecuting attorney is a judicial officer in the sense that he is vested with a broad discretion as to the prosecution of criminal actions. Taylor, Jr. v. State (1968), 251 Ind. 236, 236 N.E.2d 825; Tinder, Pros. Atty. et al. v. Music Op. Inc. (1957), 237 Ind. 33, 142 N.E.2d 610.
However, the powers of a prosecuting attorney in reference to criminal actions are not without limits. Because the powers and duties of prosecuting attorneys are prescribed by statute, a prosecuting attorney has only those express powers enumerated within the four corners of such statutes. State v. Market (1973), Ind. App., 302 N.E.2d 528, 534. Thus it has been held that a prosecuting attorney is without the power to remit any portion of a criminal sentence, The State v. Brewer (1843), 7 Blackf. 45; and that a trial court can, in no way, be bound by the recommendations of a prosecuting attorney with regard to the sentence to be imposed in a criminal cause. Gray v. State (1971), 256 Ind. 447, 269 N.E.2d 535; Mahoney v. State (1925), 197 Ind. 335, 149 N.E. 444. Rather, the power and duty to pronounce sentence upon a convicted or admitted criminal within the statutory limits rests solely in the trial court; it is a judicial act. Tahash, Supt., etc. v. Clements (1955), 234 Ind. 197, 199, 125 N.E.2d 439.
Our Supreme Court indicated in Mahoney v. State, supra, that a defendant can not be allowed to circumvent the sentencing discretion of a trial court by conditioning his guilty plea upon the imposition of a certain maximum sentence. Therein, the court further held that the subjective expectations of a defendant or his counsel as to sentencing also cannot be allowed to deprive the trial court of its discretion in sentencing:
"[The] [l]eniency of a trial court toward an accused should not, by rule of law, go to the extent that an accused or an accused's counsel may speculate upon what the action of the trial court will be upon a plea of guilty, and, in the event such plea results in a judgment which is more severe than that hoped for by the defendant, take advantage of the same by a request to set aside the judgment and withdraw the plea of guilty, as in the case at bar. If such should become the hard and fast rule of law, the result inevitably would follow that the accused, with his counsel, may use the court as a pawn and gain the end sought when the judgment in any manner exceeded the lenient *777 one hoped for, whether suggested by the counsel of the accused, or from the determined desire of the accused." 197 Ind. at 343, 149 N.E. at 447.)
We believe it to be equally improper to allow the prosecution in a criminal cause to circumvent the sentencing discretion of a trial judge by requiring a defendant to receive a certain minimum sentence as a condition of a plea bargain. In the case at bar, although Spalding entered a plea of guilty to a robbery charge, the deputy prosecutor refused to dismiss the other charges solely because the sentence imposed by the trial judge following such plea was considered inadequate. Thereafter, Spalding was prosecuted on other pending charges (including the charge which is the basis of this appeal) until the sentence deemed appropriate by the prosecution for the several charges was amassed; only then was a remaining charge dismissed.
As evidenced by the Mahoney case cited hereinabove, our courts have jealously guarded the sentencing discretion of trial judges from any infringement by defendants. It must also be protected from prosecutorial frustration.
In a situation such as in the instant case, the trial court is deprived of its discretion in any single cause because the prosecution has determined a sentence it considers appropriate for the aggregate. If the sentence deemed appropriate by the prosecution is obtained upon the first charge, the remainder are then dismissed. However, if such sentence is not obtained on the first or subsequent charges, prosecution will be continued until the minimum figure is met.
While it is clearly proper for the prosecution to make sentencing recommendations, it is just as clearly improper for it to invade the discretion of the trial court by effectively determining the minimum sentence a given defendant must serve on a group of unrelated charges pending against him. A prosecutor should logically be accorded a wide latitude in determining the charge or charges to be pursued against an individual as a result of one series of related events. However, the same logic does not apply to unrelated criminal charges which are only fortuitously pending at the same time.
When the plea bargain in the case at bar was made, there was in effect a statute reflecting a similar view of the duties of a prosecuting attorney:
"Motion for dismissal.  No criminal cause shall be dismissed except by order of the court on motion of the prosecuting attorney; and such motion must be in writing, and the reasons therefor must be stated in such motion and read in open court before such order is made; and the mere number of prosecutions against the same person shall not be a reason for dismissing any of such causes."
(Emphasis supplied.)
IC 1971, XX-X-XX-X, Ind. Ann. Stat. § 9-910 (Burns 1956).[4]
In order to ensure justice through the disposition of charges in open court, the practice of "open-ended" plea bargaining must be disapproved; the State as well as the defendant must be bound by the sentencing decision of the trial court.
In recommending a sentence, however, the prosecution may apprise the trial judge of the reasons for its recommendation, and zealously advocate the imposition of such a sentence. The objectionable practice is the wholesale disposition of unrelated charges against a defendant through an "open-ended" plea bargain in which the prosecution requires a certain *778 minimum sentence. Because such a requirement was beyond the powers of the prosecutor, the term of the plea bargain herein requiring a minimum sentence of nine years as a condition to the dismissal of the remaining charges was a nullity and, therefore, unenforceable. Considered without reference to such unenforceable term, this plea bargain consisted of a plea of guilty to the robbery charge in exchange for the dismissal of such remaining charges, including the charge which is the basis of this appeal. These terms have not been met by the State.
The types of remedies which are available upon the breach of a plea bargain agreement were discussed by the Supreme Court of the United States in Santobello v. New York (1971), 404 U.S. 257, at 263, 92 S.Ct. 495, at 499, 30 L.Ed.2d 427, at 433, as follows:
"The ultimate relief to which petitioner is entitled we leave to the discretion of the state court, which is in a better position to decide whether the circumstances of this case require only that there be specific performance of the agreement on the plea, in which case petitioner should be resentenced by a different judge, or whether, in the view of the state court, the circumstances require granting the relief sought by petitioner, i.e., the opportunity to withdraw his plea of guilty." (Emphasis supplied; footnote omitted.)
In the case at bar, petitioner has consistently sought the first of these two remedies. Upon the facts of this case, such relief should be granted.
An additional aspect of this case requires comment. Nearly the entire hearing on the petition for post-conviction relief in the trial court was devoted to an ascertainment of the terms of the plea bargain in this cause. Although indications of what some of the terms of the plea bargain might have been appear in the transcript of the sentencing hearing at which such plea bargain was consummated, both Spalding and the State were forced to rely upon the recollections of the participants in attempting to prove such terms.
It is doubtful that the secreting of the terms of plea bargains even as they are being consummated is beneficial, for such clandestinity can lead to misapprehension, mistake or even calculated misrepresentation.
The practice of plea bargaining is no longer denounced as corrupt, as it once was. See: Golden v. The State (1875), 49 Ind. 424. Rather, today it is considered both proper and desirable:
"The disposition of criminal charges by agreement between the prosecutor and the accused, sometimes loosely called `plea bargaining,' is an essential component of the administration of justice. Properly administered, it is to be encouraged."
Santobello v. New York, supra, at 260 of 404 U.S, at 498 of 92 S.Ct., at 432 of 30 L.Ed.2d.
See also: Dube v. State (1971), 257 Ind. 398, 275 N.E.2d 7; Williams v. State (1974), Ind. App., 307 N.E.2d 880 (transfer denied).
Once the propriety of plea bargaining is recognized, it becomes apparent that the interests of justice would well be served if trial courts would encourage the placing of record of all the terms of such agreements at the time they are presented to the court. In addition to the introduction into the record of an oral or written statement of the terms of the bargain, in some cases a trial judge may wish to advise a defendant who appears uncertain about revealing the terms of a plea bargain that such bargains are an accepted practice, and that for his own protection all promises made to him in return for his plea should be placed of record.
Spalding's conviction in this cause for a violation of the 1935 Uniform Firearms *779 Act is vacated, and this cause is remanded to the trial court with instructions to dismiss.
Judgment of conviction vacated and cause remanded.
STATON, P.J., concurs in result with opinion.
GARRARD, J., dissents.
STATON, Presiding Judge (concurring).
I concur in result. The prosecution accepted Spalding's guilty plea. Plea negotiations can not go beyond those matters which can not be controlled by the parties to the negotiations. Sentencing is a judicial function beyond the control of the prosecution or the defense.
NOTES
[1]  IC 1971, XX-XX-X-X, Ind. Ann. Stat. § 10-4736 (Burns 1956). This section was repealed by Acts 1973, P.L. 333, § 5, and the present law on this subject is found in IC 1971, 35-23-4.1-3, Ind. Ann. Stat. § 10-4751c (Burns Supp. 1974).
[2]  IC 1971, XX-XX-X-X, Ind. Ann. Stat. § 10-4709 (Burns Supp. 1974).
[3]  IC 1971, 35-8-3-1, Ind. Ann. Stat. § 9-1815 (Burns 1956).
[4]  IC 1971, XX-X-XX-X, Ind. Ann. Stat. § 9-910 (Burns 1956), was repealed by Acts 1973, P.L. 325, § 5.
