×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Multiple 01s in an FD

Multiple 01s in an FD

Multiple 01s in an FD

(OP)
Please excuse the basic question, but my COBOL is very, very rusty.

I am looking at some code written by someone else.  There is an FD with multiple 01s with different record layouts, one for billing, one for payments, one for adjustments, etc.

The READ statement does not READ...INTO, like I remember.  So, basically, I am looking to verify my assumption that the multiple 01s are an implied REDEFINE and that based on the value of a xx-SORT-CODE (the first 3 bytes of each 01), you decide which 01 to use.

Thanks, Jack

RE: Multiple 01s in an FD

Jack,

your memory is not as faulty as you think.  That is correct.  The multiple 01 records in the FD implicitly redefine the same storage.

Code what you mean,
and mean what you code!
But by all means post your code!

Razalas

RE: Multiple 01s in an FD

One other thing to keep in mind: If any of the 01s is a different length than the others, the compiler assumes that the file is variable length.  Therefor, you must WRITE the appropriate rec to assure that the correct length rec is written.

If they all are the same length you can WRITE any of the 01s defined.  

Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
 

RE: Multiple 01s in an FD

(OP)
Thanks to both of you - I appreciate the quick responses.

Jack

RE: Multiple 01s in an FD

Slade,

a valuable point to remember. Definitely worth a star!thumbsup

Code what you mean,
and mean what you code!
But by all means post your code!

Razalas

RE: Multiple 01s in an FD

Why, thank you Razalas, it's appreciated.  

Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close