Need Help: UTL_FILE Reading and Writing to Text File

Hello I am using version 11gR2 using the UTL_FILE function to read from a text file then write the lines where it begins with word 'foo' and end my writing to the text file where the line with the word 'ZEN' is found. Now, I have several lines that begin with 'foo' and 'ZEN' Which make for one full paragraph, and in this paragraph there's a line that begins with 'DE4.2'. Therefore,
I need to write all paragraphs that include the line 'DE4.2' in their beginning and ending lines 'foo' and 'ZEN'
FOR EXAMPLE:
FOO/234E53LLID
THIS IS MY SECOND LINE
THIS IS MY THIRD LINE
DE4.2 THIS IS MY FOURTH LINE
THIS IS MY FIFTH LINE
ZEN/DING3434343
FOO/234E53LLID
THIS IS MY SECOND LINE
THIS IS MY THIRD LINE
THIS IS MY FIFTH LINE
ZEN/DING3434343
I am only interested in writing the first paragraph tha includes line DE4.2 in one of ther lines Not the Second paragraph that does not include the 'DE4.2'
Here's my code thus far:
CREATE OR REPLACE PROCEDURE my_app2 IS
infile utl_file.file_type;
outfile utl_file.file_type;
buffer VARCHAR2(30000);
b_paragraph_started BOOLEAN := FALSE; -- flag to indicate that required paragraph is started
BEGIN
-- open a file to read
infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
-- open a file to write
outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
-- check file is opened
IF utl_file.is_open(infile)
THEN
-- loop lines in the file
LOOP
BEGIN
utl_file.get_line(infile, buffer);
     --BEGINPOINT APPLICATION
IF buffer LIKE 'foo%' THEN
          b_paragraph_started := TRUE;          
     END IF;
     --LOOK FOR GRADS APPS
          IF b_paragraph_started AND buffer LIKE '%DE4%' THEN
          utl_file.put_line(outfile,buffer, FALSE);
END IF;
     --ENDPOINT APPLICATION      
          IF buffer LIKE 'ZEN%' THEN
     b_paragraph_started := FALSE;
          END IF;
utl_file.fflush(outfile);
EXCEPTION
WHEN no_data_found THEN
EXIT;
END;
END LOOP;
END IF;
utl_file.fclose(infile);
utl_file.fclose(outfile);
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20099, 'Unknown UTL_FILE Error');
END my_app2;
When I run this code I only get one line: DE4.2 I AM MISSING THE ENTIRE PARAGRAPH
PLEASE ADVISE...

Hi,
Look at where you're calling utl_file.put_line. The only time you're writing anything is immediately after you find the the key word 'DE4', and then you're writing just that line.
You need to store the entire paragraph, and when you reach the end of the paragraph, write the whole thing only if you found the key word, like this:
CREATE OR REPLACE PROCEDURE my_app2 IS
    TYPE  line_collection  
    IS       TABLE OF VARCHAR2 (30000)
           INDEX BY BINARY_INTEGER;
    infile               utl_file.file_type;
    outfile                      utl_file.file_type;
    input_paragraph          line_collection;
    input_paragraph_cnt          PLS_INTEGER     := 0;          -- Number of lines stored in input_paragraph
    b_paragraph_started      BOOLEAN      := FALSE;     -- flag to indicate that required paragraph is started
    found_key_word          BOOLEAN          := FALSE;     -- Does this paragraph contain the magic word?
BEGIN
    -- open a file to read
    infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
    -- open a file to write
    outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
    -- check file is opened
    IF utl_file.is_open(infile)
    THEN
     -- loop lines in the file
     LOOP
         BEGIN
          input_paragraph_cnt := input_paragraph_cnt + 1;
             utl_file.get_line (infile, input_paragraph (input_paragraph_cnt));
          --BEGINPOINT APPLICATION
          IF LOWER (input_paragraph (input_paragraph_cnt)) LIKE 'foo%' THEN
              b_paragraph_started := TRUE;
          END IF;
          --LOOK FOR GRADS APPS
          IF b_paragraph_started
          THEN
              IF  input_paragraph (input_paragraph_cnt) LIKE '%DE4%'
              THEN
               found_key_word := TRUE;
              END IF;
              --ENDPOINT APPLICATION
              IF input_paragraph (input_paragraph_cnt) LIKE 'ZEN%' THEN
                  b_paragraph_started := FALSE;
               IF  found_key_word
               THEN
                   FOR j IN 1 .. input_paragraph_cnt
                   LOOP
                       utl_file.put_line (outfile, input_paragraph (j), FALSE);
                   END LOOP;
               END IF;
               found_key_word := FALSE;
               input_paragraph_cnt := 0;
              END IF;
          ELSE     -- paragraph is not started
              input_paragraph_cnt := 0;
          END IF;
          EXCEPTION
              WHEN no_data_found THEN
               EXIT;
          END;
      END LOOP;
    END IF;
    utl_file.fclose (infile);
    utl_file.fclose (outfile);
--EXCEPTION
--    WHEN OTHERS THEN
--        raise_application_error(-20099, 'Unknown UTL_FILE Error');
END my_app2;
SHOW ERRORSIf you don't have an EXCEPTION section, the default error handling will print an error message, spcifying exactly what the error was, and which line of your code caused the error. By using your own EXCEPTION section, you're hiding all that information. I admit, the error messages aren't always as informative as we'd like, but they're never less informative than "Unknown UTL_FILE Error'. Don't use your own EXCEPTION handling unless you can improve on the default.
Remember that anything inside quotes is case-sensitive. If your file contains upper-case 'FOO', then it won't be "LIKE 'foo%' ".
Edited by: Frank Kulash on Dec 7, 2011 1:35 PM
You may have noticed that this site normally doesn't display multiple spaces in a row.
Whenever you post formatted text (such as your code) on this site, type these 6 characters:
\{code}
(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.

Similar Messages

  • Help on reading and writing to a file !!!!!!!!!!!!!!!!

    hi there
    anyone can help me on how to write and read from a file? how can i read one string at a time instead of a char. thank you.

    Use the StringTokenizer to break up the line
    File newFile = new File("text.txt");
    BufferedReader in = new BufferedReader(new FileReader (newFile));
    String line;
    while((line = in.readLine()) != null){
    StringTokenizer st = new StringTokenizer(inputLine, " ");
    while(st.hasMoreTokens()){
    // do something with the token
    // e.g:
    // String lc = st.nextToken().toLowerCase()
    hope that helps

  • UTL_FILE: Reading and Writing client-side Files

    Hi All,
    Please tell me how to read & write UTL_FILE at client-side
    Regards

    And you need this XML to be generated on and read from a client machine? You can't generate the file on the server, move it to the new server, and import it?
    If you need to generate files on the client machine, the client application would have to do the file I/O. Java has a number of libraries for generating XML and parsing XML that could be used, for example, but that implies that a Java application has been deployed to the client machine.
    Justin

  • Reading and writing from a file

    I am trying to read and write to a file so that I may store an array of string and a double in my application, but I have come upon a couple of problems; first when I put my file path into the path constant it will say that the file is not there ever though it is (so I have to force the issue and when the application asks for a file I have to browse and add the files), secondly when I run the program and it reads from the file it does not display the strings or doubles immediately instead I have to hit the submit button and than they finally come up, thirdly when I reset my values in the .txt files and put in my string and double and hit submit the array jumps one spot and starts at the index of 1 (array[1])  if anyone can help I would appreciate it a lot.
    here is my code:
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome
    Solved!
    Go to Solution.
    Attachments:
    testingfileIO.vi ‏30 KB
    double.txt ‏1 KB
    string.txt ‏1 KB

    Harold Timmis wrote:
    I am trying to read and write to a file so that I may store an array of string and a double in my application, but I have come upon a couple of problems; first when I put my file path into the path constant it will say that the file is not there ever though it is (so I have to force the issue and when the application asks for a file I have to browse and add the files),
    I don't see that behavior at all about forcing the issue.  Why are you using Not a Path constants?  Why not turn those constants into controls you put on your front panel?
    secondly when I run the program and it reads from the file it does not display the strings or doubles immediately instead I have to hit the submit button and than they finally come up,
    Put your array indicators before your event structure rather than after.  Think dataflow.  The code pauses at the event structure waiting for an even to fire.  Only when it does (such as hitting the submit button) does the data get written to the array indicators. 
    thirdly when I reset my values in the .txt files and put in my string and double and hit submit the array jumps one spot and starts at the index of 1 (array[1])  if anyone can help I would appreciate it a lot.
    I don't see this behavior either.  How come your double.txt file has names in it, and your string.txt file has doubles in it?

  • ALE, IDOC - need to send IDOC and create a text file

    Hi,
    i need to send idoc to some other system and create a text file in that.
    I want sent data to Channel Cluster.
    what are the settings required for that in transactions
    BD54
    SCC4
    SM59 - which connection is required
    WE21 - which type of port
    WE20 - which partner
    BD64
    Is there any other function modules required.
    which function module is suitable like MASTER_IDOC_DISTRIBUTE.

    Hi,
    SM59 - Use TCP/IP Connection with connection type 'T'
    WE20 - Partner Name can be logical system name, if it is a vendor/customer you can configure it under the respective names.
    Thanks
    Krithika

  • Reading and Writing large Excel file using JExcel API

    hi,
    I am using JExcelAPI for reading and writing excel file. My problem is when I read file with 10000 records and 95 columns (file size about 14MB), I got out of memory error and application is crashed. Can anyone tell me is there any way that I can read large file using JExcelAPI throug streams or in any other way. Jakarta POI is also showing this behaviour.
    Thanks and advance

    Sorry when out of memory error is occurred no stack trace is printed as application is crashed. But I will quote some lines taken from JProfiler where this problem is occurred:
              reader = new FileInputStream(new File(filePath));
              workbook = Workbook.getWorkbook(reader);
              *sheeet = workbook.getSheet(0);* // here out of memory error is occured
               JProfiler tree:
    jxl.Workbook.getWorkBook
          jxl.read.biff.File 
                 jxl.read.biff.CompoundFile.getStream
                       jxl.read.biff.CompoundFile.getBigBlockStream Thanks

  • Very slow painting while reading and writing doubles into file

    for 15MB length file i = 7662080
    for 50MB length file i = 12414368
    Part of Code for writing into file follows like this:
    try{
    fos = new FileOutputStream("Angel.txt");
    File f = new File("Angel.txt");
         if(f.length() >=4)
         f.delete();
    fos = new FileOutputStream("Angel.txt");     
    dos = new DataOutputStream(new BufferedOutputStream(fos,1000000));
    int x=0;
    double y_last, y_new;
    for(int j=0 ;j<i ;j++)
    if(some condition)
    y_new = ....;
    try{
    //previously in vectors
    y_last = y_new;
    vect.add(new Line2D.Double(x, y_last, x, y_new)_;
    dos.writeDouble(y_new);
         }catch(Exception e){System.out.println(e);}
    dos.close();
    fos.close();
    x++;
    }catch(Exception excp){System.out.println(excp);}
    part of code for reading from file follows like this:
    public void paint(Graphics g)
    try{
         double y1, y2 =0;               
         Line2D.Double doub;
         raf = new RandomAccessFile("Angel.txt","r");
         dis = new DataInputStream(new BufferedInputStream(new FileInputStream(raf.getFD(),1000000)));
         raf.seek((rect.x*8));
         for (int i = 0/any value; (i < value as per choice); i++)
              g2.setStroke(new BasicStroke(0)); //2
              y1 = y2;
         y2 =dis.readDouble();
              doub=new Line2D.Double(i,y1,i,y2);
              g2.draw(doub);
    dis.close();
         raf.close();
    }catch(Exception excp){System.out.println(excp);}
    I tried using Object Streams but NotSerializable Exception is thrown as Line2D.Double objects
    are not serialized.
    Any idea to make reading and writing into file specially from MB files faster is appreciated.

    Why are you reading in the file in the paint method ?
    Create your data once before painting.
    I think you should explain what is your goal and what behavior you want.
    Denis

  • Need help to read and write using UTF-16LE

    Hello,
    I am in need of yr help.
    In my application i am using UTF-16LE to export and import the data when i am doing immediate.
    And sometimes i need to do the import in an scheduled formate..i.e the export and imort will happend in the specified time.
    But in my application when i am doing scheduled import, they used the URL class to build the URL for that file and copy the data to one temp file to do the event later.
    The importing file is in UTF-16LE formate and i need to write the code for that encoding formate.
    The problem is when i am doing scheduled import i need to copy the data of the file into one temp place and they doing the import.
    When copying the data from one file to the temp i cant use the UTF-16LE encoding into the URL .And if i get the path from the URl and creating the reader and writer its giving the FileNotFound exception.
    Here is the excisting code,
    protected void copyFile(String rootURL, String fileName) {
    URL url = null;
    try {
    url = new URL(rootURL);
    } catch(java.net.MalformedURLException ex) {
    if(url != null) {
    BufferedWriter out = null;
    BufferedReader in = null;
    try {
    out = new BufferedWriter(new FileWriter(fileName));
    in = new BufferedReader(new InputStreamReader(url.openStream()));
    String line;
    do {
    line = in.readLine();
    if(line != null) {
    out.write(line, 0, line.length());
    out.newLine();
    } while(line != null);
    in.close();
    out.close();
    } catch(Exception ex) {
    Here String rootURL is the real file name from where i have to get the data and its UTF-16LE formate.And String fileName is the tem filename and it logical one.
    I think i tried to describe the problem.
    Plz anyone help me.
    Thanks in advance.

    Hello,
    thanks for yr reply...
    I did the as per yr words using StreamWriter but the problem is i need a temp file name to create writer to write into that.
    but its an logical one and its not in real so if i create Streamwriten in that its through FileNotFound exception.
    The only problem is the existing code build using URL and i can change all the lines and its very difficult because its vast amount of data.
    Is anyother way to solve this issue?
    Once again thanks..

  • How do I read and write to text files on a remote computer's hard drive

    I would like to read and write data to a text file on a remote computer. This is easily accomplished using one of the file functions such as "write characters to file.vi". If I am already connected to the remote computer, all I need to do is specify the path to the particular file and it will work fine.
    My problem is that I want to connect to the remote computer programatically within LabVIEW (I do not want to have to use the computer's OS to establish the connection. Is there a function that I can use to do this?
    Thomas D. Schaefer
    Wells Manufacturing Corp

    Yariv,
    You should really start a new thread with a new question like this, so that more people see it. Some people look primarily at threads that have no responses yet. Also, don't post the exact same question in multiple places. Or, if you must cross-post to some other forum, make sure to mention it in your question text.
    I'm happy to be a brick in your Western Wall, but I'm not sure what the main objective is here. Is the main problem really getting access to the "X bytes received in Y seconds at Z bytes/sec" string? Or is it accomplishing the file transfer? And what OS and LabVIEW version are you running?
    I think your problem is that you the LabVIEW System Exec command does not allow for the degree of interactivity that you need if you want to issue a sequence of commands to a command-line executable. However, under Windows XP (and, presumably, other Windows versions, though I can't check), you can tell the FTP executable to use commands from a textfile script by using the -s switch, and you can override the prompts during multiple file transfers with the -i switch:
    ftp -i -s:FILEPATH SERVERNAME
    If you issue a command in this format to System Exec, and make sure to create a file at FILEPATH with your command sequence (one per line), then you should at least accomplish the FTP actions. This won't give you the transfer details in the standard output, unfortunately. However, if you just want a general sense of how much was transferred and how quickly it happened, you can code that in LabVIEW by getting the resulting file sizes and using Tick Count before and after the System Exec call to see how long the transfer took.
    Hope that helps,
    John

  • READING AND WRITING FROM A FILE(WRITTEN IN ANOTHER LANGUAGE)

    # Comment
    INTEGER Declares integer type variable
    STRING Declares string type variable
    LET Assigns a variable
    CALCULATE Performs an arithmetic calculation
    PRINT Writes data to the console
    PRINTLN As print, but followed by a new line
    END Terminates the program
    Each line of the program must begin with one of these words, and the language should not be case sensitive.
    Tim Brailsford, 2007
    G64ICP
    COMMENT
    Any line beginning with the # character is completely ignored.
    Example:
    # ignore this line!
    INTEGER
    The INTEGER reserved word declares an Integer variable, and assigns a default value of 0 to it.
    Example:
    INTEGER myInt
    This example is equivalent to the Java statment "int myInt=0;"
    STRING
    The STRING reserved word declares a String variable, and assigns an empty string to it.
    Example:
    STRING myString
    This is equivalent to the Java statement "String myString;"
    LET
    This assigns values to variables (either integers, or strings enclosed
    in double quotes).
    Examples:
    LET myInt=42
    LET myString="Hello World!"
    CALCULATE
    This performs numeric calculations upon values or variables, and assigns the result to a variable (which must have
    been declared earlier). Four operators are supported: + *
    and / (for addition, subtraction multiplication and
    integer division respectively).
    Examples:
    CALCULATE myInt=2*2
    CALCULATE myInt=myInt+24
    CALCULATE myInt=intA/intB
    PRINT and PRINTLN
    These words both print to the console the
    only difference being that PRINTLN appends a new line (as does
    System.out.println in Java). These can print either text provided as an argument, or variables (string or integer).
    Examples:
    PRINTLN "Hello World!"
    PRINT myString
    PRINTLN myInt
    END
    This terminates the program, and prints a message to that effect.
    TPL Example
    To the left is an example TPL input file , to
    calculate the factorial of 5. This should produce
    an output similar to that shown overleaf (except
    that calculates the factorial of 10).
    # A TPL Program to calculate the factorial of 5
    INTEGER myInt
    INTEGER factorial
    STRING myString
    LET mystring="Factorial Program"
    LET myInt=5
    CALCULATE factorial=myInt*4
    CALCULATE factorial=factorial*3
    CALCULATE factorial=factorial*2
    Tim Brailsford, 2007
    G64ICP
    PRINTLN mystring
    PRINTLN
    PRINT "The factorial of "
    PRINT myInt
    PRINT " is "
    PRINTLN factorial
    END
    Documentation
    Document your code by writing instructions explaining how to run it, listing all of the files you have submitted,
    and specifying any limitations (eg you might want to say what platforms you would expect it to run on, and what
    platforms you have tested it on). This document should be written as a plain text file (ie ASCII � MS Word binary
    files are not acceptable) � and this file should be called README.TXT. This file should constitute the user
    manual of your program, and should explain exactly how to use your program.
    The README file should be the user manual for your language as implemented.
    NB:
    I want it to read values from the file as given above and execute the answer in the command prompt( as intented in the file above)
    Thanks
    Alam Ikenna

    Hai I have one doubt in doing other peoples homework for them. Why bother?

  • Recording data at particular iterations and writing to text file

    Hi all,
    this is my first time posting on the NI boards. I'm running into a couple problems I can't seem to figure out how to fix.
    I'm collecting data using a LabJack U3-HV daq. I've taken one of the out-of-the-box streaming functions that comes with the LabJack and modified it for my purposes. I am attempting to simply save the recorded data to a text file in columns, one for each of my 4 analog strain gauge inputs, and one for time. For some reason when the 'write to measurement file.vi' executes it is puts everything in rows, and the data is unintelligible.
    The 2nd issue I am facing, which is not currently visible in my vi, is that I am running my test for 60,000 cycles, which generates a ton of data. I'm measuring creep/fatigue with my strain gages so I don't need data for every cycle, probably for the first 1000, then the 2k, 4k, 6k, 8k, 10k, 20k, etc. More of an exponential curve. I tried using some max/min functions and then matching the 'write to measurement file.vi' with a case structure that only permitted it to write for particular iterations, but can't seem to get it to work.
    Thanks in advance for any help!
    Attachments:
    3.5LCP strain gages v2.vi ‏66 KB

    Hey carfreak,
    I've attached a screenshot that shows three different ways of trying to keep track of incrementing data and/or time in a while loop. The top loop just shows a program that demonstrates how shift registers can be used to transfer data between loops. This code just writes the iteration value to the array using the Build Array function.
    The first loop counts iterations in an extremely round-about way... the second shows that really you can just build the array directly using the iteration count (the blue "i" in the while loop is just an iteration counter).
    The final loop shows how you can use a time stamp to actually keep track of the relative time when a loop executes.
    Please note that these three should not actually be implemented together in one VI. I just built them in one BD for simplicity's sake for the screenshot. As described above, the producer-consumer architecture should be used when running parallel loops.
    Does that answer your question?
    Chris G
    Applications Engineer
    National Instruments
    Attachments:
    While Loops and Iterations.JPG ‏83 KB

  • Need help finding Sound and Vibration Toolkit Example Files

    I need help finding some Sound and Vibration Toolkit Example Files?
    http://www.ni.com/white-paper/3779/en
    From this link you get:  getting_started_otb.llb
    The missing files are:
    OAT Truncate Time Indices.vi
    Speed profile.ctl
    oa_Config Time or RPM Segment.vi
    svl-Complex Datatype Default.vi
    Running Windows 7, LabVIEW 2011, 32bit
    Sound and Vibration Measurement Suite
    Sound and Vibration Toolkit
    Thanks,
    -SS
    Solved!
    Go to Solution.
    Attachments:
    License S and V.png ‏4 KB

    SS,
    You can find these files here:
    C:\Program Files (x86)\National Instruments\LabVIEW 2011\vi.lib\addons\Sound and Vibration\Order Analysis\Resample Order Tracking\SubVIs
    C:\Program Files (x86)\National Instruments\LabVIEW 2011\vi.lib\addons\Sound and Vibration\Order Analysis\Tach Process\SubVIs
    C:\Program Files (x86)\National Instruments\LabVIEW 2011\vi.lib\addons\Sound and Vibration\Order Analysis\Resample Order Tracking\SubVIs
    svl-Complex Datatype Default.vi changes to svc-Complex Datatype Default.vi
    C:\Program Files (x86)\National Instruments\LabVIEW 2011\vi.lib\addons\_NISVFA\_Shared subVIs\Common
    Make sure you are license activated, and you will have to dig through the *vi and relink a subvi.
    Then you should get a white arrow.
    -SS 

  • Adobe Acrobat Reader Plug - Writing to text file

    Hi,
    I have an Acrobat plug-in which performs various functions including writing to a text file on c:\
    If I use my plug-in with Acrobat all is well.
    If I use the same plug-in with Reader everything seems to work ok except that it won't create the text file. It's as if Adobe reader is protecting this somehow.
    Has anyone seen this before? Any one know how to get around it?
    Regards
    Stuart

    More about protected mode. It is designed specifically to protect the user against attacks originating INSIDE Adobe Reader (e.g. via exploits). Sandboxing is a leading edge protection technology, which (for example) is also being applied to browsers. Your plug-in is therefore part of the problem to be protected against. You have to fully understand the philosophy to exist inside this new sandboxed world. Here is some reading
    http://blogs.adobe.com/livecycle/2010/11/technical-details-of-adobe-reader-x-protected-mod e.html
    http://blogs.adobe.com/security/2010/07/introducing-adobe-reader-protected-mode.html
    http://blogs.adobe.com/security/2010/10/inside-adobe-reader-protected-mode-part-1-design.h tml
    http://blogs.adobe.com/security/2010/10/inside-adobe-reader-protected-mode-part-2-the-sand box-process.html
    http://blogs.adobe.com/security/2010/11/inside-adobe-reader-protected-mode-part-3-broker-p rocess-policies-and-inter-process-communication.html
    http://blogs.adobe.com/security/2010/11/inside-adobe-reader-protected-mode-part-4-the-chal lenge-of-sandboxing.html

  • Please, I need help - How can I generate a text file with Word format?

    Hello friends at www.oracle.com ,
    is it possible for me to create a text file - that is, with TEXT_IO.fopen, and so on - that's already formatted as a Word document?
    We have a Forms program here, where it's needed to generate a text file with .RTF format, 8 centimeters margin, Times New Roman font, with size 7.
    Best regards,
    Franklin Goncalves Jr.

    Hello Shay,
    sincere thanks for your answer. And, to answer your last question, I'm using client-server model.
    Since I couldn't create this .RTF file by using built-ins like TEXT_IO, I tried to generate an .RTF file using Reports, passing the parameters DESTYPE, DESNAME and DESFORMAT, as shown below.
    add_parameter (pl_id, 'DESTYPE', text_parameter, 'FILE');
    add_parameter (pl_id, 'DESNAME', text_parameter, 'c:\franklin.rtf');
    add_parameter (pl_id, 'DESFORMAT', text_parameter, 'RTF');
    However, the just generated .RTF file is uncomprehensible. After opening the file at Microsoft Word, I can see the following message at the top of file:
    This file was created by Oracle Reports. Please view this document in Page Layout mode.
    ... and informations doesn't appear as desired.
    If I can't generate such text format by using TEXT_IO, and if generating an .RTF file through Reports shows me an incomprehensible result, how can I export the selected result to an .RTF file?
    When Reports is opened, choosing Generate to file -> RTF doesn't export anything.
    Thanks, and best regards,
    Franklin Goncalves Jr.

  • Reading and writing u16 binary file to a new file

    Hello all,
    a very simple thing that I just don't seem to be able to figure out. I have a file containing 1024bytes of unsigned 16bit words. I can read it successfully with the right value  being displayed. But then I try to write these values to a new file, I can no longer read the same value (in fact it's all grayed out 0) from the newly written file. The newly written file has the right size 1024 bytes, but I don't seem to obtain the right information. I made sure the endian are the same, little-endian.
     Attached is my basic VI, and the .dat file is the file containing the binary information. 
    I'm not using copy file because once I get this figure out, I'll need to append more of the Scan.dat file to one single file. 
    Thank you!
    Solved!
    Go to Solution.
    Attachments:
    read_write_binary_u16.zip ‏11 KB

    I would put some wait time between the write and the read.  It may be a good idea to actually close the file in between.
    I have a feeling that you may not have allowed enough time to actually have the file written out before you read it again.  That or since it is still open, the file pointer is at the end of the file and you are trying to read all the bytes starting at the end, which means you get nothing.
    Not sure of the exact issue, but those two things comes to mind.

Maybe you are looking for

  • How to add a partner in sales order item by enhancement?

    Hi expert, Sales order item's bill-to and payer will be same with header if you do not change it manually. now I want to modify some item's bill-to and payer which different from the header automatically. Is there any enhancement for this function? T

  • Mailing in process chains

    Hello together, when sending a message e.g. via internet from a process chain the complete job log is added to the message. In some cases the message gets very long and often it is enough to send a short message (e.g. "Error in loading XY"). Is it po

  • Disable Edit Content button on virtual content management reposititory

    Hello, i have a requirement to disable content edit in virtual content management repository (Weblogic portal administration console). i set delegated administration to view capability on Repository and it took out all delete and add functionality bu

  • Reference partitioning?

    If I have tables A, B, C where I have 1->M->M if I have reference partitioning everything ends up in the same partition based on A's partitioning defintion. If when I query I only specify the partition key to quality C when I'm joining from A to B to

  • Itunes findet ipod Nano7 nicht unter windows 8, itunes findet ipod Nano7 nicht unter windows 8

    Itunes findet den ipod nicht. Heute gekauft. Update usw. durchgeführt. zum Syncronisieren geht nicht. Windows 8