How to load unicode data files with fixed records lengths?
Hi!
To load unicode data files with fixed records lengths (in terms of charachters and not of bytes!) using SQL*Loader manually, I found two ways:
Alternative 1: one record per row
SQL*Loader control file example (without POSITION, since POSITION always refers to bytes!)<br>
LOAD DATA
CHARACTERSET UTF8
LENGTH SEMANTICS CHAR
INFILE unicode.dat
INTO TABLE STG_UNICODE
TRUNCATE
A CHAR(2) ,
B CHAR(6) ,
C CHAR(2) ,
D CHAR(1) ,
E CHAR(4)
) Datafile:
001111112234444
01NormalDExZWEI
02ÄÜÖßêÊûÛxöööö
03ÄÜÖßêÊûÛxöööö
04üüüüüüÖÄxµôÔµ Alternative2: variable length records
LOAD DATA
CHARACTERSET UTF8
LENGTH SEMANTICS CHAR
INFILE unicode_var.dat "VAR 4"
INTO TABLE STG_UNICODE
TRUNCATE
A CHAR(2) ,
B CHAR(6) ,
C CHAR(2) ,
D CHAR(1) ,
E CHAR(4)
) Datafile:
001501NormalDExZWEI002702ÄÜÖßêÊûÛxöööö002604üuüüüüÖÄxµôÔµ Problems
Implementing these two alternatives in OWB, I encounter the following problems:
* How to specify LENGTH SEMANTICS CHAR?
* How to suppress the POSITION definition?
* How to define a flat file with variable length and how to specify the number of bytes containing the length definition?
Or is there another way that can be implemented using OWB?
Any help is appreciated!
Thanks,
Carsten.
Hi Carsten
If you need to support the LENGTH SEMANTICS CHAR clause in an external table then one option is to use the unbound external table and capture the access parameters manually. To create an unbound external table you can skip the selection of a base file in the external table wizard. Then when the external table is edited you will get an Access Parameters tab where you can define the parameters. In 11gR2 the File to Oracle external table can also add this clause via an option.
Cheers
David
Similar Messages
-
UNICODE data files with SQLLDR
how can i load UNICODE data files with SQLLDR.
my Oracle instance is on UNIX with NLS_CHARACTERSET WE8ISO8859P1.
I have .dat files extracted from SQL Server using bcp utility with -w option.
When i use -c option i'm not getting the european characters correctly like the a and e with 2 dots on top....
when i load UNICODE (-w) file with CHARACTERSET UTF8 in my control file, it doesnt go thru. Any solution for this ? Thanks !I just created a unicode textfile on windows with some westeuropean characters and imported it into we8iso8859p1 database on linux using controlfile parameter CHARACTERSET UTF16.
They got all properly converted.
As Justin mentioned, unicode on windows means generally UTF16 Little Endian.
Best regards
Maxim -
How to load a flat file with utf8 format in odi as source file?
Hi All,
Anybody knows how we can load a flat file with utf8 format in odi as source file.Please everybody knows to guide me.
Regards,
SaharCould you explain which problem are you facing?
Francesco -
SQL Loader - CSV Data file with carraige returns and line fields
Hi,
I have a CSV data file with occasional carraige returns and line feeds in between, which throws my SQL loader script off. Sql loader, takes the characters following the carraige return as a new record and gives me error. Is there a way I could handle carraige returns and linefeeds in SQL Loader.
Please help. Thank you for your time.
This is my Sql Loader script.
load data
infile 'D:\Documents and Settings\user1\My Documents\infile.csv' "str '\r\n'"
append
into table MYSCHEMA.TABLE1
fields terminated by ','
OPTIONALLY ENCLOSED BY '"'
trailing nullcols
( NAME CHAR(4000),
field2 FILLER,
field3 FILLER,
TEST DEPT CHAR(4000)
)You can "regexp_replace" the columns for special characters
-
How to load a flat file with lot of records
Hi,
I am trying to load a flat file with hundreds of records into an apps table. when i create the process and deploy it onto the console it asks for an input in an html form. why does it ask for an input when i have specified the input file directory in my process? is there any way around tis where in it just reads all the records from the flat file directly??is custom queues anyway related to what I am about to do?any documents on this process will be greatly appreciated.If any one can help me on this it will be great. thank you guys....After deploying it, do you see if it is active and the status is on from the BPEL console BPEL Process tab? It should not come up to ask for input unless you are clicking it from the Dashboard tab. Do not click it from the Dashboard. Instead you should put some files into the input driectory. Wait few seconds you should see the instances of the BPEL process is created and start to process the files asynchrously.
-
How to load several transformation files with a single action
Hi everybody,
We are loading data from BI cube into BPC cube. We are working on SAP BPC 7.0 version and we have designed several transformation files in order to load each key figure we need.
Now, we want to load all the transformation files executing only one action. Which one is the best way to do it?
We thought that it would be possible to build a single process chain, where we would call the target cube and all the transformation files. In this way, the administrator only has to execute once a package that would execute the process chain. We don't want the administrator to execute several times a package looking for the different transformation files.
How can we do it? Is there any example or document related to it?
Any idea out there?
Kind regards
Albert MasHI SCOTT,
I AM FACING A PROBLEM WHEN I RUN 2 ROUNDS IN ONE TRANSFORMATION FILE...
I need to distribute a source field in to BPC through making 2 conversion files... following is the data
Transformation file
*OPTIONS
FORMAT = DELIMITED
HEADER = YES
DELIMITER = ,
AMOUNTDECIMALPOINT = .
SKIP = 0
SKIPIF =
VALIDATERECORDS=YES
CREDITPOSITIVE=YES
MAXREJECTCOUNT=
ROUNDAMOUNT=
CONVERTAMOUNTWDIM=ZOUTPUT
*MAPPING
CATEGORY=*NEWCOL(ACT)
PAO=0COSTCENTER
TIME=0FISCYEAR
ZOUTPUT=0FUNDS_CTR
SIGNEDDATA=0DEB_CRE_LC
*CONVERSION
PAO=PAO_CONVER.XLS
ZOUTPUT=ZOUTPUT_CONVER.xls
*OPTIONS
FORMAT = DELIMITED
HEADER = YES
DELIMITER = ,
AMOUNTDECIMALPOINT = .
SKIP = 0
SKIPIF =
VALIDATERECORDS=YES
CREDITPOSITIVE=YES
MAXREJECTCOUNT=
ROUNDAMOUNT=
CONVERTAMOUNTWDIM=ZOUTPUT
*MAPPING
CATEGORY=*NEWCOL(ACT)
PAO=0COSTCENTER
TIME=0FISCYEAR
ZOUTPUT=0FUNDS_CTR
SIGNEDDATA=0DEB_CRE_LC
*CONVERSION
PAO=PAO_CONVER.XLS
ZOUTPUT=AMOUNT_CONVER.XLS
Conversion file 1 (PAO=PAO_CONVER.XLS)
EXTERNAL
INTERNAL
ID0001
F08001
ID0002
F08001
ID0003
F08001
DG0001
F08001
DG0002
F08001
Conversion file 2 (ZOUTPUT=ZOUTPUT_CONVER.xls)
ID0001
FX01
VALUE*1
ID0002
FX01
VALUE*1
ID0003
FX01
VALUE*.40
DG0001
FX02
VALUE*1
DG0002
FX02
VALUE*1
Conversion file 3 (ZOUTPUT=AMOUNT_CONVER.XLS)
EXTERNAL
INTERNAL
FORMULA
ID0003
FX02
VALUE*.60
I am getting the following error
[Start validating transformation file]
Validating transformation file format
Start validation transformation 1/2
Validating options...
Validation of options was successful.
Validating mappings...
Validation of mappings was successful.
Validating conversions...
Validation of the conversion was successful
Start validation transformation 2/2
Validating options...
Validation of options was successful.
Validating mappings...
Validation of mappings was successful.
Validating conversions...
Validation of the conversion was successful
Creating the transformation xml file. Please wait...
Transformation xml file has been saved successfully.
Begin validate transformation file with data file...
[Start test transformation file]
Validate has successfully completed
ValidateRecords = YES
Reject count: 0
Record count: 6
Skip count: 0
Accept count: 6
0COSTCENTER is not a valid command or column 0COSTCENTER does not exist in source
Validation with data file failed -
How to load a dat file data into CRM Application
Hi,
My sourcre file is .DAT File and I want load data in that .DAT file in CRM Application.
Is it Possible? if yes then how.
As this is urgent requirement please respond soon
Thanks in Advance
Raghu
Edited by: 869619 on Aug 10, 2011 1:39 AMHi Cesar,
I don't know if you have found a solution, but attached is a DLL built in VC that will read the text out of a file into a TestStand variable. The attached sequence file \SequenceFile1.seq contains a step type that is set to call the DLL responsible for reading the file. It reads the file specified under Step.FilePath and stores the data in Step.ReadData. Please let me know if this works for you. I have attached the source as well.
Regards,
Bob
Attachments:
ReadFile.zip 3628 KB -
How to load a data file? help!
I am developing a bean for JSF and JSP.
my directory is like this
WEB-INF
classes
wol
woldss.class
/data
hh.txt
in woldss.java, i would like to load hh.txt file.
my code:
private String fname= "/data/hh.txt";
URL url = this.getClass().getResource(fname);
if(url==null) System.out.println("File path:" + "Empty");
else System.out.println("File path:" + "not empty" );
String tempStr, token;
StringTokenizer st;
try{
InputStream is = url.openStream();
I tied many names of fname: /wol/data/hh.txt, wol/data/hh.txt, /data/hh.txt, data/hh.txt.
None is working!?
Help!!!!private String base_rom_path="/base/kana.rom";
try
BufferedReader in=new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(base_rom_path)));
String line="";
int i=0;
while ((line = in.readLine()) != null)
StringTokenizer st=new StringTokenizer(line);
base_kana_ogg=st.nextToken();
base_kana_roman[i]=st.nextToken();
i++;
in.close();
catch(IOException ioe){ioe.printStackTrace();}
That worked perfectly well. -
Flat file with fixed lengths to XI 3.0 using a Central File Adapter---Error
Hi
According to the following link
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
In Adapter Monitor I got the following error,
In sender Adapter,
Last message processing started 23:47:35 2008-10-25, Error: Conversion of complete file content to XML format failed around position 0 with java.lang.Exception: ERROR converting document line no. 1 according to structure 'Substr':java.lang.Exception: Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this
last retry interval started 23:47:35 2008-10-25
length 15,000 secs
some one help me out ?
Thanks
Ramfrom the blog you referenced -
<u> /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
<b>goto step 4</b>
<u>additional parameters</u>
add as the last entry
<recordset structure>.lastFieldsOptional Yes
e.g.,
Substr.lastFieldsOptional Yes -
Send a flat file with fixed lengths to XI 3.0 using a Central File Adapter?
Hello,
I'm wondering if someone have experience setting up conversion for different record structures. The example shown,
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter,
(in a greate way) only picture one kind of structure.
How should it be done if the file would contain
10Mat1
20100PCS
The first record structure has columns
ID(2),Material(10)
The second redcord structure has columns
ID(2),Quantity(3), Unit of messure (3)
Brgds
Kalle
Message was edited by: Karl BergstromThe configuration would be like follows:
Content Conversion Parameters:
Document Name: <your message type name>
Document Namespace: <your message type namespace>
Document Offset: <leave empty>
Recordset Name: <any name>
Recordset Namespace: <leave empty>
Recordset Structure: row1,,row2,
Recordset Sequence: any
Recordsets per Message: *
Key Field Name: ID
Key Field Type: String
Parameters for Recordset Structures:
row1.fieldNames ID,Material
row1.fieldFixedLengths 2,10
row1.keyFieldValue 10
row2.fieldNames ID,Quantity,UOM
row2.fieldFixedLengths 2,3,3
row2.keyFieldValue 20
Instead of row1 and row2 you can choose any name.
Regards
Stefan -
I have an input file, which is fixed length format. I need to configure the Sender File Adapter for a fixe length file(i.e each field length is available and I need to mention that in my sender file Adapter)
Can anyone suggest an appropriate blog, that explains my scenario.
(I searched this web and it keep on hanging)Hi Naveen
check these links
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
for sender conversion (check the sub links in this topic)
http://help.sap.com/saphelp_nw04/helpdata/en/0b/9a50465ccf84479e39a6d50c90fb3f/frameset.htm
and my reply to your previous post for idoc to flat file.
Regerds
Vishnu -
File with various field lengths non - fixed cardinalities problem
Hallo all,
we have the following problem.
we implemented a scenario as sown in this blog
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
but there is a problem.
If the file structure is declared as :
Header,1,Items,*
then the adapter does not even read the file from the directory (so I assume that for some reason the file structure is not as expected).
If on the other had the structured is declared as :
Header,1,Items,3
everything works.
Obviously though, this is not satisfying since we need variable cardinalities.
Any suggestions and help is appreciated
Thank you .Well, I will write the main tests we tried, in case that the situation could be cleared :
I have a specific file in a standard directory, called xi_input. The file is edited straight into that directory, so there can't be filename errors etc.
If the file is left empty :
Nothing happens . No message of any kind in sxmb_moni/monitoring xml messages .
If the file contains the following (data is random) , where 'H' is the key for the header and 'I' is the key for the items :
H 20060403 16 3 316001 kapou lalla morellala 20060403 F3 23
I 277101010 2
I 277101011 3
I 277101012 4
There are to cases :
if the file structure is declared as :
Header,1,Items,*
Then nothing happens .
If on the other had the structured is declared as :
Header,1,Items,3
everything works .
I guess there is now a more clear picture of the problem.
As for whether the file adapter does care about the file contents or not, I think that if the Message Protocol is "Message Content Conversion", then it does check the structure. -
Fixed record length with GUI_DOWNLOAD
Hi All,
In our current system we set global variables GLOBAL_FIXLEN_* by calling form SET_FIXLEN(SAPLGRAP). This allows us to create ASCII download files using function module WS_DOWNLOAD that have a fixed record length of 160 as required by the bank.
We are now going to a unicode system and WS_DOWNLOAD is being replaced by GUI_DOWNLOAD. How can I continue to create a fixed record length of 160 using this function module? I cannot find any similar GLOBAL_FIXLEN* variables in GUI_DOWNLOAD.
Thanks in advance for suggestions,
KirstenHi,
Kirsten,
I find form "set_trail_blanks" also not available in GUI_DOWNLOAD.
FYI
aRs -
Flat File with multiple record types (OWB 10.2.0.2)
Hi!
I`m using OWB 10.2.0.2 and I`m trying to load a flat file with multiple record types, using SQL LOADER.
In the flat file editor in the Record tab, I`ve set the type values and the corresponding record names like this:
Type Value Record Name
======== ===========
T TRAILER
0 DETAILS
1 DETAILS
2 DETAILS
When using this flat file in a mapping to load the data in a staging table, the generated code looks like this:
INTO TABLE TRAILER
TRUNCATE
REENABLE DISABLED_CONSTRAINTS
WHEN (1:1) = 'T'
INTO TABLE DETAILS
APPEND
REENABLE DISABLED_CONSTRAINTS
WHEN (1:1) = '0,1,2'
The above clause (WHEN (1:1) = '0,1,2') is wrong as I expect one "INTO TABLE..." clause for each record type.
Could this be a bug or am I doing something wrong?
Thanks a lot for your help,
YorgosWe`re using two target tables, one for the trailer record and the other for the details records.
We are facing this problem from the moment we upgraded from OWB 10.1 to OWB 10.2.0.2, so we think it must be something with the way the sql loader code is generated in the new version.
As our data sources are mainly flat files coming from mainframes, this is a huge problem for us. We even asked an expert in DW from Oracle to help us on this, but still haven`t found a solution.
Is there any workaround for this or should we forget sql loader and go with an external tables + custom PL/SQL code solution?
Your help is greatly appreciated Jean-Pierre.
Regards,
Yorgos -
I have written a routine that loads a Hex file, checks for record marker,length,address etc then loads the data into a table on front panel. However, my routine only loads single record hex files. I need to be able to load multiple record files, I need to identify the ':' colon record marker start for each record in the hex file, I just can't see how to loop my routine so that all records with ':' prefix marker are loaded.
Jeff,
I'm not exactly sure of what you are trying to do. Is it possible you could post your code, or a screen shot of the diagram in question, so that I can get a better understanding, and possibly offer some assistance?
I am familiar with hex files, but not with the : marker separating records. This may be able to be solved with simple text parsing, and as I am not familiar with how you are retrieving and/or displaying the files, I require more information.
Thanks
Maybe you are looking for
-
SAP & Crystal reports connectivity
Hi SAP Gurus, I'm facing a problem while connecting ABAP query & infoset from crystal reports. I've installed crystal reports 8.5 and also SAP crystal report enterprise add on. when i want to connect to sap system from crystal reports, it aunthentica
-
Connecting an external dvd player
is there any way of connecting an external (tv use) dvd player to an iBook G4? I understand the latter doesn't have video input...but are there adapter cables one could buy or something? any helpful clues would be much appreciated. thanks
-
Syntax for doing multiplication,division ,subtraction in xml
Hi Experts, I need help in coding this statement in xml . (No of units per case * price per consumable) / (end_date-start_date) Please help Thanks
-
Container ID field to list with the data from master in shipment header
Hi, While do the Shipment VT01N, Vehicle number (ZZ05XX1588) is added manually in the field of Container ID in Shipment. The requirement is vehicle number should be picked up from the list of possible entries with Vehicle master data. (IE01) If is it
-
Hi All, I created Output type through NACE transaction. When i was trying to assign that in tranx VF02>billing #->enter->goto>header--->output. Here i was trying to assigning my output type. I am getting error that 'Output type is not defined'. But w