Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 105127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:23:25+00:00 2026-05-11T01:23:25+00:00

I need to create a structure or series of strings that are fixed lenght

  • 0

I need to create a structure or series of strings that are fixed lenght for a project I am working on. Currently it is written in COBOL and is a communication application. It sends a fixed length record via the web and recieves a fixed length record back. I would like to write it as a structure for simplicity, but so far the best thing I have found is a method that uses string.padright to put the string terminator in the correct place.

I could write a class that encapsulates this and returns a fixed length string, but I’m hoping to find a simple way to fill a structure and use it as a fixed length record.

edit–

The fixed length record is used as a parameter in a URL, so its http:\somewebsite.com\parseme?record=’firstname lastname address city state zip’. I’m pretty sure I won’t have to worry about ascii to unicode conversions since it’s in a url. It’s a little larger than that and more information is passed than address, about 30 or 35 fields.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:23:25+00:00Added an answer on May 11, 2026 at 1:23 am

    As an answer, you should be able to use char arrays of the correct size, without having to marshal.

    Also, the difference between a class and a struct in .net is minimal. A struct cannot be null while a class can. Otherwise their use and capabilities are pretty much identical.

    Finally, it sounds like you should be mindful of the size of the characters that are being sent. I’m assuming (I know, I know) that COBOL uses 8bit ASCII characters, while .net strings are going to use a UTF-16 encoded character set. This means that a 10 character string in COBOL is 10 bytes, but in .net, the same string is 20 bytes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer There is not a built in procedure to accomplish this,… May 11, 2026 at 10:04 am
  • added an answer It's a mysql user permission problem. Create a new user… May 11, 2026 at 10:04 am
  • added an answer Transform the nagvigation controller's navigation bar by rotaiong it with… May 11, 2026 at 10:04 am

Related Questions

I need to create a structure or series of strings that are fixed lenght
I need to create a db structure where Supplier inherits from Client. I used
In data processing, I frequently need to create a lookup data structure to map
I need to create an XML schema that validates a tree structure of an
I need to create a historical timeline starting from 1600's to the present day.
I need to create a linked server to a DB2 database on a mainframe.
I need to create a backup of a SQL Server 2005 Database that's only
I need to create a 2D int array of size 800x800. But doing so
I need to create a quick-n-dirty knob control in Visual Basic 2005 Express, the
I need to create a batch file which starts multiple console applications in a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.