Type to write in a file

I want to write in a file
1,1,1,1 where 1 is an int/integer optionally i have to write also 0(zero)
my java ws (very simple, numeric output variable is input variable)have to return
1. int variable
or
2. new Integer variable(so the object)??
In the tutorial there is only string type!
In xsd file, what type of variable i have to set?
Thanks
Ema

Sorry but i can't understand why i have to work with string if i have int variables! Then I need to increment the value in the variable!
I think that your write file web service cannot write int value!
I 've created xsd file:
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://TargetNamespace.com/Write"
xmlns:tns="http://TargetNamespace.com/Write"
elementFormDefault="qualified"
attributeFormDefault="unqualified" nxsd:encoding="US-ASCII" nxsd:hasHeader="true" nxsd:headerLines="1" nxsd:headerLinesTerminatedBy="${eol}" nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="genstep">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Step1" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="Step2" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="Step3" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="Step4" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
and the variable genstep is correctly filled. But i cannot write it on a file po_%SEQ%.txt in the directory I specified!
This is the bpel process write:
<invoke name="Invoke_Write" partnerLink="WriteFile" portType="ns2:Write_ptt" operation="Write" inputVariable="Invoke_Write_Write_InputVariable"/>
This is the write.wsdl:
<definitions
name="Write"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/file/Write/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/file/Write/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:imp1="http://TargetNamespace.com/Write"
xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/file/"
>
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/file/" location="fileAdapterOutboundHeader.wsdl"/>
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" >
<import namespace="http://TargetNamespace.com/Write" schemaLocation="schema_1.xsd" />
</schema>
</types>
<message name="genstep_msg">
<part name="genstep" element="imp1:genstep"/>
</message>
<portType name="Write_ptt">
<operation name="Write">
<input message="tns:genstep_msg"/>
</operation>
</portType>
<binding name="Write_binding" type="tns:Write_ptt">
<jca:binding />
<operation name="Write">
<jca:operation
PhysicalDirectory="C:\prova"
InteractionSpec="oracle.tip.adapter.file.outbound.FileInteractionSpec"
FileNamingConvention="po_%SEQ%.txt"
OpaqueSchema="false" >
</jca:operation>
<input>
<jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
</input>
</operation>
</binding>
<service name="Write">
<port name="Write_pt" binding="tns:Write_binding">
<jca:address location="eis/FileAdapter" />
</port>
</service>
<plt:partnerLinkType name="Write_plt" >
<plt:role name="Write_role" >
<plt:portType name="tns:Write_ptt" />
</plt:role>
</plt:partnerLinkType>
</definitions>
Thanks,
Ema

Similar Messages

  • How to read/write a binary file from/to a table with BLOB column

    I have create a table with a column of data type BLOB.
    I can read/write an IMAGE file from/to the column of the table using:
    READ_IMAGE_FILE
    WRITE_IMAGE_FILE
    How can I do the same for other binary files, e.g. aaaa.zip?

    There is a package procedure dbms_lob.readblobfromfile to read BLOB's from file.
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#sthref3583
    To write a BLOB to file you can use a Java procedure (pre Oracle 9i R2) or utl_file.put_raw (there is no dbms_lob.writelobtofile).
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1559124855641433424::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6379798216275

  • How can I write to data file only near to SW Trigger samples?

    Hi everyone
    I am working on a model based in this one:
    http://zone.ni.com/devzone/cda/epd/p/id/34#0requir​ements
    I would like to save the data once the trigger is reached, with some data near to the impact.
    Where should I place a "write to measurement file" block in order to may load and plot the data of an impact test?
    Regards.
    Solved!
    Go to Solution.

    Celuti,
    You are so close!
    I am glad to see you understood what I recommended!
    You need to ensure that you connect the same data type to the Queue as what is coming from the DAQ.
    Please see the modified version of the code you posted.
    Craig
    CLD | CTD
    LabVIEW 2011 SP1 | TestStand 4.5
    Attachments:
    daqmx_sw_trigger_example (modified).zip ‏93 KB

  • Gui_download, not able to write to the file

    Hello all,
    I am testing file I/O....and have following code:
    parameters filename(128) default 'd:\test1.txt'.
    data fname type string.
    fname = filename.
    Data itab2 like sflight occurs 10 with header line.
    Select * from sflight into itab2 where carrid = 'SQ'.
    *loop at itab2.
    write : / itab2-carrid,
              itab2-connid,
              itab2-fldate,
              itab2-price.
    endselect.
    *endloop.
    *itab2-carrid = 'LH'.
    *itab2-connid = '23'.
    Call function 'GUI_DOWNLOAD'
    exporting
    filename = fname
    filetype = 'ASC'
    WRITE_FIELD_SEPARATOR = 'X'
    tables
    data_tab = itab2
    exceptions
    file_open_error = 1
    others = 2.
    case sy-subrc.
    when 1.
    write 'Error when file Opened'.
    exit.
    when 2.
    write 'error during data transfer'.
    exit.
    endcase.
    The issues is that...file gets created but there is nothing in the file.  Any ideas what is wrong here...
    Thanks in advanced.

    Hi J Are,
    Try as follows.
    Select * from sflight into itab2 where carrid = 'SQ'.
    *loop at itab2.
    write : / itab2-carrid,
    itab2-connid,
    itab2-fldate,
    itab2-price.
    <b>APPEND ITAB2.</b>
    endselect.
    Call function 'GUI_DOWNLOAD'
    exporting
    filename = fname
    filetype = 'ASC'
    WRITE_FIELD_SEPARATOR = 'X'
    tables
    <b>data_tab = itab2[]</b>
    exceptions
    file_open_error = 1
    others = 2.
    Thanks,
    Vinay

  • How to read from BLOB and Write to a file in user readable format.

    Hi,
         I am trying to read from a BLOB column and write the content to a file in user readable format. So far I was able to read the Blob column using dbms_lob, but not able to write to a file. Kindly let me know the method to do this.

    Hi, with this Java Code from Oracle Technet it's a easy thing:
    // classpath= /ORACLE/u01/app/oracle/product/10.2.0.3/jdbc/lib/ojdbc14.jar
    // Java SQL classes
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.Statement;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    // Oracle JDBC driver class
    import oracle.jdbc.OracleDriver;
    // Java IO classes
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    //Java Util classes
    import java.util.Properties;
    * This class demonstrates the Oracle JDBC 10g enhanced features for inserting
    * and retrieving CLOB data from the database. Using the new features, large
    * data of more than 32765 bytes can be inserted into the database using the
    * existing PreparedStatement.setString() and PreparedStatement.getString()
    * methods.
    public class ClobMan {
    /* Database Connection object */
    private Connection conn = null;
    /* Variables to hold database details */
    private String url = null;
    private String user = null;
    private String password = null;
    // Create a property object to hold the username, password and
    // the new property SetBigStringTryClob.
    private Properties props = new Properties();
    /* String to hold file name */
    private String fileName = null;
    * Default Constructor to instantiate and get a handle to class methods
    * and variables.
    public ClobMan(String fileName) {
    this.fileName = fileName;
    * Main runnable class.
    public static void main(String[] args) throws SQLException {
    // Instantiate the main class.
    ClobMan clobMan = new ClobMan(args[0]);
    // Load the Oracle JDBC driver class.
    DriverManager.registerDriver(new OracleDriver());
    // Load the database details into the variables.
    String dbUrl = "jdbc:oracle:thin:@pmol:1550:dbpmol";
    clobMan.url = dbUrl;
    clobMan.user = "gh10";
    clobMan.password = "secret";
    // Populate the property object to hold the username, password and
    // the new property 'SetBigStringTryClob' which is set to true. Setting
    // this property allows inserting of large data using the existing
    // setString() method, to a CLOB column in the database.
    clobMan.props.put("user", clobMan.user );
    clobMan.props.put("password", clobMan.password);
    clobMan.props.put("SetBigStringTryClob", "true");
    // Check if the table 'CLOB_TAB' is present in the database.
    //clobMan.checkTables();
    // Call the methods to insert and select CLOB from the database.
    //clobMan.insertClob();
    clobMan.selectClob();
    * This method will insert the data into a CLOB column in the database.
    * Oracle JDBC 10g has enhanced the existing PreparedStatement.setString()
    * method for setting the data more than 32765 bytes. So, using setString(),
    * it is now easy to insert CLOB data into the database directly.
    private void insertClob() throws SQLException {
    // Create a PreparedStatement object.
    PreparedStatement pstmt = null;
    try {
    // Create the database connection, if it is closed.
    if ((conn==null)||conn.isClosed()){
    // Connect to the database.
    conn = DriverManager.getConnection( this.url, this.props );
    // Create SQL query to insert data into the CLOB column in the database.
    String sql = "INSERT INTO clob_tab VALUES(?)";
    // Read a big file(larger than 32765 bytes)
    String str = this.readFile();
    // Create the OraclePreparedStatement object
    pstmt = conn.prepareStatement(sql);
    // Use the same setString() method which is enhanced to insert
    // the CLOB data. The string data is automatically transformed into a
    // clob and inserted into the database column. Make sure that the
    // Connection property - 'SetBigStringTryClob' is set to true for
    // the insert to happen.
    pstmt.setString(1,str);
    // Execute the PreparedStatement
    pstmt.executeUpdate();
    } catch (SQLException sqlex) {
    // Catch Exceptions and display messages accordingly.
    System.out.println("SQLException while connecting and inserting into " +
    "the database table: " + sqlex.toString());
    } catch (Exception ex) {
    System.out.println("Exception while connecting and inserting into the" +
    " database table: " + ex.toString());
    } finally {
    // Close the Statement and the connection objects.
    if (pstmt!=null) pstmt.close();
    if (conn!=null) conn.close();
    * This method reads the CLOB data from the database by using getString()
    * method.
    private void selectClob() throws SQLException {
    // Create a PreparedStatement object
    PreparedStatement pstmt = null;
    // Create a ResultSet to hold the records retrieved.
    ResultSet rset = null;
    try {
    // Create the database connection, if it is closed.
    if ((conn==null)||conn.isClosed()){
    // Connect to the database.
    conn = DriverManager.getConnection( this.url, this.props );
    // Create SQL query statement to retrieve records having CLOB data from
    // the database.
    String sqlCall = "SELECT rownum, name, sourcetext FROM t_source";
    pstmt= conn.prepareStatement(sqlCall);
    // Execute the PrepareStatement
    rset = pstmt.executeQuery();
    String rownum = null;
    String o_name =null;
    String clobVal = null;
    // Get the CLOB value from the resultset
    //java.io.BufferedWriter out = new java.io.BufferedWriter(new java.io.FileWriter("pr_all.sql"));
    while (rset.next()) {
    rownum = rset.getString(1);
         o_name = rset.getString(2);
         clobVal = rset.getString(3);
    System.out.println(" length: "+clobVal.length()+" "+o_name+" "+rownum);
         java.io.BufferedWriter out =
         new java.io.BufferedWriter(new java.io.FileWriter(o_name+".prc"));
         out.write(clobVal);
         out.newLine();
         out.write("/");
         out.newLine();
         out.newLine();
    out.flush();
    out.close();
    } catch (SQLException sqlex) {
    // Catch Exceptions and display messages accordingly.
    System.out.println("SQLException while connecting and querying the " +
    "database table: " + sqlex.toString());
    } catch (Exception ex) {
    System.out.println("Exception while connecting and querying the " +
    "database table: " + ex.toString());
    } finally {
    // Close the resultset, statement and the connection objects.
    if (rset !=null) rset.close();
    if (pstmt!=null) pstmt.close();
    if (conn!=null) conn.close();
    * Method to check if the table ('CLOB_TAB') exists in the database; if not
    * then it is created.
    * Table Name: CLOB_TAB
    * Column Name Type
    * col_col CLOB
    private void checkTables() {
    Statement stmt = null;
    ResultSet rset = null;
    try {
    // Create the database connection, if it is closed.
    if ((conn==null)||conn.isClosed()){
    // Connect to the database.
    conn = DriverManager.getConnection( this.url, this.props );
    // Create Statement object
    stmt = conn.createStatement();
    // Check if the table is present
    rset = stmt.executeQuery(" SELECT table_name FROM user_tables "+
    " WHERE table_name = 'CLOB_TAB' ");
    // If the table is not present, then create the table.
    if (!rset.next()) {
    // Table does not exist, create it
    stmt.executeUpdate(" CREATE TABLE clob_tab(clob_col CLOB)");
    } catch (SQLException sqlEx) {
    System.out.println("Could not create table clob_tab : "
    +sqlEx.toString());
    } finally {
    try {
    if( rset != null ) rset.close();
    if( stmt != null ) stmt.close();
    if (conn!=null) conn.close();
    } catch(SQLException ex) {
    System.out.println("Could not close objects in checkTables method : "
    +ex.toString());
    * This method reads the specified text file and, returns the content
    * as a string.
    private String readFile()
    throws FileNotFoundException, IOException{
    // Read the file whose content has to be passed as String
    BufferedReader br = new BufferedReader(new FileReader(fileName));
    String nextLine = "";
    StringBuffer sb = new StringBuffer();
    while ((nextLine = br.readLine()) != null) {
    sb.append(nextLine);
    // Convert the content into to a string
    String clobData = sb.toString();
    // Return the data.
    return clobData;
    }

  • Quickie: Write to measurement file VI, how to create new file?

    I am using the write to measurement file express VI in my code and I have wired into it a control that sets the location to save the measurement file
    The only problem is the measurement file has to exist first!! I cant for example, from the front panel, click the browse directory box, navigate to a folder and type in a name for the file. It just says file not found! Its like the file directory control is opening a file to save to, rather than creating a new file in that location
    How can I solve this?
    Solved!
    Go to Solution.

    Project attached
    If I go in browse options what do i do? Just chose new and existing files?
    Attachments:
    engine.zip ‏119 KB

  • How to write a CSV file in OSB

    Hi All,
    can any one tell me How to write a CSV file in OSB?
    Thanks.

    Hey, I couldnot find any xsl usage inside pipeline pair in the links given by you. Do you have any links that gives a sample example.I could not find any links with examples. I will send you a simple config jar demonstrating the use of XSLT resources/transformations.
    secondly should MFL doc replicate the name(s)of the nodes of the source xsd:I'm not sure If I understood your question.Can you please explain?
    Ex: My database schema looks like:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/AssetsPoll" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/AssetsPoll" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="CountriesCollection" type="CountriesCollection"/>
    <xs:complexType name="CountriesCollection">
    <xs:sequence>
    <xs:element name="Countries" type="Countries" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Countries">
    <xs:sequence>
    <xs:element name="countryId">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="countryName" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="40"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="regionId" type="xs:decimal" minOccurs="0" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    and the corresponding MFL that I have created gives this output
    <?xml version="1.0" encoding="windows-1252"?>
    <countriesCollection1>
    <Countries>
    <counrtyId>counrtyId</counrtyId>
    <country_name>country_name</country_name>
    <regionId>regionId</regionId>
    </Countries>
    <Countries>
    <counrtyId>counrtyId</counrtyId>
    <country_name>country_name</country_name>
    <regionId>regionId</regionId>
    </Countries>
    </countriesCollection1>
    Why I am asking this beacuse there is an error that i am getting:
    Jun 19, 2009 5:50:50 PM IST> <Error> <JCATransport> <BEA-381951> <JCA inbound r
    quest only invocation failed, exception: java.security.PrivilegedActionExceptio
    : com.bea.wli.sb.transports.TransportException: Binary to XML mfl transformatio
    failed for the MFL Resource Database-Jms-File/Database-File/MFLSample : null
    ava.security.PrivilegedActionException: com.bea.wli.sb.transports.TransportExce
    tion: Binary to XML mfl transformation failed for the MFL Resource Database-Jms
    File/Database-File/MFLSample : null..................................................
    Any help?
    Regards
    PS

  • I want a stamp to write to the file metadata and be able to display the result in windows explorer.

    I want a stamp to write to the file metadata and be able to display the result in windows explorer. I have read PDF Stamp Secrets and can write to Custom Metadata but don't know how to display that custom field in explorer. Can I have the stamp write to a standard (non-custom) metadata field? Or, how do it get the custom field to display in explorer? Windows is pretty stingy with the file details it displays for PDF files, in fact there are no editable fields provided (like are available for Office files).   I want this to work for multiple users hopefully without having to get the IT group involved to make (or allow) system modifications to make this work. Any ideas? Thank you.

    Metadata for Windows Explorer is tagged with different names than the metadata for PDFs. Acrobat cannot copy the metadata to the tagged items of the file header.
    There are tools like EXIFTool that can manipulate the data as necessary. Phil Harvey also provides the details about the file types and their metadata tags and values so you should be able to map the tags that need to be updated.

  • Write to text file qeustion

    Hello all,
    My first question about writing to text file is does the file need to be opened? i know you have the option to create, replace, open..., but does it need to be opened in order to properly write data to the file? Also if my application is running with a disk streaming file setup and i open the file that it is writing to will this cause an error or cause labview to lose control of the file and possibly stop writing to the file?
    Thank you,
    Matt

    Feel free to experiment.  Try writing to a file from multiple locations at once, and you'll see race conditions where data could be lost.
    The reason for the Open, Write, Close type of software is because generally you are in a loop continually writing to a file, and the extra overhead of a Open and Close can be limited to when the software starts and closes, instead of having to open a new reference and close it every time you want to write to the file.  Just open the reference once, work with it in a while loop, then close it once, must more efficient and better for applications that write many times to disk.
    Is it necessary?  No you can just use the Write to Text file giving it a path and data to write, but behind that function it will need to open and close the reference each time.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • How to populate column titles for y values when using Write to Measurement File Express VI with a tab delimited text-based .lvm file?

    The .lvm file generated by the Write to Measurement File Express VI includes column heading titles for the y values, but they are a default value of "untitled".  See attached example of a sample file when opened in Excel, the values in question are highlighted.  Is there a way to specify the column titles when the file is written?
    This is a similar question to this posting, which received a work around response to use the Write to Spreadsheet File.vi, rather than a solution when using this VI.
    Message Edited by Hightop Raven on 05-02-2007 03:37 PM
    Attachments:
    column_titles.gif ‏13 KB

    Sorry for the late reply.  I was out of the office Friday.
    You can do it, but the code can get rather ugly.  Under the hood, the dynamic data type (the dark blue wire) is an array of waveforms.  In your case, the scalar values you convert to a dynamic data type are being converted to an array of waveforms, each waveform having one element.  You have two options.
    Explicitly convert your scalars to one-element waveforms (t0=0, dt=1) and add the title before conversion to a dynamic data type.
    Convert your dynamic data type to an array of waveforms and loop through them to add the column labels.  The conversion blocks are in the Signal Manipulation Express palette.
    I would recommend 2, since it is the easiest to add.  It is also the easiest to run only on the first iteration.  Just put a case selector around the loop, wire the selection to the While loop iterator, and set the case containing the label code to 0.  The default case simply passes through the dynamic data.
    My apologies for not including a screen shot.  I am in the process of upgrading my machine and can't run LabVIEW.  If you need one, let me know and I can post one tomorrow.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • How to view waveforms in DIAdem that were saved in Labview using "write waveforms to file" VI

    I'm new to DIAdem but would appreciate any help to my question.
    I seem to be having a little trouble but how do I view waveforms
    in DIAdem that were saved in Labview using "write waveforms to file" VI??
    tks, Terry

    Hello,
    There are several ways to write waveform data from LabVIEW so it can be accessed from DIAdem. Two of the easiest ways are to use either .lvm files or .tdm files. You can write .lvm files using the Write LabVIEW Measurement File.vi which is located in the File I/O palette. You can write .tdm files by using the storage VIs which are located in the File I/O >> Storage palette. So, I would recommend using either of these file formats if you are developing a new application since these can be loaded into DIAdem directly.
    If you are interested in loading files that where already created from the Write Waveforms to File.vi, I am wondering what file type you are using. For example are you saving your files as .dat or .txt with your Write Waveforms to File.vi? Feel free to reply to this thread with this information and I would be glad to help you out.
    Regards,
    Kevin L.
    Applications Engineer
    National Instruments

  • UTL_FILE - Write to a file on a mapped network drive

    Hello,
    I am trying to get the UTL_FILE package to write a file to a mapped network drive on
    Windows NT. We have the following definition in the init<SID>.ora file pointing to the
    network drive:
    UTL_FILE_DIR=v:\hawkrpt
    Here is the code to write to the file:
    CREATE OR REPLACE PACKAGE pkgUtlFileTest AS -- package spec
    PROCEDURE isp_UtlFileTest ( vcDir IN VARCHAR2,
    vcFileName IN VARCHAR2,
    vcOpenType IN VARCHAR2,
    vcMessage1 IN VARCHAR2 );
    END pkgUtlFileTest;
    CREATE OR REPLACE PACKAGE BODY pkgUtlFileTest AS -- package body
    PROCEDURE isp_UtlFileTest ( vcDir IN VARCHAR2,
    vcFileName IN VARCHAR2,
    vcOpenType IN VARCHAR2,
    vcMessage1 IN VARCHAR2 ) IS
    -- vcDir is the utl file directory
    -- vcOpenTpye is the open type a = append, w = write or r = read
    -- vcFileName is any file name you want.
    -- vcmessage is the entry you want placed into the file
    vcUtlFile UTL_FILE.FILE_TYPE;
    BEGIN
    IF LOWER(vcOpenType) = 'a' OR LOWER(vcOpenType) = 'w' THEN
    vcUtlFile := UTL_FILE.FOPEN(vcDir, vcFileName, vcOpenType);
    UTL_FILE.PUT_LINE(vcUtlFile, vcMessage1);
    UTL_FILE.FCLOSE(vcUtlFile);
    END IF;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.PUT_LINE('no_data_found');
    UTL_FILE.FCLOSE_ALL ();
    WHEN UTL_FILE.INVALID_PATH THEN
    DBMS_OUTPUT.PUT_LINE('UTL_FILE.INVALID_PATH');
    UTL_FILE.FCLOSE_ALL ();
    WHEN UTL_FILE.READ_ERROR THEN
    DBMS_OUTPUT.PUT_LINE(' UTL_FILE.READ_ERROR');
    UTL_FILE.FCLOSE_ALL ();
    WHEN UTL_FILE.WRITE_ERROR THEN
    DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
    UTL_FILE.FCLOSE_ALL ();
    WHEN UTL_FILE.INVALID_OPERATION THEN
    DBMS_OUTPUT.PUT_LINE('UTL_FILE.INVALID_OPERATION');
    UTL_FILE.FCLOSE_ALL ();
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('OTHER ERROR' );
    UTL_FILE.FCLOSE_ALL ();
    END isp_UtlFileTest;
    END pkgUtlFileTest;
    Here is the code to execute the stored procedure:
    Begin
    pkgUtlFileTest.ISP_UTLFILETEST('v:\hawkrpt','test.txt','w','This is a test');
    End;
    When the stored procedure is executed, the following error is returned:
    UTL_FILE.INVALID_OPERATION
    Can someone tell me how to get the UTL_FILE package to write a file to a network drive
    on a Windows NT server?
    Your help will be greatly appreciated!
    Mike

    Did you restart the database after changing the init.ora parameter? Make sure that you have this new value in v$parameter view.

  • Write to spreadsheat file

    LV 2014
    Experimenting with write to spreadsheet file, substep of larger project. 
    The problem seems to be the type of excel file. What file extension does "write to spreadsheet" want to see? I tried two ways that seem most likely. Each time I made a pre-existing excel file. Before running the vi, I pointed the file path to the excel file. I tried .xlsx and .xls
    .xlsx extension I cannot reopen the file after running the vi. It says the "file or file format is invalid". 
    .xls extension, I can open the file after running the vi, but there is a warning that says "The file you are trying to open [file name], is in a different file format than specified by the extension".  Or, there is no warning when I open the file, but there is no data saved either. 
    Is there a preferred file extension? 
    Eventually I want to save thermocouple data from a 9211 4 Ch TC input, in a cDAQ single slot chassis. 
    Is write to spreadsheet a good way to log data. I've seen examples with "write to measurement file". I ran into trouble there, so wanted to avoid blue "helper" vi's. 
    Attachments:
    array - write to spreadsheat file.PNG ‏4 KB

    Thanks for replies everyone. 
    I should have mentioned I'm using LV 2014 Base. It doesn't have the Report Generation toolkit. 
    Yes, my dream is to double click and open the file in Excel. 
    I did more reading in the help under File I/O. I'm still discovering where all the help, examples, and tips and tricks are. 
    In LV Help, Contents, Fundamentals, File I/O, Spreadsheet Files, Creating Spreadsheet Files, it says: 
    Note  For Microsoft Excel files (.xlsx), use the Write to Measurement File Express VI to save the dynamic data you acquire to an Excel file.
    So maybe I should just get with the dynamic data type (some have called evil) and the Express VI, if it gets me to where I can double click the file open? I think there is an example. 
    I'm also going to need to open and close the file. It will save data for up to a year or more. And we'll access the file for short periods during data collection. One saved temperature per day. Will the Express VI allow me to close the file so we can open it? 

  • Can you write an avi file without using imaq

    Just curious if anybody has tried to write an avi file without using imaq vi's? So far I have only found sketchy info on the file format and am looking for some help on the file structure etc. Any references or example avi files with explanations of format would be most helpfull. Thanks in advance -

    Absolutely.......
    An AVI video file is actually structured in the same way as most Windows media files or RIFF files as they are generically known, thus the description below is applicable to for example WAV files etc.
    Thus the file always begins with the four byte code RIFF and continues to use this generic four byte coding known as FOURCC, four-character code or FCC throughout.
    There are then specific requirements for each different media content and the sections that must be included to define a valid file structure of the desired meadia type.
    Each section or 'CHUNK' is defined by an FCC (RIFF being the first) with facility to include additional FCC's as required. The FCC is followed by a length descriptor and then the data (just for fun the odd CHUNK does not quite fit this very general overview). These chunks then align to even word boundries so padding zeros are often inserted at the end of a CHUNK to make it all nice and neat.
    It is a requirement that software that does not recognise an additional custom CHUNK should ignore it, this is very easy as all you have to do is use the length descriptor to 'jump' over the CHUNK concerned.
    The following is an example from the 'CLOCK.AVI' found on windows computers for a number of years...
    RIFFjB AVI LISTΠhdrlavih8
    Here you can see the RIFF followed by a four byte length descriptor (4 Gigabytes), followed by various sub CHUNKS in this example the sub CHUNK is an AVI (note that it is actually 'AVI ' to conform to the FCC).
    So the CHUNK structure looks a bit like this:-
    RIFF ('AVI '
    LIST ('hdrl'
    'avih'()
    LIST ('strl'
    'strh'()
    'strf'()
    'strd'()
    'strn'()
    LIST ('movi'
    {SubChunk | LIST ('rec '
    SubChunk1
    SubChunk2
    ['idx1']
    For more information on all this you need to read the RIFF specification documentation on the MSDN website or on the MSDN Technet materials. Most of the stuff you will immediately locate will refer to the AVI file format as that is where most of the recent effort has been focused.

  • Write to excel file (into AL11 directory)

    Hi,
    I am able to loop an internal table and write to csv file in AL11 directory.
    But how to write to excel file instead of csv file. And how to format the excel file (for example, column B should be format to numeric and column E should format to date format), and are we able to put like red color on column C for example?
    Thanks in advance.

    Hi,
    You need to add the tab inbetween all the fields of internal table and upload to application server using
    OPEN DATASET
    TRANSFER
    CLOSE DATASET.
    to add the tab inbetween the fields..you can use this code....
    concatenete itb-field1 itab-field2......... into string seperated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    one exception whicle uploading data to the Application server you need to convert dec or currency field to char type otherwise it will give you short dump.

Maybe you are looking for

  • DBAdapter insert only operation issue

    Hi Gurus, I'm trying to create the BPEL SOA composite which is receive the input using File Adapter (file only containt 2 rows) and insert into database table using DBAdapter with Insert only operation using mediator. The data will be inserted to see

  • When will Lightroom 4 support tethering for Canon EOS 6D?

    Hi, all... The Canon 6D is not in the current list of supported cameras for tethering in Lightroom. When will Lightroom 4 support tethering for Canon EOS 6D? Thanks Steve

  • Uninstalling Photoshop CS3

    Even with all of the extremely helpful advice provided in these forums I reluctantly conclude that CS3 is not compatible with my new iMac. The problem I now have is that the Photoshop download doesn't even have an uninstall component. Asking it to re

  • SWF files stopped working Flash8

    Hi, I have uploaded my swf file to the web. It is a video clip . Some of the swf loads on the web (the text part) when I click a button, to load it, but the video does not show ? see page 2 of link below www.geocities/suddentlyisee.com I have load sw

  • Disk space is full, everything is starting not to work.

    My computer has been saying my startup disk is getting full for some time. I deleted basically every file, since I didn't have much on here anyways. I have my pictures, my itunes, and only a few word documents. I had thought that maybe my itunes was