TechTalk: Join Logicals

General
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

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.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: