Topic
  • 1 reply
  • Latest Post - ‏2013-03-05T12:58:03Z by hnasgaard
SystemAdmin
SystemAdmin
1245 Posts

Pinned topic Streams 3, to and from binary ..

‏2013-03-04T20:49:31Z |
Hello Experts ..

I have a data file that has a header in ASCII, then it moves to binary.

. Without writing C/C++, Can I read this file, How ?

. Why doesn't this string return its original value ?

MyString = "fgfg";
l_MyBlob = convertToBlob( MyString );
l_MyOutput.MyString = convertFromBlob(l_MyBlob);

Thanks in advance.

Daniel
  • hnasgaard
    hnasgaard
    200 Posts

    Re: Streams 3, to and from binary ..

    ‏2013-03-05T12:58:03Z  
    Hi Daniel,

    If you want to stay in SPL to read your file, I think you could either read the file using a FileSource in block mode, reading the file data a block at a time into a blob. A downstream operator would have to strip off the header and then parse the binary data.

    I tried a quick experiment converting rstring to blob and back and I got the same result back. Can you tell me what result you got?