Return results from ADEP in AS3 Arrays, not ArrayCollections

Hi all,
Is there any way to force ADEP to return results from data services in simple AS3 Arrays, not ArrayCollections? Here are my situation:
In my project I use ADEP Data Management Services. To connect to ADEP services we use RTMP channel defined in services-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
     <services>
          <service-include file-path="remoting-config.xml" />
          <service-include file-path="proxy-config.xml" />
          <service-include file-path="messaging-config.xml" />
          <service-include file-path="data-management-config.xml" />
          <service-include file-path="managed-remoting-config.xml" />
          <service class="fiber.data.services.ModelDeploymentService" id="model-deploy-service" />
          <default-channels>
               <channel ref="my-rtmp"/>
          </default-channels>
     </services>
     <channel-definition id="my-rtmp" class="mx.messaging.channels.RTMPChannel">
          <endpoint url="rtmp://{server.name}:1000" class="flex.messaging.endpoints.RTMPEndpoint"/>
          <properties>
               <idle-timeout-minutes>20</idle-timeout-minutes>
               <block-rtmpt-polling-clients>true</block-rtmpt-polling-clients>
               <rtmpt-poll-wait-millis-on-client>0</rtmpt-poll-wait-millis-on-client>
          </properties>
     </channel-definition>
</services-config>
To manage data in database we defined data services in data-management-config.xml like this:
<?xml version="1.0" encoding="UTF-8"?>
<service id="data-service" class="flex.data.DataService">
    <adapters>
        <adapter-definition id="java-dao" class="flex.data.adapters.JavaAdapter"/>
        <adapter-definition id="mr-java-dao" class="flex.data.adapters.ManagedRemotingDataAdapter" />
        <adapter-definition id="actionscript" class="flex.data.adapters.ASObjectAdapter" default="true"/>
    </adapters>
    <default-channels>
        <channel ref="my-rtmp"/>
    </default-channels>
    <destination id="SomeProduct.SomeItems">
        <adapter ref="java-dao" />
        <properties>
            <source>flex.data.assemblers.SQLAssembler</source>
            <scope>application</scope>
            <metadata>
                <identity property="ID" />
            </metadata>
            <server>
                <database>
                    <datasource>java:comp/env/jdbc/SP</datasource>
                </database>
                <actionscript-class>com.somecompany.classes.SomeCoolClass</actionscript-class>
                <create-item>
                    <procedure name="SomeItems_Insert">
                        <procedure-param property-value="#Session_ID#" />
                        <procedure-param property-value="#Division_ID#" />
                        <procedure-param property-value="#Salesrep_ID#" />
                        <procedure-param property-value="#Area_Code#" />
                        <procedure-param property-value="#Item_ID#" />
                    </procedure>
                    <id-query>SELECT IDENT_CURRENT('Work_Area_Item')</id-query>
                </create-item>
                <fill>
                    <name>all</name>
                    <procedure name="SomeItems_Get">
                        <procedure-param property-value="#Session_ID#" />
                        <procedure-param property-value="#Last_Sync_Time#" />
                    </procedure>
                </fill>
                <update-item>
                    <procedure name="SomeItems_Update">
                        <procedure-param property-value="#Session_ID#" />
                        <procedure-param property-value="#Division_ID#" />
                        <procedure-param property-value="#Salesrep_ID#" />
                        <procedure-param property-value="#Area_Code#" />
                        <procedure-param property-value="#Item_ID#" />
                   </procedure>
                </update-item>
                <delete-item>
                    <procedure name="SomeItems_Delete">
                        <procedure-param property-value="#Session_ID#" />
                        <procedure-param property-value="#Item_ID#" />
                    </procedure>
                </delete-item>
            </server>
        </properties>
    </destination>
</service>
By default, ADEP returns results from SomeProduct.SomeItems destination to Flex side as ArrayCollection of SomeCoolClass instances but I need the data to be returned in simple AS3 Arrays. Recently, I found that there is small optional serialization configuration in channel-definition that should resolve my problem. So I updated my channel-definition in services-config.xml to this:
<channel-definition id="my-rtmp" class="mx.messaging.channels.RTMPChannel">
     <endpoint url="rtmp://{server.name}:1000" class="flex.messaging.endpoints.RTMPEndpoint"/>
     <properties>
          <serialization>
               <legacy-collection>true</legacy-collection>
          </serialization>
          <idle-timeout-minutes>20</idle-timeout-minutes>
          <block-rtmpt-polling-clients>true</block-rtmpt-polling-clients>
          <rtmpt-poll-wait-millis-on-client>0</rtmpt-poll-wait-millis-on-client>
     </properties>
</channel-definition>
However, result are still returned in ArrayCollections.
Any ideas?
Thanks in advance

Thom Parker answered this here: http://forums.adobe.com/message/2614570#2614570
Answer copied below:
"The problem is that when the focus is on the text box
it's in edit mode. It's only displaying the value interactively entered by
the user, or as a consequence of the change event.  What you need to do is
force the focus off of the text box in code.  You can do a little trick
where you bounce it to a tiny transparent field, which then bounds the focus
back so it doesn't look like the focus changed."
What I ended up doing was calling up the dialog box, then using setfocus with no parameters to remove focus from the field, as follows:
this.rawValue = this.dialogBoxFunction(this.rawValue); // passing current value so dialog box defaults to that value
xfa.host.setFocus();
Cheers,
Marty.

Similar Messages

  • Forcing the ReadAllQuery to return results from DB instead of cache

    How can I programmatically setup a ReadAllQuery to always return results from DB instead of cache. I dont want to use session.refreshObject - as this will result in 2 lookups - first for the actual search from cache or db and then a second search on each object on the DB. I am using Toplink 11.1.1

    You can use,
    query.refreshIdentityMapResult()
    or,
    query.setShouldRefreshIdentityMapResult(true)
    James : http://www.eclipselink.org

  • How do I get multiple return results from a function

    IDBASKET IDSTAGE DTSTAGE
    3 1 24-JAN-03
    3 5 25-JAN-03
    4 1 13-FEB-03
    4 5 13-FEB-03
    5 3 21-FEB-03
    I input is a single IDBASKET number from this table and this function works fine only if it has one IDSTAGE per idbasket. (idbasket#5)
    But how do I get it to return a result for an IDBASKET when it has multiple IDSTAGE? (idbasket#3 & 4)
    THANKS MUCH,
    MAT
    SQL> CREATE OR REPLACE FUNCTION status_desc_sf
    2 (p_code NUMBER)
    3 RETURN VARCHAR2
    4 IS
    5 lv_output_txt VARCHAR2(30);
    6 BEGIN
    7 IF p_code = 1 THEN lv_output_txt := 'Order submitted';
    8 ELSIF p_code = 2 THEN lv_output_txt := 'Accepted, sent to shipping';
    9 ELSIF p_code = 3 THEN lv_output_txt := 'Backordered';
    10 ELSIF p_code = 4 THEN lv_output_txt := 'Cancelled';
    11 ELSIF p_code = 5 THEN lv_output_txt := 'Shipped';
    12 ELSE lv_output_txt := 'No information';
    13 END IF;
    14 RETURN lv_output_txt;
    15 END;
    16 /

    Duplicate thread:
    How do I get multiple return results from a function

  • I can't prevent Spotlight from returning results from emails and Safari

    Try as I might, I can't prevent Spotlight from returning results from emails and from Safari web browser history.
    I've toggled the two relevant boxes in the Spotlight system preferences, and rebuilt the index, but it still returns results from categories that I have deselected (like emails and webpages).
    The system preferences say "Only selected categories will appear in Spotlight search results". If only it were true!

    I think this could be a reason, your settings regarding indexing of mail messages didn't stick.
    I'm having other problems with security update 2008-005.
    It'd be interesting to know if OnyX is able to fix your problem again. Hopefully its doings survive the next update.

  • Sharepoint 2013 returning results from userprofiles

    Hello, I need some help in cleaning up the results from a search query.
    I've created a new page within SharePoint 2013 and added 2 script editors.
    One script editor holds a search box:
    <div unselectable="on">
    <label unselectable="on">First Name Search: </label>
    <input id="searchTextBox" type="text">
    <input id="getColleagues" type="button" value="Search">
    </div>
    <div id="resultsDiv" unselectable="on">
    </div>
    The other holds the search query:
    <script src="http://site/SiteAssets/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var spAppWebUrl = "http://site";
    $("#searchButton").click(function () {
    //var queryUrl = spAppWebUrl + "/_api/search/query?querytext='" + $("#searchTextBox").val() + "'";
    var wildcard = $("#searchTextBox").val() + "*";
    var queryUrl = spAppWebUrl + "/_api/search/query?querytext='*'&sourceid='b09a7990-05ea-4af9-81ef-edfab16c4e31'&rowlimit='500'&selectproperties='FirstName, LastName, PictureURL, SipAddress, PreferredName, WorkEmail'&refinementfilters='FirstName:"+ (wildcard) + "'";
    alert(queryUrl);
    $.ajax({ url: queryUrl, method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: onQuerySuccess, error: onQueryError });
    function onQuerySuccess(data) {
    var results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;
    $("#resultsDiv").append('<table>');
    $.each(results, function () {
    $("#resultsDiv").append('<tr>');
    $.each(this.Cells.results, function () {
    $("#resultsDiv").append('<td>' + this.Value + '</td>');
    $("#resultsDiv").append('</tr>');
    $("#resultsDiv").append('</table>');
    function onQueryError(error) {
    $("#resultsDiv").append(error.statusText)
    </script>
    I am getting results, but not just the selectedproperties: FirstName, LastName, PictureURL, SipAddress, PreferredName, WorkEmail.
    Can someone help me to get just the selectedproperties of FirstName, LastName, PictureURL, SipAddress, PreferredName, WorkEmail?
    Thanks

    Hi,
    According to your post, my understanding is that you want to get the User Profile properties using REST API.
    If you want to use Search Query, here is a tool for your reference:
    http://sp2013searchtool.codeplex.com/
    If you just want to get the User Profile properties, we can use SP.UserProfiles.PeopleManager
    to achieve it.
    Example:
    Get Multiple Properties for the current user:
    http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties?$select=PictureUrl,AccountName
    More information is here:
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Rookie...can't return results from JDBC query?

    I am trying to get my web service to return results to the client from my JDBC query. They "try/catch statements sem to be in the way. I can't return anything within them or outside of them. Can someone tell me how I could get my results to return to where I want them to?
    At present, all this does is return the value "Dummy" to my client. Shouldn't the value be reset by the results of the query coming in?
    package hello;
    import java.sql.*;
    public class HelloImpl implements HelloIF {
    String s2 = "Dummy";
    public String sayHello(String s) {
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    catch( Exception e ) {
    System.out.println("Failed to load driver.");
    try {
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:liggy11/fisher@dligman:1521:dligman");
    Statement stmt = conn.createStatement();
    String query = "SELECT end_phrase FROM rap_lines WHERE start_phrase = '" + s + "'";
    ResultSet rs = stmt.executeQuery(query) ;
    while (rs.next()) {
    s2 = rs.getString("end_phrase");
    System.out.println("Got another row. s2 is now [" + s2 + "]");
    catch( Exception e ) {
    e.printStackTrace();
    return new String(s2);

    liggy11,
    I believe the smart-ass forum is the most appropriate
    place for replies such as yours. Excuse me while I
    get with some honeys....
    Peace in the middle east,
    mrcheeks.
    I'm Sorry Miss Jackson!

  • Return results from custom dialog box not visibly updating field value

    I have a form with custom dialog boxes (execDialog) for data entry. The dialog box is being called from the Entry event successfully. I also have it called from the Click event. So, here's what I get:
    1. On entering the field, I get the dialog box pop up, I select a value, it visibly changes the field raw value and leaves focus in the field.
    2. If I exit the field and re-enter, it also works as in point 1 (as expected)
    3. If, while focus is already in the field, I click in the field, I get the dialog box, as expected, but after selecting a value from the dialog, the field raw value DOES NOT VISIBLY change until I exit the field! It's kind of like the click event is working in conjunction with the Exit event. This is totally counter-intuitive for a production form that is being designed for the general populace.
    Anyone had any experience with this?
    Cheers,
    Marty.

    Thom Parker answered this here: http://forums.adobe.com/message/2614570#2614570
    Answer copied below:
    "The problem is that when the focus is on the text box
    it's in edit mode. It's only displaying the value interactively entered by
    the user, or as a consequence of the change event.  What you need to do is
    force the focus off of the text box in code.  You can do a little trick
    where you bounce it to a tiny transparent field, which then bounds the focus
    back so it doesn't look like the focus changed."
    What I ended up doing was calling up the dialog box, then using setfocus with no parameters to remove focus from the field, as follows:
    this.rawValue = this.dialogBoxFunction(this.rawValue); // passing current value so dialog box defaults to that value
    xfa.host.setFocus();
    Cheers,
    Marty.

  • Facing problem while going to  catch return result from web-services.

    Hi everybody,
    I am new to BPEL. I am facing problem while going to catch the attributes of resultsets returning from web-services(QAS). As far as my knowledge, two types of results it should return - XML entities and another is attributes which is coming as the part of XML entitites. I am able to catch the XML entities, but can't catch the attributes under it. Even, I am not able to see whether web-services returning something within that field.
    When, I tried to catch the attribute and store to a temporary varilable using the following code:
    *<assign name="AssignQASDoGetAddress1">*
    *<copy>*
    *<from variable="InvokeQAS_DoSearch_OutputVariable"*
    part="body"
    query="/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded"/>
    *<to variable="temp"/>*
    *</copy>*
    *</assign>*
    but, I am facing the following selectionFailure errors after running it:
    *"{http://schemasxmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.*
    -<selectionFailure xmlns="http://schemasxmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    *<summary>*
    empty variable/expression result.
    xpath variable/expression expression "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')" is empty at line 269, when attempting reading/copying it.
    Please make sure the variable/expression result "bpws:getVariableData('InvokeQAS_DoSearch_OutputVariable', 'body', '/ns6:QASearchResult/ns6:QAPicklist/ns6:PicklistEntry/@PostcodeRecoded')"is not empty.
    *</summary>*
    *</part>*
    *</selectionFailure>*
    Getting this error it seems to me that web-service is returning nothing, but, it returns something as it has been catched using a method called isPostcodeRecoded() Java Code in Oracle ADF. This method has been used as it should return boolean whereas for catching the xml entities using java code we used the method like getPostcode(), getMoniker().
    For your information, we are using Jdeveloper as the development tool for building the BPEL process.
    Am I doing any syntax error. Please consider it as urgent and provide me asolution.
    Thanks in advance.
    Chandrachur.

    Thanks Dave and Marc, for your suggestions. Actually what I found is QAS web-service is returning nothing as attributes when the attributes are set to the default value. For example, following is the part of the wsdl of the result which QAS webservice returns.
    <xs:element name="QASearchResult">
    - <xs:complexType>
    - <xs:sequence>
    <xs:element name="QAPicklist" type="qas:QAPicklistType" minOccurs="0" />
    <xs:element name="QAAddress" type="qas:QAAddressType" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="VerifyLevel" type="qas:VerifyLevelType" default="None" />
    </xs:complexType>
    </xs:element>
    <xs:complexType name="QAPicklistType">
    - <xs:sequence>
    <xs:element name="FullPicklistMoniker" type="xs:string" />
    <xs:element name="PicklistEntry" type="qas:PicklistEntryType" minOccurs="0" maxOccurs="unbounded" />
    <xs:element name="Prompt" type="xs:string" />
    <xs:element name="Total" type="xs:nonNegativeInteger" />
    </xs:sequence>
    <xs:attribute name="AutoFormatSafe" type="xs:boolean" default="false" />
    <xs:attribute name="AutoFormatPastClose" type="xs:boolean" default="false" />
    <xs:attribute name="AutoStepinSafe" type="xs:boolean" default="false" />
    <xs:attribute name="AutoStepinPastClose" type="xs:boolean" default="false" />
    <xs:attribute name="LargePotential" type="xs:boolean" default="false" />
    <xs:attribute name="MaxMatches" type="xs:boolean" default="false" />
    <xs:attribute name="MoreOtherMatches" type="xs:boolean" default="false" />
    <xs:attribute name="OverThreshold" type="xs:boolean" default="false" />
    <xs:attribute name="Timeout" type="xs:boolean" default="false" />
    </xs:complexType>
    <xs:complexType name="PicklistEntryType">
    - <xs:sequence>
    <xs:element name="Moniker" type="xs:string" />
    <xs:element name="PartialAddress" type="xs:string" />
    <xs:element name="Picklist" type="xs:string" />
    <xs:element name="Postcode" type="xs:string" />
    <xs:element name="Score" type="xs:nonNegativeInteger" />
    </xs:sequence>
    <xs:attribute name="FullAddress" type="xs:boolean" default="false" />
    <xs:attribute name="Multiples" type="xs:boolean" default="false" />
    <xs:attribute name="CanStep" type="xs:boolean" default="false" />
    <xs:attribute name="AliasMatch" type="xs:boolean" default="false" />
    <xs:attribute name="PostcodeRecoded" type="xs:boolean" default="false" />
    <xs:attribute name="CrossBorderMatch" type="xs:boolean" default="false" />
    <xs:attribute name="DummyPOBox" type="xs:boolean" default="false" />
    <xs:attribute name="Name" type="xs:boolean" default="false" />
    <xs:attribute name="Information" type="xs:boolean" default="false" />
    <xs:attribute name="WarnInformation" type="xs:boolean" default="false" />
    <xs:attribute name="IncompleteAddr" type="xs:boolean" default="false" />
    <xs:attribute name="UnresolvableRange" type="xs:boolean" default="false" />
    <xs:attribute name="PhantomPrimaryPoint" type="xs:boolean" default="false" />
    </xs:complexType>
    here the attributes like FullAddress, PostcodeRecodedare , etc. are not being return by the web-service when it is getting the default value false. But, if it gets true then , it is being displayed at the BPEL console.
    Do you have any idea how can I catch the attributes and its value even when it gets the default value which is already set. Previously, it was returning(it was not being displayed at the console).
    Thanks once again for your valuable suggestions...!!!
    Chandrachur.

  • Last Result from Fulltext SQL Query Search Not Showing

    I am creating a custom search results page for MOSS 2007 (using inline .aspx code - don't ask) that uses Fulltext SQL Queries.  I get the results in a ResultTable (see code below) and then use a DataTable to write code to display it (I could have used
    a DataGrid, I know).
    The problem is that the last result is not showing. So, if it reports that there are 5 results, only 4 will show. I have verified that all 5 results do exist (using a slightly broadened query). If it reports 1 result, none exist in the DataTable that loads
    the result data from the ResultTable.
    FullTextSqlQuery query = new FullTextSqlQuery(site);
    query.ResultTypes = ResultType.RelevantResults;
    query.QueryText = qry;
    query.RowLimit = 50;
    query.StartRow = iPage;
    try
    ResultTableCollection results = query.Execute();
    ResultTable resultTable = results[ResultType.RelevantResults];
    DataTable table = new DataTable();
    table.Load(resultTable, LoadOption.OverwriteChanges);
    int n = resultTable.TotalRows;
    The variable "qry" is a valid SQL Query with the relevant clauses.
    I am using a foreach loop to go through "table" (a DataTable), and so I do not think that I have a "one-off error".
    Any suggestions would be most welcome.

    So in results you have all items but when you are loading it into table (type DataTable) you are loosing one last record.
    1) First you check what data you are getting in resultTable - as you are specifying RelevantResult
    2) Check last index of data in ResultTable collection and try to find out the last index ResultTable, or try to find last index of data in result table
    DataTable.Load method accepts parm of type IDataReader and IDatareader, there are cases it looses records if not read properly..check below links
    http://stackoverflow.com/questions/8396656/why-does-my-idatareader-lose-a-row
    http://msdn.microsoft.com/en-us/library/system.data.datatable.load(v=vs.110).aspx
    <hr> Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL <br/> <b><a href="http://insqlserver.com">Everything about SQL Server | Experience inside SQL Server </a></b>-<a href="http://insqlserver.com">Mohammad
    Nizamuddin </a>

  • Return String from values in int array

    Hi
    I am very new to Java and have been asked to carry out the following task.
    Returns a string version of counterGroups. For each
    group it gives its number (1 more than its index) and (in
    parentheses) the number of counters currently in that group.
    Each is followed by two spaces. Thus if there are 3 groups
    with 7, 9 and 11 counters the string returned is
    "1(7) 2(9) 3(11) "
    I have created an array of type int referenced by counterGroups. It stores values 7,9 and 11.
    I have made a start on my method but I am struggling. Any help would be appreciated. Please see my method below to see how far I have got. It does not compile.
    public String toStr()
    String output1;
    String temp;
    String other;
    for (int i=0; i<counterGroups.length(); i++)
    int num1 = counterGroups;
    output1 = String.valueOf(num1);
    other = "(" + output1 + ")";
    temp =
    int num1 = counterGroups[0];
    output1 = String.valueOf(num1);
    return "(" + output1 + ")";
    regards
    Paul

    When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
    Paste in the exact error message and clearly indicate which line it's complaining about.

  • IF condition to return result from either matching strings

    Hi All,
    My Current Shell script condition
    PRIM_CRS.log
    testing1/localserver1-> cat log_PRIM_CRS.log
    ora.asm                  asm               11.2.0.4.0  ONLINE on localserver1 (+ASM1)      ONLINE   NEVER                STABLE
    ora.localserver1.vip  cluster_vip_net1  11.2.0.4.0  ONLINE on localserver1              ONLINE   03/20/2015 16:15:07  STABLE
    ora.remoteserver1.vip  cluster_vip_net1  11.2.0.4.0  ONLINE on remoteserver1              ONLINE   03/20/2015 16:40:06  STABLE
    ora.cvu                  cvu               11.2.0.4.0  ONLINE on localserver1              ONLINE   02/26/2015 15:49:38  STABLE
    ora.rdb1v001.db          database          11.2.0.4.0  ONLINE on localserver1 (rdb1v0011)  ONLINE   04/17/2015 11:04:35  STABLE
    ora.testing.db           database          11.2.0.4.0  ONLINE on localserver1 (testing1)   ONLINE   04/30/2015 13:09:54  STABLE
    ora.ASMU03.dg            diskgroup         11.2.0.4.0  ONLINE on localserver1              ONLINE   03/20/2015 15:53:57  STABLE
    ora.DATA.dg              diskgroup         11.2.0.4.0  ONLINE on localserver1              ONLINE   03/20/2015 15:54:18  STABLE
    From above file, i search for each component like 'asm' and return the entire row using following awk condition
                   awk -F";" '{for(i=1;i<=NF;i++){if ($i ~ /asm/){print $i}}}' PRIM_CRS.log > prim_asm.txt
    After getting the entire row, i am trying to just return specific column value using $ as shown below
    testing1/localserver1-> cat log_prim_asm.txt
    ora.asm                  asm               11.2.0.4.0  ONLINE on localserver1 (+ASM1)      ONLINE   NEVER                STABLE
    awk '{print $2, $4, $7 }' prim_asm.txt --> this was standard command to get output like "asm ONLINE ONLINE", however some servers has 7th column different value like (+ASM1), so my output does not show as "asm ONLINE ONLINE"
    So, Problem is 7 or 8 column is changing,so i have no idea how to get output like "asm ONLINE ONLINE" even if any changes in column 7 or 8.
    testing1/localserver1-> awk '{print $2, $4, $7 }' log_prim_asm.txt
    asm ONLINE (+ASM1)
    testing1/localserver1-> awk '{print $2, $4, $8 }' log_prim_asm.tx
    asm ONLINE ONLINE
    I was thinking of writing if condition like this, but its NOT working. I tried 'awk' to search for strings 'asm ONLINE ONLINE' and return the respective column ,but i couldnt find any such solution out there..
    testing1/localserver1-> cat crs_asm1.sh
    #!/bin/sh
    export PRIMARY_CRS_ASM_SV1=`awk '{print $2, $4, $7 }' log_prim_asm1.txt`  
    export PRIMARY_CRS_ASM_SV2=`awk '{print $2, $4, $8 }' log_prim_asm1.txt`                                                     
    #echo $PRIMARY_CRS_ASM_SVC                                                                                                                     
    if [ "${PRIMARY_CRS_ASM_SV1}" != "asm ONLINE ONLINE" ] && [ "${PRIMARY_CRS_ASM_SV2}" != "asm ONLINE ONLINE" ]; then                                                                                   
      echo " "                                                                                                                                     
      echo -e "ASM Resource "$PRIMARY_HOST" is \x1b[37;41m NOT RUNNING \x1b[m"                                                                     
    ${PRINTFCMD} "\e[${TAB_HEAD_COLR}";                                                                                                            
    elif [ "${PRIMARY_CRS_ASM_SV1}" == "asm ONLINE ONLINE" ] && [ "${PRIMARY_CRS_ASM_SV2}" == "asm ONLINE ONLINE" ]; then                                                                                 
      echo " "                                                                                                                                     
      echo -e "ASM Resource on ($PRIMARY_HOSTNAME) is \x1b[42;30mRUNNING\x1b[m "
    fi
    Any thoughts or suggestion on this??
    Thanks in advance

    Thanks for your suggestion, let me check how it works,
    Meanwhile, i have troublesome to export of the 1st line from output from the below script
    This script basically lists all SIDs and ORACLE_HOMEs and echo for selection.
    I want to automatically to set to line 1 for +ASM instances without prompting. As part of my script, i want to source +ASM instance and run the command automatically without prompt
    The below scripts automatically picks up the last line. How do i change it to pick up the 1st line??
    Script
    if [ `uname -s` = SunOS ]
    then
    ORATAB=/var/opt/oracle/oratab
    else
    ORATAB=/etc/oratab
    fi
    if [ -s "$ORATAB" ]
    then
    #echo "Standby Oratab Entries:"
    #echo " #      DATABASE  NAME       ORACLE_HOME"
    #echo "-----   ------------------   -----------------------------------"
    set -x
    CURSOR=1
    while read LINE
    do
    case $LINE in
    \#*) ;; #comment line
    "") ;; #null line
    LASTSID=`echo $LINE | cut -f1 -d":"`
    LASTHOME=`echo $LINE | cut -f2 -d":"`
    printf "%5s %20s %40s\n" $CURSOR $LASTSID $LASTHOME
    CURSOR=`expr $CURSOR + 1`
    #CURSOR=1
    esac
    done < $ORATAB
    #if [ $CURSOR -eq 2 ]
    #then
    #echo""
    #echo "only one database found in oratab..."
    echo $LASTSID
    echo $LASTHOME
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib:/usr/lib64:/lib64:/lib:/usr/lib
    SHLIB_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib
    SQLPATH=$ORACLE_HOME/rdbms/admin:$ORACLE_HOME/sqlplus/admin
    ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    PATH=/opt/oracle/local/bin:/usr/openwin/bin:/usr/sbin:/usr/bin:/usr/ucb:/etc:/bin:/sbin:$ORACLE_HOME/bin:$ORACLE_HOME/jdk/bin:$ORACLE_HOME/jdk/jre/bin:$ORACLE_HOME/Apache/Apache/bin:$ORACLE_HOME/Apache/perl/bin:/usr/local/bin:/bin:/sbin
    `set -o vi`
    PS1="$ORACLE_SID/`uname -n`-> "
    alias rm="rm -f"
    else
    echo ""
    echo " "
    echo -n "Choose the Database  [ 1 - "`expr $CURSOR - 1`" ] "
    #export SELECTION=1
    export $CURSOR=1
    #read SELECTION
    $CURSOR=1
    fi
    Output
    1           
    +ASM1                
    /u01/app/11.2.0/grid
    2        
    rdb1v001  /u01/app/oracle/product/11.2.0/dbhome_1
    3       
    rdb1v001r  /u01/app/oracle/product/11.2.0/dbhome_1
    4          
    testrj  /u01/app/oracle/product/11.2.0/dbhome_1
    5          
    rdbp01  /u01/app/oracle/product/11.2.0/dbhome_1
    6        
    rmb1r001  /u01/app/oracle/product/11.2.0/dbhome_1
    rmb1r001
    /u01/app/oracle/product/11.2.0/dbhome_1
    Thanks in advance

  • Help with query to return results from group within table?

    Hi
    Im a total noob, so please be gentle....!
    I am looking at a table that has a WORD column and a WORD_TYPE_ID column.
    Words can have the same type_id.
    What I am trying to do is write a query that will return the longest word for each word_type_id.
    I have been trying for hours to get this and all I seem to get is either error messages or I return the longest word in the whole WORD column.
    The furthest I can get before things break down is.....
    select word
    from table
    where
    length(word) =
    select
    max(length(word))
    from table
    Any help on this or if I could be pointed in the right direction it would be greatly appreciated.
    Thanks

    Hi,
    Welcome to the forum!
    Here's one way:
    SELECT    word_type_id
    ,       MIN (word) KEEP (DENSE_RANK LAST ORDDER BY LENGTH (word))     AS longest_word
    FROM       table_x
    GROUP BY  word_type_id;If there happens to be a tie within some word_type_id (that is, 2 or more words have exactly the same length, which is the longest in that group) the expression above will return the first one, in alphabetic order. (That's what MIN means here.)
    Edited by: Frank Kulash on Aug 11, 2009 1:56 PM
    You almost had it.
    As you noticed, you were getting the longest row in the whole table. That's because your sub-query was looking at the whole table.
    If you correlate the sub-query to the row in the main table, as shown below, you can get the longest word in each group:
    select  word
    from     table     m                              -- m for main
    where      length (word) = (
                                select  max (length(word))
                   from     table
                   where     word_type_id  = m.word_type_id     -- New
                   );

  • Results from a form submission does not keep the fields in order when I get the email

    I created a form and it works fine but when I get the email
    back the fields are out of the tab order or out of wack meaning
    they are not in order that I set the acceptabilities to.
    Is this something in the Action script I have to add and what
    would it look like or do I need to edit the CGI script?
    I can provide a link or script let me know.
    Thanks

    This is action script 3.0 Flash CS3
    Below is what I receive back after I test it but it is not in
    order. I guess I assumed that if the tab order is correct and the
    are layout in that order and the code in the form is in order it
    would come back the same way. Mostly I am trying to narrow down the
    problem and my guess is the cgi script or am I wrong? I have
    attached the code for the form.
    Thank You for you time
    Form email submission results:
    Below is what you submitted on Tuesday, February 19, 2008 at
    10:35:08
    list:
    phone:
    address:
    comments:
    city:
    state:
    zip:
    name:

  • Spotlight doesn't return results from shared drives

    I work in an all Mac graphics shop and we all (four of us) share a variety of volumes connected to a G4 running Tiger 10.4.11 (regular, not server version). Two of us have Leopard and two have Tiger (two Mac Pros running 10.5.6, two MacBook Pros running 10.4.11).
    The G4 is partitioned into an 80gb drive, a 500gb drive, and also has an external 500gb LaCie drive. We access all drives on this computer by automatically connecting to the shared "network" when we boot up each day. Hornware's Sharepoints is installed on the G4 "server".
    Recently, the two of us running Leopard on our MacPros lost the ability to search the shared volumes. I have had intermittent permissions problems since I started in October and I have attempted to troubleshoot this using the Sharepoints application (which, admittedly, I'm not familiar with, and I'm a noob to networking).
    I have tried adding and then deleting the drives from the privacy pane in Spotlight preferences (both on my MacPro and on the G4 server Mac). I've repaired permissions with Disk Utility. I've used DiskWarrior 3 to rebuild the directories on all but the external drive (will do that tomorrow). I also ran TechTools 4 but it took so long running the tests that I gave up and canceled (didn't work), force-quit and restarted.
    The second part of my question is would it be worth it to upgrade to Leopard on our server Mac and do away with Sharepoints altogether? I've read some horror stories about Leopard's buggy filesharing but I'm really hamstrung not being able to search my shared volumes.
    Any advice would be appreciated. Thanks in advance!

    Start with a search in these forums for search server, search servers, search network, etc. The first step. You'll find numerous items to peruse.
    Once that's fixed, see these for the Spotlight issues, if they're not related to the server one: http://www.pinkmutant.com/articles/Leopard/leospot.html and my mod to Finder's Find at http://discussions.apple.com/message.jspa?messageID=6725932 for what you can change so you can find stuff excluded by the default structure.

  • How to return result from a Thread generically?

    Should be done using some form of callback class like below:
    Is this the right way of doing this or a better way especially trying
    to make it generic. What if I found the value from the Thread and want
    to pass that to some other class and do this generically?
    public interface Command {
       public void execute();
    public class ThreadClass extends Thread {
       private Command command;
       public ThreadClass(Command command) {
          super();
          this.command = command;
       public void run() {
           while (true) {
           if (xyz != null) {
              command.execute();
    }

    Should be done using some form of callback class like
    below:What should?
    Is this the right way of doing this or a better way
    especially trying
    to make it generic. Right way of doing what?
    What if I found the value from the
    Thread and want
    to pass that to some other class and do this
    generically?What value? What do you mean by "pass that to some other class"? What other class? What do you mean by "generically"?
    Can you post a (small but complete) example that actually demonstrates what you are trying to explain?
    public interface Command {
    public void execute();
    public class ThreadClass extends Thread {
    private Command command;
    public ThreadClass(Command command) {
    super();
    this.command = command;
    public void run() {
    while (true) {
    if (xyz != null) {
    command.execute();
    You are putting a thread into an infinite loop and wasting resources.
    So unless you intended on doing that (in which case you probably don't have particularly honourable motives so nobody here will want to help you), then whatever it is you're trying to do with this code, its certainly not the best way of doing it. Assuming its just a typo, then please, in future, test your code before you post it, and cut & paste it into the forums, and use the "Preview" button to check it looks okay.

Maybe you are looking for

  • How can I get ITunes to install on my D drive

    I have a Dell laptop that has been a great computer.  I did not oreder it, but rather purchased it in a store (hence my problem).  The hard drive is partitioned into two drives:  C Drive for the operating system and D Drive for all the data.  I under

  • Can we have a multiple TAGS in single line.Pls let me know

    Hi Team, Can we have a multiple TAGS in single line.Ie 2 open tags and 2 close tags in XML..Pls let me know

  • Chinese font issue with Oracle 6i

    Hello all, I am working on a Chinese report. when i open an existing RDF  in Report Builder 6.0.8.24.0 and save it with out modification the lables in chinese (labels) characters are corrupted i.e I only see inverted question marks for the labels whe

  • How to create new SVG export option

    I need to create a new SVG option to work with exportFile(). The new option will allow me to place a tag on in my exported SVG file. I'm not finding hints in the delivered documentation on how to do this. Could someone with experience in such, please

  • Adding value's from a main and subreport

    Post Author: Nick7 CA Forum: Formula I have a valuation report containing a subreport, and I want to create a formula that adds the grand total of the main report to the grand total of the subreport to give me an overall total figure.  The value's ar