Sorry I was tied up yesterday.
I am not sure this works either.
This is the code:
set serveroutput on
declare
l_file blob;
l_dir_listing as_sftp.tp_dir_listing;
l_not6405 boolean;
procedure retbol is
begin
l_not6405 := true;
end;
begin
as_sftp.open_connection( i_host => 'sftp.host.com',i_port =>22 );
as_sftp.login( i_user => 'user', i_password => 'demo' );
as_sftp.set_log_level( 3 );
if as_sftp.is_file_exists ('/tmp/OGI.txt') then
as_sftp.delete_file ('/tmp/OGI.txt');
end if;
as_sftp.put_file( i_path => '/tmp/OGI.txt', i_directory =>'TX1242', i_filename => 'OGIt.txt' );
as_sftp.close_connection;
end;
Running the Analysis with the stock rule says that the following three variables fall withing rule 6405:
-
l_file blob;
-
l_dir_listing as_sftp.tp_dir_listing;
-
l_not6405 boolean;
The first two surely do. Not the last one. As it is being used in the private procedure.
Here is what I did to test your new expression.
- Created rule 7000 with the same info from current 6405. I did this to establish that Analysis will show both. After the Analyzing the code, rule 7000 did not show as a problem. Just 6405.
- Then I copied your expression into rule 7000. Same result as above
- Lastly I exported the rules, changed 6405 to use your expression. Imported the rules back in.
Analysis kept showing variable l_not6405 as an unused variable.