Packed Number Sign Format to Ascii equivalent  java program

Hi
I have a requirement to convert the packed Number Sign Format(usually used in MainFrame Platforms) to Ascii equivalent .
please help me out with java code or steps to be done to achieve these task
thank's
habeeb
[email protected]
[email protected]

Already answered in other thread.

Similar Messages

  • Using ASCII in java

    How can i use ascii in java programming. For example i want convert binary to decimal and use operator such XOR etc to campare to another decimal number. After that convert into ascii code.
    thank you

    If you have a string, then you can convert it into an array of char. Chars are just numbers. (They're numbers that represent unicode characters, but they're still numbers.)
    And all the primitive types in java are essentially binary; you don't have to convert anything to binary unless you mean to convert it for display purposes.
    If you have a string and want to convert it to ascii, then you can specify the encoding type (ascii) while converting to bytes or writing output to a file, etc.
    Hope this helps.

  • How to call a java program in javafx class(Urgent) and even vice versa

    Hi all,
    Here I have two questions:
    1)
    Please let me know how to call a javafx in java program...
    I tried with the following code but it is not working..
    The below is the java program in which I made a call to the Fx program.
    FxMainLauncher.java
    import net.java.javafx.FXShell;
    public class FxMainLauncher {
    public static void main(String[] args) throws Exception {
    FXShell.main(new String[] {"HelloWorld.fx"});
    2) How to call a java program in javafx class
    Here is my javafx program
    import check.*;
    import javafx.ui.*
    var instance = new MyJava();
    //visible:true
    System.out.println("Number is: {instance}");
    Here is my java program
    public class MyJava {
    public static void main(String args[])
    System.out.println("JAVAFX TO JAVA");
    Even this is not working please let me know ASAP
    Thanks in advance,
    V.Srilakshmi

    GOT IT !!!
    I had to change the name of the method in .h file generated by javah command. On doing
    javac -d ../../classes HelloWorld.java
    go to the ../../classes directory (where you have the class file) and do
    javah HelloWorld
    I got a HelloWorld.h file in which I had
    JNIEXPORT void JNICALL Java_HelloWorld_display(JNIEnv *, jobject);
    I added the package name too:
    JNIEXPORT void JNICALL Java_GUI_HelloWorld_display(JNIEnv *, jobject);
    The HelloWorldImp.c file should have the same name (ie with package) and be in the same directory(ie ../../classes)
    compile and build the shared library to get "libhello.so" file
    gcc -c -fPIC -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c
    gives .o file
    gcc -shared -o libhello.so HelloWorldImp.o
    gives .so file
    then run java with the command in my first message. It works.
    Thanks for the reply "thedracle".

  • ASCII equivalent of CF's URLDecode?

    Hello, everyone.
    Even though I've been working with CF for over a decade, this is going to sound like a total n00b question.  I'm just drawing a blank, right now.  Google isn't much help.
    Is there an ASCII equivalent of URLDecode??
    Where I work, everything that is inserted into a database goes through a filter that changes certain characters to their ASCII equivalent (ie, the less than "<" is altered to "&lt;").  For displaying the data, I need to revert the &lt; back to < for formatting (there are <br /> in place of line breaks, in the data.)
    If not, I suppose I should check cflib to see if there is a UDF.  Hmm..
    Respectfully,
    ^_^

    Well, first, that's not ASCII encoding, that's HTML Entity Encoding.
    Second, no. There is not a built-in function for decoding HTML entities. The purpose of the function is to use it when displaying output to the screen, not to use it before sotring data for later use.
    Obviously that doesn't help since you already have a system that encodes before putting data into the DB. So you need a way to decode it.
    If you are using CF8 or CF9, with all of the security hotfixes installed, or you are using CF10, then you'll have ESAPI available to you via Java integration. ESAPI is a security tool from OWASP with built-in encoders and decoders. You can use those. Here is how.
    <cfoutput>
              <cfset string = "&lt;hi&gt;" />
              <cfset list = createObject("java", "java.util.ArrayList") />
              <cfset htmlCodec = createObject("java", "org.owasp.esapi.codecs.HTMLEntityCodec") />
              <cfset list.add(htmlCodec) />
              <cfset encoder = createObject("java", "org.owasp.esapi.reference.DefaultEncoder").init(list) />
              #string#
              <br />
              #encoder.decodeForHTML(string)#
    </cfoutput>
    Hope that helps.

  • Floating point Number & Packed Number

    Hai can anyone tell me what is the difference in using floating point & packed Number .
    when it will b used ?

    <b>Packed numbers</b> - type P
    Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and the number of digits after the decimal point. The valid size can be any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. Up to 14 digits are allowed after the decimal point. The initial value is zero. When working with type P data, it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.
    You can use type P data for such values as distances, weights, amounts of money, and so on.
    <b>Floating point numbers</b> - type F
    The value range of type F numbers is 1x10*-307 to 1x10*308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating point arithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.
    You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.
    Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.
    reward if useful

  • Input a number in format

    I try to create a PlainDocument for input a value range from 0.0 to 99999.99
    i have not use DecimalFormat, because the user can type other things (i.e. 345..34 , 345a33.3)
    if using MaskFormatter, it will force to user to fill in all the blank .
    so, my purpose is that just allow user to input a number and one decimal point.
    Is there other method can I do?
    there is my code:
    class PD_Double extends PlainDocument {
    int MaxLength;     
    int IntLen=5,DecLen=2;
    int DecPt=0,NumLen=0;
    public PD_Double(int parMaxLength){
    MaxLength=parMaxLength;
    public void insertString(int offset, String str, AttributeSet attr)
         throws BadLocationException {        
    System.out.println("offset:"+offset);
    if (str == null) return;
         try {
    if (!str.equals(".")) {
         double n = Double.parseDouble(str);
    int LeftIndex =getText(0,getLength()).indexOf(".");
    int RightIndex=getText(0,getLength()).lastIndexOf(".");
    if ((LeftIndex < 0 & RightIndex < 0) || (LeftIndex == RightIndex) & !str.equals(".")) {               
    boolean cont=!false;
    if (DecPt == 0) {
    else if (DecPt == 1) {                    
    if (getLength() < 3) {
    cont=true;
    System.out.println("@1");
    else {
    if (DecPt <= IntLen+1 & getLength()-DecPt < DecLen) {
    cont=true;
    else {
    cont=false;
    if (DecPt <= IntLen+1 & getLength()-DecPt == DecLen) {                               
    if (offset < DecPt)
    cont=true;
    else
    cont=false;
    else if (DecPt == 2) {                    
    if (getLength() < 4){                       
    cont=true;
    else cont=false;
    else if (DecPt == 3) {                    
    if (getLength() < 5){                       
    cont=true;
    else cont=false;
    else if (DecPt == 4) {
    if (getLength() < 6){
    cont=true;
    else cont=false;
    else if (DecPt == 5) {
    if (getLength() < 7){
    cont=true;
    else cont=false;
    else if (DecPt == 6) {
    if (getLength() < 8){
    cont=true;
    else cont=false;
    if ((getLength() + str.length()) <= MaxLength & cont) {
              super.insertString(offset, str, attr);
    NumLen=getLength();
    catch (Exception ex) {}
    protected void removeUpdate(AbstractDocument.DefaultDocumentEvent chng) {
    super.removeUpdate(chng);
    try { DecPt=getText(0,getLength()).indexOf(".")+1;
    catch (Exception ex) {}
    protected void insertUpdate(AbstractDocument.DefaultDocumentEvent chng,AttributeSet attr) {
    super.insertUpdate(chng,attr);
    try { DecPt=getText(0,getLength()).indexOf(".")+1;                
    catch (Exception ex) {}
    }

    sorry, I have not read your code. use codetags next time you post code (see formatting tips: http://forum.java.sun.com/help.jspa?sec=formatting).
    but if you are talking about JTextFields I think you might want to use a floatdocument.
    save this class as FloatDocument.java:
    import javax.swing.text.AttributeSet;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.Document;
    import javax.swing.text.PlainDocument;
    public class FloatDocument extends PlainDocument {
        private int m_nMaxChars;
        private float m_fMinValue;
        private float m_fMaxValue;
        private boolean m_boMaxCharsSet = false;
        private boolean m_boMinMaxValuesSet = false;
        public FloatDocument() {
            super();
        public FloatDocument(int p_nNumChars) {
            super();
            m_nMaxChars = p_nNumChars;
            m_boMaxCharsSet = true;
        public FloatDocument(float p_fMinValue, float p_fMaxValue) {
            super();
            m_fMinValue = p_fMinValue;
            m_fMaxValue = p_fMaxValue;
            m_boMinMaxValuesSet = true;
        public FloatDocument(float p_fMinValue, float p_fMaxValue, int p_nNumChars) {
            super();
            m_fMinValue = p_fMinValue;
            m_fMaxValue = p_fMaxValue;
            m_boMinMaxValuesSet = true;
            m_nMaxChars = p_nNumChars;
            m_boMaxCharsSet = true;
        public FloatDocument(Document p_oDocument, int p_nNumChars) {
            super();
            // Below only invoked if constructor IntegerDocument(int p_nNumChars) has been used
            if (m_boMaxCharsSet) {
                m_nMaxChars = p_nNumChars;
                try {
                    // need to move text from old document to new document
                    String l_strText = p_oDocument.getText(0, p_oDocument.getLength());
                    if (l_strText.length() > m_nMaxChars)
                        l_strText = l_strText.substring(0, m_nMaxChars);
                    insertString(0, l_strText, null);
                catch (BadLocationException ex) {
        public void insertString(int p_nOffset, String p_strString, AttributeSet p_oAttributeSet) throws BadLocationException {
            if (p_strString == null) {
                return;
            else {
                if (m_boMaxCharsSet) {
                    if ((getLength() + p_strString.length()) > m_nMaxChars) {
                        return;
                String l_strNewValue;
                int l_nLength = getLength();
                if (l_nLength == 0) {
                    l_strNewValue = p_strString;
                else {
                    String l_strCurrentContent = getText(0, l_nLength);
                    StringBuffer l_strCurrentBuffer = new StringBuffer(l_strCurrentContent);
                    l_strCurrentBuffer.insert(p_nOffset, p_strString);
                    l_strNewValue = l_strCurrentBuffer.toString();
                try {
                    float l_fNewFloatValue = Float.parseFloat(l_strNewValue);   
                    if (m_boMinMaxValuesSet) {
                        if (l_fNewFloatValue < m_fMinValue || l_fNewFloatValue > m_fMaxValue) {
                            return;
                    if (p_strString.equals(".")) {
                        super.remove(0,l_nLength);
                        super.insertString(0, l_strNewValue,p_oAttributeSet);
                        return;
                    float currentFloat = 0;
                    if (l_nLength > 0) {
                        String l_strCurrentFloat = getText(0, l_nLength);
                        if (!l_strCurrentFloat.equals("-")) {
                            currentFloat = Float.parseFloat(l_strCurrentFloat);
                    else {
                        currentFloat = 0;                        
                    if (currentFloat == 0 && l_fNewFloatValue == 0 && l_nLength == 1) {
                        return;                         
                    super.remove(0,l_nLength);
                    super.insertString(0, l_strNewValue,p_oAttributeSet);
                    return;
                } catch (NumberFormatException exception) {
                    if (!l_strNewValue.equals("-")) {
                        return;  //doesn't return on a single '-'
                super.insertString(p_nOffset, p_strString,p_oAttributeSet);
    }Use it like this where you make your JTextField:
            JTextField m_oFloatTextField = new JTextField();
            m_oFloatTextField.setDocument(new IntegerDocument(0.0, 99999.99);

  • Packed number conversion

    Hi.
    Net connector returns the string and when I parse it I end up with packed number format in STRING data type.
    Is there some function in connector or external library that simply and quickly transforms BCD string to Decimal and vice versa?
    Or any trick to do that. Tried to retype via net connector, but says string cannot be converted to decimal.
    Am I only one who needs this functionality. Was digging google half day found nothing.
    Thx
    Juraj

    Hi Gaurav,
    I tried a small program and found no problem in moving the data. Just check the length of char field..or try this program
    DATA: pack TYPE p DECIMALS 5,
          char(10) TYPE c.
    pack = '5.00345'.
    MOVE pack TO char.
    WRITE char.
    //Kothand

  • Running a java program a set number of times

    This is a general question. Is it possible to make a java program run only 5 times for the sake of arguement.
    Basically I want to write a program that will give the user some flexibility when it will actually run another Java program, but I only want them to be able to say "not now' for a set number of times. When the last time comes the other program will launch. I was initially thinking of the Do Whilw loop, but this needs to work when the program is restarted.
    Program starts, it has 5 times it will run before it does something else(doesn't really matter now I think). User takes option "Not Now" and the program ends, but warns the user this will run 4 more times before you will need to do something.
    This process will repeat until the user takes the option "Ok install now" or the time limit expires and the install occurs anyway. Can someone point me in the right direction.

    ok I see so it's like one those programs that you download for free on the internet and they give you a set amount times to use it before you have to pay for it. but in this case when the number of times you use it equals 5 (or when the user clicks ok) a different java app will open automatically.
    My first thought would be to Write a Serialized object to disk using objectOutputStream that stores the number of times the application has been opened. and each time the program runs it checks for the serialized object and then you can do something like what I posted before. of course if were worried about security the user could always look for the object and erase it, if so then I guess we would have to come up with another plan of attack
    Hope this helps

  • 1.4.2 - What is the correct way to format output in the java.io.PrintStream

    With Java 1.4.2:
    What is the correct way to format output in the java.io.PrintStream?
    The following is incorrect, even though it is still used in the The JavaTM Tutorial at: http://java.sun.com/docs/books/tutorial/essential/
    System.out.formatThis returns "cannot resolve the method 'format'"
    Any detailed suggestions or information is greatly appreciated.

    The following is incorrect, even though it is still
    used in the The JavaTM Tutorial at:
    http://java.sun.com/docs/books/tutorial/essential/
    The whole format thing has been introduced in 1.5. The tutorial also states it's been "updated to 1.5.".
    That's all I've got to say for I don't know how you can format a PrintWriter, let alone a PrintStream, prior to 1.5. I'm not really sure there is any way. Any "legacy way", that is. There almost certainly are third-party API which achieve similar results.

  • How to covert EBCDIC format to ASCII in JMS Adapter??????????

    Hi All,
          I am developing one JMS to File scenario, in which JMS adapter will pick file which is in EBCDIC format from WebSphere MQ and send it to receiver file system by receiver file adapter. when i am trying this, i am getting file in EBCDIC format in receiver file system, but the file system is expecting data in ASCII format.
    Is there any options to encode the EBCDIC format to ASCII in Sender JMS Adapter or Receiver File Adapter.
    Thanks,
    Madhusudhan.

    Hi,
    It was Basis / Database / OS staff that configured this aspect of the connection, and I am afraid I do not have any more details.
    A Google search gave me the following from IBM Documentation on MQ Series:
    <a href="http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/ucli_pqcfm.html">http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/ucli_pqcfm.html</a>
    <b>MQSeries queue connection factory settings for application clients</b>
    CCSID
    The coded character set identifier for use with the WebSphere MQ queue manager.
    This coded character set identifier (CCSID) must be one of the CCSIDs supported by WebSphere MQ.
    Data type  String 
    For more information about supported CCSIDs, and about converting between message data from one coded character set to another, see the WebSphere MQ System Administration and the WebSphere MQ Application Programming Reference books. These are available from the WebSphere MQ messaging multiplatform and platform-specific books Web pages; for example, at <a href="http://www-3.ibm.com/software/ts/mqseries/library/manualsa/manuals/platspecific.html">http://www-3.ibm.com/software/ts/mqseries/library/manualsa/manuals/platspecific.html</a> , the    IBM Publications Center , or from the WebSphere MQ collection kit, SK2T-0730.
    hope this may be of some help
    Andrew

  • Whole number field formatted as timezone in CRM 2013 SP1UR1 gives error on saving

    Hi,
    I added a whole number field formatted  as time zone to the appointment form and when I save the record I get an error saying
    Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.InvalidCastException: Unable to cast object of type 'Microsoft.Xrm.Sdk.OptionSetValue' to type 'System.IConvertible'.
    This error is coming from the timezone field and only happens when I have data in the field. Has anyone seen this?
    Thanks
    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    More info, the error occurs on pipeline stage 30 of the Book or Reschedule message and the same thing happens in CRM 2015. I've started a thread on connect with URL
    https://connect.microsoft.com/dynamicssuggestions/feedback/details/1128206/crm-2013-sp1ur1-cant-handle-the-timezone-field
    This must be rather new because I've tried it in CRM 2011 UR late and it did not occur there, I haven't tried CRM 2013 RTM though so I can't say if it's a CRM 2013 or a CRM 2013 SP1UR1 issue.
    BTW, the 2015 org was a complete vanilla so I've pretty much ruled out custom code as a culprit :)
    Regards
    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

  • HT1338 My keyboard does not have the number sign: # . How do I get my keyboard to type this?

    My keyboard does not have the number sign:  # . How do I get my keyboard to type this?

    It depends on your keyboard layout.
    From the menu bar, select
     ▹ System Preferences... ▹ Keyboard ▹ Keyboard ▹ Show Keyboard & Character Viewers in menu bar
    Now select
    Show Keyboard Viewer
    from the menu with a keyboard icon in the menu bar, towards the right. By pressing modifier keys, you can see what characters correspond to any key combination. You can also produce a character by clicking it in the viewer.

  • Getting IDoc Number after posting it frm Java Program

    Hi All:
    I had written a Java Program to post an IDoc into the SAP System. I was successful in posting an IDoc. My next step is, to get the Idoc number generated by SAP system for the posted IDoc. Using this IDoc number i want to track its status.
    Can anyone please let me know how to get the IDoc Number from SAP from a Java program? I have Transaction ID with me, can i get IDoc Number via Transaction ID?
    Please let me know ur views on this.
    Thanks & Best Regard,
    - - Rajiv

    Hi Rajiv,
       Could you Please help to clear one thing .I am very new to SAP JCO Programming.To remove the dependency of Posting Data to SAP through RFC program which is written by SAP People ,I want to use IDoc,is it possible to use it ? if yes could u please help with Some Java code so i can post Data through Java Code to SAP with IDoc.
    Wait for Your Kind Reply.
    Thanks & Warm regards,
    Kamal

  • Error when number sign # in address field of form

    I need to be able to accept the number sign # in my form field for address, ie apt #3. When a # is submitted with my form, I get an error. How do I allow the # to be included for this field?
    <cfinput style="WIDTH: 247px" size="30"  type="text" name="shipaddress" value="" required="yes" message="You must enter your address">

    Thank you for your help. I am very new here.
    The form collecting the address is on my shopping cart and is working fine, I ran the test code you provided.
    The data from the form is then inserted into a database.
    intodb.cfm
    INSERT INTO people(firstname,lastname,email,address,city,state,country,zip,phone,shipfirst,shiplast,s hipaddress,shipcity,shipstate,shipzip,shipcountry,lastfour,frequency,cases,ccmo,ccyr,cctyp e,dater,cfid,cftoken)
    VALUES('#shipfirst#','#shiplast#','#email_addr#','#shipaddress#','#shipcity#','#shipstate# ','#shipcountry#','#shipzip#','#phone#','#shipfirst#','#shiplast#','#shipaddress#','#shipc ity#','#shipstate#','#shipzip#','#shipcountry#','#lastfour#','#frequency#','#cases#','#ccm o#','#ccyr#','#cctype#','#DateFormat("#Now()#", "yyyy-mm-dd")# #TimeFormat("#Now()#", "hh:mm:sstt")#','#session.cfid#','#session.cftoken#')
    <cflocation url="sale2.cfm?shipmethod=#shipmethod#&shipcost=#shipcost#&shipfirst=#shipfirst#&shiplast =#shiplast#&shipaddress=#shipaddress#&shipcity=#shipcity#&shipstate=#shipstate#&shipzip=#s hipzip#&shipcountry=#shipcountry#&country=#shipcountry#&phone=#phone#&email_addr=#email_ad dr#&ccnum=#ccnum#&ccmo=#ccmo#&ccyr=#ccyr#&cctype=#cctype#&ordertotal=#ordertotal#&disc=#di sc#">
    Then on sale2.cfm.
    <cfsavecontent variable="strXML">
    <?xml version="1.0" standalone="yes"?>
    <SaleRequest>
    <CustomerData>
    <Email>#email_addr#</Email>
    <BillingAddress>
    <Address1>#shipaddress#</Address1>
    <FirstName>#shipfirst#</FirstName>
    <LastName>#shiplast#</LastName>
    <City>#shipcity#</City>
    <State>#shipstate#</State>
    <Zip>#shipzip#</Zip>
    <Country>#shipcountry#</Country>
    <Phone>#phone#</Phone>
    </BillingAddress>
    I receive this error, assuming it is the EMAIL_ADDR variable because it is the first one:
    Variable  EMAIL_ADDR is undefined.

  • How to store xml data into file in xml format through java program?

    HI Friends,
    Please let me know
    How to store xml data into file in xml format through java program?
    thanks......
    can discuss further at messenger.....
    Avanish Kumar Singh
    Software Engineer,
    Samsung India Development Center,
    Bangalore--560001.
    [email protected]

    Hi i need to write the data from an XML file to a Microsoft SQL SErver database!
    i got a piece of code from the net which allows me to parse th file:
    import java.io.IOException;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import org.apache.xerces.parsers.SAXParser;
    import java.lang.*;
    public class MySaxParser extends DefaultHandler
    private static int INDENT = 4;
    private static String attList = "";
    public static void main(String[] argv)
    if (argv.length != 1)
    System.out.println("Usage: java MySaxParser [URI]");
    System.exit(0);
    String uri = argv[0];
    try
    XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
    MySaxParser MySaxParserInstance = new MySaxParser();
    parser.setContentHandler(MySaxParserInstance);
    parser.parse(uri);
    catch(IOException ioe)
    ioe.printStackTrace();
    catch(SAXException saxe)
    saxe.printStackTrace();
    private int idx = 0;
    public void characters(char[] ch, int start, int length)
    throws SAXException
    String s = new String(ch, start, length);
    if (ch[0] == '\n')
    return;
    System.out.println(getIndent() + " Value: " + s);
    public void endDocument() throws SAXException
    idx -= INDENT;
    public void endElement(String uri, String localName, String qName) throws SAXException
    if (!attList.equals(""))
    System.out.println(getIndent() + " Attributes: " + attList);
    attList = "";
    System.out.println(getIndent() + "end document");
    idx -= INDENT;
    public void startDocument() throws SAXException
    idx += INDENT;
    public void startElement(String uri,
    String localName,
    String qName,
    Attributes attributes) throws SAXException
    idx += INDENT;
    System.out.println('\n' + getIndent() + "start element: " + localName);
    if (localName.compareTo("Machine") == 0)
    System.out.println("YES");
    if (attributes.getLength() > 0)
    idx += INDENT;
    for (int i = 0; i < attributes.getLength(); i++)
    attList = attList + attributes.getLocalName(i) + " = " + attributes.getValue(i);
    if (i < (attributes.getLength() - 1))
    attList = attList + ", ";
    idx-= INDENT;
    private String getIndent()
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < idx; i++)
    sb.append(" ");
    return sb.toString();
    }// END PRGM
    Now , am not a very good Java DEv. and i need to find a soln. to this prob within 1 week.
    The next step is to write the data to the DB.
    Am sending an example of my file:
    <Start>
    <Machine>
    <Hostname> IPCServer </Hostname>
    <HostID> 80c04499 </HostID>
    <MachineType> sun4u [ID 466748 kern.info] Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 360MHz) </MachineType>
    <CPU> UltraSPARC-IIi at 360 MHz </CPU>
    <Memory> RAM : 512 MB </Memory>
    <HostAdapter>
    <HA> kern.info] </HA>
    </HostAdapter>
    <Harddisks>
    <HD>
    <HD1> c0t0d0 ctrl kern.info] target 0 lun 0 </HD1>
    <HD2> ST38420A 8.2 GB </HD2>
    </HD>
    </Harddisks>
    <GraphicCard> m64B : PCI PGX 8-bit +Accel. </GraphicCard>
    <NetworkType> hme0 : Fast-Ethernet </NetworkType>
    <EthernetAddress> 09:00:30:C1:34:90 </EthernetAddress>
    <IPAddress> 149.51.23.140 </IPAddress>
    </Machine>
    </Start>
    Note that i can have more than 1 machines (meaning that i have to loop thru the file to be able to write to the DB)
    Cal u tellme what to do!
    Even better- do u have a piece of code that will help me understand and implement the database writing portion?
    I badly need help here.
    THANX

Maybe you are looking for

  • Sybase replication server on HA / DR

    Hi Experts, We are in the process of setting up DR environment for Sybase ASE using replication server. The primary site has an HA configured. My doubt is when we need to install replication server at standby site, what host needs to be specified as

  • XE: create DB-User in APEX and Monitor Storage???

    Hello there, i am wondering, where some of the features described in the XE 2Day DBA guide are? For Example, i cannot find the usage monitor or storage tab. I loged in: WS: system | internal | MyWorkspace user: system | admin | Jana PW: ***** | *****

  • Deleting Universal Binary Files

    I have just downloaded OS X Lion and I am trying to delete some file on my Macbook to speed things up.  I have downloaded cleanmymac and it had found universal binary files. Can i delete theses.  I am using a mac with 2.4 GHz intel core 2 duo.

  • CSM overwrites Configurations

    Hello. We have installed CSM 3.2 which we want to use for managing Catalyst 6509 and 3845. We also have a VPN tunnel between 6509 and a Checkpoint Firewall. We have find out a problem: if we configure a little thing (e.g. setting snmp-server) on Cata

  • The communication of LabView on Excel is unstable.

    After the rearrangement of Windows 2000 to Windows XP the communication of LabVIEW on Excel is unstable. I write an Array from LabVIEW to Excel. Only zeros arrive in Excel mostly, however. It works from time to time.