Consultor Eletrônico



Kbase P50802: Workaround: Having to use CAPS function in Dsrv code when it shouldn't be needed
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/4/2006
Status: Unverified

FACT(s) (Environment):

Progress 9.1D
Oracle DataServer

SYMPTOM(s):

Code does not work if CAPS function is not used

Connecting to both ORACLE and PROGRESS database

No need to use CAPS when doing:
FOR EACH against PROGRESS_TABLE
FIND FIRST against ORACLE_TABLE

Need to use CAPS when doing:
FOR EACH against ORACLE_TABLE
FIND FIRST against PROGRESS_TABLE

Sample of code that does not work:

for each ANOTHER_ORACLE_TABLE no-lock
where ANOTHER_ORACLE_TABLE.pip_company = v-companyid,
each ORACLE_TABLE no-lock
where ORACLE_TABLE.uoi_id = ANOTHER_ORACLE_TABLE.uoi_id:

find first PROGRESS_TABLE no-lock
where PROGRESS_TABLE.companyid = ANOTHER_ORACLE_TABLE.pip_company
and PROGRESS_TABLE.prod = ANOTHER_ORACLE_TABLE.item_number
and PROGRESS_TABLE.name = ORACLE_TABLE.name
and PROGRESS_TABLE.unit = ORACLE_TABLE.unit
no-error.

if error-status:error then
do:
run audit.ip(ANOTHER_ORACLE_TABLE.item_number,'','',
ORACLE_TABLE.name + " - " + ORACLE_TABLE.unit,
'Differentiator Not in PAL - Did Not Use CAPS','Teams').
end.
end.

CAUSE:

This is a known issue being investigated by Development

FIX:

Enter CAPS for both PROGRESS and ORACLE Tables after the FIND FIRST
Review area within the code that has ------>>> <<<-------


for each ANOTHER_ORACLE_TABLE no-lock
where ANOTHER_ORACLE_TABLE.pip_company = v-companyid,
each ORACLE_TABLE no-lock
where ORACLE_TABLE.uoi_id = ANOTHER_ORACLE_TABLE.uoi_id:

find first PROGRESS_TABLE no-lock
where PROGRESS_TABLE.companyid = ANOTHER_ORACLE_TABLE.pip_company
and PROGRESS_TABLE.prod = ANOTHER_ORACLE_TABLE.item_number
------>>>and caps(PROGRESS_TABLE.name) = caps(ORACLE_TABLE.name) <<<-------
and PROGRESS_TABLE.unit = ORACLE_TABLE.unit
no-error.

if error-status:error then
do:
run audit.ip(ANOTHER_ORACLE_TABLE.item_number,'','',
ORACLE_TABLE.name + " - " + ORACLE_TABLE.unit,
'Differentiator Not in PAL - Used CAPS','Teams').
end.
end.