[VMS] How to replace Dictionary records?
Chris Sharman
chris.sharman@ccagroup.co.uk
Mon, 13 Dec 2004 09:16:34 +0000
Thomson, Martyn EDUC:EX wrote:
>
> Hello listers,
> I need to add a new field to the record and indices of an RMS file. A
> simple task in POW, but I need to automate the replacement of the
> dictionary definition so it can be migrated between environments.
> The PDL manual states "A change to any of the index attributes requires
> you to unload, create and reload any associated files and record
> structures".
> I have created a PDL script with the new definition, but running it in
> PDL has no effect and gives no error messages. Do I need to delete
> the existing definition before loading the new? I can't find any PDL
> statement that does a global delete aka POW.
> Is there another approach to this? Any advice appreciated.
> I'm using 7.10g1 on OpenVMS Alpha V7.3-2.
Adding a field means actually modifying the data in the file.
If this is a simple extend of the record, it can be done with convert.
Otherwise you'll need to unload the data (Quiz to a subfile, probably),
and then reload it. Best to modify the structure as you write it to the
subfile (add the new field in the right place with the right type).
You can use POW to generate the new file, or maybe even the fdl, but
assuming you want the file reasonably tuned you're best using the RMS
toolset instead - powerhouse can't tune your bucketsizes for
performance, as that requires knowledge of how many records, how
compressible, etc.
$ anal/rms/fdl <datafile> ! creates <filename>.fdl
$ edit/fdl/nointer/script=optim/gran=double/emph=flatter-
/anal=<filename> <filename> ! tunes it reasonably
$ edit/fdl/script=add/gran=double/emph=flatter <filename>
$! adds new key
$ convert/fdl=<filename>/nosort unloaded_data.sf <newdatafile>
You may want to repeat steps 1,2, and 4 to get the index compression
right. I have a script that does that weekly for every indexed file it
can find - data, sysuaf, PH dictionaries, everything.
If you just need to extend the data, you can skip the unload, and add
/pad= to the convert.
If your difficulty's with the pdl, try using qsho to generate it, and/or
post it so someone can tell you what's wrong.
Chris
-----------------------------------------------------------------------
Any views expressed in this message are those of the sender and not
necessarily those of CCA Group. The unauthorized use, disclosure,
copying or alteration of this message is forbidden. The contents of
this message may be confidential and/or privileged, copyright CCA Group
and are intended solely for the use of the individual or entity to whom
they are addressed. Whilst this message has been scanned, CCA Group
cannot guarantee that it is virus free or compatible with your systems
and accepts no responsibility for any loss or damage arising from its
use. The recipient is advised to run their own anti-virus software. If
you receive this message in error please contact
postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
from your computer systems.