Present invention relates to a novel pharmaceutical dosage form for the controlled release of active agent in the stomach or upper part of gastrointestinal tract for prolonged period of time. The dosage form contains two layered polymeric film to be folded in hard capsule made up of gelatin or like, in which one layer intended for immediate release purpose containing loading dose and the other layer which is mucoadhesive constitutes for controlled release purpose containing maintenance dose. The dosage form can be best utilized for the administration of drugs having absorption window in the upper part of gastrointestinal tract or locally acting in upper part of gastrointestinal tract, or which form undesirable metabolites when passed to the terminal end of gastrointestinal tract or which are used in long acting pharmaceutical dosage forms. The said dosage form is retained in the stomach or upper part of gastrointestinal tract for controlled delivery of said drugs to improve its pharmacokinetics and pharmacodynamics.