procedure error - urgent

when i compiled the below code  i got the following errors

 PLS-00103: Encountered the symbol "CLOSE" when expecting one of
 the following:
 begin end function package pragma procedure form
 The symbol "begin was inserted before "CLOSE" to continue.

 PLS-00103: Encountered the symbol "PROCEDURE"
 PLS-00103: Encountered the symbol "END" when expecting one of the
 following:
 begin function package pragma procedure form

here is the code

PROCEDURE import(p_errbuf   OUT NOCOPY VARCHAR2,
                 p_retcode  OUT NOCOPY NUMBER)
IS

v_object_version_number    NUMBER;
v_job_defination_id        NUMBER;
v_error_stage              VARCHAR2(4000);
v_validate                 BOOLEAN:=FALSE;
v_job_group_id             NUMBER;
v_job_id                   NUMBER;
v_job_information_category VARCHAR2(10) :=trim('US');

cursor c_job IS
SELECT stg.rowid,stg.*
from LVHR_HRCV0002_JOB_STG stg
where stg.status in ('D');

ro_job     c_job%ROWTYPE;

BEGIN
  open c_job;
  EXIT WHEN c_job%NOTFOUND;
  IF MOD(c_job%ROWCOUNT,500)=0 THEN
    COMMIT;
  END IF;
 
  v_error_message        :=NULL;
  v_object_version_number:=NULL;
  v_job_defination_id    :=NULL;
  v_job_group_id         :=NULL;
  v_job_id               :=NULL;

BEGIN
 HR_JOB_API.create_job
  (p_validate                      =>  v_validate
  ,p_business_group_id             =>  ro_job.business_group_id
  ,p_date_from                     =>  ro_job.date_from  
  ,p_comments                      =>  null
  ,p_date_to                       =>  null
  ,p_approval_authority            =>  null
  ,p_benchmark_job_flag            =>  null
  ,p_benchmark_job_id              =>  null
  ,p_emp_rights_flag               =>  null
  ,p_job_group_id                  =>  ro_job.job_group_id
  ,p_attribute_category            =>  null
  ,p_attribute1                    =>  null
  ,p_attribute2                    =>  null
  ,p_attribute3                    =>  null
  ,p_attribute4                    =>  null
  ,p_attribute5                    =>  null
  ,p_attribute6                    =>  null
  ,p_attribute7                    =>  null
  ,p_attribute8                    =>  null
  ,p_attribute9                    =>  null
  ,p_attribute10                   =>  null
  ,p_attribute11                   =>  null  
  ,p_attribute12                   =>  null  
  ,p_attribute13                   =>  null  
  ,p_attribute14                   =>  null
  ,p_attribute15                   =>  null
  ,p_attribute16                   =>  null
  ,p_attribute17                   =>  null
  ,p_attribute18                   =>  null
  ,p_attribute19                   =>  null
  ,p_attribute20                   =>  null
  ,p_job_information_category      =>  v_job_information_category
  ,p_job_information1                  =>  to_number(ro.job.job_information1d)
  ,p_job_information2                  =>  null
  ,p_job_information3                  =>  to_number(ro.job.job_information3d)
  ,p_job_information4                  =>  null
  ,p_job_information5                  =>  null
  ,p_job_information6                  =>  null
  ,p_job_information7                  =>  null
  ,p_job_information8                  =>  null
  ,p_job_information9                  =>  null
  ,p_job_information10                  =>  null
  ,p_job_information11                  =>  null
  ,p_job_information12                  =>  null
  ,p_job_information13                  =>  null
  ,p_job_information14                  =>  null
  ,p_job_information15                  =>  null
  ,p_job_information16                  =>  null
  ,p_job_information17                  =>  null
  ,p_job_information18                  =>  null
  ,p_job_information19                  =>  null
  ,p_job_information20                  =>  null
  ,p_segment1                      =>  ro_job.job_code
  ,p_segment2                      =>  ro_job.job_title
  ,p_segment3                      =>  null
  ,p_segment4                      =>  null
  ,p_segment5                      =>  null
  ,p_segment6                      =>  null
  ,p_segment7                      =>  null
  ,p_segment8                      =>  null
  ,p_segment9                      =>  null
  ,p_segment10                     =>  null
  ,p_segment11                     =>  null
  ,p_segment12                     =>  null
  ,p_segment13                     =>  null
  ,p_segment14                     =>  null
  ,p_segment15                     =>  null
  ,p_segment16                     =>  null
  ,p_segment17                     =>  null
  ,p_segment18                     =>  null
  ,p_segment19                     =>  null
  ,p_segment20                     =>  null
  ,p_segment21                     =>  null
  ,p_segment22                     =>  null
  ,p_segment23                     =>  null
  ,p_segment24                     =>  null
  ,p_segment25                     =>  null
  ,p_segment26                     =>  null
  ,p_segment27                     =>  null
  ,p_segment28                     =>  null
  ,p_segment29                     =>  null
  ,p_segment30                     =>  null
  ,p_concat_segments               =>  ro_job.job_code||'.'||ro_job.job_title
  ,p_language_code                 =>  null
  ,p_job_id                        =>  v_job_id
  ,p_object_version_number         =>  v_object_version_number
  ,p_job_definition_id             =>  v_job_defination_id
  ,p_name                          =>  ro_job.job_name
  );
   
 UPDATE LVHR_HRCV0002_JOB_STG
set   status               =  'P'
     ,error_message        =  NULL
     ,job_definition_id    =  v_job_defination_id
     ,object_version_number=  v_object_version_number
     ,last_updated_by      =  gv_user_id
     ,LAST_UPDATE_DATE     =  SYSDATE
     ,last_update_login    =  gv_user_id
     where rowid = ro_job.rowid;
     
EXCEPTION
WHEN OTHERS THEN
v_error_message := SUBSTR(SQLERRM,1,500);

UPDATE LVHR_HRCV0002_JOB_STG
set   status               =  'E'
     ,error_message        = 'API Validation Error'
where rowid = ro_job.rowid;

end loop;
end;
CLOSE c_job;

EXCEPTION
WHEN OTHERS THEN

p_errbuf := 'Unknow Error ' || SUBSTR(SQLERRM,1,500);
p_retcode := 2;
end import;




reddy_mvgAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

WelkinMazeCommented:
Hi,

Try to replace the following part

end loop;
end;
CLOSE c_job;

EXCEPTION
WHEN OTHERS THEN

p_errbuf := 'Unknow Error ' || SUBSTR(SQLERRM,1,500);
p_retcode := 2;
end import;



with this one:



end;
CLOSE c_job;

EXCEPTION
WHEN OTHERS THEN

p_errbuf := 'Unknow Error ' || SUBSTR(SQLERRM,1,500);
p_retcode := 2;
end;

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
reddy_mvgAuthor Commented:
thank you for ur suggestion,

WelkinMazeCommented:
Please, write the result after trying. I hope it will work this way.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.