When converting a UniVerse account to jBASE, proceed as follows:
Create a uvbackup of the account to be converted, saving it to a disk file.
Install jBASE and either use the default jBASE SYSTEM file (in ..jBASE\src) , or create your own SYSTEM file
Start up a jBASE shell in the directory you wish to restore the account to.
Use resuv to restore the UniVerse backup file.
If the UniVerse account existed in E:\UVAccounts\HS.SERVICE, then, depending on the version of jBASE and resuv used, the following directory structure may need to exist before resuv commences
E:\Data\Dev (for instance)
E]3A
UVAccounts
Depending on the version of resuv, the “E]3A” and “UVAccounts” directories may not be created if they do not already exist. If the UniVerse account existed in D:\…., then a D]3A directory would need to be created.
àT-ATT FILE0 DEVICE=E:\Data\Backups\pdscbackup LABEL=NONE SIZE=8192
àResuv –v
Depending on the options chosen, the Resuv process will restore the account, resize all the files and, if it finds BASIC source code files, will run the PORTBAS utility to check all the source code for jBASE reserved words. Any reserved words found are changed to mixed case. See Appendix B for all resuv options and Appendix C for all PORTBAS options.
After the resuv procedure completes, move the account directory (HS.SERVICE, in this example) to a suitable location, removing the unnecessary directory structure.
Rename VOC to MD]D (DICT MD), or set your jEDIFILENAME_MD environment variable to point to VOC.
Create a batch file similar the one supplied in Appendix A, so that a jSH session can be started with the appropriate environment variables set.
Open a jSH session in the “HS.SERVICE” directory
Run the jBASE UpdateMD procedure
Replace the existing UniVerse SYSTEM entry in MD with the following SYSTEM item :
001 Q
002 SYSTEM
Remove all &… files and pointers, except for &SAVELISTS&
Create a POINTER-FILE Q pointer entry to &SAVEDLISTS& in your MD
File MD , Record ‘POINTER-FILE’ Insert 11:17:44
Command->
001 Q
002
003 &SAVEDLISTS&
——————————– End Of Record ————————
Remove all ….O files and pointers
Delete all references to files which should not be part of the conversion process.
Create a lib and bin directory.
Compile and catalogue your programs.
Appendix A
An example of a batch file to start a jSH Session for the PDSC account :
Set JBCRELEASEDIR=D:\JBASE
Set JBCGLOBALDIR=D:\JBASE
Set PATH=D:\JBASE\BIN;D:\JBASE\JDP\BIN;
E:\JBAccounts\PDSC\BIN;
D:\Program Files\Microsoft Visual Studio .NET\VC7\bin;
D:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\Bin
Set INCLUDE=D:\jBASE\include;D:\Program Files\Microsoft Visual Studio
.NET\VC7\include
Set LIB=D:\jBASE\lib;D:\Program Files\Microsoft Visual Studio .NET\VC7\lib
Set HOME=E:\JBAccounts\PDSC
Set TERM=VT220
Set JBCLOGNAME=PDSC
Set JEDIFILEPATH=.;E:\JBAccounts\PDSC
Set JEDIFILENAME_MD=E:\JBAccounts\PDSC\VOC
Set JEDIFILENAME_SYSTEM=E:\JBAccounts\SYSTEM
Set JBCOBJECTLIST=E:\JBACCOUNTS\PDSC\LIB;
Set JBCDEV_BIN=E:\JBACCOUNTS\PDSC\BIN
Set JBCDEV_LIB=E:\JBACCOUNTS\PDSC\LIB
CD E:\JBACCOUNTS\PDSC
E:
CLS
“jSH.exe”
Note : The jBASE and C compiler specific locations will need to be changed based on individual installation requirements.
Appendix B
Options for the resuv utility are as follows :
jsh Train ~ –>resuv -?
Usage: resuv {-cehmprstvEMOPRST} {targetdir}
Where:
targetdir specify target directory.
-c suppress check on targetdir being empty
-e Suppress empty directory delete.
-h display help screen
-m Suppress conversion of VOC entries to MD entries.
-p Suppress calling PortBas on all source files.
-r Suppress Restore from Tape phase.
-s Suppress reSize of jBASE files.
-t Suppress deletion of .Type1 files.
-v Verbose mode
-E Delete empty directories.
-M Convert from VOC records to MD records.
-O Object files (those ending in .O ) are to be kept.
-P Run PortBas on all source files.
-R Restore from tape.
-S reSize all jBASE files.
-T Delete all .Type1 files.
-V Verify restore
-d Debug Display On
Appendix C
PORTBAS Syntax and Options PortBas FileName {ItemName} {(Options)} Where Options can be:
Option | Explanation |
A | force conversion of all files |
C | convert reserved keywords to upper case |
E | Expand compressed items |
F | prompt for output file name (Unix mode only) |
H | skip added header to item |
K | prefix illegal variables with “V.” rather than capitalize |
N | suppress .b suffix (Unix mode only) |
O | overwrite original item in source file |
R | do not rename subroutines to item name |
S | create a statistics record |
U | Unix mode; copy item to directory with .b suffix |
V | verbose mode |
X | skip the parse and execute routines (see Notes) |
Z | suppress copy of file |
If ItemName is not supplied, then all items in the source file or outstanding select list are scanned.
Notes
The use of the X option will cause PortBas to skip all of the following actions:
There will be no indentations or formatting of existing source code.
EXECUTE statements will not be converted from the ‘Prime/UniData’ form (e.g. EXECUTE command //OUT. > outvar) to the more generic ‘Pick’ syntax (e.g. EXECUTE command CAPTURING outvar).
Spaces will not be inserted between keywords and the label/numeric value. For example, GOTO42 will not be converted to GOTO 42 and SLEEP300 will not be converted to SLEEP 300.
Line continuation character(s) (e.g. ‘,’ and ‘…’) will not be replaced with the expected slash ‘/’.