INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Jobs from Indeed

i need to add record on output file

i need to add record on output file

(OP)
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

RE: i need to add record on output file

Can't you just do:

dbms_output.put_line('9999999999999999999999999999');

after the loop ?

For Oracle-related work, contact me through Linked-In.

RE: i need to add record on output file

(OP)
i thank you very much

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close