HP3000-L Archives

February 2002, Week 3

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:
Bob Comeau <[log in to unmask]>
Reply To:
Bob Comeau <[log in to unmask]>
Date:
Fri, 15 Feb 2002 16:36:49 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (87 lines)
A very crude method can be used if the number of records is
not extravagant,
and the fields match up between your source and your
destination data sets.

Redirect your report to disc similar to that described but
the record length
only needs to be long enough to hold your longest field
value.

Then in QUERY find all your records, then do a "report
all,x"
The x can be any character.
The sends a stream of field values, one line at at time, to
your output file.
Then use this output as the input to an ADD command.

Remember I said it was crude...

Bob Comeau

 |-----Original Message-----
 |From: HP-3000 Systems Discussion
 |[mailto:[log in to unmask]]On
 |Behalf Of John Pollard
 |Sent: Friday, February 15, 2002 3:32 PM
 |To: [log in to unmask]
 |Subject: Re: Query
 |
 |
 |"Ray Cotton" <[log in to unmask]> wrote
 |
 |> I know it can be done but I am having a bad
 |hair day, I want to use
 |> Query to extract data from on dataset and
 |populate another empty
 |> database with that info.
 |
 |If your new empty data set has the exact same
 |format as your existing
 |populated data set, just "find" the records you
 |need and "save" them to
 |a disk file.
 |
 |But it sounds, from your description, like the
 |two data sets may not
 |have the same format.  In that case, set a file
 |equate for QSLIST which
 |defines a disk file with the characteristics you
 |want - especially a
 |record length long enough to hold all the fields
 |you intend to
 |"transfer".
 |
 |In Query do your "find", then do "output=lp" then
 |do a "report".  For
 |each field you want in the output file, use the
 |"d"etail report
 |statements to pick the input fields you want and
 |to place them in the
 |output record.  Example:
 |
 |:file  qslist=mydata,new;save;rec=-30,20,f,ascii;dev=disc
 |set = users
 |find all  user-id
 |output=lp
 |report
 |d1,user-id,6
 |d1,user-name,30
 |end
 |
 |Getting the data into the other data set is
 |another matter.  I have a
 |Cobol program that I use for that, but I am sure
 |there are tons of such
 |programs around - seems to me there used to be
 |one (many?) available
 |from Interex.
 |
 |* To join/leave the list, search archives, change
 |list settings, *
 |* etc., please visit
http://raven.utc.edu/archives/hp3000-l.html *

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

ATOM RSS1 RSS2