Interpret the header line in /etc/release file

Can you pelase interpret the header lines in /etc/release file on solaris 9 OS.

sreedeepa wrote:
Can you pelase interpret the header lines in /etc/release file on solaris 9 OS.
x31$ cat /etc/release
Solaris 9 9/05 s9s_u8wos_05 SPARC
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 04 August 2005
x31$ Base OS level (Solaris 9), Release Date (9/05), shorthand for easy parsing (s9s == Solaris 9 sparc, u8 == update 9, wos_05 (don't know what the represents)), Processor Architecture
I'll assume you don't need the other lines parsed :-)
Best,
Edited by: John.Kotches on Feb 22, 2008 9:18 AM
Edited by: John.Kotches on Feb 22, 2008 9:18 AM
Trying to get Code tag to work.

Similar Messages

  • How to read the last line in a txt file?

    Dear all,
    I want to read the last line in a txt file. There are thousands of lines in this file. What I want is to move the file pointer directly to the last line of the file. But I did not know how do to it. Can anybody help me out?
    Thank you very much!

    If the file is coded as ASCII or one of the encodings that maps a single byte to a char then the following class will assist you
    import java.io.*;
    import java.util.*;
    public class GetLinesFromEndOfFile
        static public class BackwardsFileInputStream extends InputStream
            public BackwardsFileInputStream(File file) throws IOException
                assert (file != null) && file.exists() && file.isFile() && file.canRead();
                raf = new RandomAccessFile(file, "r");
                currentPositionInFile = raf.length();
                currentPositionInBuffer = 0;
            public int read() throws IOException
                if (currentPositionInFile <= 0)
                    return -1;
                if (--currentPositionInBuffer < 0)
                    currentPositionInBuffer = buffer.length;
                    long startOfBlock = currentPositionInFile - buffer.length;
                    if (startOfBlock < 0)
                        currentPositionInBuffer = buffer.length + (int)startOfBlock;
                        startOfBlock = 0;
                    raf.seek(startOfBlock);
                    raf.readFully(buffer, 0, currentPositionInBuffer);
                    return read();
                currentPositionInFile--;
                return buffer[currentPositionInBuffer];
            public void close() throws IOException
                raf.close();
            private final byte[] buffer = new byte[4096];
            private final RandomAccessFile raf;
            private long currentPositionInFile;
            private int currentPositionInBuffer;
        public static List<String> head(File file, int numberOfLinesToRead) throws IOException
            return head(file, "ISO-8859-1" , numberOfLinesToRead);
        public static List<String> head(File file, String encoding, int numberOfLinesToRead) throws IOException
            assert (file != null) && file.exists() && file.isFile() && file.canRead();
            assert numberOfLinesToRead > 0;
            assert encoding != null;
            LinkedList<String> lines = new LinkedList<String>();
            BufferedReader reader= new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));
            for (String line = null; (numberOfLinesToRead-- > 0) && (line = reader.readLine()) != null;)
                lines.addLast(line);
            reader.close();
            return lines;
        public static List<String> tail(File file, int numberOfLinesToRead) throws IOException
            return tail(file, "ISO-8859-1" , numberOfLinesToRead);
        public static List<String> tail(File file, String encoding, int numberOfLinesToRead) throws IOException
            assert (file != null) && file.exists() && file.isFile() && file.canRead();
            assert numberOfLinesToRead > 0;
            assert (encoding != null) && encoding.matches("(?i)(iso-8859|ascii|us-ascii).*");
            LinkedList<String> lines = new LinkedList<String>();
            BufferedReader reader= new BufferedReader(new InputStreamReader(new BackwardsFileInputStream(file), encoding));
            for (String line = null; (numberOfLinesToRead-- > 0) && (line = reader.readLine()) != null;)
                // Reverse the order of the characters in the string
                char[] chars = line.toCharArray();
                for (int j = 0, k = chars.length - 1; j < k ; j++, k--)
                    char temp = chars[j];
                    chars[j] = chars[k];
                    chars[k]= temp;
                lines.addFirst(new String(chars));
            reader.close();
            return lines;
        public static void main(String[] args)
            try
                File file = new File("/usr/share/dict/words");
                int n = 10;
                    System.out.println("Head of " + file);
                    int index = 0;
                    for (String line : head(file, n))
                        System.out.println(++index + "\t[" + line + "]");
                    System.out.println("Tail of " + file);
                    int index = 0;
                    for (String line : tail(file, "us-ascii", n))
                        System.out.println(++index + "\t[" + line + "]");
            catch (Exception e)
                e.printStackTrace();
    }Note, the EOL characters are treated as line separators so you will probably need to read the last two lines (think about it for a bit).

  • Add Header Line tot he output File

    Hi,
    Proxy to File Senario.
    Details records are coming through proxy.
    I need to add a static header line in the file that is created..
    The Header line is something Like this :- "SSN";"UPI";"EFF_DATE";"STATUS";"STATUS_ACTION_CD";"PAY_CONTINUATION";"LASTNAME";"FIRSTNAME";"MI";"NAME_SFX";"LOC_CODE";"EMP_CAT";"
    The configuration that i did in Content Conversion:-
    Recordset :- HEADER,ROOT
    HEADER.addHeaderline : 1
    HEADER.headerline : "SSN";"UPI";"EFF_DATE";"STATUS";"STATUS_ACTION_CD";"PAY_CONTINUATION";"LASTNAME";"FIRSTNAME";"MI";"NAME_SFX";"LOC_CODE";"EMP_CAT";"
    ignoreRecordsetName : true
    ROOT.fieldSeparator : ;
    ROOT.endSeparator : 'nl'
    <b>But the error in Communication channel monitoring is : -</b>
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'HEADER.fieldFixedLengths' or 'HEADER.fieldSeparator' is missing....
    So Plz help me out in this.....
    Thanks
    Harpreet

    Hi Harpreet,
    You can pass the static header content in your message mapping ....to the target header field..
    and then use a normal FCC to print out the structure...
    Regards,
    Sushil H.

  • Can you help me interpret the following lines in UPDATE rule?

    Hi,
    Can you help me interpret the following lines in UPDATE rule?
    1. What is the role of role of u201CCHANGING RESULT.u201D and u201CCHANGING lc_local_value.u201D?
    2. What is the role of the CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY', in particular the Exporting and Importing parts?
    3. Can I say that u201CCOMM_STRUCTURE-ORDER_VALu201D in the subroutine is passed to u201Clc_document_valueu201D in the u201CFORM loc_curr_convertu201D; and further passed to u201Cforeign_amountu201D in the u201CCALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'u201D?
    4. Finally, what becomes of my original u201CActual Goods receipt quantityu201D( 0GR_QTY ) which I am writing the routine for? I donu2019t see any where in the code that it is being referred to? Do any of these codes affect the value of 0GR_QTY?
    5. Also, if there are 3 different subroutines in the INCLUDE and I am making the change described in #4 above, how do I know which of the 3 subroutines to call?
    ===============================
    ===============================
    So I am reviewing a transfer routine in for u201CActual Goods receipt quantityu201D and routine an INCLUDE statement: INCLUDE RS_BCT_MM_UPDATE_RULES.
    The update rule also includes the following properties to run the following subroutine in the Include:
    IF u2026..
    perFORM LOC_CURR_CONVERT
               USING    COMM_STRUCTURE-ORDER_VAL
                        COMM_STRUCTURE-DOC_DATE
                        COMM_STRUCTURE-ORDER_CURR
                        COMM_STRUCTURE-LOC_CURRCY
                        COMM_STRUCTURE-EXCHG_RATE
               CHANGING RESULT.
    I verified in the INCLUDE (RS_BCT_MM_UPDATE_RULES) and the subroutine is as follows:
    FORM loc_curr_convert
      USING    lc_document_value
               lc_date
               lc_document_currency
               value(lc_local_currency)
               lc_rate
      CHANGING lc_local_value.
    conversion of lc_rate from floating-point to decimal. Necessary for *
    call of CONVERT_TO_LOCAL_CURRENCY.
    data lc_rate_dec type p decimals 5.
    lc_rate_dec = lc_rate.
      IF lc_document_currency = lc_local_currency
      no conversion necessary -> Main case 1
        AND NOT ( lc_document_currency IS INITIAL
               OR lc_local_currency IS INITIAL ) .
        lc_local_value = lc_document_value.
      ELSEIF NOT ( lc_document_currency IS INITIAL
      OR lc_local_currency IS INITIAL OR lc_date IS INITIAL ) .
      conversion necessary with lc_date -> Normally not possible
        CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
          EXPORTING
            date                 = lc_date
            foreign_amount       = lc_document_value
            foreign_currency     = lc_document_currency
            local_currency       = lc_local_currency
            rate                 = lc_rate_dec
          IMPORTING
          EXCHANGE_RATE        =
            local_amount         = lc_local_value
          EXCEPTIONS
            NO_RATE_FOUND        = 1
            OVERFLOW             = 2
            NO_FACTORS_FOUND     = 3
            NO_SPREAD_FOUND      = 4
            DERIVED_2_TIMES      = 5.
        IF sy-subrc NE 0.
      message a802 with lc_date lc_document_currency lc_local_currency
                        sy-subrc.
        ENDIF.
      ELSE.
      if conversion not possible -> assign target values
        lc_local_value = lc_document_value.
        lc_local_currency = lc_document_currency.
      ENDIF.
    ENDFORM.

    HI,
    Thanks so much the explanations.
    I just verified again on our dev system and the update rule for 0GR_QTY (Actual goods receipt quantity) include the following:
        perFORM QUANTITY_CONVERT
           USING    COMM_STRUCTURE-CPQUAOU
                    COMM_STRUCTURE-po_UNIT
                    COMM_STRUCTURE-base_uom
                    COMM_STRUCTURE-numerator
                    COMM_STRUCTURE-denomintr
           CHANGING RESULT
    Now, in the include, I also found:
    FORM QUANTITY_CONVERT
      USING    QC_SOURCE_VALUE
               QC_SOURCE_UNIT
               VALUE(QC_TARGET_UNIT)
               QC_UMREZ
               QC_UMREN
      CHANGING QC_TARGET_VALUE.
    i.  Does it mean it actually does quantity conversion?
    ii. If you have access to the INCLUDE I will appreciate some hints on what the subroutine QUANTITY_CONVERT is doing. It does not appear do to be saying anything about quantity conversion; but it is supposed to be doing something with the parameters being passed from the update routine.
    iii. In your response to #5, after all the computation in the INCLUDE, what comes back to the Update rule  i.e. what comes back to become the value of 0GR_QTY?
    Is it the u201CRESULT.u201D in the update rule or u201CQC_TARGET_VALUE.u201D in the subroutine in the INCLUDE.
    iv. So, am to create an Update rule for 0PSTNG_DATE and the source is BUDAT; and I need to write a routine using the include INCLUDE RS_BCT_MM_UPDATE_RULES.
    I looked through the INCLUDE and identified all the subroutines in this INCLUDE as follows:
    QUANTITY_CONVERT
    LOC_CURR_CONVERT
    GET_WEEK
    WEEK_DAY
    QUARTER_DAY
    --Does it mean that to use this subroutine, I can only use the USING parameters of one of these listed subroutines?
    --Also, does it mean that because 0PSTNG_DATE is a date, I can only use one of
    GET_WEEK
    WEEK_DAY
    QUARTER_DAY
    --Or, are there other includes to be used for 0PSTNG_DATE
    Thanks

  • How to delete value in the header line of itab

    dear all,
    i have create an internal table.
    i would like to delete value of the header line after have used read table to read the contents.
    how can i do it ?

    If your internal table is something like this:
    data: begin of i_mara occurs 0.
    include structure mara.
    data: end of i_mara.
    That clears the matnr field of the header line...
    CLEAR i_mara-matnr.

  • After adding one column in a table can't get the header line

    hi all,
    i have make a SMART FORM which was working perfectly.Now the requirement of user is to add one column in my table at smart form which i did and after modification i execute it it give me data as well but issue which i'm facing is that the TABLE at smart forms in which i have add one field is not displaying the HEADER LINE which i have define with SELECT PATTREN option.
    Thanks & Regards,
    sappk25

    Hi,
    Have you created the Header Text? If yes, then might be the case that your smartforms
    table which was already created is with Multiple Line. Check weather you have added
    customer field in Header Line or Not?
    Regards,
    SUjeet

  • Need to add a TAB in the header line of PO

    Hi,
    Can someone suggest me where to add a screen tab in the header line of PO.
    Please help me with the exit name.
    Thanx.
    Kamlesh

    Hi,
    You can use the enhancement MM06E005 for this..
    GO to CMOD..create a project and give the enhancement..
    Activate the project..
    GO to SE51..give the program SAPLXM06 and screen 0101 for header level data.
    Press create..
    GIve the screen type as SUBSCREEN..
    In the layout give the field.
    Activate the screen..Now you can see the field in ME21N
    Thanks
    Naren

  • How to overwrite the header part of a wave file?????

    I need to overwirte the header part of a wave file. Any one has ideas or similar experiences?
    basically, I want to continousely save wave data from a sound card. At the end of my program, I need to write the data size of the final wave file to the header part of the wave file.
    Is there a function to replace the content of a file? Thanks

    I assume that what you want to do is add documentation into the header of the wav file such as the media type, location, equipment used .....
    Some one may have written some routines to do this in Labview, unfortunately all the ones I have are written in Visual Basic, quite a long time ago.
    Here are some pointers in the event that no one has any Labview stuff, we could even knock a few togther, if its not been done.
    The WAV file falls into a cateory of Windows files known as RIFF format files, in fact you will see this written into the file header almost at the very front.
    I quote here from the Microsoft Technet Article:-
    See here for a nice picture and here for full details, although for the header structure I prefer here.
    "The basic building block of a RIFF file is a chunk. A chunk is
    a logical unit of multimedia data, such as a single frame in a video
    clip. Each chunk contains the following fields:
    A four-character code specifying the chunk identifier
    A doubleword value specifying the size of the data member in the chunk
    A data field
    Don't be put off by the fact that it often says AVI rather than WAV in the examples, the RIFF format is an extensible file format supporting lots of various media types even custom types. It's just that at the moment people are interested in Video.
    There are standard fourcc codes that exist to hold various specific types of information and if one of these is not suitable you can create your own, there is (well was) even a way to regiser your own special type with Microsoft!!
    There are a couple of ways of doing the job (assuming some kind sole does not donate a VI library).
    1) Handle all the file i/o yourself by reading in the file and then insert the appropriate headers and rewrite the file out again.
        Involved, but cross platform.
    2) Muck about with Windows 'mmio' librarys (mmioCreateChunk).
        Platform specific but possibly more reliable???
    If you select option 1, then what you have to do is read in the appropriate chunk sizes(lengths) contained in the header, insert your appropriate FOURCC code, size(length) and data then adjust the affected 'chunk' size indicators to put all the various size indicators in the correct place, simple ehhh
    If you select option 2, this requires linking to the appropriate DLL, it always my last resort to avoid DLL hell and portability issues.
    As an example I wrote my own Turbo Pascal and later Visual Basic handlers which allowed attachment of lots of information from a form, and then created a special media format for the data to allow storing native measured data. These files are still recognised by WAV file readers today such as Media Player 10. Of course the data format is not understood because the encoding type was special, but that's the point.
    One final point, there was a tool which read in a WAV file displaying all available headers, with C source (Windows 3.X) supplied in the MSDN toolkit. There are probalby other tools available by now, as a last resort If you decide to have a go I can send you my VB alpha version which reads all standard headers, it might write out a few as well (it was a very long time ago).
    Good  luck.
    Message Edité par Conseils le 12-10-2005 04:09 PM

  • When I open an html file saved in UTF-8 format the 3-byte file header (usually hex EF BB BF) is shown as text at top-left. How can I avoid this - all other browsers interpret the header correctly and don't show it.

    I write VB apps that create web pages for international sports scoring systems, and these must be able to show Latin, Cyrillic, eastern names etc. that require 2-bytes for some characters in the text. This means saving in UTF-8 to avoid 8-bit ASCII files being created. UTF-8 files typically have a 3-byte header = hex EB BB BF, and with all browsers except Firefox this header is interpreted and not shown. Firefox however always displays these characters as  at the top-left screen position. What do I have to do the make Firefox recognize UTF-8 files, or do to my UTF-8 files to work properly with Firefox?
    See http://www.iacusn.org/USN2010/results/ for a typical recent example.

    You see that UTF-8 BOM (Byte Order Mark) because of the content type specification in the page code.
    <pre><nowiki>content="text/html; charset=windows-1252"</nowiki></pre>
    If you remove that or change it to utf-8 then Firefox won't show that BOM as text. There is however no need to insert that BOM at the start of the file. You can also configure the server to send the file (all files) as utf-8.

  • How to customize the File Adapter to put the header line in a variable?

    I have a file in which the first line contains the number of records contained by the file itself.
    Like this:
    4
    record1
    record2
    record3
    record4
    where each record is a delimited list of values
    I need to validate that the records are actually 4.
    in the documentation of the File Adapter I see that you can declare the first line as "header", but I have the impression that in this case it would be simply ignored, and not stored in a variable for later use......
    Is this correct?
    Any trick or workaround?
    thank you soooo much!

    it worked like a charm,
    here is the XSD I have used:
    http://www.javamonamour.org/2010/12/soa-sutie-file-adapter-parsing-complex.html
    ( I don't seem to be able to display correctly XML in this post :o( )

  • Replace the header line in the o/p file

    My scenarion is to generate a xml file,the xml file contains a header line <?xml version="1.0" encoding="utf-8"?>
    and this lineis  to be relaced with <XYZ>.
    it is multi message mapping -- splitting of messages 1:n, i cannot add any extra fields to the target structure to pass the header
    I wrote a abap mapping program and included that in the second step of my interface mapping.
    the code for abap mapping is as below.
    method IF_MAPPING~EXECUTE.
       data: lv_new_str  type string,
             lv_old_str type string,
             lv_string type string.
    ***Convert the XSTRING to STRING
    CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
      EXPORTING
        im_xstring        = source
    *   IM_ENCODING       = 'UTF-8'
    IMPORTING
       EX_STRING         = lv_string .
    **Pass the Values
    lv_old_str = '<?xml version="1.0" encoding="utf-8"?>'.
    lv_new_str = '<!XYZ>.
    REPLACE ALL OCCURRENCES OF lv_old_str in lv_string with lv_new_str.
    ***Convert the STRING to XSTRING.
    CALL FUNCTION 'ECATT_CONV_STRING_TO_XSTRING'
      EXPORTING
        im_string         = lv_string
    *   IM_ENCODING       = 'UTF-8'
    IMPORTING
       EX_XSTRING        = result
    *   EX_LEN            = .
    endmethod.
    But iam not able to get the desired output.
    Please suggest me how to make this work?
    Thanks
    Srinivas

    Hi Srinivas,
    Can you please see the java mapping as given by suraj in this thread:
    How do I remove xml encoding?
    Regards,
    ---Satish

  • Addition of a header line to a flat file using Custom Adapter Module?

    Is the header that you want to add to the input file always a constant?
    In that case why go for a module. Directly map the required constants during the mapping to your IDoc.
    My suggestion is to avoid the module

    Hi Shabrish,
    The Header is not a constant field always as the value changes per file adapter so a module will be helpful, and it will be a must to add the Header record as the first line.
    Can you suggest/direct me to some appropriate blogs? Thanks
    Regards,
    Nipun

  • How to read the second line in a .txt file with bufferedReader?

    hi,
    i am not the best in speaking english and programming java :)
    so, just try to make sense of my question:
    Im using a BufferedReader to read a .txt file.
    the .txt file has 5+ different lines, and each line has 6 tokens (separated with ; )
    My java file has 6 textFields and each textfield is filled with one of the 6 different tokens.
    and my problem is:
    I want my buffered reader to read the next line (with 6 new different tokens) by pressing a button.
    if somethings not understandable, just ask :)

    maybe its easier to help me, when i publish my code, so here it is:
    (its my version, without Thof's code. Sorry, but the comments are the most in german)
    /* userdata.java */
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    public class userdata extends Frame {
    //-----------------------------------KlassenVariablen------------------------------------------------
    private JPanel panel = new JPanel ();
    String tokId = "";
    String tokName= "";
    String tokAge= "";
    String tokTel= "";
    String tokMail= "";
    String tokText= "";
    BufferedReader br;
    String zeile;
    StringTokenizer st;
    String delim = ";";
    //---------Buttons f?r Panel 1-------------------------
    Button first = new Button("|< First");
    Button back = new Button("< Back");
    Button next = new Button("Next >");
    Button last = new Button("Last >|");
    //---------Buttons f?r Panel 3-------------------------
    Button neu = new Button("New");
    Button safe = new Button("Safe");
    Button refresh = new Button("Refresh");
    //--------Labels f?r Panel 2-----------------------------
    Label lid = new Label("ID",Label.LEFT);
    Label lname = new Label("Name",Label.LEFT);
    Label lage = new Label("Age",Label.LEFT);
    Label ltel = new Label("Tel.",Label.LEFT);
    Label lmail = new Label("E-Mail",Label.LEFT);
    Label ltext = new Label("Spruch",Label.LEFT);
    Label lub = new Label("Last Button",Label.LEFT);
    TextField id = new TextField();
    TextField name = new TextField();
    TextField age = new TextField();
    TextField tel = new TextField();
    TextField mail = new TextField();
    TextField text = new TextField();
    TextField usedbutton = new TextField();
    //--------ActionEvent bla sachen eben--------------------
    public static void main (String[] args) throws IOException {
    userdata wnd = new userdata();
    wnd.setVisible(true);
    public userdata() throws IOException {                                                                                                                                                                                                                                                                                
    //--------------------------------Layout mit panel bestimmung--------------------------------------
    setLayout(new BorderLayout());
    JPanel p1 = new JPanel();
    JPanel p2 = new JPanel();
    JPanel p3 = new JPanel();
    add(BorderLayout.NORTH ,p1);
    add(BorderLayout.CENTER , p2);
    add(BorderLayout.SOUTH , p3);
    //-------------------------------Funktionslose Buttons in PANEL 1------------------------------------
    p1.add(first);
    p1.add(back);
    p1.add(next);
    p1.add(last);
    p1.add(usedbutton);
    //--------------------------------Funktionierende Textfelder in PANEL 2------------------------------
    Panel labelpanel = new Panel();
    p2.setLayout(new GridLayout(7,3));
    p2.add(lid);
    p2.add(id);
    p2.add(lname);
    p2.add(name);
    p2.add(lage);
    p2.add(age);
    p2.add(ltel);
    p2.add(tel);
    p2.add(lmail);
    p2.add(mail);
    p2.add(ltext);
    p2.add(text);
    p2.add(lub);
    p2.add(usedbutton);
    //--------------------------------------Buttons in PANEL 3-----------------------------------------
    p3.add(neu);
    p3.add(safe);
    p3.add(refresh);
    //--------------------------------BufferedReader -------------------------------------------------
    readData();
    //--------------------------------Panel 2 TextField-----------------------------------------------
    fillForm();
    //================================ActionPerformed==================================================
    first.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    System.out.println ("First");
    usedbutton.setText("First");
    back.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    System.out.println ("Back");
    usedbutton.setText("Back");
    next.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    System.out.println ("Next");
    usedbutton.setText("Next");
    last.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    System.out.println ("Last");
    usedbutton.setText("Last");
    neu.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    System.out.println ("New entry");
    usedbutton.setText("New");
    safe.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    System.out.println ("Now Saving, do not turn off!");
    usedbutton.setText("Save");
    //-----------------refresh
    refresh.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    try{
    readData();
    }catch( IOException ioe){
    System.out.println("Fehler beim lesen aus Datei");
    fillForm();
    usedbutton.setText("Refresh");
    //=============================================================================Button Funktionen!!!
    pack();
    //--------------------------------WindowsListener hinzuf?gene--------------------------------------
    addWindowListener(
    new WindowAdapter() {
    public void windowClosing(WindowEvent event)
    setVisible(false);
    dispose();
    System.exit(0);
    //-----------------------------------readData() - > Buffered Reader in aktion! --------------------
    private void readData() throws IOException{
    BufferedReader br = new BufferedReader(new FileReader("My .txt File with path"));
    String zeile;
    StringTokenizer st;
    String delim = ";";
    zeile = br.readLine();
    st = new StringTokenizer(zeile, delim);
    st.hasMoreTokens();
    //System.out.println (st.nextToken());
    tokId = new String(st.nextToken());
    tokName = new String (st.nextToken());
    tokAge = new String (st.nextToken());
    tokTel = new String (st.nextToken());
    tokMail = new String (st.nextToken());
    tokText = new String (st.nextToken());
    //--------------------------fillForm() - > f?llt die TextFelder aus!--------------------------------
    private void fillForm(){
    id.setText(tokId);
    name.setText(tokName);
    age.setText(tokAge);
    tel.setText(tokTel);
    mail.setText(tokMail);
    text.setText(tokText);
    }

  • PDF: How to get date/time into the heading of a FOP/PDF file?

    Hi!
    What changes do I need to make to the PDF report template or what else can I put in the heading block of the "Print" page so that it will include the date and time the PDF was generated?
    Also how would I add this so that it prints on the bottom of the page like the page number?
    Thanks in advance for any tips, tricks, ideas, examples, etc.!
    Dave Venus

    Hi!
    Perhaps I missed this some place but you can get the value of a page item or application item into the header or footer of a (FOP) PDF report by using a "&<item>." format substitution string. For example I have a 1 time application process that puts todays date in an application item named F106_SYSDATE (F106_ is the application id). Then in my headers I use:
    XXXX Report on: &F106_SYSDATE.
    Simple. Works great! And better yet my users are a little happier! :)
    Thank for everyone's help and suggestions!
    Dave Venus

  • How to read the last line in a text file using text_io?? please help

    Dear all
    I made a procedure that append text into a text file on the operating system.
    the text file grows rapidly. It contains now about 200,000 line . I need to read the last line only . In other wprds i need to go direct to the last line to read some values. Is it possible??
    Please help

    Hello,
    If you know the number of the line you want to read, I can sugget you to use the MORE dos command or the TAIL unix command that redirect to a temporary text file
    Example to create a file that contains the 200010th last lines :
    (Client)Host( 'MORE the_file_name.txt +200010 > small_file.txt') ;So you have only to read the small file with the TEXT_IO functions.
    Francois

Maybe you are looking for

  • BW Authorization and setting issue to set up a BICS connection for Xcelsius

    We are trying to create a BICS connection with Xcelsius on our BW production system and would like to know what the minimal settings should be to be able to publish and run an Xcelsius dashboard. We have been able to make a BICS connection with Xcels

  • Installation of CS4 Master Collection Query

    Hello I intend to buy CS4 Master Collection to use on my home laptop for media work. The license agreement for Create Suite software states that users can install and use one copy of the software up to the permitted number of compatible computers as

  • Could not complete your request because certain required files were ......

    Hi, the last months was a APPLE ISSUE FESTIVAL i think, well, 2 months ago I have installed Photoshop CS2 on my macbookpro intel with 10.5.2, after update and upgrade system , quicktime and another things, Photoshop not open anymore, when I try to op

  • Package: SUNWcsu is "missing"

    Running Solaris 9 on V280R I am getting numerous error messages when installing the latest Solaris 9 Recommended Patch Cluster : ERROR: Information for SUNWcsu.* was not found (The DST of course is not correct as it needs this) the command: pkginfo S

  • OIM Reuseid

    Hi All, I have deleted the user in OIM . Status is also deleted.I ahve set the resuseid property to true.Still when I am trying to use that user id it says userid already exists. Thanks IDM Edited by: IDM on Sep 27, 2009 1:12 PM