Home     Content    

Before installing

Prior to installing VistA on Cache on Linux, increase the number of lines that will be saved on a terminal screen.

These instructions are for those running Cache on Linux, and do not have a Cache client running on a windows box on the LAN. For those using a windows client, simply set the Linux box running Cache as the default using the cache cube, and follow the instruction for installing on Windows. Of course when Caché version 5.1 is available, you will be able to use your web browser on Linux.

Once VistA is installed, continue on the Linux box where VistA is installed and begin a csession.


The following is for installing VistA on Linux without using the cube.

All this will change when Cache 5.1 becomes available with a web interface for doing all this configuring and administrations. I like it.

Make sure cache is running. Normally, a start up script is put into /etc/rc.d/init.d The script is named cache

Then symbolic links are made from /etc/rc.d/rc3.d to it to start and stop

The script from /etc/rc.d/init.d on this computer follows:

-------------------------- snip -----------------------------

#!/bin/bash
#
# Startup script for Cache
#

# The semantics of these two functions differ from the way cache does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure.  So we just do it the way init scripts
# are expected to behave here.

top="/home/CacheSingle"
mgr="/home/CacheSingle/mgr"
csp="/home/CacheSingle/csp"


start() {
        echo -n $"Starting cache: "
	cd $mgr
	$top/cstart
	$csp/CSPnsd start
        return 
}
stop() {
	echo -n $"Stopping cache: "
	cd $mgr
	$csp/CSPnsd stop
	$top/cstop
	return
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  *)
	echo $"Usage: $prog {start|stop}"
	exit 1
esac

exit 1

------------------ end-snip ----------------------------

In the above script, topdir points to the directory where Cache is installed. The single user download version was installed in /home, its top directory is named CacheSingle to distinguish it from other Caché installations.

Now for the start and stop links:
 # cd /home/rc.d/rc3.d
 # ln -s ../init.d/cache S99cache
 # ln -s ../init.d/cache K12cache

The above links will start and stop Cache when Linux is started and stopped.

If you do not want to start and stop Cache automatically do not use these scripts, and use the start and stop instructions found in the extensive Cache Documentation.

Setting up Cache for VistA

start a Cache session

A side note:
Cache on Windows terminal provides an option for logging information to a log file.
On Linux, it is easy to copy and paste from the terminal. When running an application that may have many lines of output, it is generally a good idea to increase the number scroll lines. On this system, a logging profile was created that will scroll 9000 lines, so, when running a session to log, select the logging profile.

Now to begin:

The following will create a database and namespace for VistA


------------- snip -----------------------------
delltest > mkdir CacheDB
delltest > cd CacheDB/
delltest > mkdir VistA
delltest >

delltest > csession CACHE -U %SYS

%SYS>

%SYS>s db=##class(%SYSTEM.Database).%New()

%SYS>s dir = "/home/CacheDB/VistA"

%SYS>set db.Directory = dir

%SYS>set dbst = db.%Save()

%SYS>w dbst
1
%SYS>set ns = "VISTA"

%SYS>SET zuval = $zu(86)

%SYS>w zuval
/home/CacheSingle/cache.cpf*CACHE
%SYS>set cpffile = $P(zuval,"*",0,1)

SYS>w cpffile
/home/CacheSingle/cache.cpf
%SYS>w ns
VISTA
%SYS>do CreateNamespace^%DMCONFIG(ns,dir,,,,,,,)

%SYS>DO REACT^STU1(cpffile)
 
Processing Net sectionNetConfiguration
                    CACHE, CACHE Configuration
NetDirectorySets
                    DELLTEST.RWITKOP.COM, DELLTEST.RWITKOP.COM
 
Reactivating Network
Processing Datasets section
Processing Namespace section
Activating Namespaces
WARNING: Switch is set and may affect production for up to 10 seconds.
Waiting for system activity to finish... ready.
%SYS>h
delltest >
----------------------------- end-snip --------------------------

The necessary commands to create the dataset and namespace were:
csession CACHE -U %SYS start a Cache session
s db=##class(%SYSTEM.Database).%New() create an new database object
s dir = "/home/CacheDB/VistA" set a variable to the DB path
db.Directory = dir the object directory path
set dbst = db.%Save() save the database object
w dbst the save status should be 1
set ns = "VISTA" set a variable to the namespace
Do CreateDataset^%DMCONFIG(ns,,,,,,,,) create the dataset
do CreateNamespace^%DMCONFIG(ns,dir,,,,,,,) Create the namespace
SET zuval = $zu(86) find the configuration file
set cpffile = $P(zuval,"*",0,1) extract the file path/name
DO REACT^STU1(cpffile) reactivate the configuraiton
halt end the session


IMPORTANT:

Any time a cache.dat file is touched outside if Cache, there is danger of corruption of the data. In the above session, we have created a database, dataset, and namespace. The cache.dat is empty, and we are about to replace it with the cache.dat that was downloaded.

At this point, we must either unmount the database, or stop Cache.

To be absolutely certain we can replace the cache.dat safely, STOP Cache.

---------------- snip -----------------------------------

delltest > pushd /etc/rc.d/init.d/

delltest > ./cache stop

                  Cache Shutdown Status:  5:47 pm 22 Dec 2004

       0 interactive jobs (Telnet/Lat)
       0 background jobs (from job command)
       0 Cache Direct server jobs
       0 Cache Objects server jobs
       0 CSP server jobs
       0 ODBC server jobs
      14 system jobs

Do you want to broadcast a message to anyone? No => No
Do you want to see the Cache status report? No => No
Do you want to run the user defined shutdown routine? Yes => Yes
Are you ready for the system to halt? Yes => Yes

17:48:02 Shutting down Cache
17:48:02 Notifying Clients
17:48:02 Executing user-defined shutdown routines
17:48:02 Stopping User Jobs
17:48:04 Stopping Network Servers
17:48:04 Withdrawing from License Domain
17:48:04 Waiting for users to stop
17:48:04 Stopping Client Networking
17:48:04 Removing database locks
17:48:04 Updating Journal File
17:48:04 Waiting for database updates to complete
17:48:04 Database updates complete
17:48:04 Stopping System Jobs
17:48:06 Shutdown complete
delltest >

-------------------- end-snip --------------------------------

Now that Cache is stopped, we can replace the cache.dat with the downloaded cache.dat

----------------- snip --------------------------------


delltest > cd /home/CacheDB/VistA
delltest > ls
CACHE.DAT  CACHE.zip  InstallingVistA.OnLinux
delltest > unzip CACHE.zip
Archive:  CACHE.zip
replace CACHE.DAT? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
  inflating: CACHE.DAT

--------------- end-snip -----------------------------------

DANGER *** DANGER *** DANGER *** DANGER *** DANGER *** DANGER *** DANGER

Never edit your configuration file (cache.cpf) manually.

But before you do, make a backup copy.

MAKE A BACKUP COPY OF YOUR cache.cpf it is in directory where Cache is installed. for this example it is /home/CacheSingle/cache.cpf

Those with the cache cube map your data as instructed in the appropriate document "Installing FOIA VistA for Windows".

On Linux, edit the cache.cpf

find the lines:

[Namespaces]
Nsp_1=%SYS,CACHESYS,CACHESYS,CACHESYS,CACHESYS,CACHELIB,CACHETEMP
Nsp_2=DOCBOOK,DOCBOOK,CACHESYS,DOCBOOK,CACHESYS,CACHELIB,CACHETEMP
Nsp_3=SAMPLES,SAMPLES,CACHESYS,SAMPLES,CACHESYS,CACHELIB,CACHETEMP
Nsp_4=USER,USER,CACHESYS,USER,CACHESYS,CACHELIB,CACHETEMP
Nsp_5=VISTA,VISTA,CACHESYS,VISTA,CACHESYS,CACHELIB,CACHETEMP

[SQL]

and before the line with 
[SQL]

paste the following

[NspMap.VISTA]
GloMap_1=%Z*,VISTA,VISTA,0,-1,
RouMap_1=%DT*,ALL,VISTA
RouMap_2=%RCR,ALL,VISTA
RouMap_3=%XU*,ALL,VISTA
RouMap_4=%ZIS*,ALL,VISTA
RouMap_5=%ZO*,ALL,VISTA
RouMap_6=%ZT*,ALL,VISTA
RouMap_7=%ZV*,ALL,VISTA

before the line
[SQL]

the Cache.cpf file should now appear as follows:


[Namespaces]
Nsp_1=%SYS,CACHESYS,CACHESYS,CACHESYS,CACHESYS,CACHELIB,CACHETEMP
Nsp_2=DOCBOOK,DOCBOOK,CACHESYS,DOCBOOK,CACHESYS,CACHELIB,CACHETEMP
Nsp_3=SAMPLES,SAMPLES,CACHESYS,SAMPLES,CACHESYS,CACHELIB,CACHETEMP
Nsp_4=USER,USER,CACHESYS,USER,CACHESYS,CACHELIB,CACHETEMP
Nsp_5=VISTA,VISTA,CACHESYS,VISTA,CACHESYS,CACHELIB,CACHETEMP

[NspMap.VISTA]
GloMap_1=%Z*,VISTA,VISTA,0,-1,
RouMap_1=%DT*,ALL,VISTA
RouMap_2=%RCR,ALL,VISTA
RouMap_3=%XU*,ALL,VISTA
RouMap_4=%ZIS*,ALL,VISTA
RouMap_5=%ZO*,ALL,VISTA
RouMap_6=%ZT*,ALL,VISTA
RouMap_7=%ZV*,ALL,VISTA

[SQL]

-------------------------------

while editing the cache.cpf, there is one more line you may want to change
Following the [SQL] tag find the following line:
delimitedIds=0

and change it to:
delimitedIds=1


-------------------------------------------------------------

save the cache.cpf and exit the editor 

now restart Cache

------------------ snip ----------------------------------------



delltest > cd /etc/rc.d/init.d/
delltest > ./cache start
Starting cache: Using 'cache.cpf' configuration file
This copy of Cache has been licensed for use exclusively by:
Cache Evaluation
Copyright (c) 1986-2003 by InterSystems Corporation
Any other use is a violation of your license agreement
 
WARNING: Switch is set and may affect production for up to 10 seconds.
Waiting for system activity to finish... ready.
 
 
Setting to InterSystems defaults ... done.
 
 
InterSystems Cache' Server Pages - Network Service Daemon
 
   Version 5.0.5000.0 Gateway Build 662.746 (Multi-Threaded)
 
   Started and Listening on TCP Port 7038
 
      Any further information (or errors) will be recorded
      in CSP's Event Log (CSP.log)
 
   Configuration written in: CSP.ini
 
   Use one of the following commands to close Cache' Server Pages down:
 
      ./CSPnsd stop
   or
      kill -TERM `cat CSPnsd.pid`
delltest >

---------------------------- end snip ------------------------

The VA is still running version 4.1 of Cache. Follow the next step to convert the CACHE.DAT to version 5.


------------------------- snip -----------------------------------


delltest > csession CACHE -U %SYS
 
%SYS>do START^%SYSCONV("/home/CacheDB/VistA")
 
%SYS>

----------------- end-snip ----------------------------------

Tbe conversion may take some time depending on your processor speed.

This is being run on ap P3 433Mhz (how do you spell SSSSLLLLLOOOOOOWWWWW.

but after a period of time, check the status of the conversion as follows:

------------------- snip ------------------------------------

%SYS>do STATUS^%SYSCONV
Here is the status of the conversion in each database:
 
/home/CacheDB/VistA/
     DBRENAME     Completed 12/22/2004 18:52:33
     OBJCLEAN     Completed 12/22/2004 18:52:33
     INCRENAME    Completed 12/22/2004 18:52:37
     MACRENAME    Completed 12/22/2004 18:52:38
     OBJRENAME    Completed 12/22/2004 18:52:35
     INCRECOL     Completed 12/22/2004 18:52:40
     MACRECOL     Completed 12/22/2004 18:52:41
     ROURECOL     Completed 12/22/2004 18:52:39
     OBJRECOL     Completed 12/22/2004 18:52:42
     NEWMAC       Completed 12/22/2004 18:52:34
     RECOMPILE    In progress [QAMEDT6]
/home/CacheSingle/mgr/
     DBRENAME     Not started.
     OBJCLEAN     Not started.
     INCRENAME    Not started.
     MACRENAME    Not started.
     OBJRENAME    Not started.
     INCRECOL     Not started.
     MACRECOL     Not started.
     ROURECOL     Completed 12/22/2004 09:32:08
     OBJRECOL     Completed 12/22/2004 09:32:08
     NEWMAC       Not started.
     RECOMPILE    Not started.
%SYS>

-------------- end-snip ----------------------------------

it is not finished notice that under /home/CacheDB/VistA, the line
     RECOMPILE    In progress [QAMEDT6]
so let it run for a while (watch the disk activity light)

then check the status again

----------------- snip -------------------------------------

%SYS>do STATUS^%SYSCONV
Here is the status of the conversion in each database:
 
/home/CacheDB/VistA/
     DBRENAME     Completed 12/22/2004 18:52:33
     OBJCLEAN     Completed 12/22/2004 18:52:33
     INCRENAME    Completed 12/22/2004 18:52:37
     MACRENAME    Completed 12/22/2004 18:52:38
     OBJRENAME    Completed 12/22/2004 18:52:35
     INCRECOL     Completed 12/22/2004 18:52:40
     MACRECOL     Completed 12/22/2004 18:52:41
     ROURECOL     Completed 12/22/2004 18:52:39
     OBJRECOL     Completed 12/22/2004 18:52:42
     NEWMAC       Completed 12/22/2004 18:52:34
     RECOMPILE    Completed 12/22/2004 18:56:59
/home/CacheSingle/mgr/
     DBRENAME     Not started.
     OBJCLEAN     Not started.
     INCRENAME    Not started.
     MACRENAME    Not started.
     OBJRENAME    Not started.
     INCRECOL     Not started.
     MACRECOL     Not started.
     ROURECOL     Completed 12/22/2004 09:32:08
     OBJRECOL     Completed 12/22/2004 09:32:08
     NEWMAC       Not started.
     RECOMPILE    Not started.
%SYS>

--------------- end-snip -------------------------

VistA is installed, and ready for configuring for your environment. While we are configuring VistA, it will be necessary to edit a couple routines. The authors favorite editor is emacs if Studio is not available (as on Linux). The routine that follows was modified from a routine that enabled a user to use the EDT editor on a VAX.

------------------ include zemacs.ro --------------------- Cache for UNIX^INT^MY FAVORITE EDITOR^~Format=Cache.S~ %RO on 06 Aug 2004 5:27 PM %ZEMACS^INT^1^59744,37873^ %ZEMACS ;Template for using EMACS editor on Cache' Routines ; 16 Jul 2004 7:15 AM ;R. Witkop, 16 Jul 2004 ; last modified 7/28/2004 N ROU,FIL ASK ; R !,"Routine to edit: ",ROU Q:ROU="" I '$D(^ROUTINE(ROU)) W " (does not exist)" g ASK l +^ZEMACS(ROU):10 E W " (somebody is editing the routine)" G ASK S FIL=$TR(ROU,"%._","")_".TXT",$ZT="ERR" O FIL:"WNS" U FIL X "ZL @ROU ZP" C FIL I $ZF(-1,"emacs "_FIL) O FIL:"R" S $ZT="ERR" U FIL X "ZL ZS @ROU" ERR S $ZT="" I $ZE'="",$ZE'="" U 0 W !,$ZE C FIL:"D" I $ZF(-1,"rm -f "_FIL_"*") L -^ZEMACS(ROU) Q -------------- end zemacs.ro ------------------------------- Cut and paste to a .ro file and import it. The author prefers to import it into the %sys namespace. ---------------------- snip -------------------------------- VISTA>zn "%sys" %SYS>DO ^%RI Input routines from Sequential Device: /home/witkop/Transfer/zemacs.ro Parameters: "RS"=> File written by Cache for UNIX using %RO on 06 Aug 2004 5:27 PM with extension INT and with description: MY FAVORITE EDITOR ( All Select Enter List Quit ) Routine Input Option: All Routines If a selected routine has the same name as one already on file, shall it replace the one on file? No => No Recompile? Yes => Yes Display Syntax Errors? Yes => Yes ^ indicates routines which will replace those now on file. @ indicates routines which have been [re]compiled. - indicates routines which have not been filed. %ZEMACS.INT@ 1 routine processed. %SYS> --------------------- end-snip ---------------------------------- If you have a different favorite editor, by all means, use it. Before continuing, examine what has been done. 1. Cache is installed. 2. the VistA namespace, database is configured for Cache. 3. A routine to call an external (to Cache) editor has been installed. 4. The FOIA VistA CACHE.DAT has replaced the empty CACHE.DAT in the vista database directory The steps remaining include 1. configuring VistA for Linux 2. configuring VistA for your site. 3. configure file manager 4 configure taskman 5. configure a system manager 6. configure some hardware settings It is unfortunate that the VA does not have an option for configuring VistA for Linux. The closest match is on line three when running ^ZTMGRSET. -------------- snip -------------------------
VISTA>DO ^ZTMGRSET
 
 
ZTMGRSET Version 8.0 **34,36,69,94,121,127,136,191,275**
HELLO! I exist to assist you in correctly initializing the current account.
 
THIS MAY NOT BE THE MANAGER UCI.
 I think it is VISTA,VISTA. Should I continue anyway? N//Y
I think you are using OpenM-NT
Which MUMPS system should I install?
 
1 = VAX DSM(V6), VAX DSM(V7)
2 = MSM-PC/PLUS, MSM for NT or UNIX
3 = OpenM for NT, Cache/NT, Cache/VMS
4 = Datatree, DTM-PC, DT-MAX
5 = MVX,ISM VAX
6 = ISM (UNIX, Open VMS)
7 = GT.M (VMS)
8 = GT.M (Unix)
System: 3

-------------- end-snip ---------------------------

It turns out that NT is an offshoot of the MACH kernel (Open Source of sorts).
Unfortunately, NT is not POSIX compliant, and there are a few subtle 
differences that need to be taken care of to configure Cache to run on 
Linux.


The complete log for ZTMGRSET follows:

-------------- snip ----------------------------



VISTA>DO ^ZTMGRSET
 
 
ZTMGRSET Version 8.0 **34,36,69,94,121,127,136,191,275**
HELLO! I exist to assist you in correctly initializing the current account.
 
THIS MAY NOT BE THE MANAGER UCI.
 I think it is VISTA,VISTA. Should I continue anyway? N//Y
I think you are using OpenM-NT
Which MUMPS system should I install?
 
1 = VAX DSM(V6), VAX DSM(V7)
2 = MSM-PC/PLUS, MSM for NT or UNIX
3 = OpenM for NT, Cache/NT, Cache/VMS
4 = Datatree, DTM-PC, DT-MAX
5 = MVX,ISM VAX
6 = ISM (UNIX, Open VMS)
7 = GT.M (VMS)
8 = GT.M (Unix)
System: 3
 
I will now rename a group of routines specific to your operating system.
Routine: ZOSVONT      Loaded, Saved as %ZOSV
Routine:
Routine: ZIS4ONT      Loaded, Saved as %ZIS4
Routine: ZISFONT      Loaded, Saved as %ZISF
Routine: ZISHONT      Loaded, Saved as %ZISH
Routine: XUCIONT      Loaded, Saved as %XUCI
Routine:
Routine: ZISTCPS      Loaded, Saved as %ZISTCPS
Routine: ZOSVKRO      Loaded, Saved as %ZOSVKR
Routine: ZOSVKSOE     Loaded, Saved as %ZOSVKSE
Routine: ZOSVKSOS     Loaded, Saved as %ZOSVKSS
Routine: ZOSVKSD      Loaded, Saved as %ZOSVKSD
 
NAME OF MANAGER'S NAMESPACE: VISTA//
PRODUCTION (SIGN-ON) NAMESPACE: VISTA//
NAME OF THIS CONFIGURATION: VISTA//
 
ALL SET UP
 
 
 
 
Now to load routines common to all systems.
Routine: ZTLOAD       Loaded, Saved as %ZTLOAD
Routine: ZTLOAD1      Loaded, Saved as %ZTLOAD1
Routine: ZTLOAD2      Loaded, Saved as %ZTLOAD2
Routine: ZTLOAD3      Loaded, Saved as %ZTLOAD3
Routine: ZTLOAD4      Loaded, Saved as %ZTLOAD4
Routine: ZTLOAD5      Loaded, Saved as %ZTLOAD5
Routine: ZTLOAD6      Loaded, Saved as %ZTLOAD6
Routine: ZTLOAD7      Loaded, Saved as %ZTLOAD7
Routine: ZTM          Loaded, Saved as %ZTM
Routine: ZTM0         Loaded, Saved as %ZTM0
Routine: ZTM1         Loaded, Saved as %ZTM1
Routine: ZTM2         Loaded, Saved as %ZTM2
Routine: ZTM3         Loaded, Saved as %ZTM3
Routine: ZTM4         Loaded, Saved as %ZTM4
Routine: ZTM5         Loaded, Saved as %ZTM5
Routine: ZTM6         Loaded, Saved as %ZTM6
Routine: ZTMS         Loaded, Saved as %ZTMS
Routine: ZTMS0        Loaded, Saved as %ZTMS0
Routine: ZTMS1        Loaded, Saved as %ZTMS1
Routine: ZTMS2        Loaded, Saved as %ZTMS2
Routine: ZTMS3        Loaded, Saved as %ZTMS3
Routine: ZTMS4        Loaded, Saved as %ZTMS4
Routine: ZTMS5        Loaded, Saved as %ZTMS5
Routine: ZTMS7        Loaded, Saved as %ZTMS7
Routine: ZTMSH        Loaded, Saved as %ZTMSH
Routine: ZTER         Loaded, Saved as %ZTER
Routine: ZTER1        Loaded, Saved as %ZTER1
Routine: ZIS          Loaded, Saved as %ZIS
Routine: ZIS1         Loaded, Saved as %ZIS1
Routine: ZIS2         Loaded, Saved as %ZIS2
Routine: ZIS3         Loaded, Saved as %ZIS3
Routine: ZIS5         Loaded, Saved as %ZIS5
Routine: ZIS6         Loaded, Saved as %ZIS6
Routine: ZIS7         Loaded, Saved as %ZIS7
Routine: ZISC         Loaded, Saved as %ZISC
Routine: ZISP         Loaded, Saved as %ZISP
Routine: ZISS         Loaded, Saved as %ZISS
Routine: ZISS1        Loaded, Saved as %ZISS1
Routine: ZISS2        Loaded, Saved as %ZISS2
Routine: ZISTCP       Loaded, Saved as %ZISTCP
Routine: ZISUTL       Loaded, Saved as %ZISUTL
Routine: ZTPP         Loaded, Saved as %ZTPP
Routine: ZTP1         Loaded, Saved as %ZTP1
Routine: ZTPTCH       Loaded, Saved as %ZTPTCH
Routine: ZTRDEL       Loaded, Saved as %ZTRDEL
Routine: ZTMOVE       Loaded, Saved as %ZTMOVE
Want to rename the FileMan routines: No// yes
Routine: DIDT         Loaded, Saved as %DT
Routine: DIDTC        Loaded, Saved as %DTC
Routine: DIRCR        Loaded, Saved as %RCR
Installing ^%Z editor
Setting ^%ZIS('C')
 
Now, I will check your % globals...........
ALL DONE
VISTA>

------------------- end-snip

That was step 35 in the FOIA doc.

Continuing with step 36 initialize FileMan

---------------------- snip ------------------------------------


VISTA>DO ^DINIT
 
 
VA FileMan V.22.0
 
 
Initialize VA FileMan now?  NO//Y
 
SITE NAME: TECHNICAL INTEGRATION SERVICE// VISTA TEST INSTALL
 
SITE NUMBER: 50// 5555..........................
 
Now loading MUMPS Operating System File....
 
Now loading DIALOG and LANGUAGE Files..........................................................
 
 
TYPE OF MUMPS SYSTEM YOU ARE USING: CACHE/OpenM//
 
Now loading other FileMan files--please wait.................................................................................................................................................................................................................
..........
 
The following files have been installed:
   .11     INDEX
   .2      DESTINATION
   .31     KEY
   .4      PRINT TEMPLATE
   .401    SORT TEMPLATE
   .402    INPUT TEMPLATE
   .403    FORM
   .404    BLOCK
   .44     FOREIGN FORMAT
   .46     IMPORT TEMPLATE
   .5      FUNCTION
   .6      DD AUDIT
   .7      MUMPS OPERATING SYSTEM
   .81     DATA TYPE
   .83     COMPILED ROUTINE
   .84     DIALOG
   .85     LANGUAGE
  1        FILE
  1.1      AUDIT
  1.11     ARCHIVAL ACTIVITY
  1.12     FILEGRAM HISTORY
  1.13     FILEGRAM ERROR LOG
  1.2      ALTERNATE EDITOR
  1.521    SQLI_SCHEMA
  1.52101  SQLI_KEY_WORD
  1.5211   SQLI_DATA_TYPE
  1.5212   SQLI_DOMAIN
  1.5213   SQLI_KEY_FORMAT
  1.5214   SQLI_OUTPUT_FORMAT
  1.5215   SQLI_TABLE
  1.5216   SQLI_TABLE_ELEMENT
  1.5217   SQLI_COLUMN
  1.5218   SQLI_PRIMARY_KEY
  1.5219   SQLI_FOREIGN_KEY
  1.52191  SQLI_ERROR_TEXT
  1.52192  SQLI_ERROR_LOG
 
 
Re-indexing entries in the DIALOG file.....................
 
Compiling all forms ...
 
   DICATT                          (#.001)
   DIPTED                          (#.1001)
   DIKC EDIT                       (#.1101)
   DIKC EDIT UI                    (#.1102)

    ...  many lines ...

   INSTITUTION EDIT                (#95)
   PRSA LD POST                    (#96)
   XUDEVICE LPD                    (#97)
   XUDEVICE TRM                    (#98)
   KMPD PARAMETERS EDIT            (#99)
   LREPI9                          (#100)
 
 
INITIALIZATION COMPLETED IN 23 SECONDS.
VISTA>

------------------------ end-snip ---------------------------------

Before continuing with step 37, the console must be prepared to run in Linux

This step is not in "Installng FOIA VistA for Windows" but by makeing the change here, will complete this document since the remainder is identical no matter which installation of Cache you use. (I think). Actually, when we get to setting devices, there will be a few more changes.


-------------- snip --------------------------------

VISTA>d Q^DI
 
 
VA FileMan 22.0
 
 
Select OPTION: 1  ENTER OR EDIT FILE ENTRIES
 
 
 
INPUT TO WHAT FILE: DOMAIN// 3.5  DEVICE  (38 entries)
EDIT WHICH FIELD: ALL//
 
 
Select DEVICE NAME: CONSOLE      CONSOLE     |TRM|
NAME: CONSOLE//
LOCATION OF TERMINAL: CONSOLE//
Select MNEMONIC:
LOCAL SYNONYM:
$I: |TRM|// /dev/pts
VOLUME SET(CPU):
SIGN-ON/SYSTEM DEVICE: ^
 
 
Select DEVICE NAME:
 
 
Select OPTION:
VISTA>
------------------------- end-snip -----------------

The only change was for $I, |TRM| is replaced with /dev/pts

It may not look like much, but it caused me grief till I received help.

ZOSV needs to be edited if you are running the single user version:


---------------------- snip ------------------------------------

%SYS>zn "vista"
 
VISTA>DO ^%ZEMACS
 
Routine to edit: %ZOSV

---------------------- end snip ------------------- 

emacs editor came up in its own window,

Since we are running a single user version of Cache 5.0.x, I am goind to simply return 20, no matter what. Note that this is VistA running on a Single user version, and what I am about to do is not to be used in a production system

find the lines:

         ;To get available jobs from Cache 5.0
         I v'<5 D  Q AVJ
         . X "S ZOSV=$ZU(5),%=$ZU(5,""%SYS"") S AVJ=$system.License.LUAvailable(),%=$ZU(5,ZOSV)"

and add the following line before the if (I) statement

         ;To get available jobs from Cache 5.0
	 QUIT 20 ;
         I v'<5 D  Q AVJ
         . X "S ZOSV=$ZU(5),%=$ZU(5,""%SYS"") S AVJ=$system.License.LUAvailable(),%=$ZU(5,ZOSV)"

returning 20 processes is safe since Cache was modified to help VistA developers run more processes on the single user license.

Yes I can add code to do an exact count of available jobs remaining, but this is quick.

we are using 20 because it is more realistic than 99 in the FOIA doc.

I really don't like this cludge, and will change it (I think I can) when there is time.

If you are using a fully licensed version of Cache, do not change anything in %ZOSF in step 38.

Next edit XWBTCPC

------------- snip ---------------

VISTA>DO ^%ZEMACS
 
Routine to edit: XWBTCPC


------------ end snip ---------------------

find the block of code:

-------------- snip --------------------------
WRITE(STR) ;Write a data string
         I XWBOS="MSM" W STR Q
         ; send data for DSM (requires buffer flush (!) every 511 chars)
         ;IF XWBOS="DSM"!(XWBOS="UNIX")!(XWBOS="OpenM) next line
         I $L(STR)<511 W:($X+$L(STR))>511 ! W STR Q
         ;Handle a long string
         W:$X>0 ! ;Flush what is in the buffer
         F  Q:'$L(STR)  W $E(STR,1,510),! S STR=$E(STR,511,99999)
         Q
------- end-snip -----------------------

and modify the line:

         I $L(STR)<511 W:($X+$L(STR))>511 ! W STR Q

to 

         I $L(STR)<511 W:($X+$L(STR))>511 ! W STR W:XWBOS="OpenM"&(+$$VERSION^%ZOSV()'<5) ! Q

the block of code after my changes is:

-------- snip ------------------
WRITE(STR) ;Write a data string
         I XWBOS="MSM" W STR Q
         ; send data for DSM (requires buffer flush (!) every 511 chars)
         ;IF XWBOS="DSM"!(XWBOS="UNIX")!(XWBOS="OpenM) next line
         ; I $L(STR)<511 W:($X+$L(STR))>511 ! W STR Q
         I $L(STR)<511 W:($X+$L(STR))>511 ! W STR W:XWBOS="OpenM"&(+$$VERSION^%ZOSV()'<5) ! Q
         ;Handle a long string
         W:$X>0 ! ;Flush what is in the buffer
         F  Q:'$L(STR)  W $E(STR,1,510),! S STR=$E(STR,511,99999)
         Q
---------- end-snip ---------------------------

save your changes.and exit your editor.

The next steps continue at step 41 in the document provided by the
VA titled

"Installing FOIA on Cache for Windows"

Good luck.