HP 3000 Manuals

USING FCOPY WITH NLS KSAM FILES [ KSAM/3000 Reference Manual ] MPE/iX 5.0 Documentation


KSAM/3000 Reference Manual

USING FCOPY WITH NLS KSAM FILES 

COPYING FROM A KSAM FILE TO ANOTHER KSAM FILE 

If the KSAM file already exists (built via KSAMUTIL or programmatically)
the keys of type BYTE are put into the new file according to the
collating sequence belonging to the language of the "TO" file.  If the
file does not exist, a new file is built with the same language attribute
as the "FROM" file.

CHANGING THE LANGUAGE ATTRIBUTE OF A KSAM FILE 

FCOPY cannot be used to change the language attribute of an existing
file.  KSAMUTIL must be used to build a new KSAM file with the new
language attribute.  Then the data can be copied to this file using
FCOPY. Keys of type BYTE in the destination key file will be ordered
according to the collating sequence of the new language.

MOVING NLS KSAM FILES TO PRE-NLS MPE 

Restoring a KSAM file with a native language attribute other than
NATIVE-3000 to a system without NLS installed can result in an incorrect
key sequence in the key file for tvpe BYTE keys.  Systems without NLS
installed do not recognize any collating sequence except NATIVE-3000.

If a file with a native language attribute otherthan NATIVE-3000 is
restored, the first FOPEN on the file will return the same error
condition code as if a system failure occurred while the file was opened.
KSAMUTIL should be used to build a new KSAM file, The file with the
native language attribute is recovered, and FCOPY is used to copy the
recovered file into the new KSAM file.  See Figure F-5 for an example of
this recovery procedure.
____________________________________________________________________________________
|                                                                                  |
|      :RUN KSAMUTIL.PUB.SYS                                                       |
|                                                                                  |
|      HP32208A.03.10  SAT,  SAT,  MAY 26,1984,  12:33 PM  KSAMUTIL VERSION:A.03.10|
|      >BUILD NEWDATA;REC=-80,3,F,ASCII;KEY=B,1,4,:KEYFILE =NEWKEY                 |
|      >KEYINFO OLDDATA;RECOVER                                                    |
|                                                                                  |
|      >EXIT                                                                       |
|                                                                                  |
|      :FCOPY FROM-OLDDATA;TO-NEWDATA;KEY=0                                        |
|                                                                                  |
|      :RUN KSAMUTIL.PUB.SYS                                                       |
|                                                                                  |
|      HP32208A.03.10 SAT, SAT,MAY 26,1984, 12:33 PM KSAMUTIL VERSION:A.03.10      |
|      >PURGE OLDDATA                                                              |
|      >RENAME NEWDATA,OLDDATA                                                     |
|      >RENAME NEWKEY,DLDKEY                                                       |
|      >EXIT                                                                       |
____________________________________________________________________________________

          Figure F-5.  KSAM Recovery Procedure 



MPE/iX 5.0 Documentation