Need help in dbms_output package

Hi,
I am using dbms_output package in my sql, while displaying the content its not coming in one line. Could you please help me out here.
DBMS_OUTPUT.PUT_LINE ('Its testing for around '||l_run_time||' minutes in this step, but average test time for this step is '||l_avg_time||' minutes.');
o/p:
Its running for around 63 minutes in this step, but average run time for this
step is 0 minutes.
Desired o/p
Its running for around 63 minutes in this step, but average run time for this step is 0 minutes.
Thanks.

Plese try this .
SQL> set serveroutput on
SQL> set pages 3000
SQL> set lines 3000
SQL>
SQL> declare
2 l_run_time number ;
3 l_avg_time number;
4 begin
5 l_run_time := 63;
6 l_avg_time := 0;
7 DBMS_OUTPUT.PUT_LINE ('Its testing for around '||l_run_time||' minutes in this step,but average
test time for this step is '||l_avg_time||' minutes.');
8 end;
9 /
Its testing for around 63 minutes in this step,but average test time for this step is 0 minutes.
PL/SQL procedure successfully completed.
SQL>
Thanks,
Lakshmi Kondu

Similar Messages

  • Please i need help for Webutil Package

    Please I need help Friends .
    I have already installed oracle developer 10g . and i don't know how to configure and use WEBUTIL Package .
    So , please anyone tell me how to Configure this package to be ready to use > Step By step Please .
    Thank You

    Hello,
    The step by step installation guide is available in the /webutil folder of your Developer Suite installation.
    Francois

  • Need help about class package

    Hi All,
    I need one help.
    I have one java class under package com.abc and other java class under default package.
    How do I access java class under default package from java class under com.abc package?.
    Waiting for reply.
    Thanks

    Just add default package in your CLASSPATH seting.
    But it is recommened that all classes must belong to any package. You should avoid to use default package.

  • Need help with Nagios package

    I'm attempting to build a Nagios package, and I'm pretty close, actually have it installed and running, BUT...
    when I run the web interface, it calls some CGI files, and I get an error that it can't find them.  It can't find them because it's looking for them in /repo/packages/nagios/usr/sbin/nagios/sbin  (with '/repo/packages/nagios' being our local repo where the package was built, and '/usr/sbin/nagios/sbin' being where it should be looking for the CGI files.)
    I cheated by setting up that path and copying the files over, just to get it working, but obviously my PKGBUILD needs some help.  I think the problem is pretty simple (just like me) and probably has to do with a configure prefix (with 'cgiurl' being the likely culprit.)
    Here's my package build, any help would be greatly and fantasticly appreciated.
    pkgname=nagios
    pkgver=1.2
    pkgrel=6
    pkgdesc="host and service monitor designed to inform of network problems"
    url="http://nagios.org/"
    license=()
    depends=()
    makedepends=()
    conflicts=()
    replaces=()
    backup=()
    source=('http://internap.dl.sourceforge.net/sourceforge/nagios/nagios-1.2.tar.gz')
    md5sums=('414d70e5269d5b8d7c21bf3ee129309f')
    build() {
    mkdir $startdir/pkg/usr
    mkdir $startdir/pkg/usr/sbin
    mkdir $startdir/pkg/usr/sbin/nagios
    mkdir $startdir/pkg/etc
    mkdir $startdir/pkg/etc/rc.d
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=$startdir/pkg/usr/sbin/nagios --with-cgiurl=/nagios/cgi-bin --with-html=/nagios/ --with-nagios-user=nagios --with-nagios-grp=nagios --with-init-dir=$startdir/pkg/etc/rc.d
    make all
    make install
    make install-init
    make install-config
    Thanks much

    manica wrote:
    When you have a Nagios PKGBUILD ready, could you please make it available to others?  That would be great.
    Thank you,
    Darin
    Definitely, if I ever get it working properly.  However, since I have it working it working well enough for our purposes, I won't be putting a whole lot of time in the PKGBUILD.
    Thanks to Cactus for the advice above, but the build failed (don't have the error message handy.)
    This was for Nagios 1.2, I may try building a package for Nagios 2.0b4 and see if I have any luck.

  • Need help with function (package)

    HI,
    Here is my scenario
    I have a package (stored procedure), and 3 functions and 1 procedure. Procedure calls all the functions to fetch data. I am having a trouble in accessing one of the functions. I need to count the number of records satisfy my where clause. Following is my example.
    FUNCTION S_LEVEL (ME_NO IN VARCHAR2, STDATE IN DATE, ENDATE IN DATE) RETURN NUMBER AS LEVEL NUMBER;
    SELECT COUNT(*)
    FROM --- xS, -- SP
    WHERE XS.SRVNBR = SP.NBR
    AND XS.MEMBER_NBR = ME_NO
    AND ((XS.DIR IN ('2824','28241','28242','5173','28952')
    and xs.date between stdate and endate;
    RETURN LEVEL;
    END s_level
    Now when I call this function from procedure (through a Crystal report), it never return anything and just freeze. Could someome please guide me what I am doing wrong or how it is supposed to be done?
    Please help me, I will really appreciate your time and efforts.

    Khurram,
    It's always a bad idea to use a reserved word to name something, regardless whether Oracle allows it or not.
    Sooner or later you'll run into trouble.
    SQL> create or replace
      2  FUNCTION S_LEVEL RETURN NUMBER
      3  AS
      4    v_cnt NUMBER;
      5  --  level NUMBER := 999;
      6  begin
      7    SELECT level
      8    INTO   v_cnt
      9    FROM   dual
    10    CONNECT BY rownum < 2;
    11
    12    RETURN v_cnt;
    13
    14  END s_level;
    15  /
    Function created.
    SQL> select s_level from dual;
       S_LEVEL
             1
    SQL> create or replace
      2  FUNCTION S_LEVEL RETURN NUMBER
      3  AS
      4    v_cnt NUMBER;
      5    level NUMBER := 999;
      6  begin
      7    SELECT level
      8    INTO   v_cnt
      9    FROM   dual
    10    CONNECT BY rownum < 2;
    11
    12    RETURN v_cnt;
    13
    14  END s_level;
    15  /
    Function created.
    SQL> select s_level from dual;
       S_LEVEL
           999
    SQL>

  • Need help in creating package.

    Guys,
    Here is my problem.
    I've have 2 codes. CODE-A and CODE-B. I want to create a package out of them. But here is the problem.
    I'ce create a directory called " /java/code/utils" and moved CODE-A.java and CODE-B.java in it.
    CODE-B is calling CODE-A at one point. I'm able to compile CODE-A and create a CODE-A.class out of it. But when I complete CODE-B, I get an error message "Can not resolve Symbol : CODE-B".
    Pl. note that the first line of CODE-A.java & CODE-B.java are "package utils".
    How can I get CODE-B.java to compile ?
    Can someone please help me ?
    Thanks a bunch in advance.

    It should work as long as " /java/code" is in your classpath when you compile.

  • Need help with a package

    I'm don't know anything about packages or much at all as flash is concern. I'm trying to help the company I work for with a banner for the site... I have everything working fine as long as I do it from my desktop but the moment I put it on the site is blank.. I figure out the it may have something to do with my 1st line. I made a directory on the site with the exact same folder structure but I may be missing something. I thing that maybe it because if i rename or move the folder from where is at on the desktop it gives error in flash. How would i go about doing the import so it will read from a website directory.
    package
    import cn.com.aven.*;
    import flash.display.MovieClip;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.display.Sprite;
    import flash.display.Loader;
    import flash.net.navigateToURL;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    public class BannerRotatorMain extends MovieClip

    The class files are used for creating the file that you will place on the server, the fla and as file do not get placed on the server, just the html, swf, and possibly others.  What files did you load to the server?  Do you have a URL you can share?

  • Help! Need help with preflight package script

    I am trying to write a package with Iceberg to push Office 2004 to 250 Macs. I need a preflight script with a condition that will stop my script if /Applications/Microsoft Office 2004 exists OR if OFFICE 2004 exists. Don't know if searching on the folder name is the best or if there is better way
    If it doesn't exist I want it to continue with with placing Office 2004 in the /Applications folder.
    I don't know how to do conditions (If, then, end)
    PREFLIGHT SCRIPT
    IF /Applications/Microsoft Office 2004 folder exist = STOP
    IF /Applications/Microsoft Office 2004 folder doesn't exist continue with laying down files/folder in the package.
    LAYDOWN FILES
    LAY DOWN FILES IN ICEBERG FILE SECTION OF THE PACKAGE
    POSTFLIGHT SCRIPT
    #!/bin/sh
    #Change to root directory
    cd /
    # Move Microsoft Office X folder to Messages Received folder
    mv /Applications/Microsoft\ Office\ X /Messages\ Received
    #Open Office 2004 Installer
    open /Applications/Utilities/Installers/Office2004Installer
    ALL Mac OS X (10.4.6)
    ALL Mac OS X (10.4.6)
    ALL   Mac OS X (10.4.6)  

    A simple condition (not using iceberg) would be:
    #!/bin/sh
    if [ -e "/Applications/Microsoft Office 2004.app" ]
    then
    echo "Microsoft Office 2004 exists, aborting installation"
    exit 1
    fi
    open -a "/Applications/Utilities/Installers/Office2004Installer"
    If Microsoft Office 2004 is installed then the script will exit with a message. If Microsoft Office 2004 is not there then the last line will be executed and the installer will open.
    PowerBook G4   Mac OS X (10.4.8)   MacBook Pro

  • Need Help With Jar Packages

    Can somebody please help me find the jar files for the following packages?  I'm new to both Crystal Reports as well as Java so please forgive me if I'm asking for the obvious   
    com.crystaldecisions.report.web.viewer.*
    com.crystaldecisions.sdk.occa.report.application.*
    com.crystaldecisions.report.reportengineinterface.*
    Thanks,
    V

    Thanks, that did the trick!
    Edited by: vinnyd on Jun 10, 2010 7:21 PM

  • I need help with DBMS_OUTPUT.PUT_LINE

    I am a student new to PL/SQL.  I am using SQL developer 3.2.20.9.  For several weeks DBMS_OUTPUT.PUT_LINE worked fine.  Now I cannot see it.  I have tried adding DBMS_OUTPUT.enabled(1000000); to my code to no avail.  When it did work the window was on my desktop, not locked to the bottom of the PL/SQL page.  I may have hit the x to close it, now I cannot get it back.  Yes, I selected "view" "DBMS Output".  I have had this problem for over a week.  Can someone help me?
    Tom

    user10199456 wrote:
    I am a student new to PL/SQL.  I am using SQL developer 3.2.20.9.  For several weeks DBMS_OUTPUT.PUT_LINE worked fine.  Now I cannot see it.  I have tried adding DBMS_OUTPUT.enabled(1000000); to my code to no avail.  When it did work the window was on my desktop, not locked to the bottom of the PL/SQL page.  I may have hit the x to close it, now I cannot get it back.  Yes, I selected "view" "DBMS Output".  I have had this problem for over a week.  Can someone help me?
    Tom
    Then as new student - DO NOT USE DBMS_OUTPUT!!
    It is the WRONG interface to use to display server data on a client. It does not write to a client display. The majority of times it is abused, as there is a misunderstanding of what it is and how it works.
    See Re: Can't get DECLARE/BEGIN to compile
    You are GROSSLY mistaken if you think that DBMS_OUTPUT plays any role in getting server data to render on the client.

  • Oracle 10gr2 XE. - Custom Install - Need Help Install Apex Package

    Hello Experts,
    I built a CUSTOM install script for Orage 10gR2 XE with a different dbname. dbblock, ...
    After a lot of issues (seed db, tns errors, no autostart db, ...) and solved by posts found here,
    The new database is mounted and working in console mode and Ole DB/Odbc.
    In the custom script, here are the two Data Dictionnaries packages I've used :
    -- Create Datas Dictionaries
    @%ORACLE_HOME%\rdbms\admin\catalog.sql ;
    @%ORACLE_HOME%\rdbms\admin\catproc.sql ;
    I'm looking for the package name to install for using Apex (http://locahost:8080/apex) like initial instance XE.
    I've tried installing package DBMSXDB.sql (connect / as SYDBA) ... but getting lot of errors
    Thanks for help,
    AlxK

    kfakfa wrote:
    Hello Experts,
    I built a CUSTOM install script for Orage 10gR2 XE with a different dbname. dbblock, ...Not a very smart thing to do. XE software supposedly has the SID hard-coded and your action may result in some incorrect operation of the code.
    >
    After a lot of issues (seed db, tns errors, no autostart db, ...) and solved by posts found here,
    The new database is mounted and working in console mode and Ole DB/Odbc.Yes, that is possible. But at some time, it may not work correctly.
    >
    In the custom script, here are the two Data Dictionnaries packages I've used :
    -- Create Datas Dictionaries
    @%ORACLE_HOME%\rdbms\admin\catalog.sql ;
    @%ORACLE_HOME%\rdbms\admin\catproc.sql ;
    I'm looking for the package name to install for using Apex (http://locahost:8080/apex) like initial instance XE.
    I've tried installing package DBMSXDB.sql (connect / as SYDBA) ... but getting lot of errorsExpect errors and expect inconsistent operation after you get it installed.
    But the instructions for installing Apex are in the Apex home page. Go to http://otn.oracle.com and drill to the Apex home page by going to Products:Development Tools (left edge) and finding Application Express on that resulting page.
    If you are going to potentially violate your agreement or leave the system in an unreliable state, why not simply use the Enterprise Edition?

  • Need help testing a package.

    I recently adopted yed, and I have made an updated PKGBUILD for it (along with other minor changes). But when I build and run it, I get a blank dialog box (using openjdk6 and also tried jre). Can anyone test it? http://www.filedropper.com/yed-342-1srctar I didn't upload to the aur since I don't want people with a working older copy to lose the ability to use yed.

    It smells like a classpath problem. Post a sample of the code you are testing, the package statement in particular and the directory structure where the .class files are.

  • Need help on ssis package xml using query

    I have used this reference
    http://sqlblog.com/blogs/peter_debetta/archive/2006/07/13/Using-XML-Data-Type-Methods-to-query-SSIS-Packages.aspx
    I'm able to achieve packagename, taskname, tasktype,parentnodename,childnodename,level,currentnode,childnode,configurationtype.
    Problem - My Package consists of half a dozen sql task & data flow tasks in a single container. After execution of tasks in container, it will call package. Each data flow task consists of source & destination as well, which are not part of the below
    table. I also want to know which source & destination will fall under which tasktype?
    How do I establish under which taskType which TaskType will come? I want to know relationship between tasktype. How can I figure it out which task will come, under that what will be other task? From level field, I can only find at which level but not able
    to figure it out which tasktype. Is it possible can I get 1 and 1.1. and 1.1.1.1 and 2 and 2.1 and...under each object subobjects will be identified in this way.
    Note: I have entered only few rows.
    Microsoft.SqlServer.Dt.Tasks.Execute....=Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    Packagename
    Taskname
    TaskType
    ParentNodeName
    NodeName
    level
    CurrentNode
    ChildNode
    ConfigurationType
    test1
    Tax_m
    SSIS.Pckage.2
    Tax_m
    1
    some xml
    some xml
    test1
    Seq_Tax_m
    STOCK.SEQUENCE
    Tax_m
    Seq_Tax_m
    2
    some xml 
     some xml
    test1
    Ept_Tax_m
    SSIS.ExecutePackageTask2
    Tax_m
    Ept_Tax_m
    2
     some xml
    test1
    Sql_valid_key_Tax_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_valid_key_Tax_m
    3
     some xml
    test1
    Sql_Dst_Del_Tax_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_Dst_Del_Tax_m
    3
     some xml
    test1
    Dft_Tax_M
    SSIS.Pipeline.2
    Seq_Tax_m
    Dft_Tax_M
    3
     some xml
    test1
    Sql_valid_key_TL_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_valid_key_TL_m
    3
     some xml
    test1
    Sql_Dst_Del_TL_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_Dst_Del_TL_m
    3
     some xml
    test1
    Sql_valid_key_TM_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_valid_key_TM_m
    3
     some xml
    test1
    Sql_valid_key_TC_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_valid_key_TC_m
    3
     some xml
    test1
    Sql_Dst_Del_TM_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_Dst_Del_TM_m
    3
     some xml
    test1
    Dft_TL_M
    SSIS.Pipeline.2
    Seq_Tax_m
    Dft_TL_M
    3
     some xml

    I am moving it to SSIS.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • 1.4 bug? or bad code?  please I need help

    FTPClient.getFile(inputStream out,String filename) works fine if inputStream is directed to an output file. I added a Thread to read inputStream using piped i/o and works fine but the thread never ends. Seems like readLine() does not return null. Please I need help.
    note: FTP package located finj.sourceforge.net
    import java.io.*;
    import org.finj.FTPClient;
    public class FTPSimpleDemo extends Object {
    public FTPSimpleDemo ( String server,
    String user,
    char[] password ) throws Exception {
    PipedOutputStream pipeOut = null;
    PipedInputStream pipeIn = null;
    Thread reader = null;
    FTPClient client =
    new FTPClient(server,user,password);
    //download file
    try {
    pipeOut = new PipedOutputStream();
    pipeIn = new PipedInputStream(pipeOut);
    reader = new PipeIn(pipeIn);
    reader.start();
    client.getFile(pipeOut, "J_Event.txt");
    while(reader.isAlive() ||
    !reader.isInterrupted));
    pipeOut.close();
    pipeIn.close();
    client.close();
    }catch(IOException e){e.getMessage();}
    finally {reader=null;}
    public static void main ( String[] args ) throws Exception {
    new FTPSimpleDemo(args[0], args[1],
    args[2].toCharArray());}
    class PipeIn extends Thread {
    private InputStream in;
    private String str;
    public PipeIn(InputStream in) {this.in = in;}
    public void run() {
    try {
    BufferedReader br = new BufferedReader(
    new InputStreamReader(in));
    while ((str=br.readLine()) != null)
    System.out.println(str);
    br.close();
    }catch (IOException e) {
    System.err.println(e.getMessage());}
    }

    Heres a tip: forget that open source library unless you need to customize it or something. Use the ftp library that comes wih the JDK. It is in an unsupported package (sun.net.ftp) check it out it couldn't be simpler:
    //you need this import statement
    import sun.net.ftp.*;
    //here is example code
    String server = "ftp.fileplanet.com";
    String user = "me";
    String passwd = "1234";
    FtpClient client = new FtpClient();
    client.openServer(server);
    client.login(user, passwd);
    client.binary();
    client.cd("games");
    //DO NOT CLOSE THIS INPUTSTREAM UNTIL YOU WANT TO CLOSE YOUR CONNECTION
    TelnetInputStream in = client.get("pacman.exe");
    //now do whatever u want with this inputstream
    byte[] bytes = new byte[4096];
    int x = 0;
    while((x = in.read(bytes)) != -1)
      out.write(bytes, 0, x);
      _totalBytes += x;
    out.flush();
    out.close();Also another tip for you to write code in the forum put your code between the [ code ] [ code ] tags

  • I need help to run this package and i got some error

    create or replace
    PACKAGE BODY SUBS_INS_API_sun
    AS
    PROCEDURE SUBSCRIBER_INS_sun
        (SOURCE_SYS_ID IN VARCHAR2,
        TRACKING_ID IN VARCHAR2,
        ACCOUNT_NO IN VARCHAR2,
        prepaidActDevDetails_tab IN prepaidactdvcdetailsobj_sun,
        ERROR_CODE OUT VARCHAR2)
    IS
    Input_Parameter_Is_Null EXCEPTION;
    pragma exception_init(Input_Parameter_Is_Null,-2000);
    prepaidAccountDetails prepaidActDevDetails_tab:= prepaidActDevDetails_tab(NULL,NULL,NULL,NULL,NULL);
    STATUS VARCHAR2(1):='1';
    cust_no VARCHAR(10);
    m_mac_id VARCHAR2(20);
      subscriber_master_Rec subscriber_master%ROWTYPE                 :=NULL;
      flg NUMBER(1);
    BEGIN
       IF(Source_Sys_Id IS NULL OR Tracking_Id IS NULL OR ACCOUNT_NO IS NULL OR prepaidAccountDetails.LAST=0) THEN
        RAISE Input_Parameter_Is_Null;
      END IF;
      BEGIN
             select cm_cust_no into cust_no from customer_master where cm_cust_id=ACCOUNT_NO and cm_status in('A','P','0');
          EXCEPTION
          WHEN NO_DATA_FOUND THEN
            DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
                   STATUS:='0';
        END;
      BEGIN
         FOR i IN prepaidAccountDetails.FIRST .. (prepaidAccountDetails.LAST) LOOP
         prepaidAccountDetails1:=prepaidActDevDetails_tab(i);
         prepaidAccountDetails1.Status_of_device:='1';
         IF (prepaidAccountDetails.Account_id is NULL OR prepaidAccountDetails.Mac_Id is NULL or prepaidAccountDetails.LOB_value is NULL) THEN
          RAISE Input_Parameter_Is_Null;
                END IF;
                IF(prepaidAccountDetails.LOB_value = 'VDO') THEN
                 IF(prepaidAccountDetails.Channel_Line_Up is NULL) THEN
                  Error_code :='SI002';
                 DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
                 STATUS:=0;
                  prepaidAccountDetails.Status_of_device:='0';
                 END IF;
                END IF;
                begin
                   select 1 into flg from subscriber_master where pm_phone_no=prepaidAccountDetails.Mac_Id and pm_status in('P','0','A','B');
                EXCEPTION
                 WHEN NO_DATA_FOUND THEN
                  flg:=0;
                 END;
                 if(flg=1) then
                  DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
                  STATUS:=0;
                  prepaidAccountDetails.Status_of_device:='0';
                 END IF;
                 begin
                  select md_mac_id into m_mac_id from mac_details where md_mac_id=prepaidAccountDetails.Mac_Id and md_start_date<=sysdate
                  and md_status='A';
                EXCEPTION when OTHERS then
                  Error_code :='SI004';
                 DBMS_OUTPUT.PUT_LINE('NO DATA FOUND');
                  STATUS:=0;
                  prepaidAccountDetails.Status_of_device:='0';
                 end;
              if(STATUS= 1 and prepaidAccountDetails.Status_of_device='1') then
               SELECT PM_SUBS_ACT_NO_SEQ.nextval
               INTO subscriber_master_rec.PM_SUBS_ACT_NO
               FROM dual;
              subscriber_master_Rec.pm_phone_no          :=prepaidAccountDetails.Mac_Id;
            subscriber_master_Rec.pm_open_date         :=sysdate;
              subscriber_master_rec.pm_status            :='P';
              subscriber_master_rec.PM_CUST_LVL_YN:='S';
             subscriber_master_rec.PM_EQUP_CODE:=prepaidAccountDetails.LOB_value;
             subscriber_master_rec.PM_HOME_AREA:='HOM';
             subscriber_master_rec.PM_USG_CODE:='USG';
             subscriber_master_rec.PM_NO_TYPE:='S';
             subscriber_master_rec.PM_TCG_CODE:='DEF';
             subscriber_master_rec.PM_APLN_DATE:=sysdate;
              subscriber_master_rec.PM_USER2:=prepaidAccountDetails.LOB_value;
              subscriber_master_rec.PM_USER3:=prepaidAccountDetails.Channel_Line_Up;
              subscriber_master_rec.pm_cust_no:=cust_no;
              INSERT INTO subscriber_master VALUES subscriber_master_rec;
            END IF;
         END LOOP;
        END;
      END SUBSCRIBER_INS_sun;
    END SUBS_INS_API_sun;
    and
    i got this error
    Package Body PREPAID_TESTNEW.SUBS_INS_API@PREPAID_TESTNEW
    Error(73,4): PL/SQL: Statement ignored
    Error(73,99): PLS-00302: component 'LAST' must be declared
    Error(87,6): PL/SQL: Statement ignored
    Error(87,37): PLS-00302: component 'FIRST' must be declared
    please help to run this package if anyone knows

    now i corrected my package. It working fine. But, how to run this package via procedure. my procedure check below. I give all the details about my package check below.
    ---pkg specification
    create or replace
    PACKAGE SUBS_INS_API_SS
    IS
    PROCEDURE SUBSCRIBER_INS_SS
        (SOURCE_SYS_ID IN VARCHAR2,
        TRACKING_ID   IN VARCHAR2,
        ACCOUNT_NO IN VARCHAR2,
        prepaidActDevDetails_tab IN prepaidActDeviceDetails_tabobj,
        ERROR_CODE OUT VARCHAR2);
    END SUBS_INS_API_SS;
    -----pkg body
    create or replace
    PACKAGE BODY SUBS_INS_API_SS
    AS
       PROCEDURE log_error (ip_code          IN VARCHAR2,
                            ip_message       IN VARCHAR2,
                            ip_description   IN VARCHAR2)
       IS
       BEGIN
          INSERT INTO ERR_LOG (IEL_REF_ID,
                               IEL_DATE,
                               IEL_CODE,
                               IEL_MSG,
                               IEL_DESC)
               VALUES (IVRS_ERR_LOG_SEQ.NEXTVAL,
                       SYSDATE,
                       ip_code,
                       ip_message,
                       ip_description);
       EXCEPTION
          WHEN OTHERS
          THEN
             ROLLBACK;
       END log_error;
       PROCEDURE INSERT_WS_LOG (SOURCE_SYS_ID   IN VARCHAR2,
                                STATUS          IN VARCHAR2,
                                TRACKING_ID     IN VARCHAR2,
                                ACCOUNT_ID      IN VARCHAR2,
                                MAC_ID          IN VARCHAR2)
       IS
          ws_log_rec   WS_LOG%ROWTYPE := NULL;
       BEGIN
          SELECT WS_LOG#REC#ID.NEXTVAL INTO ws_log_rec.rec#id FROM DUAL;
          ws_log_rec.VER#ID := 1;
          ws_log_rec.CRE#TS := SYSDATE;
          ws_log_rec.wl_source := SOURCE_SYS_ID;
          ws_log_rec.wl_status := Status;
          ws_log_rec.wl_tracking_id := tracking_id;
          ws_log_rec.wl_account_id := account_id;
          ws_log_rec.wl_mac_id := mac_id;
          INSERT INTO ws_log
               VALUES ws_log_rec;
       EXCEPTION
          WHEN OTHERS
          THEN
             ROLLBACK;
       END INSERT_WS_LOG;
        PROCEDURE REPLICO_DEV_INFO( Acc_id IN VARCHAR2, Mc_Id IN VARCHAR2,channel IN VARCHAR2,
                                     LOB_VAL IN VARCHAR2, outlet1 IN VARCHAR2, kit_cod IN VARCHAR2,
                                     serial_No IN VARCHAR2, shipperr IN VARCHAR2, estm_recived_date IN date)                                                                
        IS
                  Replico_device_info_det_Rec   Replico_device_info_det%ROWTYPE := NULL;
                  REC_ID  NUMBER;
        BEGIN
                  SELECT REPLICO_DEVICE_INFO_DET#RECID.nextval INTO REC_ID FROM dual; 
                   Replico_device_info_det_Rec.REC#ID := REC_ID;                 
                   Replico_device_info_det_Rec.ACCOUNT_ID := Acc_id;
                   Replico_device_info_det_Rec.MAC_ID := Mc_Id;               
                   Replico_device_info_det_Rec.CHANNEL_LINE_UP := channel;
                   Replico_device_info_det_Rec.LOB_VALUE := LOB_VAL;  
                   Replico_device_info_det_Rec.OUTLET := outlet1;
                   Replico_device_info_det_Rec.KIT_CODE := kit_cod;                
                   Replico_device_info_det_Rec.SERIAL_NUMBER := serial_No;                
                   Replico_device_info_det_Rec.SHIPPER := shipperr;                
                   Replico_device_info_det_Rec.ESTIMATED_RECIVED_DATE := estm_recived_date;
                  INSERT INTO replico_device_info_det
                        VALUES Replico_device_info_det_Rec;
                  EXCEPTION
                          WHEN OTHERS
                          THEN
                              ROLLBACK;
        END REPLICO_DEV_INFO;
       PROCEDURE SUBSCRIBER_INS_SS (
          SOURCE_SYS_ID              IN     VARCHAR2,
          TRACKING_ID                IN     VARCHAR2,
          ACCOUNT_NO                 IN     VARCHAR2,
          prepaidActDevDetails_tab   IN     prepaidActDeviceDetails_tabobj,
          ERROR_CODE                    OUT VARCHAR2)
       IS
          Input_Parameter_Is_Null       EXCEPTION;
          PRAGMA EXCEPTION_INIT (Input_Parameter_Is_Null, -2000);
          prepaidAccountDetails         prepaid_act_dvc_details_obj
                                           := prepaid_act_dvc_details_obj  (NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL,
                                                                              NULL);
          STATUS                        VARCHAR2 (1) := '1';
          cust_no                       VARCHAR (10);
          m_mac_id                      VARCHAR2 (20);
          channel_lineup                VARCHAR2 (25);
          LOB_VALUE                     VARCHAR2 (25);
          subscriber_master_Rec         subscriber_master%ROWTYPE := NULL;
        Replico_device_info_det_Rec   Replico_device_info_det%ROWTYPE := NULL;
          flg                           NUMBER (1);
          plan_code                     VARCHAR2(10);
          subs_aact_no                 NUMBER(20);
          m_plan_code1               payment_transaction_history.TH_PLAN_CODE%type;
          m_payment_mode1           payment_transaction_history.TH_PAYMENT_MODE%type;
          pm_phone_no_cur        subscriber_master.pm_phone_no%type;
          pm_status_cur          subscriber_master.pm_status%type;
          pm_user2_cur          subscriber_master.pm_user2%type;
          pm_user9_cur        subscriber_master.pm_user9%type;
          pm_cust_no_cur       subscriber_master.pm_cust_no%type;
          pm_cust_1            subscriber_master.pm_cust_no%type;
          cm_i                 customer_master.cm_status%type;
         CURSOR subs_rec is select pm_cust_no, pm_phone_no, pm_status, pm_user2, pm_user9 from subscriber_master
         where pm_cust_no = cust_no and pm_status= 'S';
       BEGIN
          IF (   Source_Sys_Id IS NULL
              OR Tracking_Id IS NULL
              OR ACCOUNT_NO IS NULL
              OR prepaidActDevDetails_tab.LAST = 0)
          THEN
             RAISE Input_Parameter_Is_Null;
          END IF;
          BEGIN
             SELECT cm_cust_no
               INTO cust_no
               FROM customer_master
              WHERE cm_cust_id = ACCOUNT_NO AND cm_status IN ('A', 'P', '0');
          EXCEPTION
             WHEN NO_DATA_FOUND
             THEN
                ERROR_CODE := 'SI001';
                log_error ('SI001',
                           SQLERRM,
                           'No Customer exist with Active or Pre Actiavted');
                INSERT_WS_LOG (Source_Sys_Id,
                               'F',
                               Tracking_Id,
                               Account_No,
                               prepaidAccountDetails.Mac_Id);
                STATUS := '0';
          END;
          BEGIN
             FOR i IN prepaidActDevDetails_tab.FIRST ..
                      (prepaidActDevDetails_tab.LAST)
             LOOP
                prepaidAccountDetails := prepaidActDevDetails_tab (i);
                prepaidAccountDetails.Status_of_device := '1';
                IF (   prepaidAccountDetails.Account_id IS NULL
                    OR prepaidAccountDetails.Mac_Id IS NULL
                    OR prepaidAccountDetails.LOB_value IS NULL)
                THEN
                   RAISE Input_Parameter_Is_Null;
                END IF;
                IF (prepaidAccountDetails.LOB_value = 'VIDEO')
                THEN
                   /* Commented as channel lineup is not coming from the input request */
                   /*IF(prepaidAccountDetails.Channel_Line_Up is NULL) THEN
                    Error_code :='SI002';
                   log_error ('SI002', SQLERRM, 'Channel line up is mandatory for Video');
                   INSERT_WS_LOG(Source_Sys_Id,'F',Tracking_Id,Account_No,prepaidAccountDetails.Mac_Id);
                   STATUS:=0;
                    prepaidAccountDetails.Status_of_device:='0';
                   END IF;*/
                   SELECT EC_CHANNEL_LINEUP
                     INTO channel_lineup
                     FROM ELIGIBLE_CUSTOMER
                    WHERE EC_CUSTOMER_NO = cust_no;
                END IF;
                BEGIN
                   SELECT 1
                     INTO flg
                     FROM subscriber_master
                    WHERE     pm_phone_no = prepaidAccountDetails.Mac_Id
                          AND pm_status IN ('P', '0', 'A', 'B');
                EXCEPTION
                   WHEN NO_DATA_FOUND
                   THEN
                      flg := 0;
                END;
                IF (flg = 1)
                THEN
                   ERROR_CODE := 'SI003';
                   log_error ('SI003',
                              SQLERRM,
                              'Customer Already Exist with given Mac Id');
                   INSERT_WS_LOG (Source_Sys_Id,
                                  'F',
                                  Tracking_Id,
                                  Account_No,
                                  prepaidAccountDetails.Mac_Id);
                   STATUS := 0;
                   prepaidAccountDetails.Status_of_device := '0';
                END IF;
                BEGIN
                   SELECT md_mac_id
                     INTO m_mac_id
                     FROM mac_details
                    WHERE     md_mac_id = prepaidAccountDetails.Mac_Id
                          AND md_start_date <= SYSDATE
                          AND md_status = 'A';
                EXCEPTION
                   WHEN OTHERS
                   THEN
                      ERROR_CODE := 'SI004';
                      log_error ('SI004', SQLERRM, 'Invalid Mac Id');
                      INSERT_WS_LOG (Source_Sys_Id,
                                     'F',
                                     Tracking_Id,
                                     Account_No,
                                     prepaidAccountDetails.Mac_Id);
                      STATUS := 0;
                      prepaidAccountDetails.Status_of_device := '0';
                END;
                 select pm_cust_no into pm_cust_1 from subscriber_master where pm_cust_no = cust_no;
                IF (STATUS = 1 AND prepaidAccountDetails.Status_of_device = '1')
                THEN
                     SELECT DECODE (prepaidAccountDetails.LOB_value,
                                  'HSD', 'HSD',
                                  'VIDEO', 'VDO')
                     INTO LOB_VALUE
                     FROM DUAL;
            OPEN subs_rec;
            LOOP
            FETCH subs_rec into pm_cust_no_cur, pm_phone_no_cur, pm_status_cur, pm_user2_cur, pm_user9_cur;
              IF subs_rec%FOUND THEN
                 IF
                  ( pm_cust_1 = pm_cust_no_cur and pm_user2_cur= LOB_VALUE and pm_user9_cur = prepaidAccountDetails.outlet and pm_status_cur = 'S')
                    THEN
                        update subscriber_master set pm_phone_no = prepaidAccountDetails.Mac_Id, pm_status = 'P', pm_name = prepaidAccountDetails.Mac_Id
                        where pm_cust_no = pm_cust_no_cur and pm_user9 = prepaidAccountDetails.outlet;
                         select cm_status into cm_i from customer_master where cm_cust_no = pm_cust_no_cur;
                            IF( cm_i = '0')
                            THEN
                                update customer_master set cm_status = 'P' where cm_cust_no = pm_cust_no_cur;
                             END IF;
                             REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
                                               prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
                                               prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
                    ELSIF
                        ( pm_cust_1 = pm_cust_no_cur and pm_user2_cur= LOB_VALUE and pm_user9_cur = null and pm_status_cur = 'S')
                          THEN
                             update subscriber_master set pm_phone_no = prepaidAccountDetails.Mac_Id, pm_status = 'P', pm_name = prepaidAccountDetails.Mac_Id, pm_user9 = prepaidAccountDetails.outlet
                             where pm_cust_no = pm_cust_no_cur and pm_user9 = NULL;
                             update customer_master set cm_status = 'P' where cm_cust_no = pm_cust_no_cur;
                             REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
                                               prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
                                               prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
                    END IF;
                 ELSIF subs_rec%NOTFOUND THEN
                       SELECT PM_SUBS_ACT_NO_SEQ.NEXTVAL
                       INTO subs_aact_no
                       FROM DUAL;
                       subscriber_master_rec.PM_SUBS_ACT_NO := subs_aact_no;
                       subscriber_master_Rec.pm_phone_no :=
                        prepaidAccountDetails.Mac_Id;
                       subscriber_master_Rec.pm_open_date := SYSDATE;
                       subscriber_master_rec.pm_status := 'P';
                       subscriber_master_rec.PM_CUST_LVL_YN := 'S';
                       subscriber_master_rec.PM_EQUP_CODE := LOB_VALUE;
                       subscriber_master_rec.PM_HOME_AREA := 'HOM';
                       subscriber_master_rec.PM_USG_CODE := 'USG';
                       subscriber_master_rec.PM_NO_TYPE := 'S';
                       subscriber_master_rec.PM_TCG_CODE := 'DEF';
                       subscriber_master_rec.PM_APLN_DATE := SYSDATE;
                       subscriber_master_Rec.PM_NAME := prepaidAccountDetails.Mac_Id;
                       subscriber_master_Rec.PM_STAFF_id := '16';
                       subscriber_master_rec.PM_USER2 := LOB_VALUE;
                       subscriber_master_rec.PM_USER3 := channel_lineup;
                       subscriber_master_rec.pm_cust_no := cust_no;
                       subscriber_master_rec.PM_USER8 := 'Y';
                       INSERT INTO subscriber_master
                       VALUES subscriber_master_rec;
                       REPLICO_DEV_INFO( prepaidAccountDetails.Account_id, prepaidAccountDetails.Mac_Id,channel_lineup,
                                         prepaidAccountDetails.LOB_value, prepaidAccountDetails.outlet, prepaidAccountDetails.kit_code,
                                         prepaidAccountDetails.serial_Number, prepaidAccountDetails.shipper,prepaidAccountDetails.estimated_recived_date);
             END IF;
             END LOOP;
             CLOSE subs_rec;
                  SELECT TH_PLAN_CODE,TH_PAYMENT_MODE
                   INTO m_plan_code1,m_payment_mode1
                   FROM PAYMENT_TRANSACTION_HISTORY
                   WHERE TH_CUSTOMER_NO = cust_no
                   AND TH_LOB = LOB_VALUE
                   AND TH_SUBSCRIBER_NO IS NULL;
                   IF(LOB_VALUE = 'HSD') THEN
                    IF(m_plan_code1 = 'SIKI') THEN
                          plan_code := 'SIKI';
                                             ELSE
                      plan_code := 'KIT';
                    END IF;
                   ELSE
                    IF(m_plan_code1 = 'SIKT') THEN
                             plan_code := 'SIKT';
                    ELSE
                          plan_code := 'TV';
                    END IF;
                   END IF;               
                          UPDATE PAYMENT_TRANSACTION_HISTORY SET TH_SUBSCRIBER_NO = subs_aact_no, th_writeback_status = 'Y' WHERE TH_CUSTOMER_NO = cust_no AND TH_PLAN_CODE = plan_code;
                          COMMIT;
                END IF;
             END LOOP;
          END;
       END SUBSCRIBER_INS_SS;
    END SUBS_INS_API_SS;
    --- type object
    create or replace
    TYPE   prepaid_act_dvc_details_obj--prepaidAccountDeviceDetailsObj
    AS     OBJECT ( Account_id VARCHAR2 ( 25 )
           , Mac_Id VARCHAR2 ( 25 )
           , Channel_Line_Up VARCHAR2 ( 25 )
           , LOB_value VARCHAR2 ( 25 )
           , Status_of_device VARCHAR2 ( 25 )
            , outlet VARCHAR2(25)
            , kit_code VARCHAR2(25)
            , serial_Number VARCHAR2(25)
            , shipper VARCHAR2(25)
            , estimated_recived_date date )
    type---
    create or replace
    TYPE prepaidActDeviceDetails_tabobj as table of prepaid_act_dvc_details_obj
    ---- i need to run this package via separate procedure. but i don't know how to pass the variable. because the passing argument contain object tab variable. please help me.. give me suggestion or procedure to run this pkg.

Maybe you are looking for