HP3000-L Archives

January 1999, Week 4

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:
"Fontaine, Charles" <[log in to unmask]>
Reply To:
Fontaine, Charles
Date:
Wed, 27 Jan 1999 00:30:15 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (218 lines)
We would be remiss if SUPRTOOL from ROBELLE was not mentioned (and yes, it
really is a super tool!).

comment
----------------------------------------------------------------------------
-----------------
comment This extracts the entire contents of the dset dataset from the
comment dbase database into a self describing file called dataout (flat
file).
comment
----------------------------------------------------------------------------
-----------------
run suprtool.pub.robelle
base dbase,5,pass
get dset
purge dataout
out dataout,sd
exit

(if you wanted to delete the entries out of the dset dataset after creating
the
 flat file dataout, simply change the mode 5 to a mode 1 in the "base"
command and add the delete command on the line following the "get" command)

comment
----------------------------------------------------------------------------
-----------------
comment This puts the entire contents of the self describing file dataout
comment (flat file) into the dset dataset of the dbase database.
comment
----------------------------------------------------------------------------
-----------------
run suprtool.pub.robelle
base dbase,1,pass
in dataout
put dset
exit

It's Y2K compliant and relatively cheap!

Regards,
Charlie "no royalties from Robelle" Fontaine

> ----------
> From:         Paul H. Christidis[SMTP:[log in to unmask]]
> Sent:         Tuesday, January 26, 1999 1:42PM
> To:   [log in to unmask]
> Subject:      Re: DB2DISK and DISK2DB
>
> Query's save command makes a pretty good 'DB2DISK' utility (followed by a
> delete if needed), while if you have MPEX and are dealing with a dataset
> record size that is less than 255 characters the following command file
> can
> be used for the 'DISK2DB' function.
>
> Of course the above are NOT 'production grade' utilities but for one time,
> quick and dirty tasks they are very handy.
>
> Cut and paste into your favorite editor, save as DISK2DB, type "DISK2DB ?"
> for instructions.
>
> Regards
> Paul H. Christidis
>
> ---------------------DISK2DB start cut *+1
> parm diskfile="?", database="?", dataset="?"
> #  Author:   Paul H. Christidis       [log in to unmask]
> #
> #     This is an MPEX command file can be used to load back into
> #     an IMAGE dataset the contents of a flat file.  It is assumed
> #     that the file was created with the save command of QUERY
> #     from the same dataset.
> #
> setvar _db_bell chr(7)
> setvar _db_diskfile UPS("!diskfile")
> setvar _db_database UPS("!database")
> setvar _db_dataset  UPS("!dataset" )
> if _db_diskfile = "?" OR _db_database = "?" OR _db_dataset = "?" then
>   echo !_db_bell
>   echo Usage: ![finfo(hpfile,"fname")] Diskfile Database Dataset
>   echo
>   echo  Diskfile - Name of flat file containing records to be loaded
>   echo        into the database.  Usually this file would have been
>   echo        generated using the QUERY 'save' command.
>   echo
>   echo  Database - Name of IMAGE database.  It is assumed that the
>   echo        user of this command file is the database's creator or
>   echo        that the user has knowledge of the password that gives
>   echo        write/update access to the database.
>   echo
>   echo  Dataset  - Name of dataset, within the above database, into
>   echo        which the contents of the above disk file will be loaded.
>   echo !_db_bell
>   return
> endif
> #
> #  Detrmine if we are within MPEX and invoke it if not.
> #
> setjcw insidempex=0
> setvar _db_mpex "main.pub.vesoft"
> if insidempex = 0 then
>   if finfo("!_db_mpex","exists") then
>     run !_db_mpex; &
>       info="xeq !hpfile '!_db_diskfile','!_db_database','!_db_dataset'"
>     return
>   else
>     echo !_db_bell This command file requires 'MPEX' to execute...
>     deletevar _db_@
>     escape 52
>   endif
> endif
> #
> echo (PHC) DISK2DB using MPEX  98.05.14 !hpdatef !hptimef
> echo
> setvar _db_err 0
> if NOT FEXISTS(_db_diskfile) then
>    echo !_db_bell **Unable to locate file: !_db_diskfile**
>    setvar _db_err _db_err + 1
> else
>    if vefinfo(_db_diskfile).recsize > 255 then
>      echo !_db_bell **Record size of !_db_diskfile is too large
>      setvar _db_err _db_err + 1
>    endif
> endif
> if NOT FEXISTS(_db_database) then
>    echo !_db_bell **Unable to locate database: !_db_database**
>    setvar _db_err _db_err + 1
> elseif vefinfo(_db_database).intcode <> -400 then
>    echo !_db_bell **File (!_db_database) is NOT an IMAGE database...
>    setvar _db_err _db_err + 1
> else
>    setvar _db_owner vefinfo(_db_database).owner = "!hpuser.!hpaccount"
> endif
> if _db_err <> 0 then
>   return
> endif
> #
> if _db_owner then
>    setvar _db_pass ";"
> else
>    echo ** You are NOT the creator of the database ** !_db_bell
>    input _db_pass;prompt="Enter DB's Password: "
> endif
> #
> setvar _db_cntr 0
> setvar _db_dbid  VEDBOPEN("!_db_database,'!_db_pass',1")
> echo 1. Opened database:  ![VEFINFO(_db_database).FULLNAME]
> setvar _db_ffnum VEFOPEN("!_db_diskfile,old")
> echo 2. Opened disk file: ![VEFINFO(_db_diskfile).FULLNAME]
> echo 3. Starting to load records
> while VEFREADV("_db_ftext",_db_ffnum) do
>   IF VEDBPUTL (_db_dbid,_db_dataset,"@;",_db_ftext) then
>     setvar _db_cntr _db_cntr + 1
>   else
>     echo !_db_bell Error adding records to dataset..
>     escape
>   endif
>   if _db_cntr mod 100 = 0 then
>     echo     !_db_cntr Records were processed....
>   endif
> endwhile
> echo !_db_cntr Records were added to the database !_db_bell
> echo 4. Closing database and disk file...
> if NOT VEDBCLOSE(_db_dbid,"",1) then
>   echo !_db_bell *Error while closing the database
> endif
> calc VEFCLOSE(_db_ffnum)
> #
> #Clean Up
> #
> if BOUND(traceon) then
>   showvar _db_@
> else
>   deletevar _db_@
> endif
> --------------------------------DISK2DB End cut *-1
>
>
> ______________________________ Reply Separator
> _________________________________
> Subject: DB2DISK and DISK2DB
> Author:  [log in to unmask] at mime
> Date:    01/25/99 19:48
>
>
> Hello all,
>
> Does anyone know if there is a recent version of the shareware DB2DISK and
> DISK2DB programs?
>
> In particular we are looking for any kind of documentation about them, and
> a
> Y2K compliant, Native Mode version !
>
> Any pointers gratefully received.
>
> Regards,
>
> Rob Rein
> for Diners Club New Zealand.
>
>
> --------------------------------------------------------------------------
> --
> Please Note: This e-mail is only intended to be read by the named
> recipient.
> It may contain information that is confidential, proprietary or the
> subject
> of legal privilege. If you are not the intended recipient, you must delete
> this e-mail and may not use any information contained in it. Legal
> privilege
> is not waived because you have read this e-mail. All content is to be
> treated as confidential unless otherwise specified, and is  not to be
> forwarded to third parties without prior permission by the author. To do
> so
> is a clear breach of the New Zealand Privacy Act.
>

ATOM RSS1 RSS2