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
75 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 70

Accepted Solution

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

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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