String operations for assignment

Hi All,
Need some idea with this operation in MDM Data Manager:
I have a tuple like aa-bb-cc-dd-ee
I am trying to write an assignment to delete the last entry i.e.. "-ee"
and finally the output of the assignment should be aa-bb-cc-dd
Can anyone help me in this assignment..
Thanks

Hi Anuj,
I would suggest, if this Tuple member field is of Type Text and the value for this field is fixed say 11 (aa-bb-cc-dd). So you can set Property width for this Tuple field as 11 using MDM Console and During Import using Import Manager, automatically values for this Tuple field would be truncated after 11 that is -ee. So in this way you can achieve your result.
Otherwise, this thing can be easily taken care using PI/XI before reaching this file in MDM.
Regards,
Mandeep Saini

Similar Messages

  • Why only +String concatation for Operator Overloading ?

    Java does not support operator overloading other than the + operator for addition of two Strings or a number and a String.Why only the + operator and Strings, even when we have a concat() for addition of Strings ?
    Wondering if anyone could provide me some link as to why this only this (+) operator was chosen.
    Thank you for your consideration.
    Edited by: amtidumpti on Apr 27, 2009 6:40 AM
    Edited by: amtidumpti on Apr 27, 2009 6:40 AM

    amtidumpti wrote:
    stevejluke wrote:
    amtidumpti wrote:
    Java does not support operator overloading other than the + operator for addition of two Strings or a number and a String.Why only the + operator and Strings, even when we have a concat() for addition of Strings ? I assume the + was implemented (even with the concat() method present) for simplicity with working with Strings. Why only +? What other operators make sense as String manipulation operators? Why are they useful?We already have String,StringBuilder,StringBuffer for simplicity and manipulations of Strings or may be they were added later,but even then we have this +.Right, and you can use those methods instead of +. But String is a much-used class, has several special attributes given to it, and the + is very self-explanatory when applied to Strings.
    Also would == qualify as the other operator for operator overloading in java ?== has no special meaning for Strings (or really for Objects at all). It has exactly one purpose, to compare the value of the operands provided. When the operands are primitives, it compares their values exactly as you or I would (if the primitive values are equal you get true). When the operands are reference types the value of the references are tested for equality (if they don't hold a reference to the same Object, then == returns false).
    >
    int iAge1=0,iAge2=0;
    String sName1="Java",sName2="Rocks";
    double dMark1=89.02,dMark2=92.0;
    if(iAge1==iAge2)
    System.out.println("HURRAH");
    if(sName1==sName2)
    System.out.println("HURRAH");
    if(dMark1==dMark2)
    System.out.println("HURRAH");Also in case of boolean :
    boolean bFlag1=false,bFlag2=true;
    if(bFlag1=bFlag2)
    System.out.println("Value Assignment done");Here is " = " working not only as a assignment operator as well as conditional operator ?
    Thanks for your consideration.

  • To use Character string operator in ABAP

    HI,
    I have a problem with joining the two fields with different data length i.e
    OBJKY has length (30).
    tknum has length (10).
    the above read table i_nast works as long as both has the records not greater than 10 and I do have some records with greater than 10 for OBJKY in the database and my read is failing at that scenario, I need to use a charater string operator, as I am new to ABAP, can any one suggest me how to do .
    ...SQL..
    select OBJKY DATVR from nast
    into corresponding fields of table i_nast
    where KSCHL = 'ZBOL'.
    sort i_nast by OBJKY.
    LOOP at i_ship_data.
    read table i_nast with key
    OBJKY = i_ship_data-tknum binary search.
    if sy-subrc = 0.
    move: i_nast-datvr to i_ship_data-datvr.
    endif.
    modift i_ship_data.
    ENDLOOP.

    HI,
    Since OBJKY and TKNUM are with different lengths the Read statement works only
    when OBJKY has a 10 character value identical to TKNUM.
    but if we can assume that only first 10 characters of OBJKY are to be comapred with TKNUM then we can try the under mentioned approach:
    Create a new field in the Internal table I_NAST with length 10 characters.(I_NAST-OBJKY_TEMP).
    now assign the first 10 characters of OBJKY to this new field :
    LOOP AT I_NAST.
    MOVE I_INAST-OBJKY+0(10) TO OBJKY_TEMP.
    MODIFY I_NAST.
    ENDLOOP.
    Now you can Modify your READ STATEMENT :
    LOOP at i_ship_data.
    read table i_nast with key
    OBJKY_TEMP = i_ship_data-tknum binary search.
    if sy-subrc = 0.
    move: i_nast-datvr to i_ship_data-datvr.
    endif.
    modift i_ship_data.
    ENDLOOP.
    Hope this will help.
    Note: You can pick up any 10 characters starting from 1 to 20 th character of the field
    I_INAST-OBJKY.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Mutliple wsdl operations for a port in BPEL Project -- Help

    I was trying to create a BPEL project with multiple operations for one port type. I used a pick activity and on message acitivity to branch out based on the operation. For some reason all the operations are channeled through the same branch (operation). Please share with me your experiences and any simple project.
    -----------------wsdl file -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="MultiWsdl"
    targetNamespace="http://xmlns.oracle.com/MultiWsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:client="http://xmlns.oracle.com/MultiWsdl"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    TYPE DEFINITION - List of services participating in this BPEL process
    The default output of the BPEL designer uses strings as input and
    output to the BPEL Process. But you can define or import any XML
    Schema type and use them as part of the message types.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/MultiWsdl" schemaLocation="MultiWsdl.xsd" />
    </schema>
    </types>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    MESSAGE TYPE DEFINITION - Definition of the message types used as
    part of the port type defintions
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <message name="MultiWsdlRequestMessage">
    <part name="payload" element="client:MultiWsdlProcessRequest"/>
    </message>
    <message name="MultiWsdlResponseMessage">
    <part name="payload" element="client:MultiWsdlProcessResponse"/>
    </message>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PORT TYPE DEFINITION - A port type groups a set of operations into
    a logical service unit.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    *<!-- portType implemented by the MultiWsdl BPEL process -->
    *<portType name="MultiWsdl">
    *<operation name="Create">
    *<input message="client:MultiWsdlRequestMessage"/>
    *<output message="client:MultiWsdlResponseMessage"/>
    *</operation>
    *<operation name="Update">
    *<input message="client:MultiWsdlRequestMessage"/>
    *<output message="client:MultiWsdlResponseMessage"/>
    *</operation>
    *</portType>
    <!-- portType implemented by the requester of MultiWsdl BPEL process
    for asynchronous callback purposes
    -->
    <portType name="MultiWsdlCallback">
    <operation name="TestReply">
    <input message="client:MultiWsdlResponseMessage"/>
    </operation>
    </portType>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PARTNER LINK TYPE DEFINITION
    the MultiWsdl partnerLinkType binds the provider and
    requester portType into an asynchronous conversation.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <plnk:partnerLinkType name="MultiWsdl">
    <plnk:role name="MultiWsdlProvider">
    <plnk:portType name="client:MultiWsdl"/>
    </plnk:role>
    <plnk:role name="MultiWsdlRequester">
    <plnk:portType name="client:MultiWsdlCallback"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    ---------------- Bpel File ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Thu Nov 06 21:46:50 PST 2008
    Author:
    Purpose: Asynchronous BPEL Process
    -->
    <process name="MultiWsdl" targetNamespace="http://xmlns.oracle.com/MultiWsdl"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:client="http://xmlns.oracle.com/MultiWsdl"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <!--
    PARTNERLINKS
    List of services participating in this BPEL process
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:MultiWsdl"
    myRole="MultiWsdlProvider"
    partnerRole="MultiWsdlRequester"/>
    </partnerLinks>
    <!--
    VARIABLES
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable"
    messageType="client:MultiWsdlRequestMessage"/>
    <!-- Reference to the message that will be sent back to the requester during callback -->
    <variable name="outputVariable"
    messageType="client:MultiWsdlResponseMessage"/>
    <variable name="OnMessage_TestReq_InputVariable"
    messageType="client:MultiWsdlRequestMessage"/>
    <variable name="OnMessage_TestReq_InputVariable_1"
    messageType="client:MultiWsdlRequestMessage"/>
    <variable name="Reply_2_TestReq_OutputVariable"
    messageType="client:MultiWsdlResponseMessage"/>
    <variable name="Reply_1_TestReq_OutputVariable"
    messageType="client:MultiWsdlResponseMessage"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in MultiWsdl.wsdl) -->
    <!--
    Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
    -->
    <pick name="Pick_1" createInstance="yes">
    <onMessage portType="client:MultiWsdl" operation="Update"
    variable="OnMessage_TestReq_InputVariable_1"
    partnerLink="client">
    <sequence name="Sequence_1">
    <assign name="Assign_1">
    <copy>
    <from expression="'test'"/>
    <to variable="Reply_1_TestReq_OutputVariable"
    part="payload"
    query="/client:MultiWsdlProcessResponse/client:result"/>
    </copy>
    </assign>
    <reply name="Reply_2" partnerLink="client"
    portType="client:MultiWsdl" operation="Update"
    variable="Reply_1_TestReq_OutputVariable"/>
    </sequence>
    </onMessage>
    <onMessage portType="client:MultiWsdl" operation="Create"
    variable="OnMessage_TestReq_InputVariable"
    partnerLink="client">
    <sequence name="Sequence_2">
    <assign name="Assign_2">
    <copy>
    <from expression='"AB"'/>
    <to variable="Reply_2_TestReq_OutputVariable"
    part="payload"
    query="/client:MultiWsdlProcessResponse/client:result"/>
    </copy>
    </assign>
    <reply name="Reply_1" partnerLink="client"
    portType="client:MultiWsdl" operation="Create"
    variable="Reply_2_TestReq_OutputVariable"/>
    </sequence>
    </onMessage>
    </pick>
    </sequence>
    </process>
    ----------xsd -------
    <schema attributeFormDefault="unqualified"
    elementFormDefault="qualified"
    targetNamespace="http://xmlns.oracle.com/MultiWsdl"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="MultiWsdlProcessRequest">
    <complexType>
    <sequence>
    <element name="input" type="string"/>
    </sequence>
    </complexType>
    </element>
    <element name="MultiWsdlProcessResponse">
    <complexType>
    <sequence>
    <element name="result" type="string"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    -----------------------------------------------------------------------------------------------------bpel.xml--------------------------------------------------
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <BPELSuitcase>
    <BPELProcess id="MultiWsdl" src="MultiWsdl.bpel">
    <partnerLinkBindings>
    <partnerLinkBinding name="client">
    <property name="wsdlLocation">MultiWsdl.wsdl</property>
    </partnerLinkBinding>
    </partnerLinkBindings>
    </BPELProcess>
    </BPELSuitcase>

    Thanks a lot. It helped me a lot. It seems this is the problem with the BPEL Console. I tried to create another BPEL Project to invoke the other service/operations. It worked perfectly fine. I had even tested with SoapUI. It worked fine. Thanks for the right pointer.

  • DataTable Exception: Invalid operation for the current cursor position

    I have a JSF application that lists rows from a view in a SQL Server database. I have set up a commandLinks in an extra columns.
    The data is displayed properly, but when I select one of the commandLinks I get the "Invalid operation for the current cursor position" exception.
    Here's the source
    Domain.jsp
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page1 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Domains.form1}" id="form1">
                        <h:dataTable binding="#{Domains.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd"
                            value="#{Domains.dataTable1Model}" var="currentRow">
                            <h:column binding="#{Domains.column9}" id="column9">
                                <h:selectBooleanCheckbox binding="#{Domains.checkbox2}" id="checkbox2"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText9}" id="outputText9" value="Select"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column10}" id="column10">
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText4}" id="outputText4" value="Name"/>
                                </f:facet>
                                <h:commandLink action="#{Domains.groupList}" binding="#{Domains.linkAction1}" id="linkAction1">
                                    <h:graphicImage binding="#{Domains.image1}" id="image1" url="resources/images/domain16.gif" value="resources/images/domain16.gif"/>
                                    <h:outputText binding="#{Domains.linkAction1Text}" id="linkAction1Text" value="#{currentRow['name']}"/>
                                </h:commandLink>
                            </h:column>
                            <h:column binding="#{Domains.column3}" id="column3">
                                <h:outputText binding="#{Domains.outputText5}" id="outputText5" value="#{currentRow['description']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText6}" id="outputText6" value="Description"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column4}" id="column4">
                                <h:selectBooleanCheckbox binding="#{Domains.checkbox1}" id="checkbox1" value="#{Domains.domainviewRowSet.currentRow['enabled']}==1"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText8}" id="outputText8" value="Enabled"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column7}" id="column7">
                                <h:outputText binding="#{Domains.outputText13}" id="outputText13" value="#{currentRow['userCount']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText14}" id="outputText14" value="Users"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column8}" id="column8">
                                <h:outputText binding="#{Domains.outputText15}" id="outputText15" value="#{currentRow['groupCount']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText16}" id="outputText16" value="Groups"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column5}" id="column5">
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText17}" id="outputText17" value="Actions"/>
                                </f:facet>
                                <h:commandLink action="#{Domains.editDomain}" binding="#{Domains.linkAction2}" id="linkAction2">
                                    <h:graphicImage binding="#{Domains.image2}" id="image2" title="Edit" value="resources/images/edit.gif"/>
                                </h:commandLink>
                                <h:commandLink binding="#{Domains.linkAction3}" id="linkAction3">
                                    <h:graphicImage binding="#{Domains.image3}" id="image3" title="View" url="resources/images/view.gif" value="resources/images/view.gif"/>
                                </h:commandLink>
                                <h:commandLink binding="#{Domains.linkAction4}" id="linkAction4">
                                    <h:graphicImage binding="#{Domains.image4}" id="image4" title="Delete" value="resources/images/delete.gif"/>
                                </h:commandLink>
                            </h:column>
                        </h:dataTable>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>
    Domains.java
    * Page1.java
    * Created on October 28, 2004, 12:45 PM
    * Copyright Gordon.Bell
    package usergroupmgt;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.jsfcl.data.*;
    import javax.faces.component.*;
    import com.sun.sql.rowset.*;
    import javax.faces.convert.*;
    public class Domains extends AbstractPageBean {
        // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
        private int __placeholder;
        private HtmlForm form1 = new HtmlForm();
        public HtmlForm getForm1() {
            return form1;
        public void setForm1(HtmlForm hf) {
            this.form1 = hf;
        private HtmlDataTable dataTable1 = new HtmlDataTable();
        public HtmlDataTable getDataTable1() {
            return dataTable1;
        public void setDataTable1(HtmlDataTable hdt) {
            this.dataTable1 = hdt;
        private JdbcRowSetXImpl domainviewRowSet = new JdbcRowSetXImpl();
        public JdbcRowSetXImpl getDomainviewRowSet() {
            return domainviewRowSet;
        public void setDomainviewRowSet(JdbcRowSetXImpl jrsxi) {
            this.domainviewRowSet = jrsxi;
        private HtmlOutputText outputText4 = new HtmlOutputText();
        public HtmlOutputText getOutputText4() {
            return outputText4;
        public void setOutputText4(HtmlOutputText hot) {
            this.outputText4 = hot;
        private UIColumn column3 = new UIColumn();
        public UIColumn getColumn3() {
            return column3;
        public void setColumn3(UIColumn uic) {
            this.column3 = uic;
        private HtmlOutputText outputText5 = new HtmlOutputText();
        public HtmlOutputText getOutputText5() {
            return outputText5;
        public void setOutputText5(HtmlOutputText hot) {
            this.outputText5 = hot;
        private HtmlOutputText outputText6 = new HtmlOutputText();
        public HtmlOutputText getOutputText6() {
            return outputText6;
        public void setOutputText6(HtmlOutputText hot) {
            this.outputText6 = hot;
        private UIColumn column4 = new UIColumn();
        public UIColumn getColumn4() {
            return column4;
        public void setColumn4(UIColumn uic) {
            this.column4 = uic;
        private HtmlOutputText outputText8 = new HtmlOutputText();
        public HtmlOutputText getOutputText8() {
            return outputText8;
        public void setOutputText8(HtmlOutputText hot) {
            this.outputText8 = hot;
        private UIColumn column7 = new UIColumn();
        public UIColumn getColumn7() {
            return column7;
        public void setColumn7(UIColumn uic) {
            this.column7 = uic;
        private HtmlOutputText outputText13 = new HtmlOutputText();
        public HtmlOutputText getOutputText13() {
            return outputText13;
        public void setOutputText13(HtmlOutputText hot) {
            this.outputText13 = hot;
        private HtmlOutputText outputText14 = new HtmlOutputText();
        public HtmlOutputText getOutputText14() {
            return outputText14;
        public void setOutputText14(HtmlOutputText hot) {
            this.outputText14 = hot;
        private UIColumn column8 = new UIColumn();
        public UIColumn getColumn8() {
            return column8;
        public void setColumn8(UIColumn uic) {
            this.column8 = uic;
        private HtmlOutputText outputText15 = new HtmlOutputText();
        public HtmlOutputText getOutputText15() {
            return outputText15;
        public void setOutputText15(HtmlOutputText hot) {
            this.outputText15 = hot;
        private HtmlOutputText outputText16 = new HtmlOutputText();
        public HtmlOutputText getOutputText16() {
            return outputText16;
        public void setOutputText16(HtmlOutputText hot) {
            this.outputText16 = hot;
        private HtmlSelectBooleanCheckbox checkbox1 = new HtmlSelectBooleanCheckbox();
        public HtmlSelectBooleanCheckbox getCheckbox1() {
            return checkbox1;
        public void setCheckbox1(HtmlSelectBooleanCheckbox hsbc) {
            this.checkbox1 = hsbc;
        private UIColumn column5 = new UIColumn();
        public UIColumn getColumn5() {
            return column5;
        public void setColumn5(UIColumn uic) {
            this.column5 = uic;
        private UIColumn column9 = new UIColumn();
        public UIColumn getColumn9() {
            return column9;
        public void setColumn9(UIColumn uic) {
            this.column9 = uic;
        private HtmlSelectBooleanCheckbox checkbox2 = new HtmlSelectBooleanCheckbox();
        public HtmlSelectBooleanCheckbox getCheckbox2() {
            return checkbox2;
        public void setCheckbox2(HtmlSelectBooleanCheckbox hsbc) {
            this.checkbox2 = hsbc;
        private HtmlOutputText outputText9 = new HtmlOutputText();
        public HtmlOutputText getOutputText9() {
            return outputText9;
        public void setOutputText9(HtmlOutputText hot) {
            this.outputText9 = hot;
        private UIColumn column10 = new UIColumn();
        public UIColumn getColumn10() {
            return column10;
        public void setColumn10(UIColumn uic) {
            this.column10 = uic;
        private RowSetDataModel dataTable1Model = new RowSetDataModel();
        public RowSetDataModel getDataTable1Model() {
            return dataTable1Model;
        public void setDataTable1Model(RowSetDataModel rsdm) {
            this.dataTable1Model = rsdm;
        private BooleanConverter booleanConverter1 = new BooleanConverter();
        public BooleanConverter getBooleanConverter1() {
            return booleanConverter1;
        public void setBooleanConverter1(BooleanConverter bc) {
            this.booleanConverter1 = bc;
        private HtmlCommandLink linkAction1 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction1() {
            return linkAction1;
        public void setLinkAction1(HtmlCommandLink hcl) {
            this.linkAction1 = hcl;
        private HtmlOutputText linkAction1Text = new HtmlOutputText();
        public HtmlOutputText getLinkAction1Text() {
            return linkAction1Text;
        public void setLinkAction1Text(HtmlOutputText hot) {
            this.linkAction1Text = hot;
        private HtmlGraphicImage image1 = new HtmlGraphicImage();
        public HtmlGraphicImage getImage1() {
            return image1;
        public void setImage1(HtmlGraphicImage hgi) {
            this.image1 = hgi;
        private HtmlCommandLink linkAction2 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction2() {
            return linkAction2;
        public void setLinkAction2(HtmlCommandLink hcl) {
            this.linkAction2 = hcl;
        private HtmlGraphicImage image2 = new HtmlGraphicImage();
        public HtmlGraphicImage getImage2() {
            return image2;
        public void setImage2(HtmlGraphicImage hgi) {
            this.image2 = hgi;
        private HtmlCommandLink linkAction3 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction3() {
            return linkAction3;
        public void setLinkAction3(HtmlCommandLink hcl) {
            this.linkAction3 = hcl;
        private HtmlGraphicImage image3 = new HtmlGraphicImage();
        public HtmlGraphicImage getImage3() {
            return image3;
        public void setImage3(HtmlGraphicImage hgi) {
            this.image3 = hgi;
        private HtmlCommandLink linkAction4 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction4() {
            return linkAction4;
        public void setLinkAction4(HtmlCommandLink hcl) {
            this.linkAction4 = hcl;
        private HtmlGraphicImage image4 = new HtmlGraphicImage();
        private HtmlOutputText outputText17 = new HtmlOutputText();
        public HtmlOutputText getOutputText17() {
            return outputText17;
        public void setOutputText17(HtmlOutputText hot) {
            this.outputText17 = hot;
        public HtmlGraphicImage getImage4() {
            return image4;
        public void setImage4(HtmlGraphicImage hgi) {
            this.image4 = hgi;
        // </editor-fold>
        public Domains() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
                domainviewRowSet.setDataSourceName("java:comp/env/jdbc/HBird");
                domainviewRowSet.setCommand("SELECT ALL dbo.DomainView.id, dbo.DomainView.name, dbo.DomainView.description, dbo.DomainView.enabled, dbo.DomainView.created, dbo.DomainView.modified, dbo.DomainView.userCount, dbo.DomainView.groupCount  FROM dbo.DomainView");
                dataTable1Model.setDataCacheKey("com.sun.datacache.Domains.domainviewRowSet");
                dataTable1Model.setRowSet(domainviewRowSet);
                dataTable1Model.setSchemaName("");
                dataTable1Model.setTableName("");
            } catch (Exception e) {
                log("Page1 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e : new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
    //        try {
    //            domainviewRowSet.execute();
    //            domainviewRowSet.next();
    //        } catch (Exception ex) {
    //            throw new FacesException(ex);
        protected usergroupmgt.ApplicationBean1 getApplicationBean1() {
            return (usergroupmgt.ApplicationBean1)getBean("ApplicationBean1");
        protected usergroupmgt.SessionBean1 getSessionBean1() {
            return (usergroupmgt.SessionBean1)getBean("SessionBean1");
         * Bean cleanup.
        protected void afterRenderResponse() {
            domainviewRowSet.close();
        public String groupList() {
            // User event code here...
            return "groupList";
        public String editDomain() {
            // User event code here...
            return "editDomain";
    }and the exception stack:
    Stack trace:
    com.sun.jsfcl.data.ResultSetPropertyResolver$RowData.getData(Unknown Source)
    com.sun.jsfcl.data.ResultSetPropertyResolver.getValue(Unknown Source)
    com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
    com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
    com.sun.faces.el.MixedELValueBinding.getValue(MixedELValueBinding.java:80)
    javax.faces.component.UIOutput.getValue(UIOutput.java:147)
    javax.faces.component.UIInput.validate(UIInput.java:639)
    javax.faces.component.UIInput.executeValidate(UIInput.java:838)
    javax.faces.component.UIInput.processValidators(UIInput.java:412)
    javax.faces.component.UIData.iterate(UIData.java:969)
    javax.faces.component.UIData.processValidators(UIData.java:781)
    javax.faces.component.UIForm.processValidators(UIForm.java:170)
    javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:904)
    javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
    com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
    org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
    com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
    java.lang.Thread.run(Thread.java:534)Any help is appreciated.

    Hi,
    Looks like some inconsistency in the jsp source:
    in the 2nd link the url property is set. I don't think
    you need to set this.
    I couldn't tell what action you want to occur when you
    click. If you want some action to occur such as
    navigating to another page then you can use Page Navigation. Then you would need an action handler
    for the LinkAction component.
    <h:commandLink action="#{Domains.editDomain}" binding="#{Domains.linkAction2}" id="linkAction2">
    <h:graphicImage binding="#{Domains.image2}" id="image2" title="Edit" value="resources/images/edit.gif"/>
    </h:commandLink>
    <h:commandLink binding="#{Domains.linkAction3}" id="linkAction3">
    <h:graphicImage binding="#{Domains.image3}" id="image3" title="View" url="resources/images/view.gif" value="resources/images/view.gif"/>
    </h:commandLink>
    <h:commandLink binding="#{Domains.linkAction4}" id="linkAction4">
    <h:graphicImage binding="#{Domains.image4}" id="image4" title="Delete" value="resources/images/delete.gif"/>
    </h:commandLink>
    John
    JSC QA

  • String operations on internal table text....

    Original table is consists of 2 columns:
    E        
    RFC error(SM_DHTCLNT010_READ): Error when opening connection
    E RFC error(SM_DHLCLNT010_READ): Error when opening connection
    E RFC error(SM_DHKCLNT010_READ): Error when opening connection
    E RFC error(SM_E10CLNT000_READ): 'tdhtci00.emea.gdc:sapgw02' E     No read RFC FOR SM_B72CLNT003_READ
    E     No read RFC FOR SM_B71CLNT003_READ
    S     Clients for system 'E21' found in RFC  'SM_E21CLNT001_READ'
    S     Clients for system 'E22' found in RFC  'SM_E22CLNT001_READ'
    S     Clients for system 'E23' found in RFC  'SM_E22CLNT001_READ'
    Now we need to apply string operations such that result table is 3 columns with new refined message:
    status       sid            
    Message NEW_TEXT
    E     DHT         
    RFC error               Error when opening connectionE     DHL         RFC error                       Error when opening connection
    E     DHK         RFC error                       Error when opening connection
    E     E10       RFC error                      tdhtci00.emea.gdc:sapgw02
    E     B72        No RFC LINK
    E     B71        No RFC LINK
    S     E21        DATA READ
    S     E22       DATA READ
    S     E23       DATA READ
    String conditions to arrive at new table is:
    1) to get SID column : the conditions are
    •     If the Status is “RFC Error” then next 3 Characters after the “_” must be extracted as SID
    •     Else the SID is between the first and the second inverted comma ‘
    Example:  Clients for system 'E21' found in RFC  'SM_E21CLNT001_READ'extracts “E21” as SID
    2) for message column
    ·         message “RFC Error” if the message text
    starts with “RFC Error”
    · message “no RFC Link” if the message text starts with “No read RFC*”
    · message “Data Read” if the Substring “found in RFC”</b> was found in the Message      
    3) •     If the Status is “RFC Error” then the whole Textstring behind the “: “ must be Extracted
    For example if message is RFC error(SM_DHLCLNT010_READ): Error when opening connection NEW_TEXT will be Error when opening connection
    Need ur inputs on these.
    Bset regards,
    Subba

    Hi,
    this u can acheive simply using offset:
    var_name+off(len). "
    e.g. wa_message-fld+0(3) = first threee characters
    wa_message-fld(3) same as above first three characters
    wa_message-fld+2(2) " will display second and third characte of wa_message-fld
    this u can use to set condtions like :
    if wa_message-fld(9) = 'RFC Error'.
    "process here
    endif.
    Hope this will help u...
    Jogdand M B

  • Can't set IE Desktop as default program for Assigned Access

    I have searched everywhere for this answer.  Kiosk mode/assigned access is excellent.  But it appears that you can only use IE Modern (Metro) for assigned access and the problem with that is I have found no way to completely lock down IE Modern. 
    I can only partially lock it down but users can still get to the address bar and settings very easily.
    I either need some advice on setting IE to complete lockdown or how to set IE desktop for Assigned  Access.

    Perhaps you can create a special application that will be selected for Assigned Access. This application will then start the desktop variant of Internet Explorer (or an intermediate desktop program). There are some articles about such
    operation based on Launcher class and custom file association.

  • Is it posssible for assigning p.o to copmpany code

    hi,
    is it posssible for assigning p.o to copmpany code.if yes which synario it works??
    thaks
    subhasis

    Hi,
    You can assign a purchasing organization to one company code. This is company-specific purchasing.
    You can assign a purchasing organization to no company code. This purchasing organization can then procure for all plants assigned to it, irrespective of the company code to which the plant belongs.
    Since each plant must be assigned to a company code, the company code can be determined via the plant in each procurement transaction, even if the procuring purchasing organization is not assigned to a company code.
    A purchasing organization must be assigned to one or more plants. This is plant-specific purchasing
    From the Materials Management and Purchasing view, the purchasing organization is responsible for all purchasing activities (including the processing of requests for quotations and purchase orders, for example).
    The purchasing organization is integrated within the organizational structure as follows:
    A purchasing organization can be assigned to several company codes.
    (= Corporate-group-wide purchasing).
    A purchasing organization can be assigned to one company code.
    (= Company-specific purchasing).
    A purchasing organization can also exist without being assigned to a company code.
    Since each plant must be assigned to a company code, the latter can be determined via the plant at the time of each procurement transaction even if the procuring purchasing organization has not been assigned to a company code.
    A purchasing organization must be assigned to one or more plants.
    (= Plant-specific purchasing).
    A purchasing organization can be linked to one or more other purchasing organizations.
    (= reference purchasing organization)
    For more on this topic, refer to Assign Purchasing Organization to Reference Purchasing Organization.
    A purchasing organization can be divided into several purchasing groups that are responsible for different operational areas.
    Each purchasing organization has its own info records and conditions for pricing.
    Each purchasing organization has its own vendor master data.
    Each purchasing organization evaluates its own vendors using MM Vendor Evaluation.
    Authorizations for processing purchasing transactions can be assigned to each purchasing organization.
    All items of an external purchasing document, that is, request for quotation, purchase order, contract, or scheduling agreement, belong to a purchasing organization.
    The purchasing organization is the highest level of aggregation (after the organizational unit "client") for purchasing statistics.
    The purchasing organization serves as the selection criterion for lists of all purchasing documents.
    Possible organizational forms
    You can organize your purchasing function in the following ways:
    Corporate-group-wide purchasing
    Company-specific purchasing
    Plant-specific purchasing
    All of these forms can co-exist within a single client.
    Corporate-group-wide purchasing:
    A purchasing organization is responsible for the purchasing activities of different company codes.
    In this case, you do not assign a company code to the purchasing organization, but specify the company code concerned for each individual purchasing transaction. You assign plants from different company codes to the purchasing organization.
    Company-specific purchasing:
    A purchasing organization is responsible for the purchasing activities of just one company code.
    In this case, you assign a company code to the purchasing organization. The purchasing organization may procure only for this company code. You assign only plants of the company code concerned to the purchasing organization.
    Plant-specific purchasing:
    A purchasing organization is responsible for the purchasing activities of one plant.
    In this case, you assign the plant and the company code of the plant to the purchasing organization. The purchasing organization may procure for this plant only.
    Note
    If you wish to work with a mixture of the above organizational forms, the reference purchasing organization is of significance to you.
    It is possible to allow one purchasing organization to access the contracts and conditions of another - a so-called reference purchasing organization. This makes it possible for advantageous terms negotiated by one purchasing organization to also be used by other purchasing organizations
    Regards

  • String operations in internal table

    Dear friends..
            Good morning.
                        I wish to know.. how i segregate the field from a database table to internal table into two different internal table field. say for example.
    i have db table tab1 which has field number
    tab1 -> number
    and i have another internal table itab1 whic has two fields numa and numb
    tab1 -> numa
         -> numb
    i have value in tab1->number is 001 and 0001
    i wish to segregate this two values in to internal table
    if the value is 001 then it should be into 001 -> numa
    if the value is 0001 then it should be into 0001-> numb
    i dont know how to perform the string operations in internal table.. would you like to tell me how i fix this problem any suggetion, article, code will be great help of mine..
    thanking you
    Regards
    Naim

    Hi,
      what u can do is check the lenth
    lit_data_tab.
    lit_data_3
    lit_data_4.
    lv_char3 type char3.
    lv_char4 type char4.
    lv_length type i.
    loop at lit_data_tab.
    lv_length = STRLEN ( lit_data_tab-value ).
    if lv_length = 3.
       lv_char3 = lit_data_tab-value .
       append lv_char3 to lv_char3 type char3.
    else.
       lv_char4 = lit_data_tab-value .
       append lv_char4 to lv_char3 type char4.
    endif.
    endloop.
    if u want
    numa  numb
    003   0003.
    then u have to loop in one table and modify other.
    that is any one table should contains both the field.
    read the table with one field
    mark helpfull answers
    Regards
    Message was edited by: Manoj Gupta

  • Between operator for group by date in Apex Interactive Reports

    Hi,
    In the interactive reports filter, i couldn't find the 'between' operator for date field (got a 'group by date' in my sql query (source). I am just wondering, Is it beacuse of the group by date clause?. Is there any way to show the 'between' operator in the interactive reports filter.
    Thanks

    I just opened an existing IR style report, went to actions, filter, selected a date column and found between at the bottom of the list of values.. Are you sure the date you are trying to filter on is a true date column?
    Thank you,
    Tony Miller
    Webster, TX
    What if you really were stalking a paranoid schizophrenic... Would they know?
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Efficiency of Java String operations

    Hi,
    for an Information Retrieval project, I need to make extensive use of String operations on a vast number of documents, and in particular involving lots of substring() operations.
    I'd like to get a feeling how efficient the substring() method of java.lang.String is implemented just to understand whether trying to optimize it would be a reasonable option (I was thinking of an algorithm for efficient string pattern matching such as the Knuth-Morris-Pratt algorithm, but if java.lang.String already applies similarly efficient algorithms I would not bother).
    Can someone help?
    J

    Thanks for your comment. Yes of course you're right, I
    mean indexOf(). If so (thanks DrClap), let me enter the discussion.
    The indexOf() implements a so called "brute force algorithm".
    The performance is O(n*m), where n is the length of the text, and
    m is the length of the pattern, but is close to n on the average.
    The KMP is O(n), so the performance gain should be hardly noticeable.
    To get a real performance gain you should look at the BM (Boyer-Moore,
    O(n/m)) algorithm or some of its descendants.
    As for java.util.regex package, as far as i understand it should be
    several times slower than indexOf(), because it reads EACH character through an interface method (as opposed to direct array access in indexOf()).
    Though it's still to be proved experimentally.

  • Reg: EQ Operator for Select-Options..

    Normally we use IN Operator for comparing selection-screen fields for select-options, Rarely we use EQ also when working with Select-Options, why we go for this EQ operator.
    Kindly let me know.
    Thanx in Advance.
    Akshitha.

    Hi there. You should use IN when you know that there will be or may be multiple values chosen for the select-option.  For instance, if the user is going to enter a range of personnel numbers on the selection screen, you could use something like:
    IF ws_pernr IN p_pernr
    (where p_pernr is your select-option selection screen field).
    But if you know that the select-option field will only have one value assigned to it (or you are referencing either the high value or the low value of the select-option) then you can use EQ; the term EQ checks for equality against a single value.
    - April King

  • Perl versus other "scripting" languages when doing string operations

    I've been told that perl is a "scripting" language like the other languages mentioned in this forum.
    If that's true, can these other languages handle the following spec as well as perl can?  (See spec at end of this post.)
    Or is perl stronger in string operations than the other scripting languages mentioned here?
    Here's the spec:
    1. I give your program  a twenty-letter alphabet (any twenty letter alphabet)
    For example:
    ABCDEFGHIJKLMNOPQRST
    2.  I also give your program four groups (any four groups) of letters in this alphabet:
    For example:
    s:  A,B,C,D,E
    p:  F,G,H,I,J
    d:  K,L,M,N,O
    e:  P,Q,R,S,T
    3.  I also give your program a sequence over the twenty-letter alphabet that I gave you in Step (1) above:
    For example:
    ABCDEFGHIJKLMNOPQRSTSRQPONMLKJIHGFEDCBA
    4.  Given this sequence,you search for pairs of adjacent letters (x,y) where X and y are from different groups (the groups defined in Step (2) above.)
    Also, you return the results of this search by giving me back the following two strings:
    ABCD(EF)GHI(JK)LMN(OP)QRSTSRQ(PO)NML(KJ)IHG(FE)DCBA  
    ABCD(sp)GHI(pd)LMN(de)QRSTSRQ(ed)NML(dp)IHG(ps)DCBA
    5.  Note: if I give you a sequence that contains "overlapping" ordered pairs like:
    ...EFK...
    then you ignore the second ordered pair.  That is, you return:
    ...(EF)K

    OK - here is the final stuff on the "C" side.
    To execute the program, the command line is:
    20let.exe file1.txt file2.txt file3.txt > fileout.txt
    Below, I've provided:
    a) source code 20let.c
    b) sample input file1.txt
    c) sample input file2.txt
    d) sample input file3.txt
    e) output fileout.txt generated from these input files.
    As soon as Bill finishes the perl version of the source code, I'll post that also.
    source code of 20let.c
    // 20let.c5
    #include <stdio.h>
    #include <stdlib.h>
    int T[333],A[99999],G[333],B[99999],C[99999],N[299999],P[99999];
    int n1,n2,f,p,x1,x2,n,m,a,b,c,i,j,k,x,y,z;
    int E[233][233];
    FILE *file;
    int substrings(int x1,int x2);
    int main(int argc, char*argv[]) {
        if(argc<3){
            printf("\nusage:20let protein-file nucleotide-file pairs-include-file\n\n");
            printf("marks amino-acid-pairs from different groups in protein-file\n");
            printf("iff they are in the include-file\n");
            exit(1);
    //----------------define the groups        G['I'] = 's', e.g.
        x='s'; G['I']=x;G['M']=x;G['V']=x;G['A']=x;G['G']=x;
        x='p'; G['F']=x;G['L']=x;G['P']=x;G['W']=x;G['W']=x;
        x='d'; G['H']=x;G['Q']=x;G['D']=x;G['E']=x;G['E']=x;
        x='t'; G['S']=x;G['T']=x;G['Y']=x;G['N']=x;G['C']=x;G['K']=x;G['R']=x;
    //----------------the 4 bases              T['a'] = 0 thru 3
        for(x=0;x<222;x++)
            T[x]=-999;
        T['a']=0;T['c']=1;T['g']=2;T['t']=3;
        T['A']=0;T['C']=1;T['G']=2;T['T']=3;
      for(i=65;i<70;i++)G<i>='s';
      for(i=70;i<75;i++)G<i>='p';
      for(i=75;i<80;i++)G<i>='d';
      for(i=80;i<85;i++)G<i>='t';
    //---------------- read include-file   file3 xxxyyy pairs E[x][y] of interest
        f=0;
        for(x=0;x<222;x++)
            for(y=0;y<222;y++)
                E[x][y]=0;
        if((file=fopen(argv[3],"rb"))==NULL){
            printf("\ncan't open exclude-file %s\n",argv[1]);exit(1);
    mq1: if(feof(file))
            goto mq3;
        x=fgetc(file);y=fgetc(file);x=fgetc(file);
        x=T[fgetc(file)]*16+T[fgetc(file)]*4+T[fgetc(file)];
        y=T[fgetc(file)]*16+T[fgetc(file)]*4+T[fgetc(file)];
        if(x<64 && x>=0 && y<64 && y>=0){
            E[x][y]=1;
            f++;
    mq2: if(feof(file))
            goto mq3;
        a=fgetc(file);
        if(a!=10)
            goto mq2;
        goto mq1;
    mq3: fclose(file);
    //------------------read amino-acid file    file1 == P array
        if((file=fopen(argv[1],"rb"))==NULL){
            printf("\ncan't open file %s\n",argv[1]);exit(1);}
        p=0;
    m1p: if(feof(file))
            goto m2p;
        p++;
        P[p]=fgetc(file);
        if(G[P[p]]==0)
            p--;
        goto m1p;
    m2p:;
        fclose(file);
    //------------------read nucleotide file    file2 == N array
        if((file=fopen(argv[2],"rb"))==NULL){
            printf("\ncan't open file %s\n",argv[1]);exit(1);
        n=0;
    m1n: if(feof(file))
            goto m2n;
        n++;
        N[n]=fgetc(file);
        if(N[n]!='a' && N[n]!='c' && N[n]!='g' && N[n]!='t')
            n--;
        goto m1n;
    m2n:;
        fclose(file);
    //for(i=1;i<=p;i++)printf("%c",P<i>);printf("\n");
    //for(i=1;i<=n;i++)printf("%c",N<i>);printf("\n");
    //printf("%i include-pairs  %i nucleotides  %i proteins\n",f,n,p);
    //------------1st line------------------       B<i> = result
        m=0;
        for(i=1;i<=p;i++){
            n1=T[N[i*3-2]]*16+T[N[i*3-1]]*4+T[N[i*3]];
            n2=T[N[i*3+1]]*16+T[N[i*3+2]]*4+T[N[i*3+3]];
    //printf("\ni=%i p=%i n1=%i n2=%i\n",i,p,n1,n2);
            if(E[n1][n2]<1 || G[P<i>]==G[P[i+1]] /* || i==n */){
                printf("%c",P<i>);
                m++;
                B[m]=P<i>;
                goto m3;
            printf("(%c%c)",P<i>,P[i+1]);
            i++;
            m++;
            B[m]='(';
            m++;
            B[m]=P[i-1];
            m++;
            B[m]=P<i>;
            m++;
            B[m]=')';
    //printf("(%c)%c",G[A<i>],G[A[i+1]]);i++;
        m3:;
        printf("\n");
    //------------2nd line------------------       C<i> = result
        m=0;
        for(i=1;i<=p;i++){
            n1=T[N[i*3-2]]*16+T[N[i*3-1]]*4+T[N[i*3]];
            n2=T[N[i*3+1]]*16+T[N[i*3+2]]*4+T[N[i*3+3]];
            if(E[n1][n2]<1 || G[P<i>]==G[P[i+1]] /* || i==n */){
                printf("%c",P<i>);
                m++;
                C[m]=P<i>;
                goto m4;
            printf("(%c%c)",G[P<i>],G[P[i+1]]);
            i++;
            m++;
            C[m]='(';
            m++;
            C[m]=G[P[i-1]];
            m++;
            C[m]=G[P<i>];
            m++;
            C[m]=')';
    //printf("(%c)%c",G[A<i>],G[A[i+1]]);i++;
        m4:;
        printf("\n");
    //for(i=1;i<=m;i++)printf("%c",B<i>);printf("\n");
    //------------3rd line------------------         printf only
        m=0;
        for(i=1;i<=p;i++){
            n1=T[N[i*3-2]]*16+T[N[i*3-1]]*4+T[N[i*3]];
            n2=T[N[i*3+1]]*16+T[N[i*3+2]]*4+T[N[i*3+3]];
            if(E[n1][n2]<1 || G[P<i>]==G[P[i+1]] /* || i==n */){
                printf("%c%c%c",N[i*3-2],N[i*3-1],N[i*3]);
                goto m33;
            printf("(%c%c%c%c%c%c)",N[i*3-2],N[i*3-1],N[i*3],N[i*3+1],N[i*3+2],N[i*3+3]);
            i++;
        m33:;
        printf("\n");
    //--------------substrings------------
        substrings(20,29);
        substrings(30,39);
        substrings(40,49);
        substrings(50,59);
        substrings(60,69);
        return 0;
    int substrings(int x1,int x2)
        printf("\n");
        printf("lengths %i - %i : \n",x1,x2);
        for(i=1; i<p; i++)
            for (j=i+x1; j<i+x2; j++) {
                if (C<i>>95 && C[j]>95) {   // if lc letter in line2
                    for(x=i;x<=j;x++)
                        printf("%c",C[x]);
                    printf("|");
                    for(x=i;x<=j;x++)
                        if(B[x]>44)         // if not () in line 1
                            printf("%c",B[x]);
                    printf("|");
                    for(x=i;x<=j;x++)
                        if(C[x]>95)         // if lc letter line2
                            printf("%c",C[x]);
                    printf("\n");}
    input file1.txt
    MKKHTDQPIADVQGSPDTRH
    IAIDRVGIKAIRHPVLVADK
    DGGSQHTVAQFNMYVNLPHN
    FKGTHMSRFVEILNSHEREI
    SVESFEEILRSMVSRLESDS
    GHIEMTFPYFVNKSAPISGV
    KSLLDYEVTFIGEIKHGDQY
    GFTMKVIVPVTSLCPCSKKI
    SDYGAHNQRSHVTISVHTNS
    FVWIEDVIRIAEEQASCELF
    GLLKRPDEKYVTEKAYNNPK
    FVEDIVRDVAEILNHDDRID
    AYVVESEBFESIHNHSAYAL
    IERD
    input file2.txt
    atgaaaaaacatactgatcaacctatcgctgatgtgcagggctcaccggataccagacat
    atcgcaattgacagagtcggaatcaaagcgattcgtcacccggttctggtcgccgataag
    gatggtggttcccagcataccgtggcgcaatttaatatgtacgtcaatctgccacataat
    ttcaaagggacgcatatgtcccgttttgtggagatactaaatagccacgaacgtgaaatt
    tcggttgaatcatttgaagaaattttgcgctccatggtcagcaggctggaatcagattcc
    ggccatattgaaatgacttttccctacttcgtcaataaatcagcccctatctcaggtgta
    aaaagcttgctggattatgaggtaacctttatcggcgaaattaaacatggcgatcaatat
    gggtttaccatgaaggtgatcgttcctgttaccagcctgtgcccctgctccaagaaaata
    tccgattacggtgcgcataaccagcgttcacacgtcaccatttctgtacacactaacagc
    ttcgtctggattgaggacgttatcagaattgcggaagaacaggcctcatgcgaactgttc
    ggtctgctgaaacggccggatgaaaaatatgtcacagaaaaggcctataacaatccgaaa
    tttgtcgaagatatcgtccgtgatgtcgccgaaatacttaatcatgatgaccggatagat
    gcctatgttgttgaatcagaaaactttgaatccatacataatcactctgcatacgcactg
    atagagcgcgac
    input file3.txt
    FA tttgcc
    FA ttcgcc
    FA tttgct
    FA ttcgct
    LK ttaaaa
    LK ttgaaa
    LK ttaaag
    LK ttgaag
    LS ctgctc
    LS ctgctt
    LS ctactc
    LS ctactt
    LT ctcacc
    LT ctcact
    LT cttacc
    LT cttact
    LY ctctac
    LY ctctat
    LY ctttac
    LY ctttat
    LG ctcggc
    LG ctcggt
    LG cttggc
    LG cttggt
    IP attccc
    IP attcct
    IP atcccc
    IP atccct
    IP attcca
    IP attccg
    IP atccca
    IP atcccg
    ML atgctc
    ML atgctt
    ML atgctc
    ML atgctt
    VL gtgctg
    VL gtgcta
    VL gtactg
    VL gtacta
    VS gtgtcc
    VS gtatct
    VS gtgtcc
    VS gtatct
    VT gtcacc
    VT gtcact
    VT gttacc
    VT gttact
    VS gtcagc
    VS gtcagt
    VS gttagc
    VS gttagt
    SL tcgctg
    SL tcgcta
    SL tcactg
    SL tcacta
    SP tctcca
    SP tctccg
    SP tcccca
    SP tccccg
    PV ccggtg
    PV ccggta
    PV ccagtg
    PV ccagta
    PG cccggc
    PG cccggt
    PG cctggc
    PG cctggt
    TL acgctg
    TL acgcta
    TL acactg
    TL acacta
    TP acgccg
    TP acgcca
    TP acaccg
    TP acacca
    AL gcttta
    AL gctttg
    AL gcctta
    AL gccttg
    AP gcgccg
    AP gcgcca
    AP gcaccg
    AP gcacca
    AP gctcca
    AP gctccg
    AP gcccca
    AP gccccg
    AN gctaat
    AN gctaac
    AN gccaat
    AN gccaac
    AS gccagc
    AS gccagt
    AS gctagc
    AS gctagt
    YP tatccg
    YP tatcca
    YP tacccg
    YP taccca
    HP catccg
    HP catcca
    HP cacccg
    HP caccca
    QR cagcga
    QR cagcgg
    QR caacga
    QR caacgg
    DL gatttg
    DL gattta
    DL gacttg
    DL gactta
    EN gaaaat
    EN gaaaac
    EN gagaat
    EN gagaac
    EK gaaaaa
    EK gaaaag
    EK gagaaa
    EK gagaag
    ER gagcga
    ER gagcgg
    ER gaacga
    ER gaacgg
    WR tggcga
    WR tggcgg
    RV cgggtg
    RV cgggta
    RV cgagtg
    RV cgagta
    RW cggtgg
    RW cgatgg
    SG agtgga
    SG agtggg
    SG agcgga
    SG agcggg
    GF ggtttt
    GF ggtttc
    GF ggcttt
    GF ggcttc
    GL gggctg
    GL gggcta
    GL ggactg
    GL ggacta
    GY gggtat
    GY gggtac
    GY ggatat
    GY ggatac
    GY ggttat
    GY ggttac
    GY ggctat
    GY ggctac
    GK ggaaaa
    GK ggaaag
    GK gggaaa
    GK gggaag
    GK ggcaag
    GK ggcaaa
    GK ggtaag
    GK ggtaaa
    GW ggctgg
    GW ggttgg
    GR gggcgg
    GR gggcga
    GR ggacgg
    GR ggacga
    GS ggcagc
    GS ggcagt
    GS ggtagc
    GS ggtagt
    output fileout.txt
    MKKHTDQPIADVQGSPDTRHIAIDRVGIKAIR(HP)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(VS)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(VT)SLCPCSKKISDYGAHNQRSH(VT)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(EK)YVT(EK)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(EF)ESIHNHSAYALIERD
    MKKHTDQPIADVQGSPDTRHIAIDRVGIKAIR(dp)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(st)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(st)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp)ESIHNHSAYALIERD
    atgaaaaaacatactgatcaacctatcgctgatgtgcagggctcaccggataccagacatatcgcaattgacagagtcggaatcaaagcgattcgt(cacccg)gttctggtcgccgataaggatggtggttcccagcataccgtggcgcaatttaatatgtacgtcaatctgccacataatttcaaagggacgcatatgtcccgttttgtggagatactaaatagccacgaacgtgaaatttcggttgaatcatttgaagaaattttgcgctccatg(gtcagc)aggctggaatcagattccggccatattgaaatgacttttccctacttcgtcaataaatcagcccctatctcaggtgtaaaaagcttgctggattatgaggtaacctttatcggcgaaattaaacatggcgatcaatatgggtttaccatgaaggtgatcgttcct(gttacc)agcctgtgcccctgctccaagaaaatatccgattacggtgcgcataaccagcgttcacac(gtcacc)atttctgtacacactaacagcttcgtctggattgaggacgttatcagaattgcggaagaacaggcctcatgcgaactgttcggtctgctgaaacggccggat(gaaaaa)tatgtcaca(gaaaag)gcctataacaatccgaaatttgtcgaagatatcgtccgtgatgtcgccgaaatacttaatcatgatgaccggatagatgcctatgttgttgaatca(gaaaac)tttgaatccatacataatcactctgcatacgcactgatagagcgc
    lengths 20 - 29 :
    st)SLCPCSKKISDYGAHNQRSH(s|VTSLCPCSKKISDYGAHNQRSHV|sts
    st)SLCPCSKKISDYGAHNQRSH(st|VTSLCPCSKKISDYGAHNQRSHVT|stst
    t)SLCPCSKKISDYGAHNQRSH(s|TSLCPCSKKISDYGAHNQRSHV|ts
    t)SLCPCSKKISDYGAHNQRSH(st|TSLCPCSKKISDYGAHNQRSHVT|tst
    lengths 30 - 39 :
    st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|VTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|std
    t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|td
    t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEK|tdt
    dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|EKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|dtd
    dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|EKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|dtdp
    t)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|KAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|td
    t)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|KAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|tdp
    lengths 40 - 49 :
    st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(d|VTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTE|stdtd
    st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(dt|VTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTEK|stdtdt
    t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(d|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTE|tdtd
    t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(dt|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTEK|tdtdt
    dt)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|EKYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|dtdtd
    dt)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|EKYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|dtdtdp
    t)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|KYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|tdtd
    t)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|KYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|tdtdp
    lengths 50 - 59 :
    t)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(s|SRLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVPV|ts
    lengths 60 - 69 :
    dp)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(s|HPVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMV|dps
    dp)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(st|HPVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMVS|dpst
    p)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(s|PVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMV|ps
    p)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(st|PVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMVS|pst
    st)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(st|VSRLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVPVT|stst
    st)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|VTSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|ststd
    st)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt|VTSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEK|ststdt
    t)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|TSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|tstd
    t)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt|TSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEK|tstdt
    t)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(d|TSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTE|tstdtd
    Edited by: David Halitsky on Mar 18, 2008 4:21 AM
    Edited by: David Halitsky on Mar 18, 2008 4:22 AM

  • Regarding string operations

    Hi All,
    i've a string holding the value as given below.
    AA,17,2/19/2003,"9,999.00",USD,00,10,318,"193,275.31"
    by performing some string operations i want the result string in the format as given below:
    AA,17,2/19/2003,"9999.00",USD,00,10,318,"193,275.31"
      i.e., i want to remove all the commas(,)that are included in between a pair of " " only.
    can anyone provide me a sample code for the same

    Hi vijay,
    A bit complex but works for sure, check the following logic,
    REPORT zsritest.
    DATA: gs_string TYPE string.
    gs_string = 'AA,17,2/19/2003,"9,999.00",USD,00,10,318,"193,275.31"'.
    WRITE: / gs_string.
    PERFORM string_trim CHANGING gs_string.
    *       FORM string_trim                                              *
    *  -->  LS_STRING                                                     *
    FORM string_trim CHANGING ls_string.
      DATA: lt_string TYPE string OCCURS 0 WITH HEADER LINE,
            lv_tabix TYPE i,
            lv_start.
      SPLIT gs_string AT '"' INTO TABLE lt_string.
      CHECK sy-subrc EQ 0.
      CLEAR gs_string.
      LOOP AT lt_string.
        lv_tabix = sy-tabix MOD 2.
        IF lv_tabix EQ 0.
          TRANSLATE lt_string USING ', '.
          CONDENSE lt_string NO-GAPS.
        ENDIF.
        IF lv_tabix EQ 0 OR lv_start EQ 'X'.
          CONCATENATE gs_string lt_string INTO gs_string SEPARATED BY '"'.
          IF lv_start EQ 'X'.
            CLEAR lv_start.
          ELSE.
            lv_start = 'X'.
          ENDIF.
        ELSE.
          CONCATENATE gs_string lt_string INTO gs_string.
        ENDIF.
      ENDLOOP.
      IF lv_start EQ 'X'.
        CONCATENATE gs_string '"' INTO gs_string.
      ENDIF.
      WRITE: / gs_string.
    ENDFORM.
    Hope this helps..
    Sri

  • 17076 : Invalid operation for read only resultset

    Hi,
    I am trying to update database table through java jdbc application.
    But while running the program i am getting the error message " Invalid operation for read only resultset: updateString " with error code 17076.
    My program is given below :
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class Misc2 {
    public static void main(String[] args) {
    Connection con = null;
    Statement stmt = null;
    ResultSet rs = null;
    try {
    con = JDBCUtil.getOracleConnection();
    stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String query = "select * from employees";
    rs = stmt.executeQuery(query);
    while (rs.next()) {
    String fname = rs.getString(3);
    if (fname.equalsIgnoreCase("Elmer")) {
    rs.updateString(3, "Mark");
    rs.updateString(2, "Robert");
    break;
    } catch (SQLException ex) {
    System.out.println("error code : " + ex.getErrorCode());
    System.out.println("error message : " + ex.getMessage());
    } finally {
    JDBCUtil.cleanUp(con, stmt);
    ****JDBCUtil Class****
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class JDBCUtil {
    public static Connection getOracleConnection(){
    Connection con = null;
    try{
    // Load the driver
    Class.forName("oracle.jdbc.driver.OracleDriver");
    //Establish Connection
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","ex","ex");
    }catch(Exception ex){
    ex.printStackTrace();
    return con;
    public static void cleanUp (Connection con , Statement stmt){
    // Release the resource
    try{
    if(con != null){
    con.close();
    if(stmt != null){
    stmt.close();
    }catch(Exception ex){
    ex.printStackTrace();
    Please help me to fix this issue.

    >
    But while running the program i am getting the error message " Invalid operation for read only resultset: updateString " with error code 17076.
    >
    Your result using 'SELECT *' is not updateable. Gimbal2 was pointing you in the right direction. You have to specify the columns in the select list to get an updateable result set.
    You also need to use 'updateRow()' to update the database and have a commit somewhere to keep the results.
    This code works for me. Note that I added an explicit SELECT list, the 'updateRow()' method and an explicit COMMIT.
        try {
            con = getOracleConnection();
            stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    //        String query = "select * from employees";
            String query = "select first_name from employees"; -- added explicit SELECT list
            rs = stmt.executeQuery(query);
            while (rs.next()) {
                String fname = rs.getString(1);
                if (fname.equalsIgnoreCase("Adam")) {
                    rs.updateString(1, "Mark");
                    rs.updateRow();                                    -- need this statement to actually update the database
    //                rs.updateString(2, "Robert");
                    break;
            con.commit(); -- added explicit commit for testing
        } catch (SQLException ex) {See Performing an UPDATE Operation in a Result Set in the 'Updating Result Sets' section of the JDBC Developer's Guide and Reference
    http://docs.oracle.com/cd/B28359_01/java.111/b31224/resltset.htm#i1024720
    As gimbal2 also alluded it is considered poor practice to use column numbers to perform result set operations when you don't know for certain what column a given number refers to. Before people start jumping all over that statement let me clarify it. The key part is KNOWING what column you are referencing. It is more performant to access result column columns by column number rather than by column name since the methods that take a column name call the integer method under the covers anyway but have to search the array of column names in order to get the column number.
    With your query (SELECT *) there is no way to be sure the column order is the same since the table could be redefined with the columns in a different order or certain columns having been deleted. So for performance LOOP processing column numbers are used inside the loop but those column numbers are determined by using the metadata BEFORE the loop to convert column names to column numbers.
    That way you code (BEFORE the loop) can use column names but you use a set of integer variables (one for each column) for the actual access inside the loop.

Maybe you are looking for

  • Why is my image icon not showing up for subscribers?

    I'm using podbean which produces the itunes feed and auto-submits it. You can see the icon when you visit the itunes page on the web - https://itunes.apple.com/us/podcast/bloggersareweird/id589296259 but when you actually subscribe via iTunes the ico

  • View Outlook Email on my iPhone

    Hi all, I've recently purchased an iPhone, but I'm hesitant to open it until I find out if I can view emails from Outlook. At work our email system (like many) is MS Outlook and I want to view my email (with syncing them) on my iPhone. Can I do this

  • Upload Vendor Address

    Hi,   What is the correct way to upload the vendor address?? I tried to do this with BDC, but only the "Street1" field appear in BDC session.  I have found the document in program RFBIKR00.  It stated that a separate procedure is required : BAPI_ADDR

  • Can't use encoder from Premiere to encode an mpg

    Okay, this is a big problem as I'm on a really tight deadline.  Does anyone have any solutions?  I am a fairly new Premiere user, about 4 months.  Is there any fix for the encoder?  I tried the reainstall, changing the file name to lower case with no

  • Can I resize thumbnails in the Review widget?

    In the review widget options, the sixth option down is called "Drag Thumbnail to Target." Does anyone know if I can resize the thumbnails at the bottom?