Help with Calling Party Transformation Patterns

Hello,I am struggling to figure out how to apply Calling Party Transformation Patterns on CUCM for MGCP gateways.
Basically, we use MGCP gateway everywhere so I need to apply CPTP on CUCM. However, I know how to do this using a gateway (CME) as an example.
Below is what I am trying to figure out using CUCM...Here as you can see, if the calling party number is 000xxxx then the calling Party xformation is set to 353xxxx and then egress to PSTN.
If the calling party number is 111xxxx, then the calling party xformation is set to 454xxxx and then gets sent to the PSTN;
voice translation-rule 1
rule 1 /^000\(...\)$/ /353\1/
rule 2 /^111\(...\)$/ /454\1/
voice translation-profile OutBound_CallerID
translate calling 1
dial-peer voice 101 pots
destination-pattern 9T
translation-profile outgoing OutBound_CallerID
port 0/0/0:15
The only way I know how to do this is by creating 2 sets of CSS and PTs. Then, create the same route pattern in both (example 9.!) but set the CPTM on each route pattern as 353xxxx on one and 454xxxx on the other. Then by putting some of the phones with one CSS and some with the other it will work. This is not ideal as I need to be able to do it before matching the Route Patterns and I need all phones to use the same CSS.
Is there a better way?
Thanks

@Anas, thanks for the response, great answer.One question. When creating 'Calling Party Transformation Patterns' should the pattern be the original calling party number i.e 111XXXX.
For example, in the below screenshot will CUCM match the pattern if extension 111XXXX tries to make an outbound call?
So the call flow on CUCM goes:
Ext 111XXXX makes call > Route Pattern>RouteList>ROuteGRoup> Gateway>CPT CSS Applied matching below rule which changes Calling PT to 454XXXX > PSTN
Would that be correct?
Thanks.

Similar Messages

  • Route pattern with called party transformations

    HI All,
    i wanto to add route pattern with transformation
    i want to add RP with 9.001! predot
    and want to convert to 9.01017! with called party transformations.
    How we replace ! ? i've tried and it's error with message
    Called Party Transform Mask - allowed characters are numeric (0-9),plus (+),asterisk (*),pound (#),X.
    I've give screen shot for the configuration
    Please anybody help.
    Thanks in advance
    Regards,
    ATommy

    You can create the RP with 9001.! and in the called party, discard predot and prefix 901017.
    see below screenshot:

  • Use External phone Number mask * Calling party Transform Mask @ Route patt

    Having an issue with CLID at RP level. Lets say I have two phones. One phone is configured with an External phone number mask of 1112223333 and the other one does not have an external number mask set. When a call is placed to the PSTN, Phone one needs to display its external phone number mask. Phone two since nothing has been added under external phone mask needs to be 1112224444.
    I configured the RP to "Use External Phone Number mask" and set the Calling Party Transform mask to 1112224444. I figured that if an external phone number mask was specified under the DN that it will route it to the PSTN and if nothing specified under the DN it will default to 1112224444 according to the setting in the RP.
    When I configured this, no matter what I do the calling party transform mask takes priority and the external phone number mask is never used. Is there a way around this? I tried it at the RL level and it does the same thing.
    Does anyone have any other ideas other than adding an external phone number mask for every phone.

    Thats what I thought. Why can't they add that as a feature in the next release of CM? It seems like it could be simple to do. Check for External Phone number mask, if nothing is specified, then check for calling party transform mask. If true set Calling Party transform Mask as CLID and route to RL or something like that..
    thanks

  • Help With Third Party Wireless Cards

    Hello, I am needing some help with third party wireless cards. I have purchased and installed the Linksys WMP54G wireless PCI card into my G4. From what ive seen on the discussions page here, this card is known to work with the G4s in place of the more expensive Airport Extreme card. The only problem is that my G4 doesnt even recognize that the card is in the PCI slot. Ive tryed the other PCI slots and still nothing. Previously, i have tried using a belkin and a d-link card that have been known to work in the G4s as well, and had the same problem. I am 100% sure that the card is seated correctly, and cant think of any other reason why it shouldnt detect that something is in the slot. If anyone can inform me what im doing wrong, or has any info on how to get it working, that would be great. Thanks for your time,
    ~Jared
    Powermac G4   Mac OS X (10.3.8)   2 gb ram, 200 gb hd, dual display

    Yes, i run Digidesigns audio editing program called Protools on my Mac. It uses a PCI card to import mic/line audio signals into the program from the hardware interface. I tried moving the Digidesign card and putting the wireless card in the same slot, and still nothing, although the Digidesign card works fine in the other slots. Each time i moved the Digidesign card, it showed up in the different slots, although the ones that were open did not show up at all. Only the PCI slots that are in use show up in ASP on my machine. I have the FW-800 version of the G4, so im not sure if that makes any difference. I have never erased the PRAM before, would you be able to give me directions on how to do that? Thanks a ton for your help. =)
    Powermac G4   Mac OS X (10.3.8)  

  • External Phone Mask vs. Calling Party Transformation Mask

    What is the difference between these two features? They seem to do exactly the same thing. Even stranger, if you use a Calling Party Transformation Mask it will override any setting you have in the External Phone Mask field.
    Why would you use one instead of the other? The only thing I can think of is that the Calling Party Transformation Mask doesn't change the number that appears in the top line of the phone display, while the External Phone Mask does. Is that true?
    I don't get it. Someone please enlighten me. :-)
    Thanks!
    John

    External Phone mask does not affect internal calls and there are many situations when you may want internal masking to send digits to voice mail, ICD systems, etc.
    Also, Sankar keeps reffering to 9.@
    Avoid that in your calling plan as much as possible, it adds a whole mess load of stuff to the route plan report and can cause lots of hassels later on when troubleshooting a call routing issue. target your dial plan as much as possible.
    I have seen a few posts on configuration recently. If you have not engaged a partner for the deployment, then consider engaging one for the planning. It will save you a lot of time while troubleshooting later on. You sound quite capable of getting this off the ground on your own, but maybe you should bring in a guy for the afternoon to bounce off a bunch of "best practices" questions. That might be a good use of consulting time.

  • Help with calling a Get URL

    I am having a problem with calling a series of web pages
    within my movie. I have an index.fla that I publish to html. Within
    the index.html, I am calling multiple swf files to load content.
    Home.swf loads when the index page displays. Then the user clicks
    on any button and each button loads another swf replacing the main
    content with perhaps loading it's own swf files of content also.
    Everything is working fine. However, on one called swf file, called
    students.swf, I also have a menu swf file that is called when
    students loads. This menu swf file has text listed with
    actionscripting calling a data file that causes the text to expand
    and rollout and display a label of the url. When the user clicks on
    the list name I have a get url to the url of the label. Everything
    works fine in the swf files when I test the movies for the swf for
    the menu file and for the student file swf. However, when I publish
    and run the index page and start testing out the student swf that
    is called, the menu will not open up a new browser window with the
    link designated in the get url. I can't figure it out! It works
    fine in the swf files, but not when I test it out through the index
    controlling file. Please Help!!!

    if you're using as2, try adding
    this._lockroot=true;
    to the movieclip that contains getURL, the student file
    swf.

  • Help with call to BAPI

    Hi all!
    I need help trying to create order with multiple line items in SAP using BAPI.
    I'm very new to SAP and I'm trying to work on a prof of concept to create orders in SAP using/calling BAPI's from Visual Basic (in Visual Studio 2005). I got the .net connector that I'm using for the proxy connection and I'm able to create order with one line item. But the problem is when I try to create one with multiple line items. I'm calling BAPI_SALESORDER_CREATEFROMDAT2 and loading item table with 3 items and also loading the schedule table but what I get is order gets created with 3 line items but all are the same item and its the last one.
    I'm guessing that problem is one how I'm adding the items to the table, it know that I have 3 items but the detail informations gets over written by the last item that I'm adding.
    Any ideas?
    Thank You

    Hi,
      Welcome To SDN!!
    Try this out...
    Report ZBapi .
    data: po_items type table of bapiekpo with header line.
    parameters: p_ebeln type ekko-ebeln.
    call function 'BAPI_PO_GETDETAIL'
    exporting
    purchaseorder = p_ebeln
    ITEMS = 'X'
    ACCOUNT_ASSIGNMENT = ' '
    SCHEDULES = ' '
    HISTORY = ' '
    ITEM_TEXTS = ' '
    HEADER_TEXTS = ' '
    SERVICES = ' '
    CONFIRMATIONS = ' '
    SERVICE_TEXTS = ' '
    EXTENSIONS = ' '
    IMPORTING
    PO_HEADER =
    PO_ADDRESS =
    tables
    PO_HEADER_TEXTS =
    po_items = po_items
    PO_ITEM_ACCOUNT_ASSIGNMENT =
    PO_ITEM_SCHEDULES =
    PO_ITEM_CONFIRMATIONS =
    PO_ITEM_TEXTS =
    PO_ITEM_HISTORY =
    PO_ITEM_HISTORY_TOTALS =
    PO_ITEM_LIMITS =
    PO_ITEM_CONTRACT_LIMITS =
    PO_ITEM_SERVICES =
    PO_ITEM_SRV_ACCASS_VALUES =
    RETURN =
    PO_SERVICES_TEXTS =
    EXTENSIONOUT =
    check sy-subrc = 0.
    loop at po_items.
    write:/ po_items.
    endloop.
    Refer
    http://abap.wikiprog.com/wiki/BAPI_PO_GETDETAIL1
    Regards
    Kiran SURE

  • Help with DBMS_XMLSCHEMA.copyEvolve Transforms Parameter

    Oracle 11gr2 on Linux VM
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 13:51:28 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Enter user-name: jmendez
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production I'm not sure how to properly use the DBMS_XMLSCHEMA.copyEvolve procedure. I'm trying to evolve a schema (ArchivalTypes) and its dependent schema (collection). There are lots of transformations for the collection schema but Archival Types is just a schema made up of Arrays referenced in the collection schema (and eventually 4 other schemas). I don't "think" I need an XSL for archivalTypes... so how do I enter a null value since the transforms parameter in the procedure requires XSL files to be specified in the exact order as the schema files were listed (sorry if I'm not making sense). Below is my command:
    BEGIN
      DBMS_XMLSCHEMA.copyEvolve(
        xdb$string_list_t('http://localhost/xsd/test/ArchivalTypes_test.xsd','http://localhost/xsd/test/Collection.xsd'),
        XMLSequenceType(XDBURIType('/u01/app/xsd/test/ArchivalTypesEvolve.xsd').getXML(),XDBURIType('/u01/app/xsd/test/Collection_Evolve.xsd').getXML()),
        XMLSequenceType(XDBURIType('/u01/app/xsd/test/Collection_Evolve.xsl').getXML()));
    END;
    /I appreciate any help I can get here.

    Actually, I don't know why I didn't think about this before but it worked without having to "evolve" ArchiveTypes. ArchiveTypesEvolve is included in the new collection.xsd like so:
         <xs:include schemaLocation="http://localhost/xsd/test/ArchivalTypesEvolve.xsd"/>Does it make sense then? When I do schema evolution I just specify Collection.xsd and it works?
    BEGIN
      DBMS_XMLSCHEMA.copyEvolve(
        xdb$string_list_t('http://localhost/xsd/test/Collection.xsd'),
        XMLSequenceType(XDBURIType('/u01/app/xsd/test/Collection_Evolve.xsd').getXML()),
        XMLSequenceType(XDBURIType('/u01/app/xsd/test/Collection_Evolve.xsl').getXML()));
    END;
    /Should I be concerned that it worked this way? All the mapping was correct and the data looks good. I just thought it would be a little more complicated since Collection_test used ArchivalTypes and the new Collection_Evolve uses ArchivalTypesEvolve.

  • Need help with Call By Reference on cRIO-9012

    I have a RT application running on a cRIO-9012 in which I am attempting to establish references to a variable number of clones of the PID Autotuning (Temperature).vi, and then passing these references to a FOR loop in which I am opening each clone with a Call By Reference node to perform the PID.  Essentially, I am trying to make the PID Autotuning (Temperature).vi accept an array of process variables, similar to the behaviour that some of the simpler PID VIs provide out-of-the-box. 
    The code I am using to obtain the references is here:
    ...and the code within the control loop where I am trying to do the processing is here:
    The problem I am encountering, according to the Highlight Execution tool, is that all inputs to the Call By Reference node are present and reach the node, but all processing stops at this point on the first iteration and the cRIO hangs.  I cannot stop the SubVI or the RT parent VI without performing a software restart on the target.
    I don't know if I am using the Call By Reference node or Open VI Reference functions incorrectly, or if there is a problem with the VI being part of a library, or if something else is wrong.  Any help would be appreciated.
    Sean

    I'm not sure this is your issue, but I think there's a conflict between opening a bunch of rereferences, and then setting the asynchronous call pool size for one of them.You don't need asynchronous execution here, you just need reentrant parallel execution (you may not even need the parallel part; your current code, if it worked, would execute sequentially, and the PID calculation is just math so should be quick and may not benefit from parallel execution). You do need reentrant execution to maintain separate data spaces.
    Try opening the references with the 0x08 (Prepare for Reentrant Run) flag instead. Remove the Populate Asynchronous Call Pool. If this works, you can run in parallel by enabling For loop parallelism - but you might find that's actually slower, especially on a cRIO.

  • Need help with Calling objects

    I have created an object named "user" and I currently have 1 Frame in my program. The first frame is called "LogonFrame" and the second is called "UserDataFrame".
    In the main method of the application I declare a "User" object as user and then call LogonFrame to retreive the logon_name and password from the user. The logon_name and password will be placed in the User object to be accessed throughout the application.
    When I compile the application I receive the following error message:
    Error: (85) variable user not found in class GL2.LogonFrame
    *I know that 85 is the line number that the error is located
    *GL2 is the name of the package.
    Has anyone ever encountered this error before, and if so how can I fix this error.
    *Listed below is the code used in the User object if it helps at all.
    Jason Franz
    // Copyright (c) 2003 Jason T. Franz
    package GL2;
    * A Class class.
    * <P>
    * @author Jason T. Franz
    public class User extends Object {
    private static int user_id;
    private static String first_name;
    private static String last_name;
    public static void User(){
    user_id = 0;
    first_name = "";
    last_name = "";
    //sets the user ID
    public static void setUserID(int newID){
    user_id = newID;
    //Returns the User ID
    public static int getUserID(){
    return user_id;
    //Sets the User First Name
    public static void setFirstName(String newFirstName){
    first_name = newFirstName;
    //Gets the Users First Name
    public static String getFirstName(){
    return first_name;
    //Sets the Users Last Name
    public static void setLastName(String newLastName){
    last_name = newLastName;
    public static String getLastName(){
    return last_name;
    //Resets all data in the User Class
    public static void reset(){
    user_id = 0;
    first_name = "";
    last_name = "";

    The code below is a small portion of the program.
    If it helps at all I am useing Oracle JDeveloper version 3.2.3 with JDK1.2.2_JDeveloper
    This section is the User object
    // Copyright (c) 2003 Jason T. Franz
    package GL2;
    * A Class class.
    * <P>
    * @author Jason T. Franz
    public class User extends Object {
      private String first_name;
      private String last_name;
      public User(){
        first_name = "Jason";
        last_name = "Franz";
      //Sets the User First Name
      public void setFirstName(String newFirstName){
        first_name = newFirstName;
      //Gets the Users First Name
      public String getFirstName(){
        return first_name;
      //Sets the Users Last Name
      public void setLastName(String newLastName){
        last_name = newLastName;
      public String getLastName(){
        return last_name;
      //Resets all data in the User Class
      public void reset(){
        first_name = "";
        last_name = "";
        logon_name = "";
        user_password = "";
    }Here is the main method.
    // Copyright (c) 2003 Jason T. Franz
    package GL2;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * GL2.DevilsHead
    * <P>
    * @author Jason T. Franz
    public class DevilsHead {
      public User user = new User();
       * Constructor
      public DevilsHead() {
        AddUserFrame frame = new AddUserFrame();
        //Center the window
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension frameSize = frame.getSize();
        if (frameSize.height > screenSize.height) {
          frameSize.height = screenSize.height;
        if (frameSize.width > screenSize.width) {
          frameSize.width = screenSize.width;
        frame.setLocation((screenSize.width - frameSize.width)/2, (screenSize.height - frameSize.height)/2);
        frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } });
        frame.setVisible(true);
       * main
       * @param args
      public static void main(String[] args) {
        try  {
          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        catch (Exception e) {
          e.printStackTrace();
        new DevilsHead();
    }and here is the Frame which calls the user object to display the Information.
    // Copyright (c) 2003 Jason T. Franz
    package GL2;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    * A Swing-based top level window class.
    * <P>
    * @author Jason T. Franz
    public class AddUserFrame extends JFrame {
      BorderLayout borderLayout1 = new BorderLayout();
      JPanel jPanel1 = new JPanel();
      Button button1 = new Button();
       * Constructs a new instance.
      public AddUserFrame() {
        super();
        try  {
          jbInit();
        catch (Exception e) {
          e.printStackTrace();
       * Initializes the state of this instance.
      private void jbInit() throws Exception {
        this.getContentPane().setLayout(borderLayout1);
        this.setSize(new Dimension(400, 300));
        button1.setLabel("button1");
        button1.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            button1_actionPerformed(e);
        this.setTitle("Add a User");
        this.getContentPane().add(jPanel1, BorderLayout.CENTER);
        jPanel1.add(button1, null);
      void button1_actionPerformed(ActionEvent e) {
        System.out.println(user.getFirstName());
        System.out.println(user.getLastName());
    }The error I receive is
    Error: (51) variable user not found in class GL2.AddUserFrame

  • Need help with calling method

    I'm new to Java, trying to pass a required class so I can graduate this semester, and I need help figuring out what is wrong with the code below. My assignment is to create a program to convert celsius to fahrenheit and vice versa using Scanner for input. The program must contain 3 methods - main, convert F to C, method, and convert C to F method. Requirements of the conversion methods are one parameter which is an int representing temp, return an int representing calculated temp after doing appropriate calculation, should not display info to user, and should not take in info from user.
    The main method is required to ask the user to input a 1 for converting F to C, 2 for C to F, and 3 to end the program. It must include a while loop that loops until the user enters a 3, ask the user to enter a temp, call the appropriate method to do the conversion, and display the results. I'm having trouble calling the conversion methods and keep getting the following 2 compiler errors:
    cannot find symbol
    symbol : method farenheitToCelsius(int)
    location: class WondaPavoneTempConverter
    int celsius = farenheitToCelsius(intTemp);
    ^
    cannot find symbol
    symbol : method celsiusToFarenheit(int)
    location: class WondaPavoneTempConverter
    int farenheit = celsiusToFarenheit(intTemp);
    The code is as follows:
    public static void main(String[] args) {
    // Create a scanner
    Scanner scanner = new Scanner(System.in);
    // Prompt the user to enter a temperature
    System.out.println("Enter the temperature you wish to convert as a whole number: ");
    int intTemp = scanner.nextInt();
    System.out.println("You entered " + intTemp + " degrees.");
    // Prompt the user to enter "1" to convert to Celsius, "2" to convert to
    // Farenheit, or "3" to exit the program
    System.out.println("Enter 1 to convert to Celsius, 2 to convert to Farenheit, or 3 to exit.");
    int intConvert = scanner.nextInt();
    // Convert temperature to Celsius or Farenheit
    int celsius = farenheitToCelsius(intTemp);
    int farenheit = celsiusToFarenheit(intTemp);
    while (intConvert >= 0) {
    // Convert to Celsius
    if (intConvert == 1) {
    System.out.println("Celsius is " + celsius + " degrees.");
    // Convert to Farenheit
    else if (intConvert == 2) {
    System.out.println("Farenheit is " + farenheit + " degrees.");
    // Exit program
    else if (intConvert == 3) {
    break;
    else {
    System.out.println("The number you entered is invalid. Please enter 1, 2, or 3.");
    //Method to convert Celsius to Farenheit
    public static int celsiusToFahrenheit(int cTemp) {
    return (9 / 5) * (cTemp + 32);
    //Method to convert Farenheit to Celsius
    public static int fahrenheitToCelsius(int fTemp) {
    return (5 / 9) * (fTemp - 32);
    I readily admit I'm a complete dunce when it comes to programming - digital media is my area of expertise. Can anyone point me in the right direction? This assignment is due very soon. Thanks.

    1) consider using a boolean variable in the while statement and converting it to true if the input is good.
    while (inputNotValid)
    }2) put the code to get the input within the while loop. Try your code right now and enter the number 30 when your menu requests for input and you'll see the infinite loop.... and why you need to request input within the loop.
    3) Fix your equations. You are gonig to have to do some double calcs, even if you convert it back to int for the method return. Otherwise the results are just plain wrong. As a good test, put in the numbers -40, 0, 32, 100, and 212. Are the results as expected? (-40 is the only temp that is the same for both cent and fahr). I recommend doing double calcs and then casting the result to int in the return. for example:
    int a = (int) (20 + 42.0 / 3);  // the 42.0 forces the compiler to do double calc.4) One of your equations may still be plain wrong even with this fix. Again, run the test numbers and see.
    5) Also, when posting your code, please use code tags so that your code will be well-formatted and readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag &#91;code&#93; at the top of your block of code and the tag &#91;/code&#93; at the bottom, like so:
    &#91;code&#93;
      // your code block goes here.
    &#91;/code&#93;

  • URGENT, Please help with calling one program in another

    I am am trying to call Ch4Ex5 within Ch3Ex5. The teacher said it should take about 6 lines of modification within Ch3Ex5 to be able to call out Ch4Ex5. I also might need to modify Ch4Ex5 to get it to work. But I spent many hours and its due soon and I still cant figure it out. I think the teacher assigned this too early in the semester because most the kids dont know how to do it.
    Here is Ch3Ex5
    import java.util.*;
    public class Ch3Ex5
         public static void main(String[] args)
              Scanner kb = new Scanner(System.in);
              int aCount = 0, bCount = 0, cCount = 0, dCount = 0, fCount = 0;
              int nScores = 0;
              int lowest, highest;
              int currentScore;
              int totalOfScores = 0;
              double average;
              do
                   System.out.print("Enter a score (negative value to quit): ");
                   currentScore = kb.nextInt();
                   kb.nextLine();
                   if(currentScore > 100)
                        System.out.println("Scores cannot be greater than 100, please try again");
              } while(currentScore > 100);
              lowest = currentScore;
              highest = currentScore;
              while(currentScore > 0)
                   nScores++;
                   totalOfScores += currentScore;
                   if(lowest > currentScore)
                        lowest = currentScore;
                   if(highest < currentScore)
                        highest = currentScore;
                   if((100 >= currentScore) && (currentScore >= 90)) aCount++;
                   else if(currentScore >= 80) bCount++;
                   else if(currentScore >= 70) cCount++;
                   else if(currentScore >= 60) dCount++;
                   else fCount++;
                   do
                        System.out.print("Enter a score (negative value to quit): ");
                        currentScore = kb.nextInt();
                        kb.nextLine();
                        if(currentScore > 100)
                             System.out.println("Scores cannot be greater than 100, please try again");
                   } while(currentScore > 100);
              System.out.println("Number of scores: " + nScores);
              if(nScores > 0)
                   System.out.println("Number of A's = " + aCount);
                   System.out.println("Number of B's = " + bCount);
                   System.out.println("Number of C's = " + cCount);
                   System.out.println("Number of D's = " + dCount);
                   System.out.println("Number of F's = " + fCount);
                   System.out.println("Percent A's = "+(100.0*aCount/nScores));
                   System.out.println("Percent B's = "+(100.0*bCount/nScores));
                   System.out.println("Percent C's = "+(100.0*cCount/nScores));
                   System.out.println("Percent D's = "+(100.0*dCount/nScores));
                   System.out.println("Percent F's = "+(100.0*fCount/nScores));
                   System.out.println("High score: " + highest);
                   System.out.println("Low score: " + lowest);
                   average = (double) totalOfScores / nScores;
                   System.out.println("Average score = " + average);
    import java.util.*;
    public class Ch4Ex5
         public static void main(String[] args)
              Scanner kb = new Scanner(System.in);
              double gradeA, gradeB, gradeC, gradeD, gradeF, total;
              double aCount, bCount, cCount, dCount, fCount;
              System.out.println("Enter in the number of each grades");
              System.out.println("In this order, A's, B's, C's, D's, F's");
              gradeA = kb.nextDouble();
              gradeB = kb.nextDouble();
              gradeC = kb.nextDouble();
              gradeD = kb.nextDouble();
              gradeF = kb.nextDouble();
              System.out.println("0    10   20   30   40   50   60   70   80   90   100");
              System.out.println("|    |    |    |    |    |    |    |    |    |    |");
              System.out.println("***************************************************");
              total = gradeA + gradeB + gradeC + gradeD + gradeF;
              aCount = (((gradeA) / (total)) * 100);
              bCount = (((gradeB) / (total)) * 100);
              cCount = (((gradeC) / (total)) * 100);
              dCount = (((gradeD) / (total)) * 100);
              fCount = (((gradeF) / (total)) * 100);
                   for (int i= 0; i < aCount; i = i +2)
                   System.out.print('*');
              System.out.println("A");
                   for (int i= 0; i < bCount; i = i +2)
                   System.out.print('*');
              System.out.println("B");
                   for (int i= 0; i < cCount; i = i +2)
                   System.out.print('*');
              System.out.println("C");
                   for (int i= 0; i < dCount; i = i +2)
                   System.out.print('*');
              System.out.println("D");
                   for (int i= 0; i < fCount; i = i +2)
                   System.out.print('*');
              System.out.println("F");
    }

    Here's a tip for you: it doesn't really matter if you post in New to Java or Java Programming. Post once, be patient and you will get a reply. As I said keep up this style of posting and nobody will be willing to help you.
    Why am I freaking out over double posting? Lets say Fred reads and replies in Thread A. Then Barney comes along and reads Thread B not knowing that Fred has already given an answer in Thread B. So Barney ends up wasting his time by posting the same answer in Thread B. Once again it aint rocket science!

  • Help with calling a web service on an external system

    All right you Xi gurus, I'm a Basis guy whom has installed XI 3.0 SP13 and now I would like to get setup a fairly "real world" example.  I have read the help section but it kind of hard to follow.  I have followed the demo examples and they somewhat work and I followed the "XI30SP14_SimpleUse.pdf" which showed me how to do a simple file transfer and mapping but a considerable amount of work was done for me.  And yesterday I received the 'SAP Exchange Infrastructure' book from SAP-Press.  Thumbing through the book I see it contains detailed information on the functionality but nothing so far on how to setup the whole process of start to finish.
    Here is what I would like to do...I would like to call an external web service from my R/3 4.6C system via XI.   Could someone help by detailing the general steps of setting this up?  Thanks in advance.

    Hi Kartik,
    have you seen this blog by Thomas?
    <a href="/people/thomas.jung3/blog/2005/01/11/publishing-abap-webservices-to-an-external-uddi-server ABAP WebServices to an External UDDI Server</a>
    Regards
    Raja

  • Help with calling a java application from inside another one

    Hello!
    I am having this problem which is getting on my nerves and dont know how to solve..
    I want to call from my java application, another java application. So i use the exec command. Then i want to read the output of this execution from my own application, (the "parent" process).
    But it doesn work properly. Something seems to happen and i dont get the whole output.
    The java program i want to call is created for running an application created with Matlab java builder.
    This program works when called from cmd, but seems not to work when called from inside a java application.
    The code of my java application is:
    Runtime rt = Runtime.getRuntime();
    Process child;
    // The java class getmagic is a special kind of java file that uses classes that work in matlab. It uses a component (.jar) file that is created from matlab java builder. thats why it wants the -classpath and the rest options.
    //I hope you wont get messed up in here.
    String[] callAndArgs = {"java","-classpath",".;C:\\Program Files\\MATLAB\\R2006b\\toolbox\\javabuilder\\jar\\javabuilder.jar;..\\MagicDemoComp\\magicsquare\\distrib\\magicsquare.jar -Djava.library.path=C:\\Program Files\\MATLAB\\R2006b\\bin\\win32;","getmagic","4"};
    try{
    child = rt.exec(callAndArgs);
    InputStream is = child.getInputStream();
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line;
    while ((line = br.readLine()) != null)
    System.out.println(line);
    is.close();
    System.out.println(child.waitFor());
    System.out.println("Finished");
    }catch(IOException e) {
    System.err.println("IOException starting process!");
    }catch(InterruptedException e) {
    System.err.println("InterruptedException starting process!");
    The java program (getmagic) thats uses matlab gives the following output (after some time) when called in cmd with argument 4
    Magic square of order 4
    16 2 3 13
    5 11 10 8
    9 7 6 12
    4 14 15 1
    My program shown above only prints:
    Magic square of order 4
    1
    Finished.
    Do i do something wrong? How can i get the rest of the output???
    Thank you very much in advance,
    Stacey
    PS: I am sorry for the length of my post.

    Hello CaptainMorgan08, thanx for the instant reply.
    I tried, but no, i cant.
    Because i cannot include this java aplication that uses matlab into my application, cause 1) it needs special arguments in the compiler and during execution so it can be run and 2) it uses classes that java doesnt have. only the java-like matlab code.
    For example it uses:
    import com.mathworks.toolbox.javabuilder.*;
    import magicsquare.*; //the component which is made from matlab java builder.
    So i cannot compile it with my application!
    If you know of a way, please let me know!
    I know i might be missing something.. something that is obvious to you.. but i ve been working days=nights hardly no sleep..so you can excuse me if i say something foolish..
    Message was edited by:
    Stacey_Gr

  • Help with calling windows executable and hiding it using java

    Hi,
    I have a small utility which calls sqlplus from java , which basically executes a sql file .
    Process sqlProcess = runtime.exec(command);
    Where command is string and has all the required parameters.
    (sqlplus_exe , username_password_sid , sql-file_to_execute_path)
    This works fine but it pops up a sql plus window on screen which kindof the user has control .
    Like the user can close that sqlplus window before the script gets executed completely.
    I want that window to be hidden so that user doesn't have any control on the window and can't interfere with the sql execution.
    So thoght about windows api , ShellExecute where you can provide a parameter to hide the window.
    Details are in below
    [http://support.microsoft.com/kb/224816]
    Now the options I have considered to call ShellExecute are JNI / JNA / Smooth
    I am using eclipse hellios on winxp
    JNI
    I Got the code from some website which has all the required files from here [http://www.heimetli.ch/shellexec.html]
    But I am not able to run the code .
    It says Exception in thread "main" java.lang.UnsatisfiedLinkError: no HSWShellExec in java.library.path
    which I am not able to resolve .
    Even I had put the dll and .h file in the JAVA Build Path> Library section.
    JNA
    looks very simple .But I don't know which library to load and call which funtion :(
    JSMOOTH
    It always gives jsmooth.Native.isAvailable() as false.
    And I dont know how to make it true
    And also thinks that it works the other way around i.e. Jsmooth loads the JVM .Don't know if it can be called from within jvm
    So there I am stuck .
    Any suggestions guys.
    Any example code would be great.
    Thanks in advance.
    Edited by: Rajinder_Sandhu on Jul 14, 2010 7:58 AM

    I got it working with JNI and the sample code from the website
    The whole matter was get the path correctly setup in eclipse.
    The solution is posted here.
    [http://www.eclipsezone.com/eclipse/forums/t49342.html]

Maybe you are looking for

  • How can i open my iBook on my Mac, not just on my iPhone

    Hi, how can i open my iBook on my Mac, not just on my iPhone?  I ask this questions in hopes that I can eventually find a way to have the iPhone read a non "Enhanced" iBook to me. I used the Accessibility reader for a brief time but it's very persini

  • Can't see list of backups of TimeMachine service in Server.app

    We can't see the list of backups (users and date of last backup) in Server.app anymore. Load the settings will say, after a couple of minutes: Error Reading Settings Service functionality and administration may be affected. Click Continue to administ

  • Highlight text in adobe reader for android

    Dear Adobe Reader Team, I've had a problem with my adobe reader for android version 11.5.0 It's not highlighting any text or doesn't even select it when I scroll over. Kindly help me with this Problem. Thank you in advance.

  • Cannot upload in Lightroom 3

    For at least a month I have been unable to upload pictures to a web gallery. I'm getting an "Access denied" error message.There are no problems on my website server, and I have not changed any settings. I'm using the same settings that have worked fo

  • Option to select RoboHelp settings.ISF file missing in FM12

    Hi I am not sure if this query comes under FrameMaker forum or RoboHelp, but since I did not see RH Integration category in FrameMaker forums, I am posting it here. Moderators, please move it to the right forum or let me know if I have to delete it f