HP3000-L Archives

October 2003, Week 5

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:
"Shahan, Ray" <[log in to unmask]>
Reply To:
Shahan, Ray
Date:
Thu, 30 Oct 2003 08:43:13 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (147 lines)
Ven (that'll be your name for short)  :-),

        First, unless you are building concatenated keys for the data sets
to search FROM, don't bother extracting from the sets to files B1/B3 (just
do GETS on the sets themselves)  if you are going to use your current method

        Next, since your table file is sorted, whether you extract the FROM
sets to files or do GETS from the set, let the TABLE command know that your
table file is sorted...this will dramatically increase your search since the
your table search will be a binary search rather than a serial scan (again,
using your current method).

        Now another way to do this type of function (find key of set-a not
in set-b) for large record numbers, you may find that the LINK process is
what you want to do (this email is not the place for such a tutorial, but
the help in SUPRTOOL shows an excellent example of how to do just what
you're asking).

        Finally, should you decide to do TABLE searches, then extract the
data set B1 or B2 or B3 into a file that you will sort by key, TABLE the B1
or B2 or B3 extract (using the SORTED parm of the TABLE command), and then
INPUT FILE-1.  Your if condition is then IF NOT $LOOKUP(TABLE-B1,KEY).  Now
your output file is truly those recs in set B1 that were not in FILE-1.




HTH,


Ray Shahan

"There is so much good in the worst of us,
and so much bad in the best of us,
that it behooves none of us
to talk about the rest of us"
                  --Robert Louis Stevenson?

> -----Original Message-----
> From: Venkataraman Ramakrishnan [SMTP:[log in to unmask]]
> Sent: Wednesday, October 29, 2003 11:19 PM
> To:   [log in to unmask]
> Subject:      [HP3000-L] SUPRTOOL help
>
> Hello everybody,
>
> This is regarding SUPRTOOL.
> We need to do some data clean up, and we are writing jobs for the same.
> We have a dataset A for which we have a search item "key1".
>
> We have to sequentially read and extract all the search items from "A",
> and then find out if any of these "keys" are not present in the datasets
>
> B1, B2 and B3 which have the same search item and report them.
>
> The approach we are thinking of is...
>
> Put all the keys from A IN FILE-1.
> Put all the keys from B1,B2,B3 in FILE-2
> Use $lookup function to find out which are the records in FILE-1 not
> present in FILE-2.
>
> Have copy pasted the way we use below...
> ------------------------------------------------------
> -------------------------------------------------------
> !RUN SUPRTOOL.PUB.ROBELLE
> :PURGE FILE1,TEMP
> :PURGE FILE2,TEMP
> :PURGE RESULT1
> :PURGE RESULT2
> BA XYZ,5,ABC
>
> GET A
> EXT KEY1\KEY4
> SORT KEY1
> OUT FILE1,LINK,TEMP
> XEQ
>
> GET B1
> (24/70) Continue?
> TA KEY1TBL,KEY1,FILE,FILE1,HOLD
> IF $LOOKUP(KEY1TBL,KEY1)
> EXT KEY1
> NUMRECS 500%
> SET SQUEEZE OFF
> OUT FILE2,LINK,TEMP
> XEQ
>
> GET B2
> IF $LOOKUP(KEY1TBL,KEY1)
> EXT KEY1
> SORT KEY1
> OUT FILE2,APPEND
> XEQ
>
> GET B3
> IF $LOOKUP(KEY1TBL,KEY1)
> EXT KEY1
> SORT KEY1
> OUT FILE2,APPEND
> XEQ
>
> IN FILE2
> (47/70) Continue?
> EXT KEY1
> SORT KEY1
> DUP NONE KEYS
> OUT = IN
> XEQ
>
> INPUT FILE1
> TA NOORPHTBL,KEY1,FILE,FILE2,HOLD
> IF NOT $LOOKUP(NOORPHTBL,KEY1)
> EXT KEY1\KEY4
> SORT KEY1
> OUT RESULT1,LINK
> XEQ
>
> INPUT RESULT1
> EXT KEY1\KEY4
> SORT KEY1
> OUT RESULT2,PRN
> XEQ
> ------------------------------------------------------------------------
> ------------------------------------------------------------------------
> -------
> This is a very round about way of doing this....
> And if there is lots of data this will take lts of time and the
> resulting files will be very huge....
> does SUPRTOOL have any functionality wherein we can make this whole
> thing simpler and better??
>
>
> Thanks
> Venkat
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared
by MailMarshal
#####################################################################################

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2