PAS string manipulation operations

Hi
How can I manipulate a string in PAS by replacing a character with another character?
Thanks.

Hi,
Do you mean passing a string variable into a procedure or logic set?
I think there is a "Text Variable" available in PAS which you can try using.
Regards,
Prasanth.

Similar Messages

  • String manipulation in JSTL

    Hello All
    I'm a just a beginner and I'm need to write a web page that is totally based on JSTL. I found out that the standard java tab lib in JSTL doesnt really support string manipulation or regular expression like in perl.
    As such, I would like to know what are the different options (like adding servlets/javabeans/etc) can i add to my JSTL page so that i can perform complex string manipulation to a data entered by the user in the text box?
    Some of the operations that I wish to carry out on the data are:
    1. check if data contains certain characters, strings
    2. joining and spliting strings
    3. find length of the string
    4. find the position of certain character in a string
    5. check if string match certain pattern.
    and many more.
    Would greatly appreciate if you guys can help to provide some light.
    Regards
    Beginner....

    You might find MicroNova YUZU JSP tag library (http://sourceforge.net/projects/micronova-yuzu) useful, especially if you need to support both JSP 1.2 and 2.0. Hope this helps.

  • String Manipulation in BI Publisher Report Paramater

    Hi,
    My Problem is that I am not able to do string manipulation on BI Publisher report Prameters.
    Actually I want to Show Deptno-Dname in Menu(LOV).and when I select Certain combination like '10-Accounting',and while passing the parameter:Dept I wanted to Cut the department no(10) using string manipulation functions provided by oracle in Data Model(Query) in where clause like (where deptno=to_number(substr(:Dept,1,2)).
    This query is working fine in other application like TOAD,But not giving results in BI Publisher Report.
    It's also not giving any error while saving or running the report.
    Please suggest any solution.

    even I tried the following query in data model..
    select DISTINCT EMP.EMPNO as EMPNO,
    EMP.ENAME as ENAME,
    EMP.JOB as JOB,
    DEPT.LOC as LOC
    from SCOTT.DEPT DEPT,
    SCOTT.EMP EMP
    where emp.DEPTNO=DEPT.deptno
    and DEPT.deptno=nvl(to_number(substr(:department,1,2)),DEPT.deptno)
    But the Parameter which I want to pass say Department('10-Accounting'),
    Still it is showing employees from all departments.

  • [svn:bz-trunk] 10020: Had previously updated user-agent string for Opera 10 in resources/config/ services-config.xml on DataServices/trunk.

    Revision: 10020
    Author:   [email protected]
    Date:     2009-09-04 07:35:51 -0700 (Fri, 04 Sep 2009)
    Log Message:
    Had previously updated user-agent string for Opera 10 in resources/config/services-config.xml on DataServices/trunk. Forgot to do this for the file on BlazeDS/trunk.
    Modified Paths:
        blazeds/trunk/resources/config/services-config.xml

    Revision: 10020
    Author:   [email protected]
    Date:     2009-09-04 07:35:51 -0700 (Fri, 04 Sep 2009)
    Log Message:
    Had previously updated user-agent string for Opera 10 in resources/config/services-config.xml on DataServices/trunk. Forgot to do this for the file on BlazeDS/trunk.
    Modified Paths:
        blazeds/trunk/resources/config/services-config.xml

  • [svn:bz-trunk] 9714: Bug: BLZ-424 - Incorrect user-agent string for Opera 10 in flex.messaging. client.UserAgentSettings

    Revision: 9714
    Author:   [email protected]
    Date:     2009-08-27 14:20:06 -0700 (Thu, 27 Aug 2009)
    Log Message:
    Bug: BLZ-424 - Incorrect user-agent string for Opera 10 in flex.messaging.client.UserAgentSettings
    QA: Yes
    Doc: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/BLZ-424
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/client/UserAgentSettings.java
        blazeds/trunk/resources/config/services-config.xml

  • String manipulation

    I am trying to read in a CSV file and then use the data contained in the CSV file to insert data into a database.
    I am programming in C#
    in order to do this I set up a StringReader object, open the file and read the file to the end into a string.
    To retreive each individual line I do a:
    string[] tokens = text.split('\n')
    which successfully splits up the text string into the tokens array, inserting single strings into each element.
    After this I try to repeat the procedure in order to retreive single values out of the tokens[index] strings so as to insert them into a database; herein my problem lies.
    so I have a string that looks something like this in each token array element:
    "a,b,c,d,e,f,g,h,i,etc"
    I do virtually the same operation:
    foreach(string s in tokens)
    string parts[] = s.Split(',');
    for(int i =0; i < parts.Length(); i++)
    //insert values into database
    The problem is here that splitting up each string into parts is giving me an empty array ... from what I understand it should give me an array of elements like so:
    parts[0]: "a"
    parts[1]: "b"
    parts[2]: "c"
    etc ...
    any clues you could help me with would be greatly appreciated.
    Lance

    Have you looked at just using SQL Loader to load the data straight into the database? SQL Loader was born to do this sort of stuff.
    - Mark
    =======================================
    Mark A. Williams
    Oracle DBA
    Author, Professional .NET Oracle Programming
    http://www.apress.com/book/bookDisplay.html?bID=378

  • Can anyone help with string manipulation please?

    I am trying to change this string 43180-1-0001-37 into the following expression 43181-0001-37
    It is a string for Project No + Job Phase + Drawing No + Item No.
    The reduction of '43180' to '4318' is causing me the problem, I have the concatenation.
    Current report code is
    SELECT Os.[Orderno-o] As 'Order Number'
    ,Ph.PH_PHASE_NO + '.' + Re.REQUISITION_NUMBER As 'Req. Number'
    ,Pl.ID As 'Item ID'
    ,@CurrentProjectNumber + '-' + Ph.PH_PHASE_NO + '-' + Dr.DRAWING_NO + '-' + Cast(Pl.ITEM_NO As varchar(max)) As 'Drg & Item No.'
    It is this line giving me the problem?
    ,@CurrentProjectNumber + '-' + Ph.PH_PHASE_NO + '-' + Dr.DRAWING_NO + '-' + Cast(Pl.ITEM_NO As varchar(max)) As 'Drg & Item No.'

    Hi uh... Mr. Rubbish at SQL :)
    Unfortunately, there are many elements in your questions which aren't clear:
    1. What is the content in your columns PH_PHASE_NO, DRAWING_NO, ITEM_NO and what is their data type?
    2. What is the content of the variable @CurrentProjectNumber and what is its data type?
    3. It's unclear what is the logic behind the "reduction" of '43180' to '4318'. Do you want to remove trailing zeros? Shorten the value by one character? Because from what I see in your first sentence, it seems like you simply want to add 1 to '43180'
    and turn it into '43181'. That's a simple +1 operation. I also notice that you want to remove the "Job Phase" part from the string (which is "1" in your case)? Or do you need to add its value to the "Project No" (43180)? It's
    all quite confusing.
    Clarification would be highly appreciated.
    I would suggest, if you can, to please explain what you need NOT by specific examples, but by explaining your requirements IN GENERAL. In other words, don't use specific values like '43180', but start with a variable like 'X', and then let us know specifically
    what operation you want to perform on it (e.g. 'add 1' / 'remove trailing zeros' / 'shorten by one character' / 'add to it the value of some column' etc.). This will make it easier to understand the algorithm needed.
    Eitan Blumin; SQL Server Consultant - Madeira Data Solutions;

  • Using CharAt for String Manipulation

    Hi,
    I am new to Java and am taking a Java class. I am trying to put a social security number in "nnn-nn-nnnn" format where n is a digit 0-9. I don't know if it would work with the charAt method of the String class. Does anyone have any suggestions on how to implement this kind of manipulation.
    It would be greatly appreciated!
    Thanks,
    waggypup99

    You could just create a class for social security number.
    e.g.
    public class SSNum{
        private int _num;
        public SSNum(int number){
          _num = number;
          * take number in the form  nnn-nn-nnnn
        public SSNum(String number){
          StringTokenizer st = new StringTokenizer(number,"-");
          StringBuffer numStringB = new StringBuffer(st.nextToken());
          numStringB.append(st.nextToken());
          numStringB.append(st.nectToken());
         _num = Integer.parseInt(numStringB.toString());
       public String toString(){
          //left as fun exercise
    }

  • String intensive operations

    I need to do intensive operations on strings, mainly searching substrings and replacing text on that string.
    These strings i need to handle are about 4-8 thousand characteres lenght. What class do you recommend me to use?
    Thanks

    Like jschell said, if you know what you're doing, then you'd probably be best off using primitives and making your own optimized solution. If you're looking for something already out there, though, you'd be best off using StringBuffer if you'll be doing a lot of modification of the string. Otherwise, you'll just be creating a lot of instances of Strings that you don't need.

  • How to use string relational operator.

    Hi,
    In my program,I have one 'Period' select option,having string length '3', I want only number should be entered in this select option,if user enter other than number any value then it should show an error message.
    currently I am using 'CA' operator but problem in this is that out of  '3' if any one contain number then instead of getting error message i am getting short dump.for it is giving error message if all '3' character are alphabet.
    e.g.: 1. If Period = 388,   working fine.
          2. If period = ABC,   Getting error message.
          3. If period = p18,   getting short dump.
    I want the error message for third case also not a shot dump.
    I used 'cO' also but the problem in his is that it not except the only one character like only '1' or '2' it want all the three field should be filled.
    Can  anyone help me out in his problem.
    Thanks
    Chetan.

    hi chetan
    follow this.. it will automatically check your requirement.
    if you want that move to character field... you can..
    <b>data: v_num type NUM03,</b>
          v_char_low type CHAR03,
           v_char_high type CHAR03
    <b>select-options s_number for v_num</b>.
    v_char_low = s_number-low.
    v_char_high = s_number-high.
    Please Close this thread.. when u r problem is solved
    Reward if Helpful
    Regards
    Naresh Reddy K

  • Most efficient way to do some string manipulation

    Greetings,
    I need to cleanse some data in a string by replacing unsafe characters with encoded equivalents. (FYI, this is for the purpose of transforming "unsafe" characters into encoded values as data inside an XML document).
    The following code accomplishes the task:
    Note that a string "currentValue" contains the data to be cleansed.
    A string, "encodedValue" contains the result.
      for (counter = 0; counter < currentValue.length(); counter++)
        addChar = (currentValue.substring(counter,counter+1));
        if (addChar.equals("<"))
          addChar = "#60;";
        if (addChar.equals(">"))
          addChar = "#62;";
        if (addChar.equals("="))
          addChar = "#61;";
        if (addChar.equals("\""))
          addChar = "#34;";
        if (addChar.equals("'"))
          addChar = "#39;";
        if (addChar.equals("'"))
          addChar = "#39;";
        if (addChar.equals("/"))
          addChar = "#47;";
        if (addChar.equals("\\"))
          addChar = "#92;";
        encodedValue += addChar;
      } // forI'm sure there is a way to make this more efficient. I'm not exactly "new" to java, but I am learning on my own with no formal training and often take a "brute force" approach with my initial effort.
    What would be the most efficient way to re-do the above?
    TIA,
    --Paul Galvin
    Integrated Systems & Services Group

    im a c++ programmer so im not totally up on these java classes either but...from a c++ stand point you might want to consider using the if else statment.
    by using if else, you only test the character until you find the actual "violating" character and skip the rest of the tests.
    also, you might trying using something to check for alphaNumeric cases first and use the continue keyword when you find one. since more of your characters are probably safe than unsafe you can skip all the ifs/if else statement and only do one test on the good characters. (i just looked for a way to test that and i didnt find one. c++ has a function that does that by checking the ascii number range. dont think that works in java. but maybe you can find one, it would reduce the number of tests probably.)
    happy hunting,
    txjump :)

  • Bank Reconciliation- String Manipulation

    Hi Gurus,
    My client using match format to reconcile.
    The Line 86 "Note to Payee " is having some additional information other than the reference no. i.e. the 12 character is required for posting, then there is "Space" and then there are some other characters, which are not used.
    We only need the first 12 character of the to match  with reference no.
    I understand that "Define Search String for Electronic Bank Statement" provides means to "take  only first 12" characters.
    How to define this? What should be in the Searching and Mapping??
    Thanks in advance

    Hi Periasamy,
      In your case, define the search string as:
    ^############( |$)
    The above will select 12 characters from the start of the field and will stop if a space comes or end of line comes.
    Then you need to use the dialog 'Search string use' and map this string to relevant bank accounts. Use Target Field as 'Check-/DME Reference-/Assignment Number'.
    -S.

  • String array operations

    Hello. I am trying to implement a method which receives a string array called SCREEN and a string called DITHERED.
    I want to check how many CHARS from DITHERED are in SCREEN.
    When I try to compile I get "An illegalaccess exception ocurred. Make sure your method is declared to be public". Any help? THANKS
    class ImageDithering
        public int count(String dithered, String[] screen)
            int num=0;
            for(int i=0;i<screen.length;i++)
                for(int j=0;j<screen.length();j++)
    for(int k=0;k<dithered.length();k++)
    if(screen[i].charAt(j)==dithered.charAt(k))
    num++;
    break;
    return num;
    }Edited by: devesa on Aug 5, 2010 9:38 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    devesa wrote:
    Hello. I am trying to implement a method which receives a string array called SCREEN and a string called DITHERED.
    I want to check how many CHARS from DITHERED are in SCREEN.Well, the method you've chosen is just about as slow as it can be.
    A few questions:
    1. Which has more characters: 'dithers' or 'screen'?
    2. Do you know about StringBuilder?
    3. Do you know about [String.indexOf()|http://download.oracle.com/javase/6/docs/api/java/lang/String.html#indexOf%28int%29]?
    4. Have you thought about sorting your strings first?
    Winston

  • String manipulation question (servlet)

    Hello,
    I have a problem replacing parts of a String with values from a HttpServletRequest.
    I have the following method:
    public String replaceVariables(String s, HttpServletRequest request) {
         Enumeration e = request.getParameterNames();
         Vector v = new Vector();
         while(e.hasMoreElements()) {
              v.add(e.nextElement());
         String paramName;
         ListIterator li = v.listIterator();
         while(li.hasNext()) {
              paramName = (String) li.next();
              if (s.indexOf("#" + paramName + "#") > -1) {
                   s = new String(new StringBuffer(s).replace(s.indexOf("#" + paramName + "#"), s.indexOf("#" + paramName + "#") + (("#" + paramName + "#").length()), request.getParameter(paramName).toString()));
         return s;
    }What I am trying to do here is read in a line of text (String s) along with a the htpp servlet request. Put the names of the request paramaters into Vector v.
    Next I try to check the String s for any part of the String that matches one of the parameter names surrounded by #'s. If there is a match then I replace the #string# with the value associated with it in the http servlet request.
    The trouble is, my code on ly replaces the very first variable then stops, I cannot see why it does not do the rest.
    I hope this makes sense to somebody, becuase it doesn't to me :-)
    Thanks for any advise or help

    Yep. I have just done a basic one for testing. The String I read in is:
    username = #username#, action = #action#, email = #email#
    And the html form information that is sent to the servlet is:
    <input type="hidden" name="action" value="test">
    <input type="hidden" name="username" value="testuser">
    <input type="hidden" name="email" value="testemail">
    ....etc.
    I don't know if it makes a difference, I don;t think it does, but I am reading in a whole file, and passing the file line by line to this method.
    The method that passes each line is:
    public Vector generateHTML(HttpServletRequest request) {
         Vector v = new Vector();
         try {
              File f = new File("/fakepath/" + request.getParameter("action") + ".template");
              FileReader fr = new FileReader(f);
              BufferedReader br = new BufferedReader(fr);
              String s;
              while((s = br.readLine()) != null) {
                   s = replaceVariables(s, request);
                   v.add(s);
         } catch (Exception e) {
              // ignore
         } finally {
              return v;
    }

  • Advanced String Manipulation Using REGEXP

    Hello all,
    I've been trying to split a string using either REGEXP_SUBSTR and REGEXP_REPLACE functions with much success so I wonder whether anyone here can give me a hand. Basically the string I want to split in to 3 is in this format:
    'instanceno;partno;serialno'
    I have read numerous articles within last few days but I still can't get it to working (I'm sure due to my lack of regular expression handling knowledge in OBIEE). I found two articles discussing similar scenarios. One in here and the other one is here. Both of those are good, but I cannot apply those principles to my query as I'm keep getting issues with the use of semicolon (;).
    Could someone explain to me how to split this string so I can have 3 separate columns, please?
    Thanks and regards,

    Hi Anuhas,
    you have to create 3 columns in the report on 3 attribute columns inside le Logical Model with this syntax for the the string str = 'instanceno;partno;serialno'
    COLUMN1 = evaluate('regexp_substr(%1,''[^\;]+'', 1,1)',REPLACE(*str*,';','\;'))
    COLUMN2 = evaluate('regexp_substr(%1,''[^\;]+'', 1,2)',REPLACE(*str*,';','\;'))
    COLUMN3 = evaluate('regexp_substr(%1,''[^\;]+'', 1,3)',REPLACE(*str*,';','\;'))
    You have to use the REPLACE function (; --> \;) because the ; is e special character
    In this way you have:
    COLUMN1 = instanceno
    COLUMN2 = partno
    COLUMN3 = serialno
    The regex_substr(a,b,c) contains:
    a = str the string
    b = [^\;]+ find for the beginning of the string the character ;
    c = number of occurrence
    I hope it hepls.
    Regards,
    Gianluca

Maybe you are looking for

  • Making a DVD to Give PC Users

    How can I make a DVD out of some iphoto pictures that can be used on a PC to review the photos? Approximately 100+ pictures. I don't want to have to open each .img file everytime to view it. I don't want to make a slideshow. I just want to burn the p

  • Dhcp error getState serveradmin_dhcp plug-in module

    Hi! I have a 10.8.2 server serving netinstall images DHCP and SUS. Suddenly it stopped serving IP addresses, and after checking in Server.app I got an error "An error occurred on the server while processing a command. The error occurred while process

  • Leading zeroes in ABAP

    How to remove leading zeros in ABAP?

  • MainStage 2.2.1 - CPU issues with old MacBook

    I just downloaded MainStage 2 for my trusty old MacBook - it's 2.0GHz Core Duo, 2GB... best spec you can make it really. I use it to run both Ableton Live and Garageband with absolutely no problems... The CPU handles both apps fine, unless I have som

  • Datagrid data update

    Hi! I'm new in flex and have a problem with datagrid. I'm using httpservice to get data. At some time I make new data request to check for changes. How can I compare the old and the new data and update the datagrid only if there are differences? I wa