reddy_mvg
asked on
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:=N ULL;
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_categor y => v_job_information_category
,p_job_information1 => to_number(ro.job.job_infor mation1d)
,p_job_information2 => null
,p_job_information3 => to_number(ro.job.job_infor mation3d)
,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_j ob.job_tit le
,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;
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
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:=N
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_categor
,p_job_information1 => to_number(ro.job.job_infor
,p_job_information2 => null
,p_job_information3 => to_number(ro.job.job_infor
,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_j
,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;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please, write the result after trying. I hope it will work this way.
ASKER