Aging Policy Output From Stored

Hello,
I am currently making some changes to our SPAM cleanup policy. After the changes have been done and have done stop-msg, start-msg, I decided to test out of things looks right. I am running "stored -c -n -v" and looking at some of the output, it looks like more than just SPAM/Trash/Deleted folders are getting processed. Is this normal output? What I am seeing is a NOTICE that stored is
"processing mailbox 'user/joeuser/INBOX'" when I thought I would only see folder names that I have specified in the expirerule settings. Here's what I have for the SPAM folders - policies for Trash/Deleted are similar:
store.expirerule.purgespam.exclusive = false
store.expirerule.purgespam.folderpattern = user/*/SPAM
store.expirerule.purgespam.foldersizebytes = 524288
store.expirerule.purgespam.messagecount = 50
store.expirerule.purgespam.messagedays = 1
store.expirerule.purgespam.messagesize = 262144
store.expirerule.purgespam.messagesizedays = 1
Your help and comments will be appreciated.
Keith

Hi Keith,
As usual please supply version information (./imsimta version) -- expire/aging support has changed lots during the various versions/hotfixes etc.
I am currently making some changes to our SPAM
cleanup policy. After the changes have been done and
have done stop-msg, start-msg, I decided to test out
of things looks right. I am running "stored -c -n -v"
and looking at some of the output, it looks like more
than just SPAM/Trash/Deleted folders are getting
processed. Is this normal output? Why are you using "-c" as well ?
This is a very specific operation to erase expunged messages, which is different to testing expiration rules.
A better test-run command is:
./stored -n -vv
What I am seeing is
a NOTICE that stored is
"processing mailbox 'user/joeuser/INBOX'" when I
thought I would only see folder names that I have
specified in the expirerule settings. The stored expire run will process all folders for a match to the folderpattern and as part of the cleanup-cycle (checking for store.exp). If this pattern doesn't match or if the mailbox is empty (no store.idx) then it will not action the expire rule(s).
Regards,
Shane.

Similar Messages

  • Get server output from pl/sql stored procedure

    Hi Colleagues,
    I would like to get and watch the server output of my PL/SQL stored procedure
    when I run my java program and call it from. The Stored proc. uses "dbms_output.put_line".
    If it is clearly and possible (or not), will you send me your answer!
    Thanks a lot
    Ulve

    Hi,
    You can redirect the standard output to the console (i.e., the SQL output) using the
    DBMS_JAVA.SET_OUTPUT() method.
    SQL> SET SERVEROUTPUT ON
    SQL> call dbms_java.set_output (5000);But, the output is only printed when the stored procedure exits, and this setting works only for one call (i.e., the SQL call that immediately follows the invocation of DBMS_JAVA.SET_OUTPUT()). The minumum and default value is 2,000 characters and the maximum is 1,000,000 (1 million) characters. Notice the “SET SERVEROUTPUT ON” which enables displaying the outputs of stored procedures (Java or PL/SQL blocks) in SQL*Plus.
    Kuassi http://db360.blogspot.com

  • Transactional file output from a Java Stored Procedure invoked by trigger.

    I need to write information to a file from a Java Stored
    Procedure which is called from an insert trigger. This works OK
    except for the condition when a rollback is performed - the file
    is updated anyway.
    I need the Java Stored Procedure file output to be part of the
    transaction - performed on commit and skipped on rollback. Is
    there any way the Java Stored Procedure can be aware of the
    state of the transaction?

    i am Still facing the following problem:
    if i pass a parameter like :
    rm -f /test/menu.ksh
    then the required output is that the menu.ksh file gets deleted.
    but when i pass this command:
    ./test/menu.ksh
    It is supposed to execute the specified script but it does not.
    I have tried multiple things like giving chmod 777 rights to the following file and changing the command to /test/menu.ksh but nothing happens
    Can you kindly tell me what can the problem be. Is there any execution rights issue: i am executing these scripts from pl sql developer.
    You can find both the procedure and java method which is being called below
    ==========================================================================================
    create or replace procedure TEST_DISPLAY(filename in varchar2, result out varchar2, error out varchar2) is
    command varchar2(100);
    vRetChar varchar2(100);
    begin
    command := filename ;
    prc_host(command, vRetChar);
    result := vRetChar;
    dbms_output.put_line(result);
    Exception
    when No_Data_Found Then
    error := 'Command is not Found';
    dbms_output.put_line('Failure');
    return;
    end TEST_DISPLAY;
    ======================================================================
    create or replace and compile java source named host as
    import java.io.*;
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.IOException;
    import java.lang.InterruptedException;
    public class Host {
    public static void executeCommand(String command,String[] outString) {
    String RetVal;
    try {
    String[] finalCommand;
    final Process pr = Runtime.getRuntime().exec(command);
    // Capture output from STDERR...
    }

  • Design Question::Instantiating Object from Stored Procedure Output

    Hi All,
    I am confused with approaching this design issue. I called a Stored Procedure, and the output from the Stored Procedure is a REF CURSOR. The size of the REF CURSOR can be large.
    My Question is, is it a good idea to pass the values from the REF CURSOR to a class constructor, there by instantiating an object of that type. lets say
    //rset is of type ((OracleCallableStatement)callableStatement).getCursor(5);
    //rset is not ResultType
    while (rset.next()){
    new ClassXYZ(var1, var2, var3);
    /*var1, var2, var3 would be rset.getObject(1),rset.getObject(2),rset.getObject(3)
    Class XYZ does some business logic
    }Other things:
    1) Will the JVM hold up assuming good enough JVM mem size, while creating objects for the range 100 thousands?
    2) I do not know the cursor size. It can change randomly from business perspective. And, it would be in the range of 100 thousands
    I was thinking, If I can "police" the call to the Class XYZ in case of large data. May be I am totally off the best solution. Any light on the best way to approach will be great.
    Anyhow, this would be a standalone java application. Just in case if people are trying to suggest/recommend DAO etc.,
    Thank you,
    VJ

    You can use ConvertTo-Html:
    http://ss64.com/ps/convertto-html.html
    Here's an example:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/5cb016d3-e2fb-43e7-9c01-10b6878056e4/formattable-lost-in-email
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Reading the output from a object running in the local machine.

    Reading the output from a object running in the local machine.
    By using a signed applet i am lunching a small application that returns an image object, how to read that without storing it in the hard disk.
    Which means i need to read the image object return by the local application using applet or jsp .
    i am using tomacat and an html page with an applet with it to lunch the application.

    You can write that image in a binary format using OutputStream for System.out and then read it in your applet.

  • Aging Policy Problem

    Dear All
    I am facing problem with the aging policy in iplanet messaging server.My aging policy is not working
    Please find the below information for your reference
    1) bash-2.03# ./imsimta version
    iPlanet Messaging Server 5.2 Patch 1 (built Aug 19 2002)
    libimta.so 5.2 Patch 1 (built 23:25:07, Aug 19 2002)
    2)configutil Output
    store.expirerule.19042k7i.createtimestamp = 20070419051559Z
    store.expirerule.19042k7i.creatorsname = "cn=msg-mymessaging,cn=iplanet messaging suite,cn=server group,cn=mymessaging.mydomain.com,ou=mydomain.com,o=netscap
    eroot"
    store.expirerule.19042k7i.folderpattern = user/%@mydomain.com/*
    store.expirerule.19042k7i.messagedays = 90
    store.expirerule.19042k7i.modifiersname = "cn=msg-mymessaging,cn=iplanet messaging suite,cn=server group,cn=mymessaging.mydomain.com,ou=mydomain.com,o=netsca
    peroot"
    store.expirerule.19042k7i.modifytimestamp = 20070419051614Z
    store.expirerule.19042k7i.objectclass = nsmsgcfgexpirerule
    store.expirerule.createtimestamp = 20030427141705Z
    store.expirerule.creatorsname = "uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot"
    store.expirerule.modifiersname = "uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot"
    store.expirerule.modifytimestamp = 20030427141705Z
    store.expirerule.objectclass = nsmsgCfgContainer
    store.expirerule.santosh.createtimestamp = 20090317095139Z
    store.expirerule.santosh.creatorsname = "cn=msg-mymessaging,cn=iplanet messaging suite,cn=server group,cn=mymessaging.mydomain.com,ou=mydomain.com,o=netscape
    root"
    store.expirerule.santosh.folderpattern = user/[email protected]/*
    store.expirerule.santosh.messagecount = 5
    store.expirerule.santosh.messagedays = 1
    store.expirerule.santosh.modifiersname = "cn=msg-mymessaging,cn=iplanet messaging suite,cn=server group,cn=mymessaging.mydomain.com,ou=mydomain.com,o=netscap
    eroot"
    store.expirerule.santosh.modifytimestamp = 20090317095315Z
    store.expirerule.santosh.objectclass = nsmsgcfgexpirerule
    store.expirestart = 1530
    Any one can help me ?

    Prashant_wagh wrote:
    1) bash-2.03# ./imsimta version
    iPlanet Messaging Server 5.2 Patch 1 (built Aug 19 2002)
    libimta.so 5.2 Patch 1 (built 23:25:07, Aug 19 2002)Seriously? I would say you should upgrade but I would be probably wasting my time.
    2)configutil Output
    store.expirerule.19042k7i.folderpattern = user/%@mydomain.com/*
    store.expirerule.19042k7i.messagedays = 90
    store.expirerule.santosh.folderpattern = user/[email protected]/*
    store.expirerule.santosh.messagecount = 5
    store.expirerule.santosh.messagedays = 1You have two overlapping rules. Only one rule can be applied to a folder. You could try setting:
    store.expirerule.santosh.exclusive = yeshttp://docs.sun.com/source/816-6009-10/store.htm
    Regards,
    Shane.

  • Aging policy

    how can i define aging policy on any cache group?
    my cache group consists of one table only.
    I've followed these steps:
    Command> call ttaginglruconfig (0.75,0.90,60);
    < .7500000, .9000000, 60 >
    1 row found.
    Command>
    Command>
    Command> call ttaginglruconfig();
    < .7500000, .9000000, 60 >
    1 row found.
    Command>
    Command> call ttagingschedulenow ('tblradiuscdr');
    2996: Cannot start aging on table without aging policy
    The command failed.

    Absolutely - time-based aging is covered in the Operations Guide under "Implementing aging in a cache group". Here's an example taken from the Create Cache Group section I mentioned before:
    Example 5.47
    Create a cache group with time-based aging. Specify AgeTimestamp as the column for aging. LIFETIME 2 hours, CYCLE 30 minutes. Aging state is not specified, so the default setting (ON) is used.
    CREATE READONLY CACHE GROUP AgingCacheGroup
    AUTOREFRESH
    MODE INCREMENTAL
    INTERVAL 5 MINUTES
    STATE PAUSED
    FROM
    CUSTOMER (CustomerId NUMBER NOT NULL,
    AgeTimestamp TIMESTAMP NOT NULL,
    PRIMARY KEY (CustomerId))
    AGING USE AgeTimestamp LIFETIME 2 HOURS CYCLE 30 MINUTES;
    Command> describe customer;
    Table USER.CUSTOMER:
    Columns:
    *CUSTOMERID                      NUMBER NOT NULL
    AGETIMESTAMP TIMESTAMP (6) NOT NULL
    AGING USE AgeTimestamp LIFETIME 2 HOURS CYCLE 30 MINUTES ON
    1 table found.
    (primary key columns are indicated with *)
    With regard to adding time-based aging to a production system, the following points may be salient:
    - For the time-based aging policy, you cannot add or modify the aging column. This is because you cannot add or modify a NOT NULL column.
    - The aging policy cannot be added, altered, or dropped for an autorefresh cache group while the cache agent is active. Stop the cache agent first.

  • Messages Deleted in Outlook do not get permanently deleted by aging policy

    Our message aging policy is setup to permanently delete messages asap. It works ok when a user does a delete from the phone but when the user deletes from MS Outlook, the messages linger forever.
    When checked from a phone, the Outlook deleted messages are in the old items folder and are labeled deleted messages. If these messages are then deleted via the phone, they do go away and the messages count in the CUC Edit>Mailbox>Mailbox Information does go to zero finally.
    Any ideas why the Aging policy doesn't work with Outlook? Is there a way to permanently delete the deleted items in the mailboxes of all users?
    Here is our default system policy which is used on all mailboxes:
    Enabled - checked
      Move new messages to the saved folder in 7 days - unchecked
      Move saved messages to the deleted folder in 14 days - checked
         Number of days alert is sent priot to moving saved messages - 3
      Permanently delete messages in the deleted folder in 1 day
         Send alert to user prior to deleting messages - unchecked
         Number of days alert is sent prior to deleting messages - 3
      Secure rules are both unchecked
    CUCM 8.5.1.12018-1
    CUC 8.6.1.10000-109

    Hi Bill,
    I just wanted to add this reference to the great tips from Jonathan (+5 "J-Man")
    I don't see your version in the "fixed-in" releases;
    CSCtr43597 - UC 8.5.1ES16.11900-16 Message Aging Does Not Work
    Description
    Symptom:UC 8.5 message aging policy set to purge deleted messages after one day and it does not purge messages.
    Conditions:The root cause is known:If the difference between the MessageModificationtime+DeleteAgingRuleNumDay and the SystemCurrentTime is more than 99 days, the exception" Overflow occurred on a datetime or interval operation" is thrown by Informix as part of SELECT query on VIEW vw_MessageAging.And the MessageAging procedure is aborted.
    Workaround:None
    Details
    1st Found-in:                          (1)
    8.5
    More
    Less
    Status:
    Fixed
    Last Modified:
    Feb 27,2012
    Known Affected Versions:
    More
    Less
    Fixed-in:                          (6)
    8.6(2.10000.30), 8.6(1.98000.53), 8.6(1.98000.126)8.6(1.64), 8.5(1.13031.1), 8.5(1)ES56
    More
    Less
    Product:
    Cisco Unity Connection
    Platform:
    Dependent
    Severity:
    3 - moderate
    Customer Reported:                          (17)
    Cheers!
    Rob

  • Dispalying output from a REF CURSOR

    Friends,
    I'm getting my self into indepth pl/sql and need some help from you to clear some basic concepts.
    create table MASTER_TABLE
    street_info varchar2(100),
    property_type varchar2(50) ------- i.e values here would be 'HOME_TABLE' ,'COM_PROP_TABLE' etc
    create table HOME_TABLE
    property_id char(5),
    prop_desc varchar2(100),
    cost varchar2(10),
    location varchar2(100)
    create table COM_PROP_TABLE
    property_id char(5),
    prop_desc varchar2(100),
    cost varchar2(10),
    location varchar2(100)
    I want to use a single procedure to open a weak REF CURSOR variable for the appropriate table based on the street address and display all information from that table.
    Here is what I want to to - execute a stored procedure which accepts 1 'in' paramter and 1 'in out ' parameter.
    IN paramter - accepts street address
    IN OUT paramter - depending on address , if it is related to 'Homes' , it should display all information from the HOME Table, else it will display information from the 'Commerical Property' table.
    create or replace package pack_address_info as
    type v_info_type ref cursor;
    end pack_address_info;
    create or replace procedure schema.sp_home_info(v_add in varchar2,v_show in out v_info_type)
    is
    home_type constant integer :=1;
    commercial_type constant integer :=2;
    cursor show_data_cur is
    select property_type from MASTER TABLE where street_info=v_add;
    var_cursor show_data_cur%rowtype;
    begin
    open show_data_cur;
    fetch show_data_cur into var_cursor;
    close show_data_cur;
    if var_cursor.property_type= HOME_TABLE
    then
    open v_show for
    select * from HOME_TABLE where location=v_add;
    elseif var_cursor.table_name = COM_PROP_TABLE
    then
    open v_show for
    select * from COM_PROP_TABLE where location=v_add;
    end if;
    end schema.sp_home_info;
    I can create the package and the stored proc ... but then ???? i'm stuck ;(
    Now , i don't know how to display the output from the HOME TABLE or the COM_PROP_TABLE depending on what the address is entered? Is this code correct. Can you please help me modify this code so that I can achieve my objective.
    This is an example from the book 'Oracle PL/SQL Programming, 4th Edition' under the 'CURSOR' section - 15.6
    Thanks for the help in advance.

    Here is one sample ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>
    satyaki>CREATE OR REPLACE PACKAGE aaa_sat     
      2  AS       
      3     TYPE crs IS REF CURSOR RETURN emp%ROWTYPE;        
      4     FUNCTION fc_retcur (e_no IN NUMBER)
      5     RETURN crs;
      6  END aaa_sat;
      7  /
    Package created.
    Elapsed: 00:00:01.03
    satyaki>
    satyaki>
    satyaki>CREATE OR REPLACE PACKAGE BODY aaa_sat     
      2  AS       
      3    FUNCTION fc_retcur (e_no IN NUMBER)
      4    RETURN crs       
      5    IS         
      6      l_crs   crs;       
      7    BEGIN         
      8      OPEN l_crs FOR
      9      SELECT * FROM emp           
    10      WHERE empno = e_no;          
    11     
    12      RETURN l_crs;       
    13    END;
    14  END aaa_sat;
    15  /
    Package body created.
    Elapsed: 00:00:00.18
    satyaki>
    satyaki>
    satyaki>DECLARE       
      2    l_emp_rec   emp%ROWTYPE;       
      3    l_crs       aaa_sat.crs;     
      4  BEGIN       
      5    l_crs := aaa_sat.fc_retcur (7782);        
      6    LOOP          
      7      FETCH l_crs           
      8      INTO l_emp_rec;           
      9        EXIT WHEN l_crs%NOTFOUND;          
    10          DBMS_OUTPUT.put_line (l_emp_rec.ename);     
    11    END LOOP;        
    12    CLOSE l_crs;    
    13  END;
    14  /
    CLARK
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.40
    satyaki>
    satyaki>Got Me?
    Regards.
    Satyaki De.

  • Calling DTS package from Stored Procedure

    I am getting error calling DTS package from CF.
    So i want to call DTS package from SQL Server Stored
    Procedure.
    DTS package create text file. So no need of input or output
    parameter.
    What is the syntax?.
    thanks for ur help.

    Ted Kruger explains how this can be done in his blog post
    Run SSIS Package from Stored Procedure
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog

  • Unity mail box aging policy

    I need to change the current Mail box aging policy for an existing system. If I reduce the current set up how does it effect existing "deleted" messages? Does it delete all existing ones or does it only delete new ones from the date of the change as with changes in Template/COS?
    Also I need to change the alarm threshold is there a best practice based upon the size of the hard drive- % wise ?
    thanks

    Hi -
    The default mailbox message aging policy is Enabled for Deleting voice messages automatically in the Deleted Items folder. "Permanently Delete Messages in the Deleted Items Folder in 15 Days"     
    So unless you have disabled this rule, voice messages are already getting deleted.  You may want to check here.
    When you enable the policy for a specific number of days, the timestamp of the message is used for calculating, based on
    how the user marked the message as new, resaved the message, deleted the message, or restored a deleted message as saved from the phone interface, called the "modification time".  So if you change it to 90 days, voice messages older than 90 days will be deleted the next time the scheduled task "Clean Deleted Messages" runs, which is every day, every 30 minutes.  From Cisco's Unity Connection 8.5 System Admin guide, "If you only need one set of message aging rules, you can change the specifications for the default message aging policy and assign that one policy to all users and all templates. If you need to allow some users to retain messages longer than other users, you can create additional policies and assign different policies to user templates and to individual users. If you want to send message aging alerts to some users and not to others, you can create additional policies that include aging alerts. (Message Aging Alerts are available only in Cisco Unity Connection 8.5 and later.)". You might have "privileged" users, i.e. Managers that you want to protect and configure a different policy for these users.
    Hope this helps!  Ginger

  • Unity Message Aging Policy

    All,
    is there anyway to customize the Message aging policy beyond the options that are present?  As an example any way to move a message from New Directly to Deleted Folder after 10 days but bypass the Move to Saved folder?
    Thanks,
    All replies rated.

    Hi Trevor,
    One nice way with Unity Connection is with the use of this excellent tool from the great suite of Unity Tools (use the ** reset" feature **).
    Unity Connection Bulk User Delete   
    For resetting users you have the option of emptying the mailbox,  resetting greetings, deleting voice names,  resetting passwords,  removing private lists and a number of other  options you may choose.   For installations where the user base “changes  over” frequently such as  schools this may be a nicer option.  This  option is also allowed for  CoRes installations since it does not involve  the removal of user  objects from the Connection database.
    http://www.ciscounitytools.com/Applications/CxN/BulkUserDelete/BulkUserDelete.html
    Cheers!
    Rob
    Please support CSC helps Kiva
    https://supportforums.cisco.com/blog/12122171/cisco-support-community-helps-kiva

  • Message aging policy

    Dear folks,
    I need to create message aging policy (based on the age of the message) and mbox aging policy( if there is no login /incoming message in n number of days).
    The users that are affected by these policies will be based on an private LDAP attribute. Is there a way that I can incoopperate this LDAP attribute value to setup the aging policy filter?
    Thanks,
    T Dang

    Dear Jay,
    mboxutil is your friend, here. I suggest writing something that calls mboxutil, and parses the output. These are not orphaned, unless they've been deprovisioned in ldap, not something you mentin.I can use "mboxutil -l" for the ZERO size case.
    But for the inactivity case, the comand "mboxutil -l" ==> list of mbox which include the time of last msg. For mail box without message, no date returned ... I guess that since your earlier post, you have indicated that there is no way to determine the time of the last login (activity)
    mbox -o -t n ==> I guess I won't be able to use this option, since this will output only orphan mail boxes.
    Thanks,
    T Dang
    Message was edited by:
    tindang

  • How to pass output from one selection-as input to another selectiion??

    From a user prompt will iniate many user table selections.   And  the outputs  of each table selection will be used as inputs for the next table selection
    I reviewed variable Scope and inner and outer Declare—it would be a great help if some one could give me a  example of the right approach??
    see sample script :
    Thank you so much for your help
    ---------------------------- Section_01_UserInput.sql -------------------------
    -- THIS SECTION OF THE SCRIPT IS TO PROMPT THE USER FOR THE MODEL NAME AND THE ORGANIZATION CODE (e.I...M1,M2,M3...._)
    -- THE ORGANIZATION WHERE MODEL WAS CREATED IS THE ONLY PLACE WHERE YOU WOULD FIND THE BILL_SEQUENCE_ID
    -- THE COMMON ORGANIZATIONS DO NOT HAVE COMPONETS THEY JUST REFERENCE TO THE ORHANIZATION THAT MODEL WAS CREATED
    SET VERIFY OFF
    SET ECHO OFF
    ACCEPT v_assemblyName CHAR DEFAULT myDefaultAssemblyName PROMPT 'Enter Assembly name:'
    ACCEPT v_OrganizationCode CHAR DEFAULT myDefaultOrganizationCode PROMPT 'Enter the Org where the MODEL WAS CREATED :'
    SELECT a.organization_code, a.organization_id, b.inventory_item_id, b.segment1, b.description
    FROM mtl_parameters a, mtl_system_items_b b
    WHERE a.organization_code = '&v_OrganizationCode'
    AND
    b.segment1 ='&v_assemblyName'
    AND
    b.organization_id = a.organization_id;
    SET VERIFY ON
    SET ECHO ON
    ----OUTPUT of the Section_01_UserInput.sql QUERY---
    ORGANIZATION_CODE ORGANIZATION_ID INVENTORY_ITEM_ID SEGMENT1 DESCRIPTION
    M1, 207, *[225957]* , CN927779, Sentinel Custom Desktop
    ----------------------------- Section_02_bom_structures_b.sql ------------------
    -- List all option class Bill of Materials for a single ATO or PTO model
    -- List of bill_sequence_id and all component_item_id's that belong to that
    -- bill_sequence_id
    SELECT a.assembly_item_id, a.bill_sequence_id, b.bom_item_type, b.component_item_id
    FROM bom_structures_b a, bom_components_b b
    WHERE a.assembly_item_id = *['225957']*
    AND
    b.bill_sequence_id = a.bill_sequence_id
    AND
    b.bom_item_type = '2'; -- OPTION Class's are identified by bom_item_type
    ----OUTPUT of the Section_02_bom_structures_b.sql  QUERY---
    ASSEMBLY_ITEM_ID ORGANIZATION_ID BILL_SEQUENCE_ID BOM_ITEM_TYPE BILL_SEQUENCE_ID COMPONENT_ITEM_ID
    *[225957]* , 207 , *[90754]* 2 90754 *[297]*
    *[225957]* , 207 , *[90754]* 2 90754 *[299]*
    *[225957]* , 207 , *[90754]* 2 90754 *[301]*
    ----------------------------- Section_03A_bom_structures_b.sql-------------------
    -- List all the components under the option class
    -- When no components are found with bom_item_type ='4' which means that this assembly has no
    -- components in the bom_components_b because the assembly is a child that is a option class.
    -- We need to run this script with a bom_item_type ='2' and stored the component_item_id into MEMORY_assembly_id
    -- and run script again by read from MEMORY_assembly_id and bom_item_type = '4';
    SELECT a.assembly_item_id, a.organization_id, a.bill_sequence_id, b.bom_item_type, b.bill_sequence_id, b.component_item_id
    FROM bom_structures_b a, bom_components_b b
    WHERE a.assembly_item_id = '297'
    AND
    b.bill_sequence_id = a.bill_sequence_id
    AND
    b.bom_item_type = '4';
    ----OUTPUT of the Section_03A_bom_structures_b.sql QUERY---
    ASSEMBLY_ITEM_ID ORGANIZATION_ID BILL_SEQUENCE_ID BOM_ITEM_TYPE BILL_SEQUENCE_ID COMPONENT_ITEM_ID
    *[297]* 207 *[384]* 4 384 *[185]*
    *[297]* 207 *[384]* 4 384 *[241]*
    *[297]* 207 *[384]* 4 384 *[249]*
    *[297]* 207 *[384]* 4 384 *[4747]*
    *[297]* 207 *[384]* 4 384 *[4749]*
    *[297]* 207 *[384]* 4 384 *[4751]*
    =================================================================================================
    note output FROM EACH SELECT  that needs to be passed to the next SELECT statement are *[ ]* for example *['225957'] see below:*
    ----OUTPUT of the Section_01_UserInput.sql QUERY---
    ORGANIZATION_CODE ORGANIZATION_ID INVENTORY_ITEM_ID SEGMENT1 DESCRIPTION
    M1, 207, *[225957]* , CN927779, Sentinel Custom Desktop
    ----OUTPUT of the Section_02_bom_structures_b.sql  QUERY---
    ASSEMBLY_ITEM_ID ORGANIZATION_ID BILL_SEQUENCE_ID BOM_ITEM_TYPE BILL_SEQUENCE_ID COMPONENT_ITEM_ID
    *[225957]* , 207 , *[90754]* 2 90754 *[297]*
    *[225957]* , 207 , *[90754]* 2 90754 *[299]*
    *[225957]* , 207 , *[90754]* 2 90754 *[301]*
    ----OUTPUT of the Section_03A_bom_structures_b.sql QUERY---
    ASSEMBLY_ITEM_ID ORGANIZATION_ID BILL_SEQUENCE_ID BOM_ITEM_TYPE BILL_SEQUENCE_ID COMPONENT_ITEM_ID
    *[297]* 207 *[384]* 4 384 *[185]*
    *[297]* 207 *[384]* 4 384 *[241]*
    *[297]* 207 *[384]* 4 384 *[249]*
    *[297]* 207 *[384]* 4 384 *[4747]*
    *[297]* 207 *[384]* 4 384 *[4749]*
    *[297]* 207 *[384]* 4 384 *[4751]*
    Edited by: user612347 on Mar 16, 2010 4:21 PM
    Edited by: user612347 on Mar 16, 2010 4:57 PM

    Hi,
    Sorry, it's unclear what you want to do.
    Whenever you have a problem, it helps to be as specific as you can.
    Post a little sampel data (CREATE TABLE and INSERT statements) and the results you want from that data. Since your problem involves parameters, give a couple of sets of parameters, and the results you want for each set, given the same data.
    Are you saying that, after the user enters one set of parameters, you will need to run a variation of this query:
    SELECT  a.assembly_item_id, a.organization_id, a.bill_sequence_id, b.bom_item_type, b.bill_sequence_id, b.component_item_id
    FROM    bom_structures_b a, bom_components_b b
    WHERE   a.assembly_item_id = '303'
    AND
            a.organization_id = '207'
    AND
            b.bill_sequence_id = a.bill_sequence_id
    AND
            b.bom_item_type = '4';several times? What will be different each time? Will the hard-coded strings in the WHERE clause ('303', '207' and '4') be values from the earlier query?
    Do you really want to run this query several times, or would you rather run one query, and have it produce results for all the relevant values? (That would probably be eaisest and less error-prone). When you post your desired results, post what you would most like to see. If something else is acceptable, describe it.
    You can write SQL*Plus scripts to use parameters (substitution variables.
    For example, you can write a query that says:
    WHERE   a.assembly_item_id     = '&1'
    AND     a.organization_id      = '&2'
    AND     b.bill_sequence_id      = a.bill_sequence_id
    AND     b.bom_item_type      = '&3';and call it like this
    @Section_03A_bom_structures_b  303  207  4You can have a query output several such rows (for example:
    @Section_03A_bom_structures_b  303  207  4
    @Section_03A_bom_structures_b  304  298  3
    @Section_03A_bom_structures_b  306  99   4), send all of that output to a SPOOL file, and then execute the SPOOL file.

  • Writing console output from numerous classes to JTextArea?

    I have written a GUI for several classs and I was wondering if it is possible to have the output from these classes written to something like a JTextArea or equivalent.
    I know I could store the output (instead of System.out.print) and then setup a JTextArea and set the text equal to the stored output. I was hoping there was another way to do this that'd be more aesthetic.
    Thanks in advance.
    Se�n

    I have written a GUI for several classs and I was
    wondering if it is possible to have the output from
    these classes written to something like a JTextArea
    or equivalent.
    I know I could store the output (instead of
    System.out.print) and then setup a JTextArea and set
    the text equal to the stored output. I was hoping
    there was another way to do this that'd be more
    aesthetic.
    java.util.logging?Alternatively, create a TextAreaPrintStream class, overriding the appropriate methods and then call
    System.setOut(someTextAreaPrintStream);Jim S.

Maybe you are looking for