Quick question, pardon the pun
csysprog@taipan.admin.bhtafe.edu.au
csysprog@taipan.admin.bhtafe.edu.au
Wed, 31 Mar 1999 11:43:21 +1100
It is hard to be sure of the exact intention of Chris's code but the following
variation works at our site.
screen temp
temp t_student_id char*7 reset at startup
temp t_surname_s char*20 reset at startup
file student_detl primary
access via student_id
file student reference alias student_ref
access via student_id using student_id of student_detl
file student designer
access via surname_s using t_surname_s
align (1,4,21)(41,44,61)
field student_id of student_detl nochange
field surname_s of student_ref upshift
field other_names_s of student_ref
procedure entry
begin
accept student_id of student_detl
end
procedure path
begin
prompt student_id of student_detl into t_student_id
if promptok
then let path = 1
if path = 0
then begin
prompt surname_s of student_ref into t_surname_s
if promptok
then begin
get student opt via surname_s using t_surname_s
if accessok
then begin
let t_student_id = student_id of student
let path = 1
end
end
end
if path = 0
then begin
let path = 3
end
end
procedure find
begin
if path = 1
then get student_detl via student_id using t_student_id
if path = 3
then get student_detl sequential
end
build
Hope this helps,
John Hogan
Box Hill Institute
Melbourne, Australia
Web: http://www.bhtafe.edu.au/
"Gassett, Chris" wrote:
> If the find on the primary file fails how do I search on the designer file
> using quick? Main goal is to find on employeeno from worker_comp, if that
> fails then search via surname from designer table. We are using PH ver.
> 7.33 on HP.
>
> SCREEN TEMP
> FILE WORKER_COMP PRIMARY
> FILE EMPLOYEES DESIGNER
> ALIGN (1,4,21)(41,44,61)
> FIELD EMPLOYEENO OF WORKER_COMP REQUIRED NOCHANGE &
> NULL VALUE NOT ALLOWED
> FIELD SURNAME OF EMPLOYEES
> FIELD GIVEN_NAME OF EMPLOYEES DISPLAY
> PROCEDURE ENTRY
> BEGIN
> ACCEPT EMPLOYEENO OF WORKER_COMP
> END
> PROCEDURE PATH
> BEGIN
> REQUEST EMPLOYEENO OF WORKER_COMP
> IF PROMPTOK
> THEN LET PATH = 1
> IF PATH = 0
> THEN BEGIN
> REQUEST SURNAME OF EMPLOYEES
> IF PROMPTOK
> THEN LET PATH = 2
> END
> IF PATH = 0
> THEN BEGIN
> LET PATH = 3
> END
> END
> PROCEDURE FIND
> BEGIN
> IF PATH = 1
> THEN GET WORKER_COMP VIA EMPLOYEENO
> IF PATH = 2
> THEN GET EMPLOYEES VIA EMPLOYEENO
> IF PATH = 3
> THEN GET WORKER_COMP SEQUENTIAL
> END
> BUILD
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.