Print Thread
Page 1 of 4 1 2 3 4
remarks at the beginning of a package
#23464 08/01/06 08:57 PM
Joined: Feb 2004
Posts: 36
C
cmj Offline OP
Member
OP Offline
Member
C
Joined: Feb 2004
Posts: 36
In a recent post, I reported that when you have too many characters at the beginning of a package body (ours are the change history for an old package) PL/SQL Dev will not offer Describe or Test when you right-click on a module. If the package fails to compile, you see only the message "Compiled with errors" but no error list.

The magic number of characters is somewhere around 10,000. I can remove a single character and the problem goes away; add a character back anywhere in the initial remarks and the problem returns.

I my earlier post, I thought the problem could be solved by converting from "rem" to denote comments to "--", but further testing shows that is not true. In my first test the change must have lowered the number of characters in comments below the threshold.

Can this bug be fixed? Will it be?

Re: remarks at the beginning of a package
#23465 08/01/06 09:53 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
It can be fixed and it will be. We'll add this for the upcoming 7.0.3 release.


Marco Kalter
Allround Automations
Re: remarks at the beginning of a package
#23466 08/08/06 10:40 PM
Joined: Feb 2004
Posts: 36
C
cmj Offline OP
Member
OP Offline
Member
C
Joined: Feb 2004
Posts: 36
I just realized that another ramification of the bug is this: The slash on the last line of my code is deleted.

Our standards require package bodies have a final line that is just a slash in order to compile correctly when the code is folded into our install scripts. In the past few months I have been dogged by that last line simply disappearing. The install script fails, the QA folks complain, I have to check out the code, add the slash, and check it back in. I was puzzled that it hadn't bothered me until recently and it only happens on some code. Only this morning, when it happened yet again, did I click and test for this error. Sure enough!

I sure hope the fix will address that part of the problem as well.

Re: remarks at the beginning of a package
#23467 08/09/06 09:59 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
Yes, it will.


Marco Kalter
Allround Automations
Re: remarks at the beginning of a package
#23468 08/23/06 07:28 PM
Joined: Feb 2004
Posts: 36
C
cmj Offline OP
Member
OP Offline
Member
C
Joined: Feb 2004
Posts: 36
I just installed 7.0.3 "final beta". The problem isn't fixed at all.

Re: remarks at the beginning of a package
#23469 08/23/06 09:56 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
No, but it will be smile .


Marco Kalter
Allround Automations
Re: remarks at the beginning of a package
#23470 09/25/06 08:54 PM
Joined: Feb 2004
Posts: 36
C
cmj Offline OP
Member
OP Offline
Member
C
Joined: Feb 2004
Posts: 36
I just returned from vacation and was pleased to see that v7.0.3 is released. I have installed it, but I find only one of the 3 problems I reported above is fixed.

The problems arise when you have too many remarks at the beginning of package code; "too many" is somewhere around 10,000 characters. The problems are:

1. When the package fails to compile, you get a message "Compiled with errors." but not a hint of what the errors might be.

2. When you right-click a program unit in the browser, the menu does not offer Describe or Test.

3. When you save the package code, if your last line is a single backslash (/), the last line is deleted.

Only #3 is fixed by v7.0.3. The other two disappear only if you delete the remarks code.

I hope you misunderstood my descriptions and the other two problems are easily fixed.

The three problems seem so unrelated to me. Are there many others that I have yet to discover?

Re: remarks at the beginning of a package
#23471 09/25/06 10:05 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
Problem 1 should be fixed. If this is still a problem, please send me a demo source.


Marco Kalter
Allround Automations
Re: remarks at the beginning of a package
#23472 09/26/06 04:04 AM
Joined: Feb 2004
Posts: 36
C
cmj Offline OP
Member
OP Offline
Member
C
Joined: Feb 2004
Posts: 36
I think I've stripped the problem down to bare bones in the code below. In the .pkg code, I've commented out the variable g_body_version so the .bdy compile will fail.

Problem 1:
When I compile the .bdy code I get the message "Compiled with errors" but no detail of the errors. If I delete one character...any one character you want...from the rem lines, I get the compile error list.

Problem 2:
If I remove the comments from g_body_version so the .bdy will compile, then I right click on the function, Test is not offered on the menu. When I remove any character from the rem lines and compile, then Test and Describe are offered on the menu.

The code:

CREATE OR REPLACE PACKAGE comp_err is
--
-- Global variables
g_package_name varchar2(20) := upper('comp_err');
p_st_spec varchar2(15) := '$Revision:41$';
g_spec_version varchar2(10) := ltrim(replace(substr(p_st_spec,
instr(p_st_spec, ':') + 1),
'$'));
p_st_body varchar2(15);
--g_body_version varchar2(10); -- set in show_version function
--
-- return the package spec and package body version information
function show_version return varchar2;
end comp_err;
/

REM comp_err.bdy
REM package body create for comp_err - description
REM
REM *********************** History LIFO ORDER ****************************
REM Date Who Comment
REM ---------- ------------ -----------------------------------------------
REM 08/06/02 Jeff Moritz
REM 08/06/02 Jeff Moritze v27, added procedure for closing cursors.
REM 08/06/02 Jeff Moritze v26, inserting distinct records into bl_bill_ap_temp
REM 08/05/02 Jeff Moritze v25, fixed the bl_bill_ap_temp query from invalid number error
REM 08/05/02 Jeff Moritze v24, added logic to keep error messages flowing
REM 07/24/02 Marilyn Fish v23, Code added to insert record into bl_bill_accounts_provider
REM for providers on an account that do not have charges for
REM the current billing.
REM 07/10/02 Marilyn Fish v22, Added previous_date_read and added bundle_tax_ind
REM to bl_bill_accounts_provider insert.
REM 07/03/02 Marilyn Fish v21, Columns final_bill_ind, estimate_ind, scan_line
REM added. Initialized penalty amounts to zero.
REM 06/24/02 Marilyn Fish v20, Added account_number to order by of account_c
REM 06/24/02 Marilyn Fish v19, Additonal changes to print_prep.
REM 06/24/02 Marilyn Fish v18, Dynamic sql v. of print_prep proc added.
REM 06/24/02 Marilyn Fish v17, Additional changes to error_log insert.
REM 06/19/02 Marilyn Fish v16, Inserts to bl_bill_print_error_log added.
REM Consumer_number parameter added to account_c
REM When abort_error exception raised, error_msg
REM inserted into bl_print_batch
REM 06/17/02 Marilyn Fish v15, Changed bl_providers to bl_provider_services
REM where provider_role is selected.
REM 06/06/02 Marilyn Fish v14, Added charge_code to bl_bill_charges and
REM added first_name, last_name to bl_bill_
REM consumer_statements
REM 06/03/02 Marilyn Fish v13, Modified parameters for process_penalties
REM 06/03/02 Marilyn Fish v12, Added code to assemble code_line value
REM 05/30/02 Marilyn Fish v11, fb/cr/tdsp_provider inserted into bl_bill_services
REM 05/14/02 Marilyn Fish v10, Functions without p_format passed in, altered
REM account_c
REM 05/14/02 Marilyn Fish v9, Changed domain ref to Bill Spec Proc Code
REM 05/14/02 Marilyn Fish v8, Added tariff_type to bl_bill_services.
REM 05/13/02 Marilyn Fish v6, Mod to correct problem with call from sql.
REM 05/11/02 Marilyn Fish v5, select change in calc_amounts
REM 05/11/02 Marilyn Fish v4, Overhaul of code.
REM 04/31/02 Marilyn Fish v3, Modified parameter in penalty_calc_amount.
REM 04/31/02 Marilyn Fish v2, penalty procs now call from bldelinq.bdy
REM 01/02/02 Marilyn Fish v1, initial version
create or replace package body comp_err
is
-- Package variables and exceptions
abort_error exception;
dup_key_ins exception;
pragma exception_init(dup_key_ins, -1);

--
-- Function and procedures
--
-- Return message with version information
function show_version return varchar2 is
--
-- Program Data
/* Variable to hold the software release string */
x_software_release varchar2(10);
/* Message to return with version information */
version_message varchar2(200);

/* Get the software release from the system table */
cursor get_ut_system_info is
select software_release from ut_system;
begin
-- begin show_version
for x in get_ut_system_info loop
x_software_release := rtrim(ltrim(x.software_release));
end loop;

version_message := g_package_name || ' Package: ' || x_software_release || '.' ||
g_spec_version || '.0 Body: ' || x_software_release || '.' ||
g_body_version || '.0';
return version_message;
end show_version;

begin
p_st_body := '$Revision:179$';
g_body_version := ltrim(replace(substr(p_st_body,
instr(p_st_body, ':') + 1),
'$'));
end comp_err;
/

Re: remarks at the beginning of a package
#23473 09/26/06 09:54 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
The problem is actually related to this line:

REM package body create for comp_err - description

If you remove it, or change the wording so that "package body" no longer appears on this line, it works okay.

We'll fix this too.


Marco Kalter
Allround Automations
Page 1 of 4 1 2 3 4

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.069s Queries: 13 (0.015s) Memory: 2.5722 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-04-29 14:47:30 UTC
Valid HTML 5 and Valid CSS