Q

Can I key the physical file?

You Can View User Feedback To This Expert Response

I am being told by several programmers that you should never key the physical file, but instead, build logicals to process by key. This goes against what I have always done. I built my payroll master file keyed by social security number and didn't need the additional logical file object as overhead. What is the story on this?

This issue on many occasions is ground for "theoretical wars". The rational of using lf for unique key instead of key definition in the physical file is to separate data representation and data view. However, key definition over the PF is simple and I could not see any disadvantage of using it.

So, in theory or "by the book", you do have to use lf for unique key over a file, in practice you will find it quick and simple to use key over the physical file.

USER FEEDBACK TO THIS EXPERT RESPONSE

  • I just viewed your response to the programmer who asked you why you should never key a physical file, when you needed only one key, so why waste space with a logical file. When you have a hard error either interactively or in a batch (like the elusive decimal data error) and you need to view the record itself to figure out why you got the error, it seems that you make it much more difficult when you key the physical files. With a sequential physical file you can look under WRKACTJOB, work with...option, then display open files to see the record # the program errored on. If the physical files are sequential you can view the record easily through PDM. When they are keyed, you cannot find the record by the record #. From a support after the program is written standpoint, am I missing some other functionality, because it would seem that using sequential physical files makes things easier? -- Jean Turner

==================================
MORE INFORMATION ON THIS TOPIC
==================================

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

The Best Web Links: Tips, tutorials and more.


This was first published in July 2002

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close