Comparing Hexadecimal value in program

Hi friends,
I have requirement in this I have to pick a file and have to write some logic by comparing file contents.
File contents some hexadecimal character like '#'.
When I am writing simple if condition like
if var = '#'.
endif.
It is not going in that if condition even when the var has value from # from file. so i think as it is hexadecimal value there is some other way to compare it.
Please let me know how can I compare hexadecimal value.

Indeed # is a character representation of a separator (tab or space) which is seen as # in character mode.
Use below snippet to compare it
DATA: xsep TYPE xstring,
                sep TYPE string.
              xsep = '09'. "if separator is tab mark
              xsep = '20'. "if it is space
          CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
            EXPORTING
              in_xstring = xsep
            IMPORTING
              out_string = sep.
         "now SEP contains character representation for separator (which is seen as #)
          "you can i.e. split uploaded file data (in iternal table) based on that separator
          SPLIT it_file_data AT sep INTO TABLE it_file_fields IN CHARACTER MODE.
          "for comparing use
          if var = sep.
          endif.
Regards
Marcin

Similar Messages

  • How can I compare single value with multiple value...

    Hello,
    I want to compare one value with multiple values, how can it possible ?
    Here in attachment I tried to design same logic but I got problem that when I entered value in y that is compared with only minimum value of x, I don't want that I want to compare y value with all the x value and then if y is less then x while loop should be stop.
    I want to do so because in my program some time I didn't get result what I want, for example x values is 4,5,6,7,8  and y value is  suppose 6 then while loop should be stop but here it consider only minimum number and its 4 here so while loop is not stop even y is less then 7 and 8. So I want to compare y value with all the entered values of x and if y is less then any of x values then while loop should be stop and led should be ON.
    Please guide me how can I do so.....
    Solved!
    Go to Solution.
    Attachments:
    COMPARISON.vi ‏8 KB

    AnkitRamani wrote:
    Thank you very mach for your help..
    may be i have solved this ....i have made one change in my vi that instead of min. i select max and max. value is compare with the value of y and then if y is less then the max. while loop will be stop other wise its run continuously.
    this is working fine...
    any ways thanks again for your help and time...
    I have to agree with Lewis - his way is more efficient.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • How to convwert hexadecimal value '13' to character

    In unicode program it is required to convert hexadecimal value to char. I do n't find any solution for converting hexadecimal value '13' to character.
    Please help

    You can try the following:
            CALL FUNCTION 'SCMS_BIN_TO_TEXT'
              EXPORTING
                bin_line  = '13'
              IMPORTING
                text_line = lv_char
              EXCEPTIONS
                failed    = 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.

  • Hexadecimal value 0x12, is an invalid character. Line 1, position 247.

    Hello! I'm starting with Azure, installed all new SDK, VS Updates, Win8 updates, created MVC4 proyect, executed on local Debug and Release, everything working. Downloaded the publish profile from my website validated the site, All ok! but, when i Hit Publish:
    2>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets(55,5): Error : '', hexadecimal value 0x12, is an invalid character. Line 1,
    position 247.
    And i can not continue. Files where not modified, that error its from output
    Ideas? Off course, my site still empty, this where my first deploy
    Thanks in advance!

    Hi,
    Do you use MSBuild? If yes, add this to setting: <property
    name="PackageAsSingleFile"
    value="false"/>
    For any issue for MSBuild, please open case in this forum: http://social.msdn.microsoft.com/Forums/uk-UA/msbuild/threads
    Also refer:
    http://blogs.msdn.com/b/webdev/archive/2012/11/20/new-web-publish-updates.aspx
    Thanks,
    QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Hexadecimal value 0x10, is an invalid character. Line 1, position 228.

    getting started with Azure.
    I installed VS2013, the Azure SDK for VS2013 and web deploy 3.5
    following the steps on this post
    http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/
    When I try to deploy to a website created in Azure with DB, I get
    Error 1
    '', hexadecimal value 0x10, is an invalid character. Line 1, position 228.
    The details:
    Transformed Web.config using C:\Projects\ContactManager\ContactManager\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.
    Copying all files to temporary location below for package/publish:
    obj\Release\AspnetCompileMerge\Source.
    C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p C:\Projects\ContactManager\ContactManager\obj\Release\AspnetCompileMerge\Source -u -c C:\Projects\ContactManager\ContactManager\obj\Release\AspnetCompileMerge\TempBuildDir 
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets(42,5): Error : '', hexadecimal value 0x10, is an invalid character. Line 1, position 228.
    I have tried uninstalling VS2013, the SDK and even web deploy and reinstalling them and that didn't help.
    One caveat:
    when I try to deploy to a website created without DB, I get don't get the error above.
    any help appreciated
    UPDATE:
    Figured it out.
    My DB Password had the "%" character. I guess that's not well handled by Visual Studio at the moment.
    After removing the "%" character from my DB password, I was able to deploy again.

    Hi,
    Figured it out.
    My DB Password had the "%" character. I guess that's not well handled by Visual Studio at the moment.
    After removing the "%" character from my DB password, I was able to deploy again.
    I'm glad to hear that you have found out the solution, I will close this thread, thanks for your posting, if you have any issues, welcome to our forum again.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Retreving Hexadecimal Values from a table using SQL query.

    Hi,
    I'm looking for a query to retreive Hexadecimal values contained in a column using SQL query.
    The column contains the values of all types, alphanumeric, numeric and hexadecimal.
    I need to retreive only hexadecimal values.
    any help to me in this regard will be appreciated.
    Thanks

    Presumably, you can be sure that any valid hex value is indeed MEANT to BE a hex value. For example the value 'ACE' is meant to be a hexadecimal value and not the word.

  • Create a new column in a table that compares the value of one column with its previous value

    The DDL:
    DECLARE
    @T TABLE
    IDNO
    int,
    name
    varchar(40),
    [Date]
    datetime2,
    Price1
    float,
    Price2
    float
    DECLARE
    @K TABLE
    IDNO
    int,
    name
    varchar(40),
    [Date]
    datetime2,
    Price1
    float,
    Price2
    float
    INSERT
    INTO @T
    VALUES(22,'C_V_Harris','2014-01-02 10:23:49.0000000',
    23.335,      
    23.347)
    INSERT
    INTO @T
    VALUES(21,'C_V_Harris','2014-01-02 10:05:13.0000000',
    23.357,      
    23.369)
    INSERT
    INTO @T
    VALUES(20,'C_V_Harris','2014-01-02 09:56:15.0000000',
    23.364,      
    23.377)
    INSERT
    INTO @T
    VALUES(19,'C_V_Harris','2014-01-02 09:45:26.0000000',
    23.351,      
    23.367)
    INSERT
    INTO @T
    VALUES(18,'C_V_Harris','2014-01-02 09:43:20.0000000',
    23.380,      
    23.396)
    INSERT
    INTO @T
    VALUES(17,'C_V_Harris','2014-01-02 09:34:28.0000000',
    23.455,      
    23.468)
    INSERT
    INTO @T
    VALUES(16,'C_V_Harris','2014-01-02 09:30:37.0000000',
    23.474,      
    23.486)
    INSERT
    INTO @T
    VALUES(15,'C_V_Harris','2014-01-02 09:18:12.0000000',
    23.419,      
    23.431)
    INSERT
    INTO @T
    VALUES(14,'C_V_Harris','2014-01-02 09:16:06.0000000',
    23.360,      
    23.374)
    INSERT
    INTO @K
    SELECT
    ROW_NUMBER()
    OVER (ORDER
    by IDNO)
    AS RN,*
    FROM
    @T
    SELECT
    * FROM
    @K
    --not working:
    SELECT
    a.RN,a.Price2
    FROM
    @K a
    INNER
    JOIN @K
    b
    ON
    a.RN=b.RN-1
    WHERE
    a.Price2>b.Price2
    I need to create  a view with a column (say 'Comp' below) that compares the value of each row in Price2 with the previous Price2 row, and it is greater then +1, the
    same 0, and less -1.
    The processed table should be:
    IDNO
    name
    Date
    Price1
    Price2
    Comp
    22
    C_V_Harris
    1/2/2014 10:23:49
    23.335
    23.347
    0
    21
    C_V_Harris
    1/2/2014 10:05:13
    23.357
    23.369
    1
    20
    C_V_Harris
    1/2/2014 9:56:15
    23.364
    23.377
    1
    19
    C_V_Harris
    1/2/2014 9:45:26
    23.351
    23.367
    -1
    18
    C_V_Harris
    1/2/2014 9:43:20
    23.38
    23.396
    1
    17
    C_V_Harris
    1/2/2014 9:34:28
    23.455
    23.468
    1
    16
    C_V_Harris
    1/2/2014 9:30:37
    23.474
    23.486
    1
    15
    C_V_Harris
    1/2/2014 9:18:12
    23.419
    23.431
    -1
    14
    C_V_Harris
    1/2/2014 9:16:06
    23.36
    23.374
    -1
     How can I structure the statement to get (the most recent - order by date ) result for Comp?

    Satheesh Variath, I just had to make some corrections from your script to get the correct answer:
    CREATE
    VIEW vw_Comp
    AS
    SELECT
    TOP 1 t.IDNO,t.name,t.[Date],t.Price1,t.Price2,
    CASE
    WHEN t.Price2
    > LAG(Price2,1)
    OVER (PARTITION
    BY name
    ORDER BY IDNO) 
    THEN 1
    WHEN t.Price2
    < LAG(Price2,1)
    OVER (PARTITION
    BY name
    ORDER BY IDNo) 
    THEN -1
    ELSE 0
    END
    AS Comp
    FROM 
    @T t
    ORDER
    BY DATE
    DESC
    The adjustments: the selection of the most recent comparison (Top 1) and the use of the function LAG (instead of LEAD) to get the previous value of the column.

  • SSRS Expression to compare two values and get data from another dataset

    Hi,
    I have a requirement where in i need to compare a value of a dataset (not the one which table is poiting to)
    with the value of a text box, and return the count if it matches else 0, the expression is as below. Here 
    industryName and recCount are from the dataset ds_MedimOrLowImpactEntities.  whats wrong in this expression
    =Sum(IIF(Fields!industryName.Value = reportItems!hpapra_name.Value, Fields!RecCount.Value, 0), "ds_MediumOrLowImpactEntities")
    This is the error that i am getting:
    Any help on this is appreciated
    Kruthi Hegde

    Hi Kruthi,
    After testing the issue in my local environment, I can reproduce it. Just the error message said, “Aggregate function can be used only on report items contained in page headers and footers”. So the sum function that contains report items should be stayed
    at page headers or footers. Besides, you said the hpapra_name textbox contain a field from another dataset, not the ds_MedimOrLowImpactEntities dataset. While in Reporting Services, Report item expressions can only refer to other report items within the same
    grouping scope or a containing grouping scope. So consider the two issues, we should use some other expression to instead the “reportItems!hpapra_name.Value” expression.
    Take a look at the "Looking up values from another dataset" topic here:
    http://msdn.microsoft.com/en-us/library/ms159673.aspx#LookupFunctions
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Error while running Configuration Wizard in SharePoint 2013: Exception in RefreshCache. Exception message :The '?' character, hexadecimal value 0x43A0, cannot be included in a name. Line 1, position 5694.

    Hi Friends,
    I was trying to run configuration wizard in SharePoint 2013 Central Administration and I got below error:
    Exception in RefreshCache. Exception message :The '?' character, hexadecimal value 0x43A0, cannot be included in a name. Line 1, position 5694.
    Yesterday my SharePoint server was running fine and today when I try to update a SharePoint solution (wsp) I got same error. Even if I try to do any operation
    in Central administration like adding new WSP, Updating WSP , I get same error.
    Does any one have any Idea?
    Regards
    Gireesh Painuly

    Posted this a few weeks back - would appreciate any suggestions?
    Thanks,
    Carl

  • Assign hexadecimal value to an Integer variable preceding with zero

    hi
    i need to pass an hexadecimal value, preceding with zero (0).
    like 0775
    the above hexadecimal value should be assigned to an integer variable. While i am trying to assign it, the output could be truncate the preceding zero value. Is it possible to do my requirement without truncating the preceding zero.?
    Edited by: sasi on Jul 23, 2012 7:09 PM

    I agree on that, this can not be carried out the way you explained.
    Either you store the hexadecimal value as a string, and convert it before arithmetic operations:
    int number = Integer.parseInt("0775", 16);
    Or you store it as an integer (no leading zero) and convert it to string as you display it:
    int number = 0x0775;
    System.out.printf("%1$04x", number);

  • Sharepoint 2007 list error - The '}' character, hexadecimal value 0x7D, cannot be included in a name. Line 1, position 440.

    Hi Everyone,
    We have a sharepoint 2007 deployment which in general has been fine since it was built.  
    Version is 12.0.0.6421 (MOSS 2007 SP2 (KB953334 & KB953338))
    on a Windows 2003 R2 SP2 server.
    We created a list a while back to store information for our servers but for some reason it now has an error.
    the symptoms are:
    1) Navigating to the list and choosing any view (a few custom views), we can see the data fine
    2)  Creating new items or modifying existing items brings up:
    An unexpected error has occurred.
    3) Trying to access the list settings brings up:
    An unexpected error has occurred.
    4) Using "view all site content" and clicking on the list brings up:
    The '}' character, hexadecimal value 0x7D, cannot be included in a name. Line 1, position 440.
    I've attempted to search for the error online but the error doesn't bring back anything specific to Sharepoint.
    My gut feeling is either a corruption of the list or a user has entered an invalid character in one of the list entries, but I cannot amend the list in any way.
    Ordinarily I would advise the user to re-create the list and enter the information from scratch, however this list contains alot of information and is crucial to the server teams documentation.
    Does anyone have any ideas on where I should be focusing my search efforts?  I did check the logs and couldn't see any obvious entries for this list.
    Any assistance would be greatly appreciated.
    Cheers,
    Carl

    Posted this a few weeks back - would appreciate any suggestions?
    Thanks,
    Carl

  • How  to compare previouse value in pl/sql array

    DECLARE
    CURSOR stg_raw_cur IS
    SELECT RAW_STG_ID,
    DEVICE_CD,
    MODEL_VERSION,
    PLATFORM_CD,
    PROFILE_COOKIE,
    LOCATION_CD,
    SAMPLE_RATE,
    EVENT_TYPE_CD,
    to_char(to_date(to_date(substr(EVENT_DATE_TIME,1,8),'yyyymmdd')-1 ||
    'T' ||
    substr(EVENT_DATE_TIME,10,8)
    || 'Z','DD-MON-RR"T"HH24:MI:SS"Z"'), 'YYYYMMDDYY"T"HH24:MI:SS"Z"' ) EVENT_DATE_TIME,
    EVENT_SPECIFIC,
    BATCH_ID,
    DWH_ARVL_DT,
    DWH_ARVL_DT_ID,
    DWH_CREATE_DT from dwh_stg.stg_raw where batch_id >= 200
    order by batch_id asc;
    TYPE stgrawarr IS TABLE OF stg_raw_cur%ROWTYPE;
    stg_raw_rec stgrawarr;
    l_batch_id NUMBER :=0 ;
    v_ctr NUMBER :=0;
    l_temp_batch_id number :=0;
    BEGIN
    OPEN stg_raw_cur;
    LOOP
    FETCH stg_raw_cur BULK COLLECT INTO stg_raw_rec LIMIT 100;
    EXIT
    WHEN stg_raw_cur%NOTFOUND;
    END LOOP;
    CLOSE stg_raw_cur;
    for i in stg_raw_rec.first..stg_raw_rec.last
    loop
    dbms_output.put_line('batch id is '|| stg_raw_rec(i).batch_id );
    IF l_batch_id != stg_raw_rec(i).batch_id
    then
    dbms_output.put_line('Different');
    end if;
    l_temp_batch_id := stg_raw_rec(i).batch_id;
    commit;
    end loop;
    END;
    I want to compare previous value of stg_raw_rec(i).batch_id if differnet then increament the value
    else leave the same.
    thanks.

    Try this,
    FOR i IN stg_raw_rec.FIRST .. stg_raw_rec.LAST
       LOOP
          IF l_temp_batch_id != stg_raw_rec (i).batch_id
          THEN
             --increment
             l_temp_batch_id := l_temp_batch_id + 1;
          END IF;
           DBMS_OUTPUT.PUT_LINE ('batch id is ' || stg_raw_rec (i).batch_id||' unique batch id is '||l_temp_batch_id);
        --  DBMS_OUTPUT.PUT_LINE ('batch id is ' || stg_raw_rec (i).batch_id);
        --  IF l_batch_id != stg_raw_rec (i).batch_id
        --  THEN
        --    DBMS_OUTPUT.PUT_LINE ('Different');
        --  END IF;
          l_temp_batch_id := stg_raw_rec (i).batch_id;
          COMMIT;
       END LOOP;

  • Flat file assembler. Hexadecimal value XYZ, is an invalid character

    Hi,
    I'm trying to send file that contains base64-encoded string. With simple xml FTP sending - all works fine. But with flat file pipeline comes this error:
    A message sent to adapter "FTP" on send port "....FlatFile" with URI "ftp://..../.../%SourceFileName%" is suspended. 
    Error details: There was a failure executing the send pipeline: "...., ....Pipelines, Version=1.0.0.1, Culture=neutral, PublicKeyToken=.."
    Source: "Flat file assembler"
    Send Port: "MyFlatFile" URI: "ftp://.../.../%SourceFileName%" Reason: '', hexadecimal value 0x03, is an invalid character. Line 1, position 100.  
    Pipeline:
    Is it impossible to do such operation on Biztalk?
    Thank you!

    Try to set the appropriate value to the "Target charset" property in the Flat file assembler component. This would solve your issue.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

  • Help comparing the value of a button using the Property Node (I get a variant)

    Dear Sirs:
    (I'm using LabView 6. I guess the solution is different for 6.1)
    Currently I have created an array of Boolean RefNums (which point to many, many buttons). When I need to know when any (and which) of the buttons was pressed I just compare every element on the array with the constant TRUE. It fact, as the array is built from RefNums, I should compare the VALUE from the Property Node.
    The problem here is that the Property Node for this type of Boolean is a LV Variant, and I need to compare this with a TRUE/FALSE value.
    I tried to convert the TRUE constant to a LV variant and visc. But nothing works... I always get that none of the buttons was pressed.
    Here it co
    mes the question: "How can I compare the value of a Property Node for a Boolean (Button) with a TRUE (or False) constant?"
    BTW, maybe I should explain why I'm using RefNums instead of the direct values: As my project requires tons of buttons, I would preffer using RefNums to refer to them. (I.E. I could use a single VI that takes the RefNum and formats the button to hide it for certain users).
    I have enclosed a VI that contains what I've achieved until now, which is nothing
    I appreciate your time and help.
    Best regards,
    JAVIER VIDAL
    Attachments:
    Other_Main_Menu.vi ‏103 KB

    Javier,
    There is another problem in your code: the booleans are not polled by the main loop so they will remain false until the user presses them again. This renders the boolean latch action useless.
    What you can do is to change the mechanical action of the booleans to non-latch. When you detect a "true" in the polling loop, set the boolean to false again. One added benefit is that once all boolean are non-latch, the value property won't be a variant but a boolean so conversion is no longer needed.
    LabVIEW, C'est LabVIEW

  • How to compare the values stored in the list

    Hi,
    I am having the requirement that i want to compare the values stored in the list.How to store the values in the list and compare the list values stored inside it.
    Regards,
    Ahamad

    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#sort(java.util.List)
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#sort(java.util.List,%20java.util.Comparator)
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Comparator.html
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Comparable.html

Maybe you are looking for

  • Problem with switch

    Hi, I have a problem using switch statement. I have a class named Resources in which I declare all the final variables. I have created an instance of Resources named res in the main class. But I cannot use the final variables in the main class in the

  • IPod, Apple Universal Dock and Remote

    Hello everyone, So I have this 3-years-old 3g iPod, a 4th generation that still has black and white display and no video. Yesterday I just bought this Apple Universal Dock on a discount which has an IR receiver, audio output but no s-video output (i

  • Do I need a wireless card to use a router with my iMac or does the built in

    I am having ComCast install a router at my home and they tell me I'll need a wireless card. I shouldn't need one with Airport Extreme installed should I?

  • Equium A100-063 PSAAQE: WLan signal interrupts

    Hi i'm italian so excuse me for my english. The 23rd of March Ive bought the Notebook EQUIUM A100-063 PSAAQE. Unfortunately I have found a problem that I can't resolve although numerous test I've tried. After some minute the connection wireless to my

  • HBRs migrating from EPM 11.1.1.4 to 11.1.2.2.

    Hi All,           I am facing an issue migrating my HBR from 11.1.1.4 to calc manager in 11.1.2.2.           I've migrating my HBRs from 11.1.1.4  to 11.1.2.1 version and exported them to XML file checking the option "For Cacl Mgr" at EAS.