
576 P.2d 859 (1978)
Robert Maxwell REDDISH, Plaintiff and Appellant,
v.
Samuel W. SMITH, Warden, Utah State Prison, Defendant and Respondent.
No. 15455.
Supreme Court of Utah.
March 1, 1978.
*860 Bruce C. Lubeck, of Salt Lake Legal Defender Assn., Salt Lake City, for plaintiff and appellant.
Robert B. Hansen, Atty. Gen., Earl F. Dorius, Asst. Atty. Gen., R. Paul Van Dam, Salt Lake County Atty., Salt Lake City, for defendant and respondent.
ELLETT, Chief Justice:
Mr. Reddish appeals from the dismissal of his petition for a writ of habeas corpus. He is an admitted horse thief and was charged with six counts of felony theft; his wife was charged with three felony counts. After plea bargaining, he agreed to plead guilty to three theft charges provided the other three charges against him were dismissed and that those charges against his wife also be dismissed save one which was to be reduced to a misdemeanor. The bargain was made and kept.
Appellant requested a pre-sentence report, and the court received it from the Adult Probation Department but did not make it available to the appellant. After due consideration of the prior record of appellant, together with the pre-sentence report, the trial judge sentenced him to the Utah State Prison. Two of the sentences were to run concurrently and the third was to run consecutively.
Before accepting the pleas of guilt, the trial judge, carefully and with great solicitude for the rights of the appellant, thoroughly explained the consequences of pleading guilty. Appellant now claims his right to a release under habeas corpus is based on three grounds:
(a) The pre-sentence report contained false information about him;
(b) The pleas of guilty were coerced;
(c) The penalties given were cruel and unusual.
There is no merit to the claims made in (b) and (c). The court will sentence a defendant to an indeterminate statutory sentence and it is left to the Board of Pardons to determine the length of time to be served.[1] In addition thereto, those matters were known and could have been raised on an appeal. Matters that could have been raised on appeal cannot be used as a ground for habeas corpus.[2] No argument is made on appeal as to the claims made under either (b) or (c).
Appellant's claim that false information was contained in the pre-sentence report and that he was not given an opportunity to rebut the same requires some consideration. The question has been before this Court on prior occasions.
In State v. Cunico[3] the appellant claimed the court committed reversible error in considering materials not available to him at the time of the pronouncement of the judgment. This Court denied his claim. In a later case[4] the defendant sought a reversal of the sentence on the sole ground that the court failed to grant her motion to inspect the report of the pre-sentence investigation. We there held that it was within the sound discretion of the trial court to permit inspection of the report or to deny it.
*861 U.C.A., 1953, 77-35-12 provides that when discretion is conferred upon the court as to the extent of punishment, the court "may take into consideration any circumstances, either in aggravation or mitigation of the punishment, which may then be presented to it by either party." Even if it be conceded that the section requires proof in open court, it has no application in the instant case for the reason that the court in this case had no discretion as to the extent of punishment. That determination is left to the Board of Pardons.
The officer making the report would be handicapped in securing information derogatory to a defendant if the one giving that information knew that it would be shown to the defendant. Some information might be given by a witness who would be incompetent as a witness in court, such as a spouse; yet, the information might be of assistance to the court in deciding whether the defendant should be placed on probation or committed to prison.
The discretion of the court would permit it to indicate to defendant's counsel the nature of the statements made and then permit the defendant to offer evidence on the matter.
In this case appellant was an admitted thief on at least three occasions with a prior record of embezzlement. His chance of receiving probation was doubtful, and he undoubtedly requested it as a forlorn hope of escaping his just desserts. His application for a writ of habeas corpus was properly dismissed because he did not state grounds that would justify his release.
In the case of Rammell v. Smith[5] this Court held that the writ of habeas corpus has its purpose, including the providing of a remedy where it challenges the jurisdiction of the court rendering the judgment; or where the sentence imposed is one not authorized by law; or where it is of an entirely different character than that which the statute prescribes so that it appears a person is being held under an obviously illegal sentence, and it would be unconscionable not to examine the issue.
In the instant matter the court did have jurisdiction of the case and over the appellant; the sentences made are the only ones provided by law; and there is no claim that the appellant is being held under an improper sentence.
The judgment is affirmed. No costs are awarded.
CROCKETT, and HALL, JJ., concur.
MAUGHAN, Justice (dissenting).
For the following reasons I dissent.
Contrary to what is said in the main opinion the court here does have discretion conferred upon it, as to the extent of the punishment. Certainly the discretion conferred allowing the imposition of consecutive sentences is a discretion to determine the extent of the punishment.
77-35-12, 13, and 14 are applicable here; as is 76-3-401 of the Utah Criminal Code. I would reverse for the purpose of applying 77-35-12 and 13.
WILKINS, Justice (dissenting).
I concur with Justice Maughan in his dissent and add these comments.
The plaintiff is seeking an evidentiary hearing in order to allow him the opportunity to prove factual allegations in his petition concerning inaccuracies in a pre-sentence report which he claims could and did affect his sentence. All statutory references are to the Utah Code Ann., 1953, unless otherwise indicated.
Sec. 77-35-12 states:
When discretion is conferred upon the court as to the extent of punishment, the court, at the time of pronouncing the judgment, may take into consideration any circumstances, either in aggravation or mitigation of the punishment, which may then be presented to it by either party.
And Sec. 77-35-13 in relevant part provides:

*862 The circumstances must be presented by the testimony of witnesses examined in open court... . No affidavit or testimony, or representation of any kind, verbal or written, shall be offered to or received by the court or a judge thereof in aggravation or mitigation of the punishment, except as provided in this section.
The main opinion reasons that these sections are inapplicable as the District Court  in its sentencing of the defendant  had no discretion "as to the extent of the punishment" noted in Sec. 77-35-12. I believe nothing is more critical or significant concerning punishment than a determination whether a defendant will be sent to jail or prison or will be placed on probation without incarceration. And certainly the District Court had discretion concerning this matter. Therefore, I believe Secs. 77-35-12 and 77-35-13 are clear and applicable.
Assuming however that these sections are not controlling, then I believe Circuit Judge Goldberg makes a valid and compelling analysis in United States v. Espinoza, 481 F.2d 553, 555-556 (5th Cir., 1973) where he said:
It is true, as the government argues, that a majority of jurisdictions, including the Fifth Circuit, have denied defendants an absolute right to see and thereby rebut information in a presentence report. .. Such assertions do not, however, dispose of this case. While the due process guarantee in Townsend has been judicially limited in order to preserve the confidentiality of the presentence report when and if in the district court's discretion such confidentiality is desirable, and to prevent the sentencing process from turning into a full scale evidentiary-type hearing, it has also been widely recognized that where a sentencing judge explicitly relies on certain information in assessing a sentence, fundamental fairness requires that a defendant be given at least some opportunity to rebut that information. [Emphasis in original.]
In this case, I believe the plaintiff  at minimum  is entitled to an evidentiary hearing to determine if the alleged inaccuracies in the pre-sentence report were relied upon by the sentencing judge, and if so, that he be given an opportunity to rebut the same.
Also, concerning the main opinion's statement that the plaintiff's petition is not a basis for habeas corpus because this matter could have been raised by appeal, I believe the reasons for not raising it thereby are sufficient to allow an evidentiary hearing as noted above.
MAUGHAN, J., concurs in the views expressed in the dissenting opinion of WILKINS, J.
NOTES
[1]  Andrus v. Turner, 29 Utah 2d 338, 509 P.2d 363 (1973).
[2]  Brown v. Turner, 21 Utah 2d 96, 440 P.2d 968 (1968).
[3]  23 Utah 2d 325, 462 P.2d 720 (1969).
[4]  State v. Doremus, 29 Utah 2d 373, 510 P.2d 529 (1973).
[5]  Utah, 560 P.2d 1108 (1977).
