HP3000-L Archives

January 1996, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Steve Dirickson b894 WestWin <[log in to unmask]>
Reply To:
Steve Dirickson b894 WestWin <[log in to unmask]>
Date:
Fri, 12 Jan 1996 17:53:00 P
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
<<I am by no means a Transact expert, but I do not see why the following
program does not give the desired result.  I am reading record numbers
from an MPE file (CLSORT) and matching them with record numbers in a
detail dataset (D-INDEX). I get output for 1 record and then nothing . .
. I must BREAK and ABORT to return to a prompt.>>
 
Are you sure that this is all of the source? While the number of
atrocities in the code is too vast to enumerate (just kidding; it's bad,
but not *that* bad), nothing jumps out that would cause an endless loop.
Indeed, you should get the same record number/name pair repeated as many
times as there are records in the CLSORT.BROSENOW file.
 
You might try something like the following:
 
SYSTEM GETPH,
  base=CLINIC.DATA("READER",1,1),
  file=CLSORT.BROSENOW((ASCII)),
  work=2048,256;
 
define(item)
  MEDREC    x(6);
 
list MEDREC:
     NUMBER:
     NAME;
 
find(serial)CLSORT.BROSENOW,
  list=(MEDREC),
  perform=GET-RECORD;
exit;
 
 
GET-RECORD:
 
<<if 'd-index' is keyed on 'number', use this:>>
  let (NUMBER) = (MEDREC);
  set(key) list(NUMBER);
  find(chain) d-index,list=(NAME),single;
<<if 'number' isn't keyed, use this:>>
  let (NUMBER) = (MEDREC);
  set(match) list(NUMBER);
  find(serial) d-index,
    list=(NUMBER,NAME),
    single;
  reset(option)match;
<<end of key/no key branch>>
if status = 1 then
  display(table) NUMBER,head="Record";NAME,head="Name",lng=30;
return;
 
Steve Dirickson         WestWin Consulting
(360) 598-6111  [log in to unmask]

ATOM RSS1 RSS2