How to write the output of a mapping into a file (OWB10.2
Hi
I am using Oracle 10.2.0.1 version of OWB.
the task is to write the output of a mapping into a File (Flat File).
Please help me out!
Regards
Abi
Hi,
Create the file format thru OWB and mention the location in OWB. Deploy the file and it will be ready to use for target load. Make sure the connection to the target loc is available.
Regards
Bharadwaj Hari
Similar Messages
-
How to capture the output of another program into a File/String
I needed to capture the output of a dos program in an String/file I tried doing Runtime.getRuntime.exec("ipconfig /all >tmp.txt");
but still I am unable to capture the output frm the program which I would like to capture in a file or String.Can anyone helpWhen you use the Runtime.exec() method, it returns a Process object, that process object has access to the streams; stdout, stdin, and stderr of the application you just executed. what you'll want to monitor is the stdout or stderr streams using the
p.getInputStream() or p.getErrorStream(), where p = the process object returned via the Runtime.exe() method. -
Procedure to save the output of a query into excel file or flat file
Procedure to save the output of a query into excel file or flat file
I want to store the output of my query into a file and then export it from sql server management studio to a desired location using stored procedure.
I have run the query --
DECLARE @cmd VARCHAR(255)
SET @cmd = 'bcp "select * from dbo.test1" queryout "D:\testing2.xlsx;" -U "user-PC\user" -P "" -c '
Exec xp_cmdshell @cmd
error message--
SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'user-PC\user'.
NULL
Goel.AmanHello,
-T:
Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security. The security credentials of the network user,
login_id, and password are not required. If
–T is not specified, you need to specify
–U and –P to successfully log in.
-U:
Specifies the login ID used to connect to SQL Server.
Note: When the bcp utility is connecting to SQL Server with a trusted connection using integrated security, use the
-T option (trusted connection) instead of the
user name and password combination
I would suggest you take a look at the following article:
bcp Utility: http://technet.microsoft.com/en-us/library/ms162802.aspx
A similar thread regarding this issue:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b450937f-0ef5-427a-ae3b-115335c0d83c/bcp-connection-error-sqlstate-28000-nativeerror-18456?forum=sqldataaccess
Regards,
Elvis Long
TechNet Community Support -
How to write the output of an SQL query to a text file?
I am using Oracle 11g and SQL plus.
I have a large table called rating.
Whenever I do
SQL> select * from rating;
The output goes much beyond what the SQL Plus screen can show. I want to therefore store the output of this query into a text file.
How can this be done? Please help. Thanks.SQL> SPOOL results.txt
SQL> select * from rating;
SQL> SPOOL OFF -
How to write the contents of string buffer to a file
hi all
how is it possible to write the contents of a string buffer to a new file (ie i have to create a file and write in it )
this my string buffer
StringBuffer s=new StringBuffer();
s.append("<html><head><title>Welcome</title>");
s.append("</head>");
s.append("<body>");
s.append("<b> Hello,");
s.append(output);
s.append(" You have been Sucessfully authenticated</b>");
s.append("</body></html>");
so please can anyone help mefor nice examples of how to do things you may look int [url http://javaalmanac.com]Java Almanac
or more specifficly: [url http://javaalmanac.com/egs/java.io/WriteToFile.html?l=find]Writin to a File
in case you don't know how to apply that example on your code, since you have StringBuffer instead of String, then look at [url http://java.sun.com/j2se/1.4.2/docs/api/]API Specification of [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html]StringBuffer, and see if there is some method like toString() or similar, that would help you convert your StringBuffer to a String. -
How to write the org.w3c.dom.Document into an XML file.
The file doesn't not exist. I have a class to form an XML Document object with giving parameters. And then how to write this Document object to an specialitied
file?The easiest way is to use a Transformer to do an default transform of the document from a DOMSource to a StreamResult.
something like
TransformerFactory tf = TransformerFactory.newInstance();
tf.setAttribute("indent-number", new Integer(4));
Transformer t = tf.newTransformer();
t.setOutputProperty(OutputKeys.INDENT, "yes");
t.setOutputProperty(OutputKeys.METHOD, "xml");
t.setOutputProperty(OutputKeys.MEDIA_TYPE, "text/xml");
t.transform(new DOMSource(yourDOMDocument), new StreamResult(new OutputStreamWriter(yourFileOutputStream))); -
How to spool the result of an query into a file in sql 2000
Hi All,
I have an SQL query which iterates through number of times for checking on some conditions and will return results each time. I wants to save the results into an different xml file each time. I tried using below query:
exec xp_cmdshell 'bcp "use Mimsadaptorlogs; select top 10 * from log order by logdate" queryout "D:\cdr_cg.xml" -T -c -t,' ---> Its not working as expected.
I got the Below output:
NULL
Starting copy...
SQLState = 01000, NativeError = 5701
Warning = [Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to 'MIMSAdaptorlogs'.
NULL
10 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.): total 62
NULL
Could you anuone please suggest me on this.......
Thanks and Regards, BalaYou will need to write a client program to do this. SQL Server is not intended for writing files. People still do it by calling BCP through xp_cmdshell, but this is a dubious practice. Better is to write a CLR stored procedure for the task. However, you
are on SQL 2000, and the CLR support was added in SQL 2005. Furthermore, there is no XML type in SQL 2000, and the only way to generate XML is with the FOR XML clause. But this output is not well understood by BCP. Then I try: [code} bcp "SELECT * FROM Northwind..Customers
FOR XML RAW" queryout slask.bcp -c -T [/code] on SQL 2000, I get [code] 11 rows copied. [/code] which is complete hogwash, because there are 91 rows in that table, and the output should be a single XML document, and the output looks like this: [code] <row
CustomerID="ALFKI"... Bouchers" City="Marseil... tomerID="DUMON" Company... 0.32.21.21" Fax="40.32.... los Hern ndez" ContactT... n Steel" ContactTitle="... e" ContactTitle="Market... ="Salzburg" PostalCode=... " Phone="(21) 555-3412"... ty="Charleroi" PostalCo...
<row CustomerID="WARTH"... [/code] I have truncated the output on the right side, but the left side is authentic. It really is that bad.
Erland Sommarskog, SQL Server MVP, [email protected] -
I create a UID list for textframe, and I add Some extra properties the textframe, now I want store these properties into INDD file , and expecte to restore these properties from INDD file again when
I open the it again . anyone could tell me how to do this ,thanks in advance.Why don't you save the properties on the textframes itself by adding a of a persistent interface on the textframes. This way you will be able modify/restore(based on the persisted values) textframes each time the document is opened. Refer to BasicPersistence sample plugin to get an idea on how persistence works in InDesign. Also regarding restoring the UID, i don't quite get the need for it. Every object(well most of them) in InDesign has a unique ID which is called UID, this is allocated automatically and remains the same between document open sessions. I can't see any circumstance where we have a need to apply a particular UID to a particular object.
Hope this info helps
Thanks,
Manan -
How to write the table content of JSP to a file
Hi there,
i have a JSP which displays data in table format.
i need to copy the data of the table( columns with comma separated and rows with line breaks).
on Mouse click of an hyper link or Button i need to perform the above action.
as i found java script wont support writing files to hard drive, i expecting help from you guys
for the solution.
Thanks and regards
RLoveOpensource wrote:
Hi thanks for your reply
i am using struts
and
i am displaying the table using
<logic:iterate can you please tell me how to implement your method on my code
my complete code for generating the table is
<table id="tbl" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><h4>LPCDealName</h4></td>
<td><h4>IntexDealName</h4></td>
</tr>
<logic:iterate id="rows" property="table" indexId="rowCount" name="LPCIntexActionForm">
<tr >
<logic:iterate id="row" indexId="colCount" name="rows" length="2">
<td><bean:write name="row" /></td>
</logic:iterate>
<td><a href="">Modify the Mapping</a></td>
</tr>
</logic:iterate>
</table>
<% File log = CreateLog(); %>
//this one for calling method
//this one for printing data in log file
<% p.println(LPCDealName);
p.println(IntexDealName); %> -
How to get the output of a program into the email program.
hi
i had created a java mail program and the keygeneration program.seperately.
i want to get the keygeneration into my email program.that should be sent along with the text message.so pls help me in this regared.
i had pasted my coding her
email pgm.
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
To use this program, change values for the following three constants,
SMTP_HOST_NAME -- Has your SMTP Host Name
SMTP_AUTH_USER -- Has your SMTP Authentication UserName
SMTP_AUTH_PWD -- Has your SMTP Authentication Password
Next change values for fields
emailMsgTxt -- Message Text for the Email
emailSubjectTxt -- Subject for email
emailFromAddress -- Email Address whose name will appears as "from" address
Next change value for "emailList".
This String array has List of all Email Addresses to Email Email needs to be sent to.
Next to run the program, execute it as follows,
SendMailUsingAuthentication authProg = new SendMailUsingAuthentication();
public class SendMailUsingAuthentication
private static final String SMTP_HOST_NAME = "smtp.mail.yahoo.com";
private static final String SMTP_AUTH_USER = "xxxx";
private static final String SMTP_AUTH_PWD = "xxxx";
//private static final String emailMsgTxt = "Online Order Confirmation Message. Also include the Tracking Number.";
private static final String emailSubjectTxt = "Order Confirmation Subject";
private static final String emailFromAddress = "[email protected]";
private static String emailMsgTxt = "I am unable to attend to your message, as I am busy sunning"
+ "myself on the beach in Maui, where it is warm and peaceful."
+ "Perhaps when I return I'll get around to reading your mail."
+ "Or perhaps not.";
private static final String[] emailList = { "[email protected]","[email protected]"};
public static void main(String args[]) throws Exception
SendMailUsingAuthentication smtpMailSender = new SendMailUsingAuthentication();
smtpMailSender.postMail( emailList, emailSubjectTxt, emailMsgTxt, emailFromAddress);
System.out.println("Sucessfully Sent mail to All Users");
public void postMail( String recipients[ ], String subject,
String message , String from) throws MessagingException
boolean debug = true;
Properties props = new Properties();
props.put("mail.smtp.host", SMTP_HOST_NAME);
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "25");
props.put("mail.smtp.protocol","smtp");
props.put("mail.debug", "true");
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getDefaultInstance(props, auth);
session.setDebug(debug);
// create a message
Message msg = new MimeMessage(session);
// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);
InternetAddress[] addressTo = new InternetAddress[recipients.length];
for (int i = 0; i < recipients.length; i++)
addressTo[i] = new InternetAddress(recipients);
msg.setRecipients(Message.RecipientType.TO, addressTo);
// Setting the Subject and Content Type
msg.setSubject(subject);
msg.setContent(message, "text/plain");
Transport.send(msg);
private class SMTPAuthenticator extends javax.mail.Authenticator
public PasswordAuthentication getPasswordAuthentication()
String username = SMTP_AUTH_USER;
String password = SMTP_AUTH_PWD;
return new PasswordAuthentication(username, password);
keygeneration program:
import java.io.Serializable;
import java.security.Security;
import com.sun.net.ssl.*;
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
public class Eval {
public static void main(String args[]) throws Exception {
String inputString ="0x0b0b0b0b";
KeyGenerator keyGen = KeyGenerator.getInstance("HMACMD5");
SecretKey secretKey = keyGen.generateKey();
Mac mac = Mac.getInstance(secretKey.getAlgorithm());
mac.init(secretKey);
byte[] byteData = inputString.getBytes("UTF8");
byte[] macBytes = mac.doFinal(byteData);
String macAsString = new sun.misc.BASE64Encoder().encode(macBytes);
System.out.println("Authentication code is: " + macAsString);I'm not sure what's confusing you. Just generate a String (using a StringBuffer)
with the data you need and use it as the content of the mail message. If each
recipient needs different content, they'll each need a different MimeMessage
object. -
How to write the map expression for a const string
hi all,
i am trying to map from source table A to target table B. Table B has a column that A doesn't have and the column type is string.
what should i do if i want to keep this column a const string like "abc"? How to write the map expression?
Setting a default value like "abc" of this column in database is not available .
please try to help, thanks a lot.
junHi jun,
You mean, u want to give some hard coded value to a specific column in mapping?
If so , give 'abc' in the target column and execute it on Target.
Thanks,
Guru -
How to write the code to send the report output to the local file.
dear all,
how to write the code to send the report output to the local file.
Thanks & Regards,
Jyothi.Hi,
Try this , it will display report and download the file as well. Just vhange the path and execute
TYPE-POOLS : SLIS.
DATA : IT_SCARR TYPE TABLE OF SCARR,
IT_FCAT TYPE SLIS_T_FIELDCAT_ALV.
SELECT *
FROM SCARR
INTO TABLE IT_SCARR.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
* I_PROGRAM_NAME =
* I_INTERNAL_TABNAME =
I_STRUCTURE_NAME = 'SCARR'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = IT_FCAT
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
* I_CALLBACK_PROGRAM = ' '
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_STRUCTURE_NAME =
* IS_LAYOUT =
IT_FIELDCAT = IT_FCAT
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IR_SALV_LIST_ADAPTER =
* IT_EXCEPT_QINFO =
* I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_SCARR
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
* BIN_FILESIZE =
FILENAME = 'C:\Documents and Settings\sap\Desktop\Hi.xls' " Change path
* FILETYPE = 'ASC'
* APPEND = SPACE
* WRITE_FIELD_SEPARATOR = SPACE
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = SPACE
* WRITE_LF = 'X'
* COL_SELECT = SPACE
* COL_SELECT_MASK = SPACE
* DAT_MODE = SPACE
* CONFIRM_OVERWRITE = SPACE
* NO_AUTH_CHECK = SPACE
* CODEPAGE = SPACE
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = SPACE
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* IMPORTING
* FILELENGTH =
CHANGING
DATA_TAB = IT_SCARR
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* NOT_SUPPORTED_BY_GUI = 22
* ERROR_NO_GUI = 23
* others = 24
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
EXPORTING
DOCUMENT = 'C:\Documents and Settings\sap\Desktop\Hi.xls' "Change path
* APPLICATION =
* PARAMETER =
* DEFAULT_DIRECTORY =
* MAXIMIZED =
* MINIMIZED =
* SYNCHRONOUS =
* OPERATION = 'OPEN'
* EXCEPTIONS
* CNTL_ERROR = 1
* ERROR_NO_GUI = 2
* BAD_PARAMETER = 3
* FILE_NOT_FOUND = 4
* PATH_NOT_FOUND = 5
* FILE_EXTENSION_UNKNOWN = 6
* ERROR_EXECUTE_FAILED = 7
* SYNCHRONOUS_FAILED = 8
* NOT_SUPPORTED_BY_GUI = 9
* others = 10
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to get the output of a procedure in to a log file ?
Hi, Everyone,
Could you please tell me
How do i write the output of a procedure to a log file ?
Thanks in advance...Hi,
could you please explain me more on how to use the UTL_file to get the output to a log file as in am new to PL/SQL
my script file is
EXEC pac_sav_cat_rfv.pro_cardbase (200910,'aaa',100,'test_tbl');
i need the output of this statement in a log file.
Could you please explain to me how it can be done.
thanks in advance -
Sun ONE Studio 4 aka Forte: How to set the output path for classes ?
Help !
Beginner's question:
Sun ONE Studio 4 aka Forte:
How to set the output path for classes ?
As default, the class files are created in the same directory as the
sources.
In opposite, both JBuilder and Together support that there is a tree
with the sources and another tree with the classes.
The first answer I got was "not possible with Forte, but just if you write your own "ANT Build script" !
a) Please point me to a ready-to-use ANT script for this purpose, if such is available
b) Is using ANT instead of the MAKE as comfortable ? Besides the separation of sourcecode and classes, I would like to keep everything else to be the same, i.e. I don�t want to edit the ANT file if I enlarge the project by directories or files.
Tia
Sincerely
RolfYou can set S1S's options to place newly created .class files in a specific location.
Identify the compiler that is being used - Open the S1S's Tools/Options window, expand Editing and select Java Sources. Note the Default Compiler value. (If it's one if the Ant options, you use Ant to specify this option, not S1S.)
Open the S1S's Tools/Options window, expand Building/Compiler Types and select the appropriate compiler.
The Properties tab of the compiler has the property Target, which sets the filesystem where the compiler output is directed. If you choose <not set>, the .class files are written to their source directory.
When you set the Target, your change affects all classes that use this compiler.
Very few options can't be set in S1S; the challenge is finding out where they're set! -
How to write an output of a VI/exe to command line before quitting
how to write an output of a VI/exe to command line or standard output before exiting the program
You can use "System Exec.vi" in the Communication pallete. (6.1 and 7.0)
Daniel L. Press
PrimeTest Corp.
www.primetest.com
Maybe you are looking for
-
I upgraded recently my firefox browser on my home computer which still runs Windows XP. I can no longer find websites thru firefox, tho, I can load websites through a google or yahoo search. The firefox browser won't download secure or unsecure site.
-
Need help on exact SIDs generation in different SID tables (S,Q & Y tables)
I have a scenario like.. Matgroup is a time-dependent attribute to Material. MatGroup is included in material dimension of cube C01. Cube C01 is loading with transactional data, which has both fields, Material and MatGroup, with the option of generat
-
Information is lost after redeployment of SAPMEINT - which workaround?
Hello! After redeployment of SAPMEINT I noticed that some information concerning the SAMEINT MII webservices gets lost. I corrected this information manually afterwards - the information can be found in the old SAP ME 5.2 documentation (pre SP05). Wh
-
Photoshop sign in - signup required
Hi - I pay my subscription every month and have not made any changes to it. I have launched Photoshop CC and it asks me to sign up for a free trial, which is obviously wrong. When I sign in, it tells me to enter a serial. This is really frustrating a
-
I am unable to access my email through Firefox. All other bookmarks respond.
I am unable to access my email account through Firefox. All other bookmarks respond correctly.