AS/400 QUICK Record Selection

Ron Olenic ROlenic@spectra-inc.com
Fri, 2 Nov 2001 16:43:36 -0500


TEMP t-RAT-NAME char*20
TEMP t-RATLET-DOB zoned*8

FILE RATS occurs 9
	select if 0 ne index(RATNAME of RATS,trunc(t-RAT-NAME))  
	
FILE RATLETS SECONDARY
	access via RAT-NO using RAT-NO of RATS
      select if RATLET-DOB of RATLETS eq t-RATTLE-DOB

;There may be no RATTLES for a given RAT
;There is no index for RAT NAME so the GET statement will be SEQUENTIAL

GENERATE THE DEFAULT find procedure and remove the optional from the get on
the secondary file.  A non valid get on the secondary file will stop the
primary file from showing up.

I'm sure that someone else will come up with a better idea, but this should
work!

Ron Olenic
Senior Systems Analyst

-----Original Message-----
From: Daniel Mielke [mailto:DMielke@aicfunds.com]
Sent: Friday, November 02, 2001 3:58 PM
To: Powerhouse List (E-mail)
Subject: AS/400 QUICK Record Selection


Hello All,

I need help in selecting records for display.  I want to select specific
records from a primary file based on records in associated reference files.

TEMP t-RAT-NAME char*20
TEMP t-RATLET-DOB zoned*8

FILE RATS occurs 9
	select if 0 ne index(RATNAME of RATS,trunc(t-RAT-NAME)) &
	and RATLET-DOB of RATLETS eq t-RATLET-DOB
	
FILE RATLETS reference
	access via RAT-NO using RAT-NO of RATS

;There may be no RATLETS for a given RAT
;There is no index for RATNAME so the GET statement will be SEQUENTIAL

QUICK gives an Error stating that it can't find RATLET-DOB, and rightly so,
it hasn't been declared yet.  How do I control the selection of a RATS
record based on data in the referenced file RATLETS?

I was thinking of modifying the FIND or POSTFIND procedures, but I'm not
sure how to start.

Help!

> BUY. HOLD. AND PROSPER.
> 
> Daniel Mielke
> Senior User Analyst
> AIC Limited
> 1-888-710-4242 (4614)
> dmielke@aicfunds.com
> www.aicfunds.com
> 
> 

= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.