Writing a symbol to UNIX file.

Hi,
I have requirement to hard code a small square like symbol
to UNIX file of format MNL.Can we write the above symbol to
UNIX file? If yes please give the procedure to do so.
thanks in advance.
Regards,
ILam.

I hope the ZZKTEX field is getting populated. Also check if the segment is crossing 1000 char and segment is released.

Similar Messages

  • Setting the UNIX file permissions after writing the file to a directory

    Hi Experts,
    Can we set the UNIX file permissions after writing the file to a directory using Receiver File Adpater in SAP PI 7.1 ?
    Thanks in Advance.
    Regards,
    Jyoti

    Hi
    you can use the option "Run Operatiing system Command after File Processing" in the file adapter.
    Thanks
    Rinku Gangwani

  • Ccms alert auto-reaction writing unix File

    Hello,
    I configured Automatic Alert Notification in RZ21 to send mail and SMS alerts when alerts are occured in RZ20 (CCMS_OnAlert_Email : frequence dump, lock oracle, process long running ,...)
    Now I would replace mail/sms Alert notification by writing file in Unix directory.
    How to generate an alert in Unix files?
    Best regards,
    Robi

    Hi,
    If I am not wrong DB6ALRTCT is the table which holds the Alert details, you need to write an ABAP program to get these details and write to a file in Unix.
    thanks...
    Sukarna...

  • URGENT : Writing to UNIX file problem !

    Hi friends,
    I am stuck at a crucial point while uploading a UNIX file from ABAP program.
    I am using open dataset & then transfer to...the file path.
    But when I go and check the UNIX file it is split into 2 lines (it is supposed to be a
    record with 1 line with 1500 characters) ! It shows a maximum of 255 chars in one line.Moreover,while I download to a text file via Txn CG3Y,some data are missing or truncated etc.
    Please suggest how can I create a record with 1500 characters in UNIX and download it successfully with full data or how can I ensure proper data has been transferred as the record display is truncated.I checked the program its fine,only after transferring I get the problem.
    Thanks,
    Sandip.

    The files would not get truncated. The file actually exists in App. server but you will be able to see only uptil 255 characters. You can check the same by downloading it onto Pres. server by specifying  file type as BIN when you are downloading through CG3Y

  • Writing n records to unix in n files

    i need to write a file to unix my requirement is if i have more than 65000 records in my final internal table
    <fs_table> then i have to divide the records in multiples of 65000 and write them to unix.
    in sperate files.i have wrirren this code for 65000 records .
    DESCRIBE TABLE fs_table LINES w_line.
    IF W_LINE < 65000.
    Create Unix file
      OPEN DATASET p_unix FOR OUTPUT IN TEXT MODE MESSAGE v_message.
      IF NOT sy-subrc IS INITIAL.
        MESSAGE e398(00) WITH text-008 p_unix v_message space.
      ENDIF.
    ** Write header to unix file
      LOOP AT gt_fieldcat1 INTO st_fieldcat1.
        CONCATENATE st_rec st_fieldcat1-seltext_l
               INTO st_rec
               SEPARATED BY '|'.
      ENDLOOP.
      CONDENSE st_rec.
      TRANSFER st_rec TO p_unix.
    ** Write data to unix file
      LOOP AT  <fs_table>  ASSIGNING <fs_struc>.
        CLEAR: st_rec.
        DO.
          ASSIGN COMPONENT sy-index OF STRUCTURE <fs_struc> TO
                                                 <field>.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
          v_field = <field>.
          IF v_field IS INITIAL.
            CONCATENATE st_rec v_field ' |'
                INTO st_rec .
          ELSE.
            CONCATENATE st_rec v_field '|'
                INTO st_rec.
          ENDIF.
        ENDDO.
        TRANSFER st_rec TO p_unix.
      ENDLOOP.
    Close unix file
      CLOSE DATASET p_unix.
    else??

    Hi Reva,
    Hope this logic works for your requirement
    *_ Initialize variable
    lv_new_file = 'X'.
    lv_new_start = 1.
    clear: lv_new_file_surfix.
    *_ Loop 1: to create multiple file with max 65,000 records per file
    while lv_new_file = 'X'.
    *_ Identify unique file naming convention
      add 1 to lv_new_file_surfix.
      concatenate '..\new_file' lv_new_file_surfix into p_unix.
    *_ Open connection and write header information
      open dataset using p_unix.
      transfer header..
    *_ Write data
      clear lv_counter.
    *_ Loop 2: to pass data from <fs_itab> into file
      loop at <fs_itab> from lv_new_start.
    *_ Validate if the record has already hit 65,000 exit the loop 2 and create a new file
        add 1 to lv_counter.
        if lv_counter > 65000.
          lv_new_start = sy-tabix.
          exit.
        endif.
        move data to unix.
        transfer data to unix.
    *_ End the looping process of 1 and 2
        at end.
          clear lv_new_file.
        endat.
      endloop.
    *_ close connection
      close dataset.
    endwhile.

  • What does the "@" symbol after the "rwx" UNIX file permissions mean?

    Greetings All,
    I tried to run the Alliance VLSI CAD system using an example (examples/alliance-examples/multi16b-reg), but have not been able to.
    It complains that the file "vasy" cannot be executed as a binary file.
    Here is the transcript from the Terminal session.
    Go Trojans >make all
    MBKWORKLIB=.; export MBKWORKLIB; MBKCATAL_NAME=NOCATAL; export
    MBKCATALNAME;
    /Applications/apps/eda/alliancevlsi_cad_sys/downloadfiles/opt/alliance-5.0/bin/vasy
    -a -B -L -o -p -I vhdl multi16
    /bin/sh: /Applications/apps/eda/alliancevlsi_cad_sys/downloadfiles/opt/alliance-5.0/bin/vasy:
    cannot execute binary file
    make: * [multi16.vbe] Error 126
    Go Trojans >
    When I run "ls -al" in $(ALLIANCE_TOP)/bin, I get the following in
    the Terminal.
    Go Trojans >ls -al
    total 17656
    drwxr-xr-x@ 52 zhiyang staff 1768 Sep 2 2009 .
    drwxr-xr-x@ 12 zhiyang staff 408 Apr 12 16:24 ..
    -rwx------@ 1 zhiyang staff 108129 Sep 2 2009 a2def
    -rwx------@ 1 zhiyang staff 12219 Sep 2 2009 a2lef
    -rwx------@ 1 zhiyang staff 8713 Sep 2 2009 alcbanner
    -rwx------@ 1 zhiyang staff 135645 Sep 2 2009 asimut
    -rwx------@ 1 zhiyang staff 24975 Sep 2 2009 attila
    -rwx------@ 1 zhiyang staff 25747 Sep 2 2009 b2f
    -rwx------@ 1 zhiyang staff 157479 Sep 2 2009 boog
    -rwx------@ 1 zhiyang staff 111598 Sep 2 2009 boom
    -rwx------@ 1 zhiyang staff 106837 Sep 2 2009 cougar
    -rwx------@ 1 zhiyang staff 568722 Sep 2 2009 def2a
    -rwx------@ 1 zhiyang staff 251206 Sep 2 2009 dreal
    -rwx------@ 1 zhiyang staff 20138 Sep 2 2009 druc
    -rwx------@ 1 zhiyang staff 40808 Sep 2 2009 exp
    -rwx------@ 1 zhiyang staff 30100 Sep 2 2009 flatbeh
    -rwx------@ 1 zhiyang staff 9975 Sep 2 2009 flatlo
    -rwx------@ 1 zhiyang staff 9959 Sep 2 2009 flatph
    -rwx------@ 1 zhiyang staff 10746 Sep 2 2009 flatrds
    -rwx------@ 1 zhiyang staff 20588 Sep 2 2009 fmi
    -rwx------@ 1 zhiyang staff 20425 Sep 2 2009 fsp
    -rwx------@ 1 zhiyang staff 9962 Sep 2 2009 genlib
    -rwx------@ 1 zhiyang staff 2455 Sep 2 2009 genpat
    -rwx------@ 1 zhiyang staff 412314 Sep 2 2009 graal
    -rwx------@ 1 zhiyang staff 10881 Sep 2 2009 k2f
    -rwx------@ 1 zhiyang staff 78387 Sep 2 2009 l2p
    -rwx------@ 1 zhiyang staff 108420 Sep 2 2009 loon
    -rwx------@ 1 zhiyang staff 33889 Sep 2 2009 lvx
    -rwx------@ 1 zhiyang staff 36842 Sep 2 2009 m2e
    -rwx------@ 1 zhiyang staff 55347 Sep 2 2009 mips_asm
    -rwx------@ 1 zhiyang staff 65038 Sep 2 2009 moka
    -rwx------@ 1 zhiyang staff 2448244 Sep 2 2009 nero
    -rwx------@ 1 zhiyang staff 2172602 Sep 2 2009 ocp
    -rwx------@ 1 zhiyang staff 14498 Sep 2 2009 pat2spi
    -rwx------@ 1 zhiyang staff 9887 Sep 2 2009 pdv
    -rwx------@ 1 zhiyang staff 51121 Sep 2 2009 proof
    -rwx------@ 1 zhiyang staff 178806 Sep 2 2009 ring
    -rwx------@ 1 zhiyang staff 60506 Sep 2 2009 s2r
    -rwx------@ 1 zhiyang staff 37106 Sep 2 2009 scapin
    -rwx------@ 1 zhiyang staff 12324 Sep 2 2009 sea
    -rwx------@ 1 zhiyang staff 13430 Sep 2 2009 seplace
    -rwx------@ 1 zhiyang staff 12276 Sep 2 2009 seroute
    -rwx------@ 1 zhiyang staff 82653 Sep 2 2009 sxlib2lef
    -rwx------@ 1 zhiyang staff 77310 Sep 2 2009 syf
    -rwx------@ 1 zhiyang staff 301653 Sep 2 2009 vasy
    -rwx------@ 1 zhiyang staff 11854 Sep 2 2009 x2vy
    -rwx------@ 1 zhiyang staff 12392 Sep 2 2009 x2y
    -rwx------@ 1 zhiyang staff 174556 Sep 2 2009 xfsm
    -rwx------@ 1 zhiyang staff 167747 Sep 2 2009 xgra
    -rwx------@ 1 zhiyang staff 185034 Sep 2 2009 xpat
    -rwx------@ 1 zhiyang staff 249181 Sep 2 2009 xsch
    -rwx------@ 1 zhiyang staff 178627 Sep 2 2009 xvpn
    Go Trojans >
    I suspect the "@" symbol indicates why the executables cannot be
    run, even though the file permissions are set correctly.
    How do I get rid of the "@" symbol for these files? What does the "@" symbol mean?
    Thank you.
    Message was edited by: Zhiyang

    OK... Well, do you know what else may cause the problem?
    Does the following help?
    Go Trojans >ls -leO@
    total 17656
    -rwx------@ 1 zhiyang staff - 108129 Sep 2 2009 a2def
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 12219 Sep 2 2009 a2lef
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 8713 Sep 2 2009 alcbanner
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 135645 Sep 2 2009 asimut
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 24975 Sep 2 2009 attila
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 25747 Sep 2 2009 b2f
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 157479 Sep 2 2009 boog
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 111598 Sep 2 2009 boom
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 106837 Sep 2 2009 cougar
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 568722 Sep 2 2009 def2a
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 251206 Sep 2 2009 dreal
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 20138 Sep 2 2009 druc
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 40808 Sep 2 2009 exp
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 30100 Sep 2 2009 flatbeh
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 9975 Sep 2 2009 flatlo
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 9959 Sep 2 2009 flatph
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 10746 Sep 2 2009 flatrds
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 20588 Sep 2 2009 fmi
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 20425 Sep 2 2009 fsp
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 9962 Sep 2 2009 genlib
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 2455 Sep 2 2009 genpat
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 412314 Sep 2 2009 graal
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 10881 Sep 2 2009 k2f
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 78387 Sep 2 2009 l2p
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 108420 Sep 2 2009 loon
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 33889 Sep 2 2009 lvx
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 36842 Sep 2 2009 m2e
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 55347 Sep 2 2009 mips_asm
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 65038 Sep 2 2009 moka
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 2448244 Sep 2 2009 nero
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 2172602 Sep 2 2009 ocp
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 14498 Sep 2 2009 pat2spi
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 9887 Sep 2 2009 pdv
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 51121 Sep 2 2009 proof
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 178806 Sep 2 2009 ring
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 60506 Sep 2 2009 s2r
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 37106 Sep 2 2009 scapin
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 12324 Sep 2 2009 sea
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 13430 Sep 2 2009 seplace
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 12276 Sep 2 2009 seroute
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 82653 Sep 2 2009 sxlib2lef
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 77310 Sep 2 2009 syf
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 301653 Sep 2 2009 vasy
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 11854 Sep 2 2009 x2vy
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 12392 Sep 2 2009 x2y
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 174556 Sep 2 2009 xfsm
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 167747 Sep 2 2009 xgra
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 185034 Sep 2 2009 xpat
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 249181 Sep 2 2009 xsch
    com.apple.quarantine 42
    -rwx------@ 1 zhiyang staff - 178627 Sep 2 2009 xvpn
    com.apple.quarantine 42
    Go Trojans >
    They all seem to end with "com.apple.quarantine". What does this mean?

  • Unix file to be converted to proper excel format

    Hi Ima writing data to unix file but when i want to download from there in excel format i data is not not aligned in excel format
    please let me know the seperator to be used to upload to unix which can be converted to excel with good alignment.
    i tried  seperator '09'  but didn't work and my version is 4.6 c so i can not use the encoding command or the classes.
    pls guide
    OPEN DATASET p_unix FOR OUTPUT IN TEXT MODE MESSAGE v_message .
      IF NOT sy-subrc IS INITIAL.
        MESSAGE e398(00) WITH text-008 p_unix v_message space.
      ENDIF.
    ** Write header to unix file
      LOOP AT gt_fieldcat1 INTO st_fieldcat1.
        CONCATENATE st_rec st_fieldcat1-seltext_l
               INTO st_rec
               SEPARATED BY ','.
      ENDLOOP.
    CONDENSE st_rec.
      TRANSFER st_rec TO p_unix.
    ** Write data to unix file
      LOOP AT  <fs_table>  ASSIGNING <fs_struc>.
        CLEAR: st_rec.
        DO.
          ASSIGN COMPONENT sy-index OF STRUCTURE <fs_struc> TO
                                                 <field>.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
          v_field = <field>.
          IF v_field IS INITIAL.
            CONCATENATE st_rec v_field ','
                INTO st_rec .
          ELSE.
            CONCATENATE st_rec v_field ','
                INTO st_rec.
          ENDIF.
        ENDDO.
        TRANSFER st_rec TO p_unix.
      ENDLOOP.
    Close unix file
      CLOSE DATASET p_unix.

    Although I dislike MPEG-1 because of the large file size those .mpg files are commonly used on the Web. They can be played by nearly any computer and are not "Player" dependent like WMP or QuickTime so each user can decide how to view them.
    As a bonus they are a "playback" format which makes editing and repurposing them a bit more difficult so your media is a bit more "secure".
    I'll stick to QuickTime formats (avoiding H.264 video codec) and force QuickTime down their WiMPy throats. Millions of PC's have QuickTime installed (because of iTunes) and others can easily download the free Player and browser plug-in. By avoiding H.264 my files can be viewed on Mac's and PC's that can't install QuickTime 7.

  • About download file into unix file

    Hi expert,
    i use the openset to write file into unix file server.
    but why there are some space at the end of every line.
    by the way, i works very well in windows server
       DATA: DATA_TRANSFER(70).
        Data: DATA_TRANSFER type string.
        data: fine_riga1(1) TYPE X VALUE '0D0A'.
        DATA: gt_data TYPE STANDARD TABLE OF ty_data.
        Constants: ascii_tab type x value ','.
        field-symbols: <f> type any, <delim> type any.
        "Assign delimiter field such as tab or comma.
        assign ASCII_tab to <delim>.
        CLEAR VN_CNT.
        concatenate DSNU 'employee' PN-BEGDA SY-UZEIT into P_UNIX.
        OPEN DATASET P_UNIX in legacy text MODE FOR OUTPUT. " IN TEXT MODE encoding UTF-8.
        IF SY-SUBRC <> 0.
          WRITE: / 'Error on file open:', P_UNIX.
        ELSE.
          LOOP AT TI_DATA .
            CLEAR DATA_TRANSFER.
            concatenate TI_DATA-TYPE
                              TI_DATA-PERNR
                              TI_DATA-ZAUSW
                              TI_DATA-ENAME
                              TI_DATA-TERID
                              INTO DATA_TRANSFER separated by cl_abap_char_utilities=>HORIZONTAL_TAB.
            CONDENSE DATA_TRANSFER NO-GAPS.
            TRANSFER DATA_TRANSFER TO P_UNIX.
            ADD 1 TO VN_CNT.
            CLEAR DATA_TRANSFER.
          ENDLOOP.
          CLOSE DATASET P_UNIX.
        ENDIF.
        WRITE: / P_UNIX,
               / 'Transfered', VN_CNT, 'records'.
    Best Regards,
    Kevin

    Hi,
    Try this way...
    TRANSFER dobj TO dset [LENGTH len]
                                          [NO END OF LINE].
    Addition 1
    ... LENGTH len
    Effect
    This addition determines how many characters or how many bytes of data object dobj are written to the file. len is expected to be a data object of type i that contains the number of characters or bytes. In text files, the content of len specifies the number of characters that are written from the storage. For binary files, legacy text file, and legacy binary files, len specifies the number of bytes that are written to the file. The first len characters or bytes are transferred and alignment gaps are included in the structures. If the addition LENGTH is not specified, all characters or bytes are transferred.
    If the value of len is less than or equal to 0, no characters or bytes are transferred. If the file is opened as a (legacy) text file, however, a line end marker is inserted into the file by default. If the value of len is greater than the number of characters or bytes in dobj, hexadecimal 0 or blank characters are transferred to the file instead of the missing bytes or characters, depending on whether the file was opened as a (legacy) text file or a (legacy) binary file.

  • Unix file problem

    Hi gurus,
          I am creating program which reads the data from unix file  and print it.
    but i am having one major problem while reading that data. when i read the currency value from the file it displays #sign every time wht can i do to eliminate this
    please give me the solution ASAP.
    thanks in advance.
    Vinod

    Hi
    sign comes ... when the mode of writing that file is other than ASC.
    if you write the file to app server in ASC.. things will solv in many cases..

  • Trailing space issue in Unix File

    Hi All,
    I am facing an issue with the trailing space in Unix file content.
    When the file is being created in Unix server the trailing space is getting trimmed automatically.
    As per the requirement,this space should be retained in the Unix file as it is when the file is being downloaded to PC.
    Is there any solution for this issue? Request your help for resolving this.
    Thanks in Advance,
    Savitha

    Hi,
    When you're writing youd data to the file (assume you're using the TRANSFER command), you could try explicitly specifying the length of the data line to write, ie.
    TRANSFER data(200) TO DATASET filename.
    Regards,   Andy

  • Deleting the data from logical file/unix file

    Hi all.
        I need to delete the all the data from logical file (application server file/unix file).But I dont want to delete the logical file ( only data in the logical file should be deleted, i.e making file empty)
    Thanks in advance.
    Cheers.
    sami

    Hi Sami,
    Refer thsi document https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4d7aeb7d-0c01-0010-fa8a-a4a8e8968a93.
    Regards,
    Flavya

  • How to delete string or line from unix file(dataset) of application server

    Hi  All,
    After transfer workarea information or all records into dataset(unix file). When I see the file in application server automatically the last line is shown a blank line. I am not passing any blank line.
    I have tried for single record than also the file generates the last line(2nd line) also a blank line.
    When I m reading the dataset, it is not reading the last blank line but why it is showing the last blank line?
    How to delete string or line from unix file(dataset) of application server?
    Please give your comments to resolve this.
    Thanks
    Tirumula Rao Chinni

    Hi Rio,
    I faced similar kind of issue working with files on UNIX platform.
    The line is a line feed to remove it use
    DATA : lv_carr_linefd TYPE abap_cr_lf VALUE cl_abap_char_utilities=>cr_lf. 
      DATA : lv_carr_return TYPE char1,                                   
             lv_line_feed   TYPE char1.                                          
      lv_line_feed   = lv_carr_linefd(1).
      lv_carr_return = lv_carr_linefd+1(1).
    Note: IMP: The character in ' ' is not space but is a special
    character set by pressing ALT and +255 simultaneosly
      REPLACE ALL OCCURRENCES OF lv_line_feed IN l_string WITH ' '.
      REPLACE ALL OCCURRENCES OF lv_carr_return IN l_string WITH ' '.

  • Problem on reading and writing from from a *.txt file

    I get Problem on reading and writing from from a *.txt file. The following is the read() method...
    The software said the DataInputStream is depreciated. Can anyone help me please?
    public void read()
        File file = new File("C://Documents and Settings//Charles//My Documents//Brunel//EE2065//Assignment and Lab//Assignment 4 and Lab 4//data.txt");
        FileInputStream in = null;
        String str = "";
        try
          in = new BufferedReader(file);
          //in = new FileInputStream(file);
          for(;;)
            str = new BufferedReader(in).readLine();
            //str = new DataInputStream(in).readLine();
            if(str == null)
              break;
            System.out.print(str);
        in.close();
        catch(IOException e)
            System.err.println("execution error: " +e);
      }

    Thank you for your reply. I have made some change. However, there is an incompetable type found error.
    in = new BufferedReader(new InputStreamReader(in));The following are all of the code.
    public void read()
        File file = new File("C://Documents and Settings//Charles//My Documents//Brunel//EE2065//Assignment and Lab//Assignment 4 and Lab 4//data.txt");
        FileInputStream in = null;
        //BufferedReader in = null;
        String str = "";
        try
          in = new BufferedReader(new InputStreamReader(in));
          //in = new FileInputStream(file);
          for(;;)
            BufferedReader Bstr = new BufferedReader(new InputStreamReader(in));
            //str = new BufferedReader(in).readLine();
            //str = new DataInputStream(in).readLine();
            if(str == null)
              break;
            System.out.print(str);
        in.close();
        catch(IOException e)
            System.err.println("execution error: " +e);

  • Writing HTML data in TEXT File

    I am writing HTML content in TEXT file ...I read it in a string and then write using PrintStream...
    But it writes all content on one line ..I want to write it as it was in source HTML file...

    Perchance, the OP is referring to the lack of carriage returns in his outputted data, and querying where they have absconded to? An analysis of his posts to date reveals that he has read the contents of a File into a String variable, and wants to write the (presumably modified) String back to a file (uncertain as to whether this is the same file or a different one) In the process of outputting to said file, carriage returns previously contained in the original input file are not present in the output. I would hazard a guess that the OP does not want said carriage returns in the String to disappear.
    Is my analysis of the situation correct?
    An example of the code that you have written to date would be of extreme usefulness to us in aiding you in your noble quest.
    Without such a resource, I must rely on my intuition instead.
    Possible places that the carriage returns are being "dropped"
    1 - On reading in. Are you discarding carriage returns while building up your variable?
    2 - On manipulating. Are you processing this line by line, or reading it all into one large variable?
    3 - On output - are you using "print" or "println" in the output?
    I look forward to further correspondence with you sir
    kind regards,
    evnafets

  • Unable to Open unix file in UNICODE system which created NON-UNICODE system

    Unable to Open unix file in UNICODE system which created in NON-UNICODE system
    We have two SAP systems both are ECC6.0 but System 1 is NON-Unicode and System2 is Unicode system.
    There is a common unix directory/folder for both system.
    Our requirement is to create one file on unix common folder and write the data to file from system1 .
    In system2 open the same file for appending mode to write the data .
    The file in system 1 created with below sentence.
    OPEN DATASET g_unix_file FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
    Now I have to append the data from system 2 to same file.
    I have tried to used below statement in system 2 to open the file but sy-subrc value comes as '8'.
    1> OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING UTF-8.
    2>OPEN DATASET g_unix_file FOR APPENDING IN legacy TEXT MODE CODE PAGE
    cdp IGNORING CONVERSION ERRORS  .
    3>OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING Default.
    4>OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING NON-UNICODE.
    Tried out all the possibilities as per F1 help given for open dataset , but still there is problem with opn file in appending as well output mode.However the file successfully open in Input mode(Read).
    Please advice suggestion to resolve this issue.
    Thanks.

    Messgae captured as 'Permission Denied". The program gets triggered with system user Id PPID.
    How to check the security access of the User ID.

Maybe you are looking for

  • Can not install hp 1010 printers

    can not get it to install on my computer  (gateway)

  • How to read a file with both text and binary data?

    For text data I use a BufferedReader, for binary data I use a DataInputStream. Since readLine is deprecated in DataInputStream, how can I read in a proper way a file that contains some lines of text followed by some binary data. Is there a way to do

  • Can't get rid of old bookmark list for current list to save for backup

    My computer was infected with malware and crashed in November. I lost everything but was able to get my bookmarks back with a jump drive. I then went in and removed a lot of bookmarks and folders, and have added a lot of other folders and bookmarks o

  • Commission to the Forwarding agent

    Hello All, I have a client requirment that they have 28 forwarding agents across the country which they treat as storage loction for storing  the product only and they book the sales order on behalf of the stockists to the client directly, the owners

  • Directory tree interface

    How would i go about making an interface which looks like a directory tree within a webpage. by directory tree interface i mean something which looks like this http://www.java2s.com/Code/CSharpImages/DirectoryTreeHost1.PNG