Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple 01s in an FD 1

Status
Not open for further replies.

sugrue

IS-IT--Management
Sep 4, 2009
2
US
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
 
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
 
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
 
Thanks to both of you - I appreciate the quick responses.

Jack
 
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
 
Why, thank you Razalas, it's appreciated.

Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top