Think of the Bit Map field as an 8 byte binary field of 64 switches.
1 means on 0 means off.  So, for example, the first two bytes would be
made up of 16 switches:

0011 1010 0001 0110

The bit map has to contain 8 eight bit values (or 64 bits or 2 words
etc..) indicating which fields are included in the rest of the
record.  So in the example above fiels 3,4,5,7,12 14, and 15 are
included in this record.  Field 3 is the members First Name, 4 =
middle initial, 5 = Last Name, 7 = account number.  Field 2, in this
case, is the members prefix (Mr., Miss, Dr, Honorable, etc...), but I
don't always have that piece data so I am not going to include this
field in this record (or any record for that fact) which is why in the
bit map field 2 is off (or 0).

Determining what the Bit Map looks like is very easy, encoding it to
be of type byte is proving to be a challenge.  I've tried different
examples from the web; wrote the output to a TXT file; and opened the
file using TextPad expecting a specific Hex representation.  For
example using the bianry example above, I would expect the first two
bytes to have a Hex value of:
3A 16

Thanks
B


On Sep 29, 9:27 am, BJ <[EMAIL PROTECTED]> wrote:
> I was tasked with creating this new output record for an existing VB6
> app. The new record(s) first field cotains a text value that contains
> a transaction code. The second field needs to be of type
> binary while the remainder of the record is text. The sample file I
> received does infact look this way. Field one is text value, followed
> by what looks like grabage, and then more text.
>
> If I open this text file in an editor like TextPad (using the binary
> format), I can see the Hex representation of the second field. I need
> to create the same type of record format using my values:
> F2 34 25 E4 06 88 81 01
>
> I thought I was close to an answer when I looked up UTF8Encoding
> Class. I can't ask the team who created the sample file because it
> came from a COBOL application on a mainframe.  I'm sure they used
> something like:
>
> Field1    X(06).
> Field2    X(08) COMP3.
> Field3    X(10).
>
> The application is in VB6. I can either modify the application to read
> (at minimum) a hex string and return a Binary value or create a
> literal value of this Binary field.
>
> B
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
 <p><a href="http://feeds.feedburner.com/DotNetDevelopment";><img 
src="http://feeds.feedburner.com/~fc/DotNetDevelopment?bg=99CCFF&amp;fg=444444&amp;anim=1";
 height="26" width="88" style="border:0" alt="" /></a></p>
-~----------~----~----~----~------~----~------~--~---

Reply via email to