my script is
set serveroutput on
set linesize 37
spool cardfees.txt
declare
mypan varchar2(19) := '';
func_desc varchar2(19) := '';
cursor c0 is select * from istcmsact where tx_date = '' ||to_date(sysdate) || '' and cms_func in ('01', '50') and substr(PAN, 1, 6)
<> '589960';
istcmsactrec c0%rowtype;
begin
open c0;
loop
fetch c0 into istcmsactrec;
exit when c0%notfound;
mypan := istcmsactrec.pan;
func_desc := case istcmsactrec.cms_func when '01' then 'Issuance' when '02' then 'Delete' when'03' then 'Modify' when '05'then 'Lost
-Hot' when '06' then 'Renewal' when '07' then 'Reprint' when '11' then'Convert' when '12' then 'issue_in_renewal' when '50' then 'Replacemen
t' else 'Unknown' end;
--func_desc := case istcmsactrec.cms_func when 01 then 'Issuance' else 'Unknown' end;
-- Locate account from ISTCARD table
open c1;
fetch c1 into istcardrec;
if(c1%found) then
if istcmsactrec.PAN_REPL <> '0000000000000000000' AND istcmsactrec.CMS_FUNC = '01' then
null;-- nothing to be written
else
DBMS_OUTPUT.PUT_LINE(substr(istcardrec.primaryacct,14,19)||rtrim(istcmsactrec.pan)||istcmsactrec.cms_func);
end if;
end if;
close c1;
but i need in the end of output file 9999999999999999999999999999
after retive
set serveroutput on
set linesize 37
spool cardfees.txt
declare
mypan varchar2(19) := '';
func_desc varchar2(19) := '';
cursor c0 is select * from istcmsact where tx_date = '' ||to_date(sysdate) || '' and cms_func in ('01', '50') and substr(PAN, 1, 6)
<> '589960';
istcmsactrec c0%rowtype;
begin
open c0;
loop
fetch c0 into istcmsactrec;
exit when c0%notfound;
mypan := istcmsactrec.pan;
func_desc := case istcmsactrec.cms_func when '01' then 'Issuance' when '02' then 'Delete' when'03' then 'Modify' when '05'then 'Lost
-Hot' when '06' then 'Renewal' when '07' then 'Reprint' when '11' then'Convert' when '12' then 'issue_in_renewal' when '50' then 'Replacemen
t' else 'Unknown' end;
--func_desc := case istcmsactrec.cms_func when 01 then 'Issuance' else 'Unknown' end;
-- Locate account from ISTCARD table
open c1;
fetch c1 into istcardrec;
if(c1%found) then
if istcmsactrec.PAN_REPL <> '0000000000000000000' AND istcmsactrec.CMS_FUNC = '01' then
null;-- nothing to be written
else
DBMS_OUTPUT.PUT_LINE(substr(istcardrec.primaryacct,14,19)||rtrim(istcmsactrec.pan)||istcmsactrec.cms_func);
end if;
end if;
close c1;
but i need in the end of output file 9999999999999999999999999999
after retive