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
54 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How do I get the unique ID after insert? 87 90
Linq help 1 16
Exception in Log4Net 1 19
Round up to 100% in .NET 10 45
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

18 Experts available now in Live!

Get 1:1 Help Now