From: David Babashanian To: All
Help! I'm writing an interactive program. I need to access two files:
FILEA FILEB CATEGORY COMPANY # DESCRIPTION CATEGORY
The problem is that I need to display the categories in FILEB in Company# and Description order. FILEA is a table. FILEB is a list of categories from FILEA that this company uses. I tried doing a join logical and that went okay. The problem is that I can't construct my key from fields in both files. That in itself is stupid-I thought this was supposed to be a relational database system. If I'm supposed to follow normalizing principles, I shouldn't have to store my description in more than one place. I am aware that 'OPNQRYF' will give me what I need, but that just happens to be against our shop's standards for online programs. I've called IBM and requested a design change but you know the problem! Does anyone know how I can get around this, or why IBM chose not to give us this ability?
From: Tim Johnston To: David Babashanian
As far as I know, when using a join logical, you can only have a key on the first file described in your JFILE keyword in DDS. In order to get it changed, you need to ask your SE for a PASR form. That stands for Program Authorized Service Request. Have your SE submit it to Rochester. Also, you can petition user groups such as COMMON, and any other user group in your area-the idea being that a user group holds more weight than an individual. Lastly, you can urge support from fellow business associates to submit PASRs to their SEs. You will have my support, for I would also like some more flexibility.
The only way around it that I know is to copy that logical to a physical file, and create a logical over the physical, or have a key already defined with the physical. You can check out the July 1991 issue of MC. I wrote a small program to display logical files. I copy it to a physical file in QTEMP and display it with DSPPFM. Your procedure would be similar.
I really don't understand your shop's standards against OPNQRYF. It is a wonderful tool, and it would solve your problems.