Solved

How to programitically read in the first 4 bytes of a txt file (that is attached) in C# and return its decimal value of '80' ?

Posted on 2016-10-18
1
63 Views
Last Modified: 2016-10-20
Attached is a file that contains 1 row of data with 40 bytes.
I am writing a C# application that reads this file.
The first 4 bytes of the 1 record in this file represent a field "record length" as follows:

...&          This 1st line is the decimal representation of the data
0005       This 2nd and 3rd line of the data represents the hexadecimal equivalent      
0000      

The value in positions 1 to 4 represents in EBCIDIC the value of '50' and this also represents a value of '80' in its decimal representation equivalent.

Do you know how to read this value into a variable field and interpret the value as '80' in decimal ?
ABC.txt
0
Comment
Question by:zimmer9
1 Comment
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 41848698
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Do you know how I could save the image array ELEMENTS as individual *.tiff files ? 2 40
Name space syntax error 12 44
C# Json POSt to Rest API 4 37
Entity Framework 7 32
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now