Problems with Concatenating Binary Data

Hi
I am experiencing a problem with the unreliable concatenation of binary data.
I have a stored procedure that I wrote to perform cell encryption on long text fields (> 4000 characters in length). This takes the string, splits it into chunks of a set length, encrypts and concatenates the encrypted chunks into a varbinary(max) variable.
It then stores the length of the encrypted chunk at the beginning of the data (the length of output when encrypting strings of a set length is always be the same), e.g.
DECLARE @output VARBINARY(MAX), @length INT
SELECT @length = LEN(@encryptedchunk1)
SELECT @output = CONVERT(binary(8), @length) + @encryptedchunk1 + @encryptedchunk2 + @encryptedchunk3 + ...
So far so good, and when I decrypt the data, I can read the first 8 bytes of data at beginning of the binary data to get the length of the chunk:
-- get the length of the encrypted chunk
SELECT @length = CONVERT(INT, CONVERT(binary(8), LEFT(@encrypteddata, 8)))
-- then remove the first 8 bytes of data
SELECT @encrypteddata = CONVERT(VARBINARY(MAX), RIGHT(@encrypteddata, LEN(@encrypteddata) - 8))
<snip> code to split into chunks of length @length and decrypt
</snip>
This is where I am experiencing an issue. 99.4% of the time, the above code is reliable. However, 0.6% of the time this fails for one of two reasons:
the length is stored incorrectly. The length of the encrypted chunks is usually 4052 and substituting 4052 for the returned value (4051) allows the encrypted chunks to be decrypted.
the encrypted data sometimes starts at offset 8 instead of 9. The @length variable is correctly read at length 8 but only 7 bytes should be removed from the start, e.g.
SELECT @length = CONVERT(INT, CONVERT(binary(8), LEFT(@encrypteddata, 8)))
SELECT @encrypteddata = CONVERT(VARBINARY(MAX), RIGHT(@encrypteddata, LEN(@encrypteddata) - 7))
Has anyone any ideas on why this is happening and how the process can be made more reliable?
Julian

Use datalength, not len. Len() is designed for character strings and will ignore trailing bytes. And count characters. Datalength does exactly what you want: it counts bytes. Look at this:
DECLARE @b varbinary(200)
SELECT @b = 0x4142434420202020
SELECT @b, len(@b), datalength(@b)
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • How can I debug a problem with the 3g data connection on my iPhone 4s?

    This question didn't get any answers in the "Using iPhone" forum. Thought I would re-ask here. Note, I had to reset the network again today 2 days after the last reset:
    I've been having intermittent problems with my 3g data connection on my iPhone 4s on ATT. Whenever this happens I see full bars etc, but can't browse from safari or get any data in other apps. My wife's iPhone 4 right next to me has no issues at all. Switching on/off airplane mode and turning off/on Cellular Data does not help. The only thing that helps is resetting the Network Settings or hard restarting the phone.
    I figured my problems were hardware related so I took my phone in for a replacement the other day. Things started out fine but after I upgraded it to 5.01 and restored my backup and now I am back to having the same issue today. I assume the issue is with something coming from my backup / restore but is there any way for me to pinpoint what could be causing the issue. I have a lot of apps, I'd rather not have to reinstall and set them all backup manually, but I would if I knew that would fix the problem... but for all I know one of the apps could be causing it.
    Anyone have any logs I can check or testing I can do on my end?
    Thanks!

    Unfortunately, Apple does not make any logs available to the average schmoe (like us) for networking, kernel dumps, or anything else (assuming, of course, it is not jailbroken).
    Your best bet is to take it back into the store. Ask them to look at the notes in GCRM regarding the last time this occured, then explain after upgrading to 5.01 it is occuring again. Then ask them for a phone swap since it is a reoccuring issue and doesn't sound like an OS/SW issue. Good luck!

  • Problem with displaying chart data

    Hello everybody,
    I have problem with displaying chart data correctly. I'm using a cartesian chart with DateTimeAxis. The stockdata I'm using is for half a year and
    with ticks for every day. The problem is, that Flex displays the data of february in march together with the data of march. I have added a picture
    to show the result. The second column of the grid is for february and the third for march.
    Could anybody help me with this problem. Thanks in advance.
    Thomas

    Hi Chris,
    thanks for your reply. Here you get the source code:
    The following method creates the LineChart:
            public function init():void
                model.upperChart = this;
                model.upperChartStyle.setChartViewStyle(this);
                this.hAxis = new MyDateTimeAxis();
                model.upperChartData.configureHAxis(this.hAxis);
                this.vAxis = new LinearAxis();
                model.upperChartData.configureVAxis(this.vAxis);           
                this.vAxisTitle = new Label();
                this.vAxisTitle.text = model.upperChartData.getVAxisTitle();
                model.upperChartStyle.setVAxisTitleLabelStyle(this.vAxisTitle);
                this.vAxisTitle.x = 10
                this.vAxisTitle.y = 0;
                this.addChild(this.vAxisTitle);
                this.myChart = new CartesianChart();
                //remove default datatip
                this.myChart.showDataTips = false;
                this.myChart.x = 10;
                this.myChart.y = 0;
                this.myChart.width = 768; 
                this.myChart.height = 196;
                model.upperChartStyle.setChartStyle(this.myChart);
                this.addChild(this.myChart);
                //Remove line shadow
                this.myChart.seriesFilters = null;
                this.myChart.horizontalAxis = this.hAxis;
                this.myChart.verticalAxis = this.vAxis;
                this.hAxisRenderer = new AxisRenderer();
                model.upperChartData.configureHAxisRenderer(this.hAxisRenderer);
                this.hAxisRenderer.axis = this.hAxis;        
                model.upperChartStyle.setHAxisRendererStyle(this.hAxisRenderer);
                this.myChart.horizontalAxisRenderers.push(this.hAxisRenderer);
                this.vAxisRenderer = new AxisRenderer();
                model.upperChartData.configureVAxisRenderer(this.vAxisRenderer);
                this.vAxisRenderer.axis = this.vAxis;
                model.upperChartStyle.setVAxisRendererStyle(this.vAxisRenderer);
                this.myChart.verticalAxisRenderers.push(this.vAxisRenderer);
                model.upperChartStyle.setVAxisDataLabelStyle(this.vAxisMinLabel);
                this.addChild(this.vAxisMinLabel);   
                model.upperChartStyle.setSeriesStyle(model.upperChartData.series, model.upperChartData.shares);           
                this.myChart.dataProvider = model.upperChartData.dataProvider;
                this.myChart.series = model.upperChartData.series;
    The data for dataprovider and series you can see in attached file dataprovider.xml.
    xfield is equivalent to timestamp
    yfield is equivalent to absolute
    I think the problem could be the configuration of the datetimeaxis. The following method shows the parameter for the datetimeaxis:
            public function configureHAxis(axis:MyDateTimeAxis):void
                axis.parseFunction = UtilityClass.parseYYYYMMDDHHNNSSString2Date;
                axis.dataUnits = "days";
                axis.dataInterval = 1;
                axis.title = "";
                axis.minimum = new Date(UtilityClass.parseYYYYMMDDHHNNSSString2Date("2009-01-07 00:00:00").time);
                axis.maximum = new Date(UtilityClass.parseYYYYMMDDHHNNSSString2Date("2009-07-06 00:00:00").time);
    And finally you get the function, that I'm using for string to date conversion:
            public static function parseYYYYMMDDHHNNSSString2Date(input:String):Date
                var result:Date = new Date();
                var year:Number = Number(input.substring(0,4));
                var month:Number = Number(input.substring(5,7));
                var date:Number = Number(input.substring(8,10));
                var hours:Number = Number(input.substring(11,13));
                var minutes:Number = Number(input.substring(14,16));
                var seconds:Number = Number(input.substring(17,19));           
                result.setUTCFullYear(year);
                result.setUTCMonth(month-1);
                result.setUTCDate(date);
                result.setUTCHours(hours);
                result.setUTCMinutes(minutes);
                result.setUTCSeconds(seconds);
                return result;           
    I hope that will help to locate the reason for the wrong chart visualization.
    Thanks for any help.

  • Encoding problem while reading binary data from MQ-series

    Dear all,
    we are running on 7.0 and we have an encoding problem while reading binary data from MQ-series. Because we are getting flat strings from queue we use module "Plain2ML" (MessageTransformBean) for wrapping xml-elements around the incoming data.
    The MQ-Series-Server is using CCSID 850, which we configured in connection parameters in communication channel (both parameters for Queuemanager CCSID and also CCSID of target).If there are special characters in the message (which HEX-values differ from codepage to codepage) we get errors in our adapter while executing, please see stack-trace for further analysis below.
    It seems to us that
    1. method ByteToCharUTF8.convert() expects UTF-8 in binary data
    2. Both CCSID parameters are not used anyway in JMS-adapter
    How can we solve this problem without changing anything on MQ-site?
    Here is the stack-trace:
    Catching com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.af.modules.trans.MessageTransformBean.throwModuleException(MessageTransformBean.java:453)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:387)
        at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0_0.process(ModuleLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:292)
        at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0_0.process(ModuleProcessorLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:84)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertBinaryToXiMessageFilter.filter(ConvertBinaryToXiMessageFilter.java:304)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:112)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:87)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:123)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filter(TxManagerFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.DynamicConfigurationFilter.filter(DynamicConfigurationFilter.java:72)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.PmiAgentFilter.filter(PmiAgentFilter.java:66)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundCorrelationFilter.filter(InboundCorrelationFilter.java:60)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JmsHeadersProfileFilter.filter(JmsHeadersProfileFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageInvocationsFilter.filter(MessageInvocationsFilter.java:89)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JarmMonitorFilter.filter(JarmMonitorFilter.java:57)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ThreadNamingFilter.filter(ThreadNamingFilter.java:62)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.SenderChannelImpl.doReceive(SenderChannelImpl.java:263)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.receive(ChannelImpl.java:437)
        at com.sap.aii.adapter.jms.core.connector.MessageListenerImpl.onMessage(MessageListenerImpl.java:36)
        at com.ibm.mq.jms.MQMessageConsumer$FacadeMessageListener.onMessage(MQMessageConsumer.java:399)
        at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:904)
        at com.ibm.msg.client.wmq.v6.jms.internal.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4249)
        at com.ibm.msg.client.wmq.v6.jms.internal.SessionAsyncHelper.run(SessionAsyncHelper.java:537)
        at java.lang.Thread.run(Thread.java:770)
    Caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:714)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:538)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:528)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:471)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:364)
        ... 36 more
    Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:270)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)
        at java.io.InputStreamReader.read(InputStreamReader.java:208)
        at java.io.BufferedReader.fill(BufferedReader.java:153)
        at java.io.BufferedReader.readLine(BufferedReader.java:316)
        at java.io.LineNumberReader.readLine(LineNumberReader.java:176)
        at com.sap.aii.messaging.adapter.Conversion.convertPlain2XML(Conversion.java:310)
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:709)
        ... 40 more
    Any ideas?
    Kind regards, Stefan

    Hi Stefan,
    for the first MTB now we are using only one parameter: Transform.ContentType = text/plain;charset="ISO-8859-1"
    The second MTB, which does the XML-Wrapping, is configured like this:
    Transform.Class = com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType = application/xml
    xml.conversionType = SimplePlain2XML
    xml.fieldNames = value
    xml.fieldSeparator = §%zulu§%
    xml.processFieldNames = fromConfiguration
    xml.structureTitle = payload
    Both CCSID configuration parameters from the "Source"-Tab we've set to 850.
    Now, we don't get an error anymore - sun.io.malformedInputException - , but, unfortunately, now special character conversion succeeded (we need an "ß" and we get an ISO-HEX-E1 -> á).  E1 is (different from ISO) an "ß" in 850.
    Any ideas?

  • Oracle Text - Problem with filtering binary documents (.doc, .pdf, etc...)

    Hi, I have a problem with filtering binary documents (.doc, .pdf, etc...). I use SQL*PLUS for remote access to Oracle 10.2 on Linux and I create table:
    CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    I insert to this table:
    INSERT into test values(1, 'PATH/text1.doc‘);
    INSERT into test values(2,'PATH/text2.doc‘);
    and then:
    CREATE INDEX test_index ON test(text) indextype is ctxsys.context
    parameters (’datastore ctxsys.file_datastore
    filter ctxsys.auto_filter’);
    Message "Index created" is displayed, but objects: DR$test_index$I, DR$test_index$K, DR$test_index$N, DR$test_index$R and DR$test_index$P are empty => index wasn´t created probably.
    I don´t know, where is bug, either bug is somewhere in this code or on the server (wrong installation oracle or constraint privileges). Do you know in what is bug?

    The following is an excerpt from the 10g online documentation. Note the items that I have put in bold.
    "FILE_DATASTORE
    The FILE_DATASTORE type is used for text stored in files accessed through the local file system.
    Note:
    FILE_DATASTORE may not work with certain types of remote mounted file systems.
    FILE_DATASTORE has the following attribute(s):
    Table 2-4 FILE_DATASTORE Attributes
    Attribute Attribute Value
    path path1:path2:pathn
    path
    Specify the full directory path name of the files stored externally in a file system. When you specify the full directory path as such, you need only include file names in your text column.
    You can specify multiple paths for path, with each path separated by a colon (:) on UNIX and semicolon(;) on Windows. File names are stored in the text column in the text table.
    If you do not specify a path for external files with this attribute, Oracle Text requires that the path be included in the file names stored in the text column.
    PATH Attribute Limitations
    The PATH attribute has the following limitations:
    If you specify a PATH attribute, you can only use a simple filename in the indexed column. You cannot combine the PATH attribute with a path as part of the filename. If the files exist in multiple folders or directories, you must leave the PATH attribute unset, and include the full file name, with PATH, in the indexed column.
    On Windows systems, the files must be located on a local drive. They cannot be on a remote drive, whether the remote drive is mapped to a local drive letter."
    With accessible paths and files, you get something like:
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(1,'c:\oracle11g\banana.pdf');
    1 row created.
    SCOTT@orcl_11g> INSERT into test values(2,'c:\oracle11g\cranberry.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
           608
    SCOTT@orcl_11g> In the following, I used a non-existent path and non-existent file name, which produces the same results as when you use a remote path that does not exist locally.
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(3,'c:\nosuchpath\nosuchfile.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
             0
    SCOTT@orcl_11g>

  • Sql Devloper 4.0.0.13 - problems with displaying user data types

    Hi,
    I have installed new version of sqldeveloper and have discovered some problems with displaying user data types. The data that is described as VARCHAR2 are displayed with ‘???’.
    The problem persist in table view, script output and exported files.
    My type is described as follows:
    create or replace TYPE "DPTY_ADRESA" AS OBJECT
      ID_DPSF_OPCINE                                         NUMBER,
      ID_DPSF_MJESTA                                        NUMBER,
      OPCINA                                            VARCHAR2(100),
      MJESTO                                            VARCHAR2(100),
      ULICA                                 VARCHAR2(200),
      BROJ                                   VARCHAR2(20),
      SPRAT                VARCHAR2(20),
      OSTALO                             VARCHAR2(100),
      CONSTRUCTOR FUNCTION dpty_adresa RETURN SELF AS RESULT
    add MEMBER FUNCTION dajAdresu RETURN VARCHAR2 cascade;
    when make select column from table that contains this type I get next results:
    CASE 1:
    SQLDeveloper Version 3.2.20.09; Build MAIN-09.87; JDK 1.6.0_43; Windows 7 64 bit
    Select:
    select id, adresalokacija
    from dptr_saglasnosti
    where id = 1;
    Result:
            ID ADRESALOKACIJA
             1 COMP.DPTY_ADRESA(124,4913,'TRAIK','TURBE','BABANA','3452','0',NULL)
    END CASE 1;
    CASE 2:
    SQLDeveloper Version 4.0.0.13; Build MAIN-13.80; JDK 1.7.0_40; Windows 7 64 bit
    Select1:
    select id, adresalokacija
    from dptr_saglasnosti
    where id = 1;
    Result1:
    ID ADRESALOKACIJA
             1 COMP.DPTY_ADRESA(124,4913,'???','???','???','???','???',NULL)    
    But if I select one element it is displayed normal.
    Select2:
    select id, a.adresalokacija.opcina
    from dptr_saglasnosti a
    where id = 1;
    Result2:
    ID ADRESALOKACIJA.OPCINA
             1 TRAVNIK                  
    END CASE 2;
    I have tried this scenario on three different pc with same output.
    Pleas help me to get rid of the '???' in result.
    Best Regards,
    Omer

      I tried on SQLDeveloper Version 4.0.0.13; Build MAIN-13.80; JDK 1.7.0_45; Windows 7 64 bit; NLS setting is default
    all data can show,No ??? in result
    Test step as following:
    create or replace TYPE "DPTY_ADRESA" AS OBJECT
      ID_DPSF_OPCINE                                         NUMBER,
      ID_DPSF_MJESTA                                        NUMBER,
      OPCINA                                            VARCHAR2(100),
      MJESTO                                            VARCHAR2(100),
      ULICA                                 VARCHAR2(200),
      BROJ                                   VARCHAR2(20),
      SPRAT                VARCHAR2(20),
      OSTALO                             VARCHAR2(100),
      CONSTRUCTOR FUNCTION dpty_adresa RETURN SELF AS RESULT
    alter TYPE "DPTY_ADRESA" add MEMBER FUNCTION dajAdresu RETURN VARCHAR2 cascade;
    CREATE TABLE dptr_saglasnosti (
    adresalokacija        DPTY_ADRESA,
      id    number);
      INSERT INTO dptr_saglasnosti VALUES (
      DPTY_ADRESA (65,225,'Vrinda Mills', '1-800-555-4412','sss','aaaa','eeeee','attta'),1 );
    select id, adresalokacija from dptr_saglasnosti where id = 1;
    ID ADRESALOKACIJA
    1    HRCP.DPTY_ADRESA(65,225,'Vrinda Mills','1-800-555-4412','sss','aaaa','eeeee','attta')

  • Problem with concatenation, need output in a desired format

    Hi all,
    I have a weird problem with concatenation.
    I should get an output in such a way that the result would be
    Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml
    For this first to get C:\TEMP\test20090210.xml format I said
    CONCATENATE  'C:\TEMP\test' sy-datum '.XML' INTO filepath.
    For this secondly to get /FOLDER1/test20090210.xml format I said
    CONCATENATE  '/FOLDER1/test' sy-datum '.XML' INTO filepath1.
    Now I need to get the format
    Put C:\TEMP\test20090210.xml  /FOLDER1/test20090210.xml
    And to get this I said
    CONCATENATE  'put' filepath INTO  filepath SEPARATED BY space.
    And the output for filepath was Put C:\TEMP\test20090210.xml.
    But I want u2026u2026u2026.Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml.
    How can I achieve this?
    If I say
    CONCATENATE  filepath INTO  filepath1 SEPARATED BY space. It throws a syntax error saying
    u201CUnable to interpret filepathu201D
    Please help me..i am dying to figure out how to concatenate and get the required output.
    My filepath contains u2026 Put C:\TEMP\test20090210.xml
    My filepath1 contains u2026/FOLDER1/test20090210.xml
    I need final output asu2026u2026u2026u2026.
    Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml
    How to attain this..please helpu2026where I am going wrong..i declared filepath and filepath1 as STRING

    Hi all,
    Thanks for immediate reply...now it works..
    but i also need to put a counter like thing to distinguish my files.
    for my filepath....
    i want it as C:\TEMP\test20090210110146 so i said....
    CONCATENATE '    C:\TEMP\test'    sy-datum s   y-uzeit  '.XML'.
    Actually i am generating XML files and naming them as testsystemdatesystemtime.
    But i am concerend that my filed might be overwrriten if a file gets generated in a fraction of a millisecond..so to avoid that now i want to put a counter.
    i.e my filepath should now be as follows each time loop executes...
    C:\TEMP\test20090210110146_1
    C:\TEMP\test20090210110147 _2
    C:\TEMP\test20090210110148 _3.........and son on how can i do it
    i.e testsystemdatesystemtime+ a counter(which tells how many times loop executed)
    Once again thanks to all for immediate help...

  • When I try and restore from iCloud it says problem with back up data help !!!

    Can anyone help me back up my phone from iCloud. It is saying there is a problem with my data

    Hey Shopaholic1181,
    Thanks for using Apple Support Communities.
    iCloud: Understanding alert messages when restoring from an iCloud Backup
    http://support.apple.com/kb/TS4585
    "Your iPhone cannot be restored because there is a problem with your backup data. Choose a different backup to restore from."
    Your backup does not appear to be usable. If you receive this alert, you should check the iCloud System Status at the iCloud Support website to make sure there are not any issues occurring with iCloud Backup. If there is not a widespread issue notated on the iCloud System Status, the error may self-resolve if you wait several minutes and try again. If issues persist, you should contact iCloud Support via the iCloud Support website.
    Have a nice day,
    Mario

  • Problem with writing continuous data to excel using using Report Generation vi's

    Hey Everyone,
    I am trying to read the data from DAQ and write to excel continuously using Report Generation vi's. 
    But when I run the VI, it writes only one interation of the while loop (gathering data from DAQ continuously) and doesn't append the data into the same file when I run it again after stoping the VI. 
    I have attached the VI i created. Please let me know if you have any idea to solve this issue. 
    Thanks
    Attachments:
    sample 5.vi ‏35 KB

    There are two problems with your VI.  First, the basic logic of writing/appending to a file (Excel, TDMS, anything) should go something like this:  Open the file, position yourself at the end of the file, then, in the loop, acquire data and write it to the file until you are finished with data acquisition.  When you exit the acquire/write to file loop, then close the file.  In particular, the opening and the closing of the file should not be inside the loop.
    As others have pointed out, writing to Excel might not be optimal, particularly if you are acquiring data at a high rate (and would therefore be writing a lot of data). We actually use Excel in our data acquisition routine, mainly reading from a WorkSheet to get the parameters of a particular stimulus, but also writing the outcome of the response to the stimulus.  As it happens, our "acquisition rate" in this example is on the order of several samples per minute, so there's no problem using Excel (we also sample 16 channels of analog data at 1 KHz -- this gets written as a binary file).
    Second, if you really do want to use Excel, use the (existing) Excel file to which you want to append as the "template" argument of the New Report function.  Then use the Excel Get Last Row function to position yourself at "end of file", as noted above.
    Good Luck.
    Bob Schor

  • Problem with extract huge data in WEBI (Errors:WIO 30280 and ERR_WIS_30270)

    Hi gurus, need your help.
    When we run the query for the report we get an error in Web Intellegence .
    This error may be two types. And their rotation occurs randomly.
    First error: There is no memory available. Please close document to free memory (WIO 30280)
    Second error: An internal error occurred while calling the 'processDPCommands' API. (ERR_WIS_30270)
    When we try reopen WEB Intelligence, or reloading servers or machine, we have no   any results and get error again.
    I was try change different parametrs in universe designer for connection and universe, in central managment console for WEBI, but it's not solve problem
    This query select data from huge table (4,7 million rows), and when I use limit for maximum rows in WEBI my report working correctly.
    Is there any way to solve these problems associated with large data? What  is invoke this problem when we try to get full data?
    We use Business Objects Enterprise XI 3.1 version 12.4.0.966 
    Our system Windows Server  R2  Enterprise 2008 SP1 (64-bit system), Processor Intel 2.67 GHz (2 processors), RAM 8 Gb.                                                                               
    Thanks.
                                                                                    Ruslan

    Hi Brad,
    here we are talking about XI3.1 which has the limitations inherited from the operating system. as this blog post explains with plenty of details.
    In BI4.0 you can leverage larger datasets without any problems however you need to properly size and configure the services.
    There are several documents out there:
    How to configure the APS  http://scn.sap.com/docs/DOC-31711
    Companion Guide
    https://service.sap.com/~sapdownload/011000358700000307202011E/SBO_BI_4_0_Companion_V4.pdf
    Web Intelligence Sizing Guide
    https://service.sap.com/~sapdownload/011000358700001403692011E/BI_4_0_WEBI_NEW.pdf
    Best regards,
    Simone

  • Problem with logminer in Data Guard configuration

    Hi all,
    I experience strange problem with applying of the logs in DataGuard configuration on the logical standby database side.
    I've set up the configuration step by step as it is described in documentation (Oracle Data Guard Concepts and Administration, chapter 4).
    Everything went fine until I issued
    ALTER DATABASE START LOGICAL STANDBY APPLY;
    I saw that log applying process was started by checking the output of
    SELECT NAME, VALUE FROM V$LOGSTDBY_STATS WHERE NAME = 'coordinator state';
    and
    SELECT TYPE, HIGH_SCN, STATUS FROM V$LOGSTDBY;
    but in few minutes it stoped and quering DBA_LOGSTDBY_EVENTS I saw the following records:
    ORA-16111: log mining and apply setting up
    ORA-01332: internal Logminer Dictionary error
    Alert log says the following:
    LOGSTDBY event: ORA-01332: internal Logminer Dictionary error
    Wed Jan 21 16:57:57 2004
    Errors in file /opt/oracle/admin/whouse/bdump/whouse_lsp0_5817.trc:
    ORA-01332: internal Logminer Dictionary error
    Here is the end of the whouse_lsp0_5817.trc
    error 1332 detected in background process
    OPIRIP: Uncaught error 447. Error stack:
    ORA-00447: fatal error in background process
    ORA-01332: internal Logminer Dictionary error
    But the most useful info I found in one more trace file (whouse_p001_5821.trc):
    krvxmrs: Leaving by exception: 604
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.LOGMNR_KRVRDREPDICT3", line 68
    ORA-06512: at line 1
    Seems that somewhere the correct privileges were not given or smth like this. By the way I was doing all the operations under SYS account (as SYSDBA).
    Could smb give me a clue where could be my mistake or what was done in the wrong way?
    Thank you in advance.

    Which is your SSIS version?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Problem with transferring of data to non sap

    Hi all,
             I am doing program of creating excise invoice details and those are transfering to non sap.and I am successfully passing text file to that non sap by using FTP connection.
    like FTP_CONNECT
    FTP_COMMAND
    FTP_R3_TO_CLIENT
    FTP_DISCONNECT
    But text file details are coming like this
    means even line items are all displaying in one row.means continously all line items are coming just like this.
    0001000264,070914,,,1000,Steel (pune) Plant,
    Retail Outlet 1,0001000265,070914,,,1000,Steel (hyderabad) Plant,Retail Outlet 1
    Actually here problem is text file data is continously coming with ','
    means actually those values has to come as
             0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
            0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
    How to split those records when sending the text file.
    This is very big issue.I am unable to complete this issue.
    Please if any one knows the solution please guide me.
    please help me.
    Thanks & Regards,
    J.Goud

    Hi all,
                My problem was solved.But I have used GUI_DOWNLOAD.
        But i want to place the file name with increasing order number.
    Just like suppose 1st i am placing file name as  PO000051.txt
    next time the file name has to be placed with increasing order like PO000052.txt
    I am generating the number in my program actually i am using like this.If i keep file name as
    190.0.18.65\qdls\ITGSAP_P\PO000052.txt means only it will place only that file how to increment that number. i am not getting.
    If i am keeping
    190.0.18.65\qdls\ITGSAP_P\g_file   like this means file is not placing.
    pls help me if any one knows solution.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
              BIN_FILESIZE        = ' '
              CODEPAGE            = ' '
                FILENAME            = '
    190.0.18.65\qdls\ITGSAP_P\g_file'
              FILETYPE            = ' '
              MODE                = ' '
              WK1_N_FORMAT        = ' '
              WK1_N_SIZE          = ' '
              WK1_T_FORMAT        = ' '
              WK1_T_SIZE          = ' '
              COL_SELECT          = ' '
              COL_SELECTMASK      = ' '
          importing
               filelength          =
           TABLES
                DATA_TAB            = ist_file
              FIELDNAMES          =
           EXCEPTIONS
                FILE_OPEN_ERROR     = 1
                FILE_WRITE_ERROR    = 2
                INVALID_FILESIZE    = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                OTHERS              = 8.
    regards,
    J.Goud

  • Re: Problem with transferring of data to non sap by using FTP funtion modul

    Hi all,
             I am doing program of creating excise invoice details and those are transfering to non sap.and I am successfully passing text file to that non sap by using FTP connection.
    like FTP_CONNECT
    FTP_COMMAND
    FTP_R3_TO_CLIENT
    FTP_DISCONNECT
    But text file details are coming like this
    means even line items are all displaying in one row.means continously all line items are coming just like this.
    0001000264,070914,,,1000,Steel (pune) Plant,
    Retail Outlet 1,0001000265,070914,,,1000,Steel (hyderabad) Plant,Retail Outlet 1
    Actually here problem is text file data is continously coming with ','
    means actually those values has to come as
             0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
            0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
    How to split those records when sending the text file.
    This is very big issue.I am unable to complete this issue.
    Please if any one knows the solution please guide me.
    please help me.
    Thanks & Regards,
    J.Goud

    Hi all,
             I am doing program of creating excise invoice details and those are transfering to non sap.and I am successfully passing text file to that non sap by using FTP connection.
    like FTP_CONNECT
    FTP_COMMAND
    FTP_R3_TO_CLIENT
    FTP_DISCONNECT
    But text file details are coming like this
    means even line items are all displaying in one row.means continously all line items are coming just like this.
    0001000264,070914,,,1000,Steel (pune) Plant,
    Retail Outlet 1,0001000265,070914,,,1000,Steel (hyderabad) Plant,Retail Outlet 1
    Actually here problem is text file data is continously coming with ','
    means actually those values has to come as
             0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
            0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
    How to split those records when sending the text file.
    This is very big issue.I am unable to complete this issue.
    Please if any one knows the solution please guide me.
    please help me.
    Thanks & Regards,
    J.Goud

  • Problem with transferring of data to non sap by using FTP funtion modul

    Hi all,
             I am doing program of creating excise invoice details and those are transfering to non sap.and I am successfully passing text file to that non sap by using FTP connection.
    like FTP_CONNECT
    FTP_COMMAND
    FTP_R3_TO_CLIENT
    FTP_DISCONNECT
    But text file details are coming like this
    means even line items are all displaying in one row.means continously all line items are coming just like this.
    0001000264,070914,,,1000,Steel (pune) Plant,
    Retail Outlet 1,0001000265,070914,,,1000,Steel (hyderabad) Plant,Retail Outlet 1
    Actually here problem is text file data is continously coming with ','
    means actually those values has to come as
             0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
            0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
    How to split those records when sending the text file.
    This is very big issue.I am unable to complete this issue.
    Please if any one knows the solution please guide me.
    please help me.
    Thanks & Regards,
    J.Goud

    Hi,
         Thanks for reply.
    Hi all,
                My problem was solved.But I have used GUI_DOWNLOAD.
        But i want to place the file name with increasing order number.
    Just like suppose 1st i am placing file name as  PO000051.txt
    next time the file name has to be placed with increasing order like PO000052.txt
    I am generating the number in my program actually i am using like this.If i keep file name as
    190.0.18.65\qdls\ITGSAP_P\PO000052.txt means only it will place only that file how to increment that number. i am not getting.
    If i am keeping
    190.0.18.65\qdls\ITGSAP_P\g_file   like this means file is not placing.
    pls help me if any one knows solution.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
              BIN_FILESIZE        = ' '
              CODEPAGE            = ' '
                FILENAME            = '
    190.0.18.65\qdls\ITGSAP_P\g_file'
              FILETYPE            = ' '
              MODE                = ' '
              WK1_N_FORMAT        = ' '
              WK1_N_SIZE          = ' '
              WK1_T_FORMAT        = ' '
              WK1_T_SIZE          = ' '
              COL_SELECT          = ' '
              COL_SELECTMASK      = ' '
          importing
               filelength          =
           TABLES
                DATA_TAB            = ist_file
              FIELDNAMES          =
           EXCEPTIONS
                FILE_OPEN_ERROR     = 1
                FILE_WRITE_ERROR    = 2
                INVALID_FILESIZE    = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                OTHERS              = 8.
    Regards,
    j.Goud

  • Problem with a XML Data Server

    Hello,
    I am facing a problem in defining the data server for an XML File.
    This Xml File is well build and I can open it with IE.
    In this file I have a namespace define.
    I define the url driver as following : jdbc:snps:xml?f=C:/Temp/dossiers_suisse.xml&s=XML_DOS_HAB_S
    but I always have the following error message :
    java.sql.SQLException: The model generated by the model mapper was not accepted by a validator: Modèle non accepté: Namespace not found:
    When I remove the namespace of the xml file the test works well.
    I was searching for the driver documentation but I just find few informations on the webhelp.
    Maybe there is a parameter to pass to the Driver URL to define the namespace but there is not in the web help.
    So if someone know how to do with this sort of file ?
    Or if someone know where I can find the real documentation for this driver ?
    Thanks in advance...
    BM

    I am able now to test my connexion succesfully after having restart my ODI.
    I can reverse my XML file too.
    But my datastores are empty except the first datastore genrated which correspond to the first Tag (the one after the root).
    Please Help...

Maybe you are looking for

  • VF02- Billing doc not cleared

    Hi Gurus, I have raised a sales order and got the following document flow: - Sales order - Completed - Delivery + PGI - Completed - Billing - Invoicing done + FI Document has been created But I have the following message in Billing: Accounting docume

  • How do I rename a lot of files from an excel worksheet?

    Hello all! I have 2k+ files in a folder named sequentially from 0001.wav to 24xx.wav. I have their contents referenced in an .xls. This is a library made for Windows when it didn't accept very long names, so you couldn't just name the file accordingl

  • Error Calling Web Service - VersionMismatch Wrong SOAP Version

    Hello, I am attempting to create a web service from a function module, and to call this web service from outside of SAP. I used the Web Service Creation Wizard to create a web service from BAPI_CURRENCY_GETLIST, and tested it using the Web Service Ho

  • How to do backup database in the menu of Oracle XE

    Dear all, When I do database backup selecting from the Oracle XE menu, it output the error as below : sql statement: create pfile=''C:\ORACLEXE\APP\ORACLE\PRODUCT\10.2.0\SERVER\DATABASE\SPFILE2INIT.ORA'' from spfile RMAN-00571: ======================

  • Reconciliation and the Key Column for Oracle DB

    I have a oracle DB with the key column called employee number (ie. 12345) In the form for my reconciliation, I assigned the employee number to an extended attribute called employeeId as below. This field is defined in the User Extended Attributes obj