Problem solve Get help with specific problems with your technologies, process and projects.

Create multiple record formats

Why can't a physical file have more than one record format?

A physical file can have more than one record format. You can create multiple record formats using the "A/R" specification line in your DDS. Something similar to:

A          R RAMPPF1
A            D1SNAM        50A         ALIAS(SHIPNAME         ) 
A            D1SADD        50A         ALIAS(SHIPADDRESS      ) 
A            D1SCITY       50A         ALIAS(SHIPCITY         ) 
A            D1SREGN        2A         ALIAS(SHIPREGION       ) 
A            D1SPOST       10A         ALIAS(SHIPPOSTALCODE   ) 
A            D1SCNTR       40A         ALIAS(SHIPCOUNTRY      ) 
A            D1CSTID       80A         ALIAS(CUSTOMERID       ) 
A            D1CNAM        50A         ALIAS(CUSTOMERNAME     ) 
A            D1CADD        50A         ALIAS(ADDRESS          ) 
A            D1CCITY       50A         ALIAS(CITY             ) 
 * Keys go here
A          R RAMPPF2                                             
A            D2SNAM        70A         ALIAS(SHIPNAME         ) 
A            D2SADD        60A         ALIAS(SHIPADDRESS      ) 
A            D2SCITY       40A         ALIAS(SHIPCITY         ) 
A            D2SREGN        2A         ALIAS(SHIPREGION       ) 
A            D2SPOST       10A         ALIAS(SHIPPOSTALCODE   ) 
A            D2SCNTR       40A         ALIAS(SHIPCOUNTRY      ) 
A            D2CSTID       80A         ALIAS(CUSTOMERID       ) 
A            D2CNAM        50A         ALIAS(CUSTOMERNAME     ) 
A            D2CADD        50A         ALIAS(ADDRESS          ) 
A            D2CCITY       50A         ALIAS(CITY             ) 
 * Keys go here 


The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

This was last published in July 2003

Dig Deeper on iSeries COBOL programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.