Wrong offset value of "Write File.vi"

Hi LVers,
to log incomming UDP messages I am using two files. The header (fixed
length) is stored in the first file and the message body (variable
length) is stored inthe second file. As an extension to the header
information I want to store the sctual offset (position of the file
pointer) of the datalog file. The "WriteFile.vi" is giving this
information as an output value.
While reading the headerlog I saw that the output value is sporadically
the same for two or three calls of the VI.
Thanks in advance for any help.
Hans J"org Beesterm"oller

Hi LVers,
to log incomming UDP messages I am using two files. The header (fixed
length) is stored in the first file and the message body (variable
length) is stored inthe second file. As an extension to the header
information I want to store the sctual offset (position of the file
pointer) of the datalog file. The "WriteFile.vi" is giving this
information as an output value.
While reading the headerlog I saw that the output value is sporadically
the same for two or three calls of the VI.
Thanks in advance for any help.
Hans J"org Beesterm"oller

Similar Messages

  • Write blob value into a file

    Hi, all
    I'm looking for the correct method of writing an internal blob value into a file. I know that the best way is using some external language. I.e. Java or C. But also I met a number of solutions of doing within pl/SQL block. All of them look like this:
    CREATE OR REPLACE PROCEDURE Write_Binary_file
       PC$Directory IN VARCHAR2
      ,PC$File_Name IN VARCHAR2
      ,PC$SQL_Order IN VARCHAR2
      ,PB$Raise     IN BOOLEAN DEFAULT FALSE
    -- Procedure to dump a BLOB column onto a file
    -- parameters:
    -- PC$Directory : name of an existing Oracle Directory
    -- PC$File_Name : name of the expected output file
    -- PC$SQL_Order : SQL order to select the BLOB column
    -- PB$Raise     : boolean to indicate if the process
    --                would be stopped after an error
    IS
      src_lob    BLOB;
      buffer     RAW(16384);
      amt        BINARY_INTEGER := 16384;
      pos        INTEGER := 1;
      LF$FicOUT  UTL_FILE.FILE_TYPE ;
      LC$Msg     VARCHAR2(2000) ;
    BEGIN
    -- get the BLOB column --
    BEGIN
      EXECUTE IMMEDIATE PC$SQL_Order INTO src_lob ;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        LC$Msg := 'Write_Binary_File(): NO_DATA_FOUND' ;
        IF PB$Raise THEN
          RAISE_APPLICATION_ERROR( -20100, LC$Msg ) ;
        END IF ;
        Dbms_Output.Put_Line(LC$Msg) ;
      RETURN ;
    END ;
    -- open the output file --
    LF$FicOUT := UTL_FILE.FOPEN( PC$Directory, PC$File_Name, 'W', 32764 ) ;
    -- write the file --
    LOOP
      -- read the chunks --
      Dbms_Lob.READ (src_lob, amt, pos, buffer);
      -- write the chunks --
      Utl_File.Put_Raw(LF$FicOut, buffer);
      pos := pos + amt;
    END LOOP;
    -- close the file --
    Utl_File.Fclose(LF$FicOut);
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        utl_file.fclose(LF$FicOut);
      WHEN OTHERS THEN
        LC$Msg := 'Write_Binary_File() Error : ' || TO_CHAR( SQLCODE ) || ' while managing file ('
    || PC$Directory || ') ' || PC$File_Name ;
        IF PB$Raise THEN
          RAISE_APPLICATION_ERROR( -20100, LC$Msg ) ;
        END IF ;
        Dbms_Output.Put_Line(LC$Msg);
    END Write_Binary_file;
    But this code seems not working. The problem is it always creates a file with a bit bigger size than initial one. So jpg copy will be never be opened with any viewer.
    Can anybody explain this issue and give any workaround?
    Thanks

    You need a code block like this:
    DECLARE
       l_file       UTL_FILE.FILE_TYPE;
       l_buffer     RAW (32767);
       l_amount     BINARY_INTEGER     := 32767;
       l_pos        INTEGER            := 1;
       l_blob       BLOB;
       l_blob_len   INTEGER;
    BEGIN
    -- Open the destination file. Note the third parameter "wb"
       l_file := UTL_FILE.FOPEN ('TEST_DIR', 'extract3.jpg', 'wb');
    -- Get LOB locator
    FOR rec IN (
    SELECT blob_col  l_blob
          FROM test_my_blob
       --AND ROWNUM =1
    LOOP
       l_blob_len := DBMS_LOB.getlength (rec.l_blob);
    -- Read chunks of the BLOB and write them to the file
    -- until complete.
       WHILE l_pos < l_blob_len
       LOOP
          DBMS_LOB.READ (rec.l_blob, l_amount, l_pos, l_buffer);
          UTL_FILE.put_raw (l_file, l_buffer, FALSE);
          l_pos := l_pos + l_amount;
       END LOOP;
      commit;
    END LOOP;
    -- Close the file.
       UTL_FILE.FCLOSE (l_file);
    EXCEPTION
       WHEN OTHERS
       THEN
    -- Close the file if something goes wrong.
          IF UTL_FILE.IS_OPEN (l_file)
          THEN
             UTL_FILE.FCLOSE (l_file);
          END IF;
          RAISE;
    END;

  • Write File.vi does not allow for offset entry

    I am using a Write File.vi to write data to my hard drive like always but I have never used the offset before and it is not allowing me to enter an offset value and the error message does not make sense. The error says you have wired different data types but then say source long, sink long which are the same in my eyes.
    Is there a trick to using the offset?

    If you are writing to file different data types, the use of input is not allowed because it depends on the number of bytes used to store the type (that's why it should be just one type)

  • Why can´t I wire the offset input in the Write File Function when I use datalog files ?

    Hi !
    I have a datalog file, in which I save variant data several times in diferents VIs, I runs these randomly, and I would like rewrite only a part of the file, but I can´t wire the offset input in the Write File function to indicates the begins and save the data in the point that I want.
    I need your help thanks.
    Attachments:
    Second Write in a datalog file.vi ‏19 KB

    Hello.
    I THINK that the reason why the offset input is disabled when you are working with datalog files is that you do not know how many bytes each entry of the data structure will ocupy.
    When you have a binary file where you store, for example, an array of double precision floating-point numbers, you know that each number ocupies 8 bytes, so you know that when you want to read the 21st number of the array you need to skip the first 160 bytes (20 numbers x 8 bytes/number).
    However, with datalog files you can store very diverse data structure, usually including strings, like in your case, which means that you do not know how many bytes to skip to be able to read or write to some particular variable of your data structure.
    If what you want to do is to not overwrite the contents of an existing file, but to append to it, what you probably will have to do is read the whole contents, append to the data in your program, and write it all again.
    Hope this helps,
    Alejandro

  • Error in using ABAP OLE wrong cell value

    Dear All..
    I'm facing a problem while using ABAP OLE..
    the problem is the ABAP OLE writes the wrong value in Excel file
    the value is 121.000 but it written in Excel file : 121
    the weird thing is .. other value of  9.000.000 written correctly in Excel File .. and also lots of other values..
    i've trace the value until it goes to the method of :
    CALL METHOD OF h_excel 'Cells' = h_zl
         EXPORTING
           #1 = i_row
           #2 = i_col.
       SET PROPERTY OF h_zl 'Value' = i_value.
       GET PROPERTY OF h_zl 'Font' = h_f.
       IF i_bold = 'X'.
         SET PROPERTY OF h_f 'Bold' = 1.
       ENDIF.
       and the values of variable i_value is still correct which is : 121.000 but after writing in excel it becomes 121
       i believe it will become faulty at the specific amount with format of XXX.000  because if I changed the value to 121.001 it displays correctly in Excel file..
    i_value is a pass value from variable ld_val with data type of is --> ld_val(20) type n.
    is this are originally bugs from the OLE ? how to solved it ?
    please advice ..

    yes it is clear, but how excel manage the passed data is unclear.
    However, to solve you can try this:
    DATA : ld_val(20).
    WRITE value1 TO ld_val CURRENCY CURR.
    REPLACE ALL OCCURRENCES OF '.' IN ld_val WITH space.
    CALL METHOD OF h_excel 'Cells' = h_zl
         EXPORTING
         #1 = i_row
         #2 = i_col.
       SET PROPERTY OF h_zl 'Value' = ld_val.
       GET PROPERTY OF h_zl 'Font' = h_f.
       IF i_bold = 'X'.
         SET PROPERTY OF h_f 'Bold' = 1.
       ENDIF.
    Regards,
    Angelo.

  • SXPG_COMMAND_EXECUTE  return wrong parameter value

    Dear all.
    We have an Abap program that pulls an encrypted FTP file and saves it to our network.
    After that we activate an external command via transaction SM69 by calling FM SXPG_COMMAND_EXECUTE.
    This command is an execution of a batch file that executes a decryption method via PGP decryption software.
    The problem is that we get an output parameter of this FM (STATUS) as u201CEu201D (error) although the decryption is being executed successfully.
    We have the same process being activated same way successfully with another folders (rest is exactly the same).
    Why does SXPG_COMMAND_EXECUTE return wrong status value ?
    Regards,
    Rebeka

    SXPG_COMMAND_EXECUTE runs under certain operating system user account. Looks like that account does not have enough privileges to do what you want it to do. Look at the operating system for privileges (read,write,execute) of the user account SAPServiceuser or equivalent.
    /Simo

  • Offset Value - ColorMatrixFilter

    Hello all,
    Please excuse me if this is the wrong part of the Flash forum to post in, or if I did not correctly follow to forum guidelines.
    I have searched for some time now for more information on the Offset Value from the ColorMatrixFilter.
    I'm writing a paper on 'Matrices within Image Manipulation', and I'm using Adobe Photoshop and Flash as my "base".
    I have read http://www.adobe.com/devnet/flash/articles/matrix_transformations_04.html this page, but I still have some questions,
    concerning what exactly this value does?
    I have no real knowledge about Flash, or any other Adobe Products for that matter, but  it's rather important I understand what I write down in my own paper!
    Thank you in advance for any replies!
    - Wesley

    the key part of the colormatrixfilter is:
    redResult = a[0] * srcR + a[1] * srcG + a[2] * srcB + a[3] * srcA + a[4]
    greenResult = a[5] * srcR + a[6] * srcG + a[7] * srcB + a[8] * srcA + a[9]
    blueResult = a[10] * srcR + a[11] * srcG + a[12] * srcB + a[13] * srcA + a[14]
    alphaResult = a[15] * srcR + a[16] * srcG + a[17] * srcB + a[18] * srcA + a[19]
    there are 4 lines of code that you need to understand.  each line can be considered independent of the other lines.  once you understand one line, you'll understand them all.
    the first line yields the red as a function of the starting r,g,b,a and the top row of the colormatrixfilter.   there's nothing more to understand about that first line.  the remaining lines are no different except they yield different end-colors and are a function of the same starting r,g,b,a and a different row of the colormatrixfilter.

  • JNI Invocation: open file in Java, write file in CPP

    Hello,
    Warning: I am a dunce, bad CPP code ahead!
    Using JNI invocation, I am trying to read a binary file in Java and write it in CPP.
    Everything compiles and runs without error, but the input and output jpg files are of course different.
    TIA to any help,
    kirst
    (begin ByteMe.java)
    import java.io.*;
    public class ByteMe
        // Returns the contents of the file in a byte array.
        public byte[] getBytesFromFile(String strInfo) throws IOException
            System.out.println("Testing:" + strInfo);
            File file = new File("1.jpg");
            InputStream is = new FileInputStream(file);
            // Get the size of the file
            long length = file.length();
            // Create the byte array to hold the data
            byte[] bytes = new byte[(int)length];
            // Read in the bytes
            int offset = 0;
            int numRead = 0;
            while (offset < bytes.length
                   && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
                offset += numRead;
            // Ensure all the bytes have been read in
            if (offset < bytes.length)
                throw new IOException("Could not completely read file "+file.getName());
            // Close the input stream and return bytes
            is.close();
            return bytes;
        public ByteMe()
              //System.out.println("in constructor");
    }(end ByteMe.java)
    (begin ByteMe.cpp)
    #include <stdlib.h>
    #include <string.h>
    #include <jni.h>
    #include <windows.h>
    // for file operations:
    #include <fstream>
    int main( int argc, char *argv[] )
         JNIEnv *env;
         JavaVM *jvm;
         JavaVMInitArgs vm_args;
         JavaVMOption options[5];
         jint res;
         jclass cls;
         jmethodID mid;
         jstring jstr;
         jobject obj_print;
         options[0].optionString = "-Xms4M";
         options[1].optionString = "-Xmx64M";
         options[2].optionString = "-Xss512K";
         options[3].optionString = "-Xoss400K";
         options[4].optionString = "-Djava.class.path=.";
         vm_args.version = JNI_VERSION_1_4;
         vm_args.options = options;
         vm_args.nOptions = 5;
         vm_args.ignoreUnrecognized = JNI_FALSE;
         // Create the Java VM
         res = JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);
         if (res < 0)
              printf("Can't create Java VM");
              goto destroy;
         cls = env->FindClass("ByteMe");
         if (cls == 0)
              printf("Can't find ByteMe class");
              goto destroy;
         jmethodID id_construct = env->GetMethodID(cls,"<init>","()V");
         jstr = env->NewStringUTF(" from C++\n");
         obj_print = env->NewObject(cls,id_construct);
         // signature obtained using javap -s -p ByteMe
         mid = env->GetMethodID(cls, "getBytesFromFile", "(Ljava/lang/String;)[B");
         if (mid == 0)
              printf("Can't find ByteMe.getBytesFromFile\n");
              goto destroy;
         else
              jbyteArray jbuf = (jbyteArray) env->CallObjectMethod(obj_print,mid,jstr);
              jlong size = jsize(jbuf);
              printf("size is: %d\n", size); // size shown in output is
              std::ofstream out("data.jpg", std::ios::binary);
              out.write ((const char *)jbuf, 100000);     
         destroy:
             if (env->ExceptionOccurred())
                env->ExceptionDescribe();
        jvm->DestroyJavaVM();
    }(end ByteMe.cpp)

    Hello,
    Me again. Well, not such a dunce after all. Here is code that works correctly, and compiles with no errors and no warnings.
    Will much appreciate help with clean-up code.
    TIA,
    kirst
    (begin ByteMe.java)
    import java.io.*;
    public class ByteMe
        public long getFilezize(String strInfo) throws IOException
              // demonstrates String parameter passed from CPP to Java:
              System.out.println("(getFilesize) Hello world" + strInfo);
              File file = new File("1.bmp");
              InputStream is = new FileInputStream(file);
              // Get the size of the file
              long length = file.length();
              is.close();
              return length;
        // Returns the contents of the file in a byte array.
        public byte[] getBytesFromFile(String strInfo) throws IOException
            System.out.println("(getBytesFromFile) Hello world" + strInfo);
            File file = new File("1.bmp");
            InputStream is = new FileInputStream(file);
            // Get the size of the file
            long length = file.length();
            System.out.println("length is: " + String.valueOf(length));
            // Create the byte array to hold the data
            byte[] bytes = new byte[(int)length];
            // Read in the bytes
            int offset = 0;
            int numRead = 0;
            while (offset < bytes.length && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0)
                offset += numRead;
            // Ensure all the bytes have been read in
            if (offset < bytes.length)
                throw new IOException("Could not completely read file "+ file.getName());
            // Close the input stream and return bytes
            is.close();
            return bytes;
        public ByteMe()
              //System.out.println("in constructor");
    }(end ByteMe.java)
    (begin ByteMe.cpp)
              Signature obtained with command:
                   "C:\Program Files\Java\jdk1.5.0_15\bin\javap.exe" -s -p ByteMe
                   Compiled from "ByteMe.java"
                   public class ByteMe extends java.lang.Object{
                   public long getFilezize(java.lang.String)   throws java.io.IOException;
                     Signature: (Ljava/lang/String;)J
                   public byte[] getBytesFromFile(java.lang.String)   throws java.io.IOException;
                     Signature: (Ljava/lang/String;)[B
                   public ByteMe();
                     Signature: ()V
         Compiled VC++ 2005 Express, run on Vista
    #include <stdlib.h>
    #include <string.h>
    #include <jni.h>
    // file operations
    #include <fstream>
    int main( int argc, char *argv[] )
         JNIEnv *env;
         JavaVM *jvm;
         JavaVMInitArgs vm_args;
         JavaVMOption options[5];
         jint res;
         jclass cls;
         jmethodID mid;
         jmethodID sizeid;
         jstring jstr;
         jobject obj_print;
         jlong filesize;
         options[0].optionString = "-Xms4M";
         options[1].optionString = "-Xmx64M";
         options[2].optionString = "-Xss512K";
         options[3].optionString = "-Xoss400K";
         options[4].optionString = "-Djava.class.path=.";
         vm_args.version = JNI_VERSION_1_4;
         vm_args.options = options;
         vm_args.nOptions = 5;
         vm_args.ignoreUnrecognized = JNI_FALSE;
         // Create the Java VM
         res = JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);
         if (res < 0)
              printf("Can't create Java VM");
              goto destroy;
         cls = env->FindClass("ByteMe");
         if (cls == 0)
              printf("Can't find ByteMe class");
              goto destroy;
         jmethodID id_construct = env->GetMethodID(cls,"<init>","()V");
         printf("%s\n",id_construct);
         jstr = env->NewStringUTF(" from C++!\n");
         if (jstr == 0)
              // Normally not useful
              printf("Out of memory (could not instantiate new string jstr)\n");
              goto destroy;
         obj_print = env->NewObject(cls,id_construct);
         //BEGIN BLOCK to get file size
         sizeid = env->GetMethodID(cls, "getFilezize", "(Ljava/lang/String;)J");
         if (sizeid == 0)
              printf("Can't find ByteMe.getFilezize\n");
              goto destroy;
         else
              printf("got here\n");
              filesize =(jlong) env->CallObjectMethod(obj_print,sizeid,jstr);
              printf("got filesize\n");
         // END BLOCK to get file size
         // BEGIN BLOCK to write file
         mid = env->GetMethodID(cls, "getBytesFromFile", "(Ljava/lang/String;)[B");
         if (mid == 0)
              printf("Can't find ByteMe.getBytesFromFile\n");
              goto destroy;
         else
              jbyteArray ret =(jbyteArray) env->CallObjectMethod(obj_print,mid,jstr);
              // Access the bytes:
              jbyte *retdata = env->GetByteArrayElements(ret, NULL);
              // write the file
              std::ofstream out("data.bmp", std::ios::binary);
              //out.write ((const char *)retdata, 921654);
              out.write ((const char *)retdata, (long)filesize);
         // END BLOCK to write file
         destroy:
             if (env->ExceptionOccurred())
                env->ExceptionDescribe();
        jvm->DestroyJavaVM();
    }(end ByteMe.cpp)

  • StarOffice 8 - finding all different font types in a Writer file

    Hello,
    I am currently using StarOffice 8 on a Windows XP system.
    I frequently transfer a large Writer (.odt) file between different computer systems as I constantly update the file with new information. As part of the updates, I use different fonts. As I install a particular font on one machine, this font may not be installed on another machine when I add new information to the file on that particular machine.
    When I open the Writer file on a machine that has some font not installed, the WYSIWYG appears incorrectly (since the proper font is not installed on that computer, of course) but if you highlight the incorrectly-displayed info, it says what the font type should be (ie, "WP Hebrew David" font). I then go online to download that specific font type for this the computer. Then the data is displayed correctly.
    When you have many, many different font types used in a file, it is hard to keep track of all different fonts used. Before anyone questions me on using so many different fonts in a file, it is important for my file to visually display the correct data, and this means using a quantity of fonts.
    What I am wondering is the following:
    Is there a way from within StarOffice 8 to scan a particular file and then let the user know every different font name used in that file?
    That way, if the file contains a font which was used on another machine but not currently installed on the current machine -- when I am updating information in the file -- I can then see a list of fonts used and then install new fonts accordingly after checking to see if they are installed (by checking the Fonts folder in C:/Windows)
    I hope this makes sense, or is it "clear as mud"?
    Please excuse my bad English grammar as I am not a native English speaker, but have picked it up living in Canada for the last 20 years :-)
    Cheers & thanks in advance for any help !
    David
    Edited by: Broad_Arrow on May 18, 2009 11:18 PM

    May 20 2009
    There is a Fonts Used macro writer_printAllFonts.sxw Further checking this is the wrong StarBasic macro. The one I use came from an OOo forum I think. I use it with SO7, SO8 and SO9.
    It is at the end of this message. To install it:
    [1] Copy the macro below to the clipboard
    [2] Go to Tools>Macros>Organize Macros>Basic>Standard
    Select New. Highlight what is there, paste, and close.
    [3] Go to Tools>Customize>Menus>Tools
    Highlight Word Count, then go to Add>Macros>My Macros>Standard>Module1
    Highlight FontsUsed, Click Add, Close, Ok
    Phil
    REM ***** BASIC *****
    Sub Main
    End Sub
    Sub FontsUsed 'Version 1 John Vigor 4/25/06
    'List fonts used in Writer document. Appears to work in normal text,
    'Sections, normal Tables, and Frames. Will currently crash on a Table
    'within a Table.
    oDoc = ThisComponent
    Dim fonts as Integer: Dim aFonts(1)
    oTC = oDoc.Text.createTextCursor
    oTC.goRight(1,true) : CurrentFont = oTC.charFontName
    fonts = fonts + 1 : aFonts(fonts) = CurrentFont
    REM Do "normal" text.
    partEnum = oDoc.Text.createEnumeration
    PartEnumerator(partEnum,CurrentFont,fonts,aFonts())
    REM Do Frames.
    oFrames = oDoc.getTextFrames
    If oFrames.Count > 0 then
    fonts = fonts + 1 : ReDim Preserve aFonts(fonts)
    aFonts(fonts) = "NEW FONTS, IF ANY, FOUND IN FRAMES:"
    For I = 0 to oFrames.Count - 1
    thisFrame = oFrames.getByIndex(I)
    partEnum = thisFrame.createEnumeration
    PartEnumerator(partEnum,CurrentFont,fonts,aFonts())
    Next
    EndIf
    REM Prepare list.
    For I = 1 to fonts
    s = s & aFonts(I) & Chr(10)
    Next
    iAns = MsgBox(s,4,"FONTS FOUND. Create font list document?")
    If iAns = 7 then
    End
    Else
    NewDoc = StarDesktop.loadComponentFromURL("private:factory/swriter"," blank",O,Array())
    oVC = NewDoc.CurrentController.getViewCursor
    oVC.String = s : oVC.collapseToEnd
    EndIf
    End Sub
    Sub PartEnumerator(partEnum,CurrentFont,fonts,aFonts())
    While partEnum.hasMoreElements
    thisElement = partEnum.nextElement
    If thisElement.supportsService("com.sun.star.text.Paragraph") then
    portionEnum = thisElement.createEnumeration
    PortionEnumerator(portionEnum,CurrentFont,fonts,aFonts())
    ElseIf thisElement. supportsService ("com.sun.star.text.TextTab le") then
    Cols = thisElement.getColumns.Count - 1
    Rows = thisElement.getRows.Count - 1
    For C = 0 to Cols
    For R = 0 to Rows
    thisCell = thisElement.getCellByPosition(C,R)
    cellEnum = thisCell.createEnumeration
    While cellEnum.hasMoreElements
    thisPara = cellEnum.nextElement
    portionEnum = thisPara.createEnumeration
    PortionEnumerator(portionEnum,CurrentFont,fonts,aFonts())
    Wend
    Next
    Next
    EndIf
    Wend
    End Sub
    Sub PortionEnumerator(portionEnum,CurrentFont,fonts,aFonts())
    Dim found as Boolean
    While portionEnum.hasMoreElements
    thisPortion = portionEnum.nextElement
    thisFont = thisPortion.charFontName
    If thisFont <> CurrentFont then
    For I = 1 to fonts
    If aFonts(I) = thisFont then found = true: Exit For
    Next
    If found then
    CurrentFont = thisFont : found = false Else
    fonts = fonts + 1 : ReDim Preserve aFonts(fonts)
    aFonts(fonts) = thisFont : CurrentFont = thisFont
    EndIF
    EndIf
    Wend
    End Sub

  • Enable to have the Write File to Citadel Example working

    Did somebody already run the Write File to Citadel Example with success ?
    This exemple aims at Importing Spreadsheet Data to the Citadel Database, and is given in the NI developer Zone --> Development Library --> Labview --> DSC --> Data Logging.
    I can run the exemple as described without any visible problem. But when I look at Citadel (through MAX), I can't find any trace of the data I imported (sine_wave_one for instance). According to the SampleSpreadsheet.csv I used for import, I should find a trace in the database around the 21st of march 2002...
    But I found nothing.
    Any help?
    Thanks,
    Hélène.

    I am not sure how savvy LabVIEW programmer you are, but if you feel confident you can go ahead and try to debug the code.
    The VI based servers are running on the background. You can however make the front panel visible during the execution - not the diagram. The debugging means you have to create a few indicators on the panel that will show what is going on on the diagram.
    These are the steps the enable the front panel during the execution:
    1) Open the Write File to Citadel Server VI
    2) File>>VI properties; select Window Appearance
    3) Click Customize and check the Show FP when called and Show FP when loaded
    4) Save it and relaunch the engine!
    When you start the engine again, you should get th
    e server front panel. Once you'll have some indicators on the FP you'll be able to learn more about what is going on in the VI.
    I have noticed that sometimes the example pops up with a File dialog box. I found out this was related to a race condition in the example. I am not sure if that's what you see.
    Let me know.
    Also if the example executes you should see the tag values changing - for example the string tags starts with "Row 0", "Row 1" ...
    Is that what you see?
    Dr.Tag

  • Read value from text file to JTextField

    Hi,
    I think this is the right place to post this. Although maybe it is not it could be classed as I/O issues?
    I have a JFrame with a JTextField which requires the user to enter a value. When they click a JButton "OK". It writes the value to a text file and closes the frame using FileWriter. If they click clear button it writes the value "" to the file. What I want to do is when the frame opens it reads the value from the text file. I have been trying to use FileReader but have not been able to write the code correctly. Any help would be greatly appreciated.
    Thanks

    File f = yourfile;
    BufferedReader br = new BufferedReader(new FileReader(f));
    String value = br.readLine();Alex.

  • How do I read and write files on a mac?

    On my windows it's easy, but when I try to write files and read them
    on a Mac the filepath is always wrong. I want to write to my
    "Documents" folder, and when I do /Documents/Hello.txt as a filepath
    it gets it wrong. I don't know why it won't work because I'm not too familiar
    with macs yet. Any help with the filepath problem?

    Your Documents folder is not /Documents. It's /Users/your_user_name/Documents

  • Oracle 11g on Unix server needs to write files (.csv) on Windows server

    Hi,
    Currently we are using Oracle 10g which is installed on a Unix server and on the same server there is a directory under which some files are being exported/downloaded by the db.
    We are having DEDICATED DB INSTANCE on the SHARED server, and not a DEDICATED SERVER.
    Now we need to migrate from Oracle 10g to 11g, but due to some complaince issue, we have been asked to create those directories on some other server. We have identified a Windows server and can create directories.
    Now I request any expert to pls suggest/guide me that how can the db (on Unix server) export/write files on another Windows server?
    I read in a thread that the server (where files should be exported) should be MOUNTED on the server where db is physically installed.
    Pls help me here.....
    Edited by: 950010 on Jul 31, 2012 7:00 AM

    950010 wrote:
    As I wrote in my question that due to compliance issue we have been asked to create the directory (that is currently on the same unix server on which our db is physically installed) in any other server (no matter unix or windows).And if that remote server is not available? Or if network connectivity to the remote server fails? Or if there is severe network congestion between the Oracle server and remote server? What then?
    How is the process on the local server suppose to deal with errors when it attempts to create a CSV file on the remote server? Or deal with network bottlenecks that results in severe performance degradation when trying to create a CSV file? Or if there lacks freespace for creating the CSV file?
    What about security? How is the local Oracle server to authenticate itself with the remote server? How is the remote server to protect that directory share against unauthorised access?
    How is this remote server going to provide access to authorised s/w to these CSV files?
    Who (local or remote processes) is going to manage this directory share and ensure old CSV files are deleted and that there is sufficient freespace for new CSV files?
    There are a LOT of questions that need to be asked... BEFORE deciding on HOW technically to do it. As the technical decision will be based on the functional requirements and how to best meet these.
    Technically - there is Samba, NFS, FTP, SFTP, SCP, RDIST and a number of other methods that can be used. But without asking the above questions and getting proper business answers, selecting a specific technical method is very much premature.
    You are asking the wrong questions, and in the wrong forum. You need to determine the business requirements first.

  • FileAdapter Write file with empty payload always error

    Hi All ,
    I run on 10.1.3.3.1 with patch Patch 7375080 only esb not have bpel.I have to use webservice for verify data.
    and response with set of objects.
    I have 2 important questions about write file with FileAdapter.
    1. I want to not create file if not have error from validate data but
    with this xsl tranform if I uncomment when value of condition is 'N' that will error cause single line payload.
    <xsl:for-each select="/tns:populateYFRIResponseElement/tns:result/tns:wrongLines">
    <!--<xsl:choose>
    <xsl:when test="../tns:isHaveWrongLines = 'Y'">-->
    <imp1:Child-Element>
    <imp1:FrameNo>
    <xsl:value-of select="concat('&quot;',tns:frameNo,'&quot;')"/>
    </imp1:FrameNo>
    <imp1:EngineNo>
    <xsl:value-of select="concat('&quot;',tns:engineNo,'&quot;')"/>
    </imp1:EngineNo>
    </imp1:Child-Element>
    <!-- </xsl:when>
    </xsl:choose>-->
    </xsl:for-each>
    but if I comment if condition 'Y' FileAdapter create csv files with empty like "","" .
    2.
    I must write log file with FileAdapter . I want to append file so I add attribute Append=true
    to wsdl
    <jca:operation
    LogicalDirectory="outgoingfile"
    InteractionSpec="oracle.tip.adapter.file.outbound.FileInteractionSpec"
    FileNamingConvention="YFRI%yyMMdd%.log"
    NumberMessages="1"
    Append = "true"
    >
    but when run that throws errors cause properties append not found.
    I view class FileInteractionSpec that have append properties .I very confuse.
    Any help would be appreciated.
    Regards,
    Weerawat

    Hi
    Thank for good answer.I am newbies in esb so I don't know that have routing expression before.
    I'm so glad your answer very helpful before routing but same question 1 if I have detail must not write data like below
    ,import file name YFRI20090616165654.DAT at Tue Jun 16 16:59:26 GMT+07:00 2009 with number of data is 2 correct line is 2
    "D",0,0,
    ,import file name YFRI20090616170202.DAT at Tue Jun 16 17:04:40 GMT+07:00 2009 with number of data is 12 correct line is 12
    "D",0,0,
    YFRI.txt,import file name YFRI.txt at Tue Jun 16 19:53:48 GMT+07:00 2009 with number of data is 2 error line is 2
    "D",1,3,MTOCCode:ZE8839LZ SAA is not have in DB
    "D",2,3,MTOCCode:ZE8839LZ SAA is not have in DB
    with
    <xsd:element name="LogFile">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="FileName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="Desc" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="Detail" nxsd:startsWith="&quot;D&quot;," maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="line" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"/>
    <xsd:element name="column" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"/>
    <xsd:element name="desc" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    ESB will display error payload If import not have verify error detail so I have to write 'D',0,0 (Detail,Line,Column).
    In this situation how am I to do ?
    In question 2 .Now I can append with
    <jca:operation
    LogicalDirectory="outgoingfile"
    InteractionSpec="oracle.tip.adapter.file.outbound.FileInteractionSpec"
    FileNamingConvention="YFRI%yyMMdd%.log"
    NumberMessages="1"
    OpaqueSchema="false"
    Append="true"
    >
    </jca:operation>
    Thank you
    Weerawat

  • Weird error: "Cannot write file summary in a read-only environment"

    Disclaimer: We are using an old version of bdb - 3.2.76 but are not able to easily upgrade.
    We see this occasionally in production. From looking at the code it looks like critical eviction is happening since more memory is used then the limit we set then eviction is happening but then failing since the env is read only. I'm just wondering how it got to this point. we set the max size (je.maxMemory) to 1572864 bytes.
    This is not urgent but is adding noise to logs so any suggestions would be welcome...
    <application specific exception>
    …causedBy com.sleepycat.je.DatabaseException: (JE 3.2.76) Cannot write file summary in a read-only environment
    at com.sleepycat.je.cleaner.UtilizationProfile.putFileSummary(UtilizationProfile.java:720)
    at com.sleepycat.je.cleaner.UtilizationProfile.flushFileSummary(UtilizationProfile.java:708)
    at com.sleepycat.je.cleaner.UtilizationTracker.evictMemory(UtilizationTracker.java:120)
    at com.sleepycat.je.evictor.Evictor.evictBatch(Evictor.java:314)
    at com.sleepycat.je.evictor.Evictor.doEvict(Evictor.java:253)
    at com.sleepycat.je.evictor.Evictor.doCriticalEviction(Evictor.java:279)
    at com.sleepycat.je.dbi.CursorImpl.close(CursorImpl.java:690)
    at com.sleepycat.je.dbi.CursorImpl.close(CursorImpl.java:660)
    at com.sleepycat.je.Cursor.endRead(Cursor.java:1820)
    at com.sleepycat.je.Cursor.retrieveNextAllowPhantoms(Cursor.java:1616)
    at com.sleepycat.je.Cursor.retrieveNext(Cursor.java:1397)
    at com.sleepycat.je.Cursor.getNext(Cursor.java:456)
    ...

    Hi Nick,
    It is strange to me also that this is happening in a read-only env. Looking at the code, we don't prevent this sort of eviction in the 3.2 release or later releases. Yet we've never seen this problem before.
    This sort of eviction only happens when writing is occurring. Of course, in a read-only env there is no writing. The only way I can think of for this to occur in a read-only env is when there is a very large recovery interval -- the amount of log between the last checkpoint start and the end of the log. This can occur if you didn't close the env cleaning when you last wrote to it, or if the last checkpoint just happened to be very large.
    So one thing you could try is to ensure that you have a small checkpoint when you write to the log, before opening it in read-only mode. To do this, just before you call Environment.close, call Environment.checkpoint(new CheckpointConfig().setForce(true)). This will do one checkpoint before closing the env, and then another during the close. The last checkpoint should be small.
    If you can't do this, or it isn't sufficient, you could increase the je.cleaner.detailMaxMemoryPercentage env config property. This is the max amount of memory (% of total cache) used for the information that is being evicted. Since nothing can really be evicted in read-only mode, there is no harm in setting this to a much higher value than the default (2). I would try 10. This doesn't reserve or waste any memory, it just prevents this sort of eviction from occurring until a larger part of the cache is used. This is probably the simplest solution.
    A third approach is to simply accept that this sort of eviction will be attempted, but try to prevent the exception. If you're willing to rebuild JE (and you're not a supported Oracle customer -- please contact us if you are), then you could simply replace the 'throws' statement with a 'return null' in src/com/sleepycat/je/cleaner/UtilizationProfile.java:
        private synchronized PackedOffsets putFileSummary(TrackedFileSummary tfs)
            throws DatabaseException {
            if (env.isReadOnly()) {
                throw new DatabaseException
                    ("Cannot write file summary in a read-only environment");
            }--mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Strange problem with the mail app on an iPad

    I've got a bit of a strange problem with the mail app on an iPad - it's sending and receiving mail ok but won't let you delete mail. If you keep at it, it appears as if you have deleted mail (though takes a very long time as you just have to keep del

  • Apply Ink Signature Option Grayed-Out

    Why would other computers except mine within my company who have the most recent Reader installed not be able to access the "apply ink signature" option under "extended?" I have enabled extended features.

  • Strange object formed when saving camera-RAW file as TIFF

    Perhaps someone has a clue as to what the strange circular object  seen on the picture below might be (on the upper-left area of the  photo), because I have no idea. My best, yet  uninformed, guess is that this is an electronic random generation of 

  • Newbie to JSP, advice needed...

    I've been a Java applet and application designer for a while, and I've come to the conclusion that I should get into JSP, I'm wondering, where I can find good tutorials or books to help me out, I already started making simple ones, but what are the c

  • Zoom-in keyboard shortcut not working in illustrator CC

    I am able to use the keyboard shortcut control+minus to zoom out, but control+plus/= to zoom in has stopped working in illustrator CC. (It works fine in illustrator CS6.) Any idea how to fix this?