
508 N.W.2d 78 (1993)
Dennis D. COHEN, Plaintiff,
v.
IOWA DISTRICT COURT FOR DES MOINES COUNTY, Defendant.
No. 92-252.
Court of Appeals of Iowa.
September 2, 1993.
Dennis D. Cohen, pro se.
Bonnie J. Campbell, Atty. Gen., Ann E. Brenden, Asst. Atty. Gen., and Pat Gunnels, Burlington City Atty., for defendant.
*79 Heard by SCHLEGEL, P.J., and SACKETT and HABHAB, JJ.
HABHAB, Judge.
In this certiorari proceeding, we are asked to review an order of a district associate judge. That order prohibits the plaintiff, an attorney, from ever making a judgment of acquittal motion that alleges the City failed in its duty to plead and prove the municipal ordinance his client was accused of violating. The court, after concluding that similar motions had been made on previous occasions, reasoned that the motion was advanced for the purpose of delaying and impeding the judicial system. We set forth as much of the facts as necessary to resolve this matter.
On October 7, 1991, a preliminary complaint was filed in Iowa District Court for Des Moines County accusing Ruth Ann Garrett ("Garrett") of the "crime of intoxication in violation of section 9.04.380 of the (West) Burlington City Code." Garrett appeared in court with her attorney, Dennis D. Cohen, the plaintiff here, and pleaded not guilty to the charge. Trial was had to a jury, and she was found guilty and was later sentenced. That conviction and sentence was not appealed.
The case was tried before the Honorable Thomas R. Brown, District Associate Judge of the Des Moines County District Court, and the case was prosecuted by the Burlington City Attorney. At the close of the City's case, Defense Attorney Cohen made a motion for judgment of acquittal. One ground of the motion was that the City failed in its duty to plead and prove the municipal ordinance it was accusing Garrett of violating. Defense counsel urged that such duty is imposed by Iowa Code section 622.62, and City of Cedar Rapids v. Cach, 299 N.W.2d 656 (Iowa 1980). He argued further that because the ordinance had not been properly plead or proved, Garrett could not be convicted of its violation.
The City Attorney responded that defense counsel had made a similar objection a number of times before and that on all of those prior occasions, the motion had been overruled.
The trial judge pointed out to defense counsel that the issue generated by his motion had been addressed on many prior occasions and each time his motion had been overruled. Defense counsel argued that he had to make the motion to make a record for appeal. He concluded by emphasizing that he was aware of the likely ruling and that he was just happy "to be able to make it and get a ruling." The trial judge then responded:
THE COURT: I'm not happy you make it, Mr. Cohen; and I'm directing you right now never to make that motion again in this courtroom. As far as I can tell, it's for the strict purpose of delaying and impeding these proceedings. We've discussed this matter many times. I think the law is clear on this, and I can see no other reason for you doing this other than to harass the system and to attempt to provoke some sort of technicality to invalidate these proceedings. And if you make that motion again, I will deem that contempt of court.
It is this statement by the court that forms the basis for this certiorari action.

I.
We first direct our attention to certiorari-defendant's claim that the statement made by the trial court is not an appealable order. It is asserted that petitioner's claim is based on a warning and has not ripened into a finding of contempt; therefore, it is argued we are without jurisdiction.
We do not necessarily disagree with certiorari-defendant's position. There is case law that appears to support this argument. See Brodsky v. Philadelphia Athletic Club, Inc., 277 Pa.Super. 549, 552, 419 A.2d 1285, 1287 n. 2 (1980) ("A chancellor's threat to hold a party in contempt at some future time if a decree is not performed is neither final nor appealable."); Steel v. Weisberg, 368 Pa.Super. 590, 593, 534 A.2d 814, 816 (1987) ("A threat to hold a party in contempt at some future time if a decree is not performed or a threat to impose sanctions in the future is neither final nor appealable.").
But we believe the facts of this case differ sufficiently from those cited so as to make it appropriate for this court to take jurisdiction. Here, we have a circumstance where the trial *80 court directed counsel "never to make that motion again in this courtroom." In addition, the trial judge admonished counsel "and if you make that motion again, I will deem that contempt of court."
The dispute here is between trial counsel and the trial court. Trial counsel is faced with a direct order of court. Under the circumstances here, we think it unwise to require a direct confrontation between trial counsel and the court before the trial court's ruling can be tested. We are not convinced such a requirement would advance in any respect the administration of justice. Thus, from the general rule set forth above, we carve out this narrow exception and take jurisdiction of this cause.

II.
A writ of certiorari may be sought when an inferior tribunal, board, or officer, exercising judicial functions, is alleged to have exceeded its, his, or her proper jurisdiction or otherwise acted illegally. Johnson v. Iowa District Court, 385 N.W.2d 562, 564 (Iowa 1986); Iowa R.Civ.P. 306. Certiorari is an action at law, not in equity. Johnson, 385 N.W.2d at 564. However, courts frequently consider defects and errors in the proceedings of the inferior tribunal which are not strictly of a jurisdictional nature. State v. Iowa District Court, 463 N.W.2d 885, 886 (Iowa 1990).

III.
The plaintiff asserts it was illegal for the trial judge to order defense counsel never again to make a motion for judgment of acquittal in his courtroom on the ground that the City has failed in its duty to plead and prove a municipal ordinance. The assertion brings into play Iowa Code section 622.62 (1991). That section provides in part:
1. The printed copies of a city code and of supplements to it which are purported or proved to have been compiled pursuant to section 380.8 shall be admitted in the courts of this state as presumptive evidence of the ordinances contained therein. When properly pleaded, the courts of this state shall take judicial notice of ordinances contained in a city code or city code supplement.
2. The printed copies of an ordinance of any city which has not been compiled in a city code or a supplement pursuant to section 380.8 but which has been published by authority of the city, or transcripts of any ordinance, act, or proceeding thereof recorded in any book, or entries on any minutes or journals kept under direction of the city, and certified by the city clerk, shall be received in evidence for any purpose for which the original ordinances, books, minutes, or journals would be received, and with the same effect. The clerk shall furnish such transcripts, and be entitled to charge therefor at the rate that the clerk of the district court is entitled to charge for transcripts of records from that court.
We are here reminded that we have not been called upon to review the merits of Garrett's conviction. That conviction was not appealed. We need only determine whether the associate district court judge exceeded his authority in issuing the disputed order.
The plaintiff argues that one of the results of the trial court's order is to deny an accused the Sixth-Amendment right to counsel. In this respect, the right of an accused to the assistance of counsel in a criminal prosecution is firmly established through the Sixth Amendment to the United States Constitution. This Sixth-Amendment right has been interpreted as being a substantive guarantee of the Fourteenth Amendment Due Process Clause and thus is applicable to state court actions. See Gideon v. Wainwright, 372 U.S. 335, 342, 83 S.Ct. 792, 795, 9 L.Ed.2d 799, 804 (1963).
The certiorari defendant, of course, does not challenge the accused's right to counsel. What is asserted is plaintiff's motion is "frivolous" and impedes the orderly administration of justice.

IV.
Our task is to preserve the integrity of the judiciary. Our goal is to insure the fair administration of justice for all persons who come before the courts of this state.
*81 Above and beyond the established constitutional guarantees, certain canons, cited to us by both parties, have been adopted and court decisions rendered that define the duties and obligations of judges, lawyers, and clients.
The judicial duties of a judge take precedence over all other activities. Iowa Code of Judicial Conduct Canon 3. In performing those duties, a judge should accord to every person who is legally interested in a proceeding or that person's lawyer full right to be heard according to law. Iowa Code of Judicial Conduct Canon 3(A)(4). It is for the judge to maintain order and decorum at all times and under all circumstances in those proceedings before him or her. Iowa Code of Judicial Conduct Canon 3(A)(2). As stated in the A.B.A. Advisory Committee's standards for the rendering of criminal justice:
The trial judge should be the exemplar of dignity and impartiality. He should exercise restraint over his conduct and utterances. He should suppress his personal predilections, and control his temper and emotions. He should not permit any person in the courtroom to embroil him in conflict, and he should otherwise avoid conduct on his part which tends to demean the proceedings or to undermine his authority in the courtroom. When it becomes necessary during the trial for him to comment upon the conduct of witnesses, spectators, counsel, or others, or upon the testimony, he should do so in a firm, dignified and restrained manner, avoiding repartee, limiting his comments and rulings to what is reasonably required for the orderly progress of the trial, and refraining from unnecessary disparagement of persons or issues.
Standards Relating to the Judge's Role in Dealing with Trial Disruptions § B.1, at 6 (Advance Rep. Tentative Draft 1971). Further,
the presiding judge must require the barristers and the litigants to observe and to respect the standards of decorum that are traditional attributes of a fair trial. By his own example, as well as by his rulings, the judge must confirm the objectivity and majesty of the judicial process. The integrity of the proceeding, not merely its ultimate outcome, must command the confidence of the community.
United States ex rel. Wilson v. Coughlin, 472 F.2d 100, 104 (7th Cir.1973) (Stevens, J.).
Lawyers, by our canons, likewise have certain duties and obligations. Among those is the duty both to the client and the legal system to represent the client zealously within the bounds of the law. In this respect,
[t]he advocate may urge any permissible construction of the law favorable to a client, without regard to the lawyer's professional opinion as to the likelihood that the construction will ultimately prevail. A lawyer's conduct is within the bounds of the law, and therefore permissible, if the position taken is supported by the law or is supportable by a good faith argument for an extension, modification, or reversal of the law. However, a lawyer is not justified in asserting a position in litigation that is frivolous.
Iowa Code of Professional Responsibility EC 7-4.
[A] lawyer as an officer of the court has certain rights which cannot be denied by a supersensitive judiciary. His duty to his client, his oath of office, his inherent sense of the fitness of things, his training in self-control, his respect for the courts, all, as a fact, constrain him to an activity within rational and proper bounds. No presumption that he has violated all these constraining influences should be indulged against him; and, until it is shown that he has as a fact exceeded the zeal with which he is presumed to represent his client's interest, he should be protected.
State ex rel. Hurley v. District Court, 76 Mont. 222, 234, 246 P. 250, 255 (1926).
The duty of a lawyer to represent a client with zeal is not without limitations. In representing a client, a lawyer shall not:
(1) File a suit, assert a position, conduct a defense, delay a trial, or take other action on behalf of a client when the lawyer knows or when it is obvious that such action would serve merely to harass or maliciously injure another.

*82 (2) Knowingly advance a claim or defense that is unwarranted under existing law, except that he may advance such claim or defense if it can be supported by good faith argument for an extension, modification, or reversal of existing law.
Iowa Code of Professional Responsibility DR 7-102(A). As in Nix v. Whiteside, 475 U.S. 157, 168, 106 S.Ct. 988, 995, 89 L.Ed.2d 123, 135-36 (1986), "[t]hese standards confirm that the legal profession has accepted that an attorney's ethical duty to advance the interests of his client is limited by an equally solemn duty to comply with the law and standards of professional conduct...."
The zeal of opposing lawyers "can pervert as well as aid the judicial process unless it is supervised and controlled by a neutral judge representing the overriding social interest in impartial justice and with power to curb both adversaries." Sacher v. United States, 343 U.S. 1, 8, 72 S.Ct. 451, 455, 96 L.Ed. 717, 723 (1952).
If the court was not given full power and authority to control the trial, "it would be impossible for the court to keep a trial or proceeding within due bounds, disorder rather than decorum would be the rule, and all attempts to expedite the disposition of business would be foredoomed to failuremere lost motion." Hurley, 76 Mont. at 233, 246 P. at 255 (contempt based on lawyer's continued efforts to admit precluded evidence upheld"trial judges are to be commended, rather than criticized, for preventing the inclusion of repetitious and surplus matter at the trial").
It is clear that a lawyer should not assert a position in litigation that is frivolous. Whether a claim is frivolous is neither easily defined nor quickly recognizable. Without attempting to fix in concrete for all cases the formula to be used in determining whether a claim is frivolous, we believe, at least under the facts of this case that two standards should be considered, i.e., objective and subjective considerations.
It can be said that in its "objective sense" a claim or defense is frivolous if the proponents can present no rational argument based upon evidence or law in support of that claim or defense. Leibowitz v. Aimexco, Inc., 701 P.2d 140, 142 (Colo.App.1985); Black's Law Dictionary 668 (6th ed. 1990). In the "subjective sense," a claim or defense may be said to be frivolous if it is taken primarily for the purpose of harassing or maliciously injuring a person. United Farm Bureau Mut. Ins. Co. v. Ira, 577 N.E.2d 588, 597 (Ind.App.1991). We find support for a subjective consideration in DR 7-102(A)(1), cited previously.
In support of the court's commitment to avoid harassing or vexatious litigation, Iowa Rule of Civil Procedure 80(a) was adopted. That rule authorizes trial courts to impose sanctions on lawyers who sign motions, pleadings, or papers in violation of that rule's requirement that, to the best of counsel's knowledge, information and belief, it is well grounded in fact and warranted by existing law or a good-faith argument for change and that "it is not interposed for any improper purpose, such as to harass or cause an unnecessary delay or needless increase in the cost of litigation."

V.
Here, we have a direct order of court instructing an attorney "never to make that motion again in this courtroom ... and if you make that motion again, I will deem that contempt of court." As previously stated, the trial court reasoned that the motion was made merely to harass and impede the proceedings, in other words, it was frivolous.
In the objective sense of "frivolous," it cannot be said the motion was frivolous, for the attorney was in a position to advance a rational argument based upon existing law in support of his claim. In this respect, both parties concede that "the general rule (in Iowa) is that a court of general jurisdiction will not take judicial notice of a city ordinance." City of Cedar Rapids v. Cach, 299 N.W.2d 656, 658 (Iowa 1980).
To enable the courts of this state to take judicial notice of city ordinances, the State can proceed under section 622.62 of our Code. Whether subsection 1 or 2 applies depends upon whether the city code and supplements thereto have been compiled pursuant to section 380.8. If it is established that such compilation has taken place, the *83 courts of this state are to take judicial notice of the ordinances contained in the city code or the city code supplement "when properly pleaded." If the city code and supplements thereto have not been compiled pursuant to section 380.8, the party relying on the city ordinance may have the same received into evidence provided, of course, the circumstances of subsection 2 exist and the provisions thereof are complied with.
Whether the circumstances and conditions of subsection 1 or 2 have been complied with is often times a fact question which can be resolved only after the issue is raised by a proper pleading or motion. We note that we have not been referred to any part of the record that reveals compliance with section 622.62(1), the section the City relied on during the course of the criminal proceedings. Such omission, at least insofar as this appeal is concerned, is not of any great consequence for we have not been asked to pass on the merits of defense counsel's motion.
Nor can it be said that in the subjective sense the motion was frivolous. It was short and to the point. We are unable to read into the motion that its purpose was to "harass or maliciously injure another." Iowa Code of Professional Responsibility DR 7-102(A)(1). If indeed defense counsel was successful in his motion, his client would have benefited at the trial court level. Further, and equally as important, to preserve the record for appellate purposes, the attorney was obligated to make the motion and await a decision.
In sustaining the writ, we do so only on the limited facts presented to us. We form no opinion what the result may have been had indeed the record revealed that the terms and provisions of section 622.62(1) had been complied with and that such compliance was within the knowledge of defense counsel. That question, and the corresponding question of what the result would be had compliance with the section in question in other proceedings been firmly established and made a matter of public record, will have to await another action.
WRIT SUSTAINED.
