Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i need to add record on output file

Status
Not open for further replies.

hammam02

IS-IT--Management
Mar 23, 2009
27
EG
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
 
Can't you just do:

dbms_output.put_line('9999999999999999999999999999');

after the loop ?

For Oracle-related work, contact me through Linked-In.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top