<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pickwiki.org/index.php?action=history&amp;feed=atom&amp;title=STD.SETUP</id>
	<title>STD.SETUP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pickwiki.org/index.php?action=history&amp;feed=atom&amp;title=STD.SETUP"/>
	<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=STD.SETUP&amp;action=history"/>
	<updated>2026-04-28T22:14:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://pickwiki.org/index.php?title=STD.SETUP&amp;diff=2221&amp;oldid=prev</id>
		<title>Conversion script: link fix</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=STD.SETUP&amp;diff=2221&amp;oldid=prev"/>
		<updated>2015-02-26T23:48:56Z</updated>

		<summary type="html">&lt;p&gt;link fix&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;HomePage&amp;gt;&amp;gt;SourceCode&amp;gt;&amp;gt;BasicSource&amp;gt;&amp;gt;SvnWrapper&amp;gt;&amp;gt;STD.SETUP&lt;br /&gt;
&lt;br /&gt;
Run this in &amp;#039;LOGIN&amp;#039; to set up global commons.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
                                 subroutine STD.SETUP&lt;br /&gt;
* SUB: Standard Setup Module for all RMS programs.&lt;br /&gt;
* =======================================================================================&lt;br /&gt;
* 28.Mar.2013 james: Add ALL COMMON&amp;#039;S that have DIM&amp;#039;s to assure THIS BREAKS: see below.&lt;br /&gt;
* 29.Dec.2010 james: Keep RMS$USER.GROUP.S in RMS.COMMON now too&lt;br /&gt;
* 12.Jan.2010 james: Reset FORM$NUM.PARAMS and FORM$PARAM.VARS now in FORM.COMMON.&lt;br /&gt;
* 07.Jul.2009 james: Reset the DEBUG.ON flag to @FALSE &amp;#039;just in case&amp;#039;.&lt;br /&gt;
* 16.Apr.2009 james: Clear new DC$TEST.FLAGS for HIGH.COST testing&lt;br /&gt;
* 27.Mar.2009 james: Call LOAD.ENV.COMMON with EC.RELOAD now in case we LOGTO.&lt;br /&gt;
* 04.Feb.2009 jim: Call OPEN.FILE with RESET to clear Open Files Common &amp;#039;just in case&amp;#039;.&lt;br /&gt;
* 15.Aug.2008 jim: Let&amp;#039;s try loading ENV.COMMON here now ? It&amp;#039;s in SELECT.FORMS anyway.&lt;br /&gt;
* 25.Jun.2008 jim: Reset &amp;#039;EC$IS.LOADED&amp;#039; so it get&amp;#039;s re-loaded if this is rerun ( LOGTO ).&lt;br /&gt;
* 11.Mar.2008 manoj: Removed open file PROGRAM since we will not rename PLAN file&lt;br /&gt;
* 28.Feb.2008 jim: Cache has problems with &amp;#039;AUTOLOGOUT&amp;#039; ? Just skip it for now for Cache.&lt;br /&gt;
* 25.Feb.2008 jim: Initialize DC$TEST.DATE just in case.&lt;br /&gt;
* 16.Jan.2008 jim: Open LAST.ID.FILE for INPUT and other misc programs.&lt;br /&gt;
* 20.Jun.2007 jim: FKEY.ACTS is obsolete.&lt;br /&gt;
* 24.Jan.2007 jim: Add RMS$PID; different method for Cache.&lt;br /&gt;
* 13.Sep.2006 jim: Add PLATFORM &amp;#039;Cache&amp;#039; or &amp;#039;[[UniVerse]]&amp;#039; for Cache migration.&lt;br /&gt;
* 29.Mar.2006 precy: Add OPEN and READ new USER file to access USER record.&lt;br /&gt;
* 30-Nov-2005 jay: Removed uname -n from being run per execution to only if not exising in CONTROL.LOCAL&lt;br /&gt;
*                  Implemented CONTROL.LOCAL&lt;br /&gt;
* 19-Sep-2005 jim: Use SYSTEM(2) and SYSTEM(3) for Screen Width[[/Height]]&lt;br /&gt;
* 14-Sep-2005 jim: Remove PRINT statements if TERMINAL and/or USER are not&lt;br /&gt;
*                  found: who cares anymore ?! Phantoms get junk...&lt;br /&gt;
* 05-Aug-2005 jay: Removed &amp;quot;uname -s&amp;quot; and hard coded &amp;quot;LINUX&amp;quot; in common var SYSTEM.OS &lt;br /&gt;
* 01-Jul-2005 jay: Added REPLICATION.INIT temporarily to avoid having to release&lt;br /&gt;
*                  war&amp;#039;s to all the server at once&lt;br /&gt;
* 09/12/2002 jay: Added SYSTEM.OS so that we could seperate programs based on os&lt;br /&gt;
*                 Also Made the ttyp fix&lt;br /&gt;
* 05/06/1999 jim: Finally use &amp;#039;uname -n&amp;#039; for SCO to get the right system name !&lt;br /&gt;
* 06/08/1988 jim: TYPE &amp;#039;T&amp;#039; TOP 1, BOT 23 FOR CULVER PLUMBING&lt;br /&gt;
*                 ALSO ADDED &amp;#039;EJECT&amp;#039; FOR RITEMAN AND ALL PRINTING !&lt;br /&gt;
* 09/15/1986 jim: WELL, NOW I KNOW WHY ! RITEMAN GOES INTO GRAPHICS MODE !&lt;br /&gt;
*                 @(-1) CHANGED BACK TO CHAR(12). SHIT&lt;br /&gt;
* 07/23/1986 jim: CLR changed to @(-1); was CHAR(12) I know there&amp;#039;s a reason ?&lt;br /&gt;
* =======================================================================================&lt;br /&gt;
* $Id$&lt;br /&gt;
* =======================================================================================&lt;br /&gt;
&lt;br /&gt;
  deffun GET.PID                 ;*  Method of getting Process ID differs in Cache&lt;br /&gt;
  deffun OPEN.FILE( FILENAME, FLAGS, FILEVAR, ERR.MSG )&lt;br /&gt;
&lt;br /&gt;
  $include RMS.BP INPUT.COMMON   ;*  LAST.ID.FILE; also includes CURRENT.COMMON&lt;br /&gt;
  $include RMS.BP ENV.COMMON     ;*  PWD, etc.&lt;br /&gt;
  $include RMS.BP FORM.COMMON    ;*  Includes EQU.PRINTER, EQU.TERMINAL, EQU.LINE&lt;br /&gt;
  $include DSI.BP DSI.COMMON     ;*  DSI Standard files and Unused slots&lt;br /&gt;
  $include DSI.BP TIMING.COMMON  ;*  Timing Configuration&lt;br /&gt;
&lt;br /&gt;
* ----------------------------------------------------------------------------&lt;br /&gt;
  *  Add ALL COMMON&amp;#039;S that have DIM&amp;#039;s to assure THIS BREAKS if any of the DIM&amp;#039;s are&lt;br /&gt;
  *  changed! This is so WEBSITE.INIT breaks and does NOT hand over the session to another&lt;br /&gt;
  *  user if programs with changes to Global Commons are compiled while the session is open.&lt;br /&gt;
  *  (I can&amp;#039;t see what it could hurt?: most of these will be loaded anyway...).&lt;br /&gt;
  *  (Note that &amp;#039;DSI&amp;#039; only things like PRICING.COMMON and INVOICE.COMMON are NOT included)&lt;br /&gt;
&lt;br /&gt;
  $include DSI.BP APR.COMMON&lt;br /&gt;
  $include DSI.BP FORM.LIST.COMMON&lt;br /&gt;
  $include DSI.BP HIGH.COST.COMMON&lt;br /&gt;
  $include DSI.BP WEB.DOCS.COMMON&lt;br /&gt;
&lt;br /&gt;
  $include RMS.BP FILE.CONFIG.COMMON&lt;br /&gt;
  $include RMS.BP REPLICATION.COMMON&lt;br /&gt;
&lt;br /&gt;
  $include DA.BP  DA.COMMON  ;*  This shares CUSTOMER() with INVOICE.COMMON !?&lt;br /&gt;
  $include DA.BP  PROCESS.COMMON&lt;br /&gt;
&lt;br /&gt;
  $include WEB.BP WEB.COMMON&lt;br /&gt;
&lt;br /&gt;
  * ----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
  $include RMS.BP EQU.USER&lt;br /&gt;
&lt;br /&gt;
  dim USER( USER.C )   ;*  Put this back in RMS.COMMON sometime !&lt;br /&gt;
&lt;br /&gt;
  * This is too dangerous; it&amp;#039;s used in the middle of things.&lt;br /&gt;
  * BUT call it at all entry points !:&lt;br /&gt;
  *CALL CLEAR.COMMON ;* 01-Dec-2004 jim: Will this fix strange crashes?&lt;br /&gt;
&lt;br /&gt;
  call DEBUG.MSG( &amp;#039;&amp;#039;, &amp;#039;E&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
  *  Reset stuff in &amp;#039;CURRENT.COMMON&amp;#039; in case someone uses it prematurely :&lt;br /&gt;
  CUR.REC = &amp;#039;&amp;#039; ; CUR.ID = &amp;#039;&amp;#039; ; CUR.AMC = 0 ; CUR.CDC = 0 ; CUR.I = &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  TIMING.ENABLED = @FALSE  ;*  By default disable timing&lt;br /&gt;
&lt;br /&gt;
  EC$IS.LOADED = @FALSE    ;*  If we don&amp;#039;t load this; at least make it re-load (for PWD, etc)&lt;br /&gt;
&lt;br /&gt;
  * 15.Aug.2008 jim: Let&amp;#039;s try loading ENV.COMMON here now ? (it&amp;#039;s in SELECT.FORMS anyway&lt;br /&gt;
  *                  so it needs to be done every request anyway...)&lt;br /&gt;
  *&lt;br /&gt;
  * This used to &amp;#039;Load only if NOT already loaded&amp;#039;; but now ALWAYS LOAD; since&lt;br /&gt;
  * this is NOT called everywhere anymore; and it IS called when we &amp;#039;LOGTO&amp;#039; so&lt;br /&gt;
  * this MUST be reloaded then:&lt;br /&gt;
  *&lt;br /&gt;
  call LOAD.ENV.COMMON( EC.RELOAD ) &lt;br /&gt;
&lt;br /&gt;
* ----------------------------------------------------------------------------&lt;br /&gt;
*  THIS PROGRAM SETS ALL &amp;#039;RMS&amp;#039; STANDARD COMMONS; Call ONCE upon initial Login.&lt;br /&gt;
*&lt;br /&gt;
*                 ----------------------&lt;br /&gt;
*                   COMMON DEFINITIONS&lt;br /&gt;
*                 ----------------------&lt;br /&gt;
*&lt;br /&gt;
*    CLR   : CLEAR SCREEN&lt;br /&gt;
*    EJECT : EJECT A PAGE ON THE PRINTER (DON&amp;#039;T USE &amp;#039;CLR&amp;#039; !)&lt;br /&gt;
*    ES    : ERASE SCREEN FROM CURRENT POSITION TO END&lt;br /&gt;
*    BELL  : RING THE BELL&lt;br /&gt;
*    RN    : TURN REVERSE VIDEO ON&lt;br /&gt;
*    RF    : TURN REVERSE VIDEO OFF&lt;br /&gt;
*    EL    : ERASE LINE FROM CURRENT POSITION TO END&lt;br /&gt;
*    TRUE  : BOOLEAN TRUE (1)&lt;br /&gt;
*    FALSE : BOOLEAN FALSE (0)&lt;br /&gt;
*&lt;br /&gt;
*    TERMTYPE   : CURRENT TERMINAL TYPE DEFINED IN PICK&lt;br /&gt;
*    EMBED.ATTR : BOOLEAN, DOES THIS TERMINAL HAVE EMBEDDED ATTRIBUTES?&lt;br /&gt;
*    TOP.LINE   : 0 OR 1, DEPENDING ON TYPE OF TERMINAL (PC MONITOR IS 0)&lt;br /&gt;
*                 Now set from &amp;#039;TERMINAL&amp;#039; in &amp;#039;RMS.CONTROL&amp;#039; if it&amp;#039;s there&lt;br /&gt;
*    BOT.LINE   : 23 OR 24 USUALLY&lt;br /&gt;
*&lt;br /&gt;
*    HD.CLR : HEADING COLOR (TOP LINE)&lt;br /&gt;
*    BD.CLR : BORDER  COLOR (FOR MENUS, ETC)&lt;br /&gt;
*    PR.CLR : PROMPT  COLOR (IMMEDIATE PROMPT, ETC)&lt;br /&gt;
*    M1.CLR : MESSAGE COLOR 1 : IMMEDIATE MESSAGES FOR CURRENT INPUT&lt;br /&gt;
*    M2.CLR : MESSAGE COLOR 2 : LESS IMPORTANT MESSAGES&lt;br /&gt;
*    BK.CLR : BACKROUND COLOR&lt;br /&gt;
*    IN.CLR : INPUT COLOR : FOR CURRENT INPUT LINE (USED BY MR.IN)&lt;br /&gt;
*    ER.CLR : ERROR MESSAGE COLOR (USUALLY RED !)&lt;br /&gt;
*    SP.CLR : SPECIAL COLOR FOR ANY PURPOSE&lt;br /&gt;
*&lt;br /&gt;
*    USER.NO : CURRENT USER # (USED TO MAKE THINGS UNIQUE)&lt;br /&gt;
*    SEC.LVL : CURRENT SECURITY LEVEL OF THIS USER..no longer used !?&lt;br /&gt;
*&lt;br /&gt;
*    DEBUG.FLAG : If set, lots of programs will show their stuff&lt;br /&gt;
*&lt;br /&gt;
* ============================================================================&lt;br /&gt;
&lt;br /&gt;
  gosub SET.STANDARD.VARS  ;*  STANDARD ASSUMPTIONS&lt;br /&gt;
&lt;br /&gt;
  gosub SET.TERMINAL.INFO  ;*  TERMINAL DEPENDANT STUFF&lt;br /&gt;
&lt;br /&gt;
  gosub SET.FORM.COMMON&lt;br /&gt;
&lt;br /&gt;
  INS.MODE = @FALSE  ;*  Insert[[/Replace]] mode for INPUT.IN, BOX.ED.&lt;br /&gt;
&lt;br /&gt;
  *crt &amp;quot;!&amp;quot;:   ;*  Signal that STD.SETUP was run; is this useful anymore ?&lt;br /&gt;
&lt;br /&gt;
  * 01-Jul-2005 jmp: Implemented for replication update to check rep state&lt;br /&gt;
  *        ? Remove when connection pool call this on connection retrieval&lt;br /&gt;
  * 10.May.2006 jim: Do NOT remove this ! It is now expected to be set by&lt;br /&gt;
  *                  REP.WRITE, etc; why not just do it here ?&lt;br /&gt;
  *&lt;br /&gt;
  [[REP_FLAGS]] = &amp;#039;&amp;#039;&lt;br /&gt;
  call REPLICATION.INIT([[REP_FLAGS]], REP.ERR)&lt;br /&gt;
  *  Do something with REP.ERR if it&amp;#039;s returned ? What ?&lt;br /&gt;
  *  At least PRINT IT !:&lt;br /&gt;
  if REP.ERR # &amp;#039;&amp;#039; then print REP.ERR&lt;br /&gt;
  *  (might be &amp;#039;REP.Q not found&amp;#039;, etc ...)&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
SET.STANDARD.VARS:  *  NOTE THESE MAY GET RE-SET BELOW&lt;br /&gt;
  AM = char(254) ; VM = char(253) ; SVM = char(252)&lt;br /&gt;
  TRUE = 1 ; FALSE = 0  ;*  Some programs still use these ? (should use @&amp;#039;s)&lt;br /&gt;
  ILEN = 32767&lt;br /&gt;
&lt;br /&gt;
  *  We may be just &amp;#039;STD.SETUP&amp;#039; for some other reason:&lt;br /&gt;
  if unassigned(DEBUG.FLAG) then DEBUG.FLAG  = &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  FKEY.LEVEL = 0     ;*  HOPE NOONE ELSE SETS IT !!&lt;br /&gt;
&lt;br /&gt;
  *   .. THIS STUFF MAY BE TERMINAL DEPENDENT, BUT SET DEFAULTS ANYWAY&lt;br /&gt;
&lt;br /&gt;
  CLR = @(-1)  ; EJECT = char(12) ;* .. PAGE EJECT FOR RITEMAN !&lt;br /&gt;
  ES = @(-3)   ; EL = @(-4)    ; BELL = char(7)&lt;br /&gt;
  TOP.LINE = 1&lt;br /&gt;
  * 19-Sep-2005 jim: Use a bigger TERM !&lt;br /&gt;
  * BOT.LINE = 24&lt;br /&gt;
  BOT.LINE     = SYSTEM(3)&lt;br /&gt;
&lt;br /&gt;
  SCREEN.WIDTH = SYSTEM(2) ;*  AND a WIDER Term !?&lt;br /&gt;
&lt;br /&gt;
  EMBED.ATTR = FALSE&lt;br /&gt;
  *  RN = @(-13)  ; RF = @(-14)&lt;br /&gt;
&lt;br /&gt;
  *  LEAVE COLOR INFORMATION NULL FOR NORMAL TERMINALS:&lt;br /&gt;
&lt;br /&gt;
  HD.CLR=&amp;#039;&amp;#039; ; BD.CLR=&amp;#039;&amp;#039; ; PR.CLR=&amp;#039;&amp;#039; ; M1.CLR=&amp;#039;&amp;#039; ; M2.CLR=&amp;#039;&amp;#039;&lt;br /&gt;
  BK.CLR=&amp;#039;&amp;#039; ; IN.CLR=&amp;#039;&amp;#039; ; ER.CLR=&amp;#039;&amp;#039; ; SP.CLR=&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  OS.VERSION = &amp;quot;UNIX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  dummy = OPEN.FILE( &amp;#039;&amp;#039;, &amp;quot;RESET&amp;quot;, FILEVAR, ERR.MSG )  ;*  RESET flag does not actually &amp;#039;open&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  gosub [[ProcessControlLocal]]&lt;br /&gt;
&lt;br /&gt;
  * ---------------------------------------------------------------------------&lt;br /&gt;
  *  These files are used enough to justify always being open: see DSI.COMMON&lt;br /&gt;
  *  ONCE &amp;#039;OPEN.FILE&amp;#039; IS USED EVERYWHERE, THIS ALL BECOMES OBSOLETE !&lt;br /&gt;
&lt;br /&gt;
  if not( OPEN.FILE( &amp;quot;WS&amp;quot;,         &amp;#039;&amp;#039;, WS.FILE,          Err ) ) then stopm Err&lt;br /&gt;
  if not( OPEN.FILE( &amp;quot;PLAN&amp;quot;,       &amp;#039;&amp;#039;, PLAN.FILE,        Err ) ) then stopm Err&lt;br /&gt;
  if not( OPEN.FILE( &amp;quot;LENDER&amp;quot;,     &amp;#039;&amp;#039;, LENDER.FILE,      Err ) ) then stopm Err&lt;br /&gt;
  if not( OPEN.FILE( &amp;quot;CONTROL&amp;quot;,    &amp;#039;&amp;#039;, CONTROL.FILE,     Err ) ) then stopm Err&lt;br /&gt;
  if not( OPEN.FILE( &amp;quot;LAST.USED&amp;quot;,  &amp;#039;&amp;#039;, LAST.USED.FILE,   Err ) ) then stopm Err&lt;br /&gt;
  if not( OPEN.FILE( &amp;quot;LAST.ID&amp;quot;,    &amp;#039;&amp;#039;, LAST.ID.FILE,     Err ) ) then stopm Err&lt;br /&gt;
&lt;br /&gt;
  * ---------------------------------------------------------------------------&lt;br /&gt;
  *  Local files:&lt;br /&gt;
  if not( OPEN.FILE( &amp;quot;USER&amp;quot;,       &amp;#039;&amp;#039;, USER.FILE,        Err ) ) then stopm Err&lt;br /&gt;
  if not( OPEN.FILE( &amp;quot;RMS.CONTROL&amp;quot;,&amp;#039;&amp;#039;, RMS.CONTROL.FILE, Err ) ) then stopm Err&lt;br /&gt;
&lt;br /&gt;
  USER.NO = @TTY ;* .. UNIQUE TTY NAME&lt;br /&gt;
&lt;br /&gt;
  * 05-Aug-2005 jay: We do not need to get this unless we have different OS Systems&lt;br /&gt;
  *                  if we change os, we need to uncomment these two lines&lt;br /&gt;
  *EXECUTE \SH -c &amp;quot;uname -s&amp;quot;\ CAPTURING SYSTEM.OS&lt;br /&gt;
  *SYSTEM.OS = UPCASE(SYSTEM.OS&amp;lt;1&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
  SYSTEM.OS = &amp;quot;LINUX&amp;quot;  ;*  Hard coded for performance&lt;br /&gt;
&lt;br /&gt;
  if USER.NO # &amp;#039;phantom&amp;#039; then&lt;br /&gt;
    if SYSTEM.OS # &amp;quot;LINUX&amp;quot; then&lt;br /&gt;
      USER.NO = field(USER.NO,&amp;quot;/&amp;quot;,3)&lt;br /&gt;
    end else&lt;br /&gt;
      USER.NO = &amp;quot;ttyp&amp;quot;:field(USER.NO, &amp;quot;/&amp;quot;, 4)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  USER.ID = @LOGNAME&lt;br /&gt;
&lt;br /&gt;
  if trim(USER.ID) = &amp;#039;&amp;#039; then&lt;br /&gt;
    mat USER = &amp;#039;&amp;#039;&lt;br /&gt;
  end else&lt;br /&gt;
    matread USER from USER.FILE, USER.ID else&lt;br /&gt;
      mat USER = &amp;#039;&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  if USER(1) = &amp;#039;&amp;#039; then crt ; crt &amp;quot;User &amp;quot;:USER.ID:&amp;quot; was not found in the USER file.&amp;quot; ; crt&lt;br /&gt;
  if USER$TOP.MENU # &amp;#039;&amp;#039; then&lt;br /&gt;
    write USER$TOP.MENU on LAST.ID.FILE, &amp;quot;MENU.&amp;quot;:USER.NO&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  *  Cache has problems with this ? Reported to Lee Burstein&lt;br /&gt;
  *  on 28.Feb.2008. The issue is not this command; it is when you&lt;br /&gt;
  *  &amp;#039;LIST LENDER&amp;#039; and it crashes at the end of the first page.&lt;br /&gt;
&lt;br /&gt;
  if USER$OFF.MINUTES # &amp;#039;&amp;#039; and USER$OFF.MINUTES &amp;gt; &amp;quot;0&amp;quot; and PLATFORM # &amp;quot;Cache&amp;quot; then&lt;br /&gt;
    execute &amp;quot;AUTOLOGOUT &amp;quot;:USER$OFF.MINUTES&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  RMS$USER.GROUP.S = USER$GROUP.S  ;*  Keep this in RMS.COMMON now too&lt;br /&gt;
  *  Security Level will be set by user id (logon id) if it exists :&lt;br /&gt;
  SEC.LVL = USER$SEC.LEVEL&lt;br /&gt;
  if SEC.LVL &amp;lt; 5 then&lt;br /&gt;
    * This does not work since it executes in a different shell:&lt;br /&gt;
    *  execute &amp;quot;BREAK OFF&amp;quot;&lt;br /&gt;
    break OFF  ;*  BUT this works !&lt;br /&gt;
    crt &amp;quot;#&amp;quot;:&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  if USER.NO = &amp;#039;&amp;#039; then&lt;br /&gt;
    mat LINE.REC = &amp;#039;&amp;#039;&lt;br /&gt;
  end else&lt;br /&gt;
    matread LINE.REC from RMS.CONTROL.FILE, &amp;quot;LINE.&amp;quot;:USER.NO else&lt;br /&gt;
      mat LINE.REC = &amp;#039;&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  L.TERM.TYPE = @TERM.TYPE   ;*  ALWAYS USE UNIVERSE TERM.TYPE&lt;br /&gt;
&lt;br /&gt;
  if L.LAST.PRT = &amp;#039;&amp;#039;  then L.LAST.PRT = &amp;#039;T&amp;#039; ;*  Default &amp;#039;T&amp;#039;erminal&lt;br /&gt;
&lt;br /&gt;
  matread TERMINAL from RMS.CONTROL.FILE, &amp;quot;TERM.&amp;quot;:L.TERM.TYPE else&lt;br /&gt;
    mat TERMINAL=&amp;#039;&amp;#039;&lt;br /&gt;
  end&lt;br /&gt;
  if TERM.TRANS.ON  = &amp;#039;&amp;#039; then TERM.TRANS.ON  = char(19)  ;*  CTL-S ??&lt;br /&gt;
  if TERM.TRANS.OFF = &amp;#039;&amp;#039; then TERM.TRANS.OFF = char(20)  ;*  CTL-T ??&lt;br /&gt;
  if TERM.WIDTH     = &amp;#039;&amp;#039; then TERM.WIDTH = SCREEN.WIDTH&lt;br /&gt;
&lt;br /&gt;
  if TERM.TOP # &amp;#039;&amp;#039; then TOP.LINE = TERM.TOP&lt;br /&gt;
  if TERM.BOT # &amp;#039;&amp;#039; then BOT.LINE = TERM.BOT&lt;br /&gt;
&lt;br /&gt;
  RN = TERM.BOLD.ON ; RF = TERM.BOLD.OFF  ;*  GENERAL HIGHLIGHT&lt;br /&gt;
&lt;br /&gt;
  FKEY.LEAD = &amp;#039;&amp;#039;  ;*  BUILD STRING OF LEAD-IN CHARACTERS&lt;br /&gt;
  for I = 31 to TERMINAL.C&lt;br /&gt;
    if len(TERMINAL(I)) &amp;gt; 1 then&lt;br /&gt;
      LEAD = TERMINAL(I)[1,1]&lt;br /&gt;
      if index(FKEY.LEAD,LEAD,1) = 0 then FKEY.LEAD = FKEY.LEAD:LEAD&lt;br /&gt;
    end&lt;br /&gt;
  next I&lt;br /&gt;
&lt;br /&gt;
  *  This fixes a problem with LINK MC5/6 and WYSE 150 Terminals with parallel&lt;br /&gt;
  *  ports: if not printer is plugged in, a TRANS.ON[[/TRANS]].OFF sequence locks&lt;br /&gt;
  *  the terminal (even with no data).&lt;br /&gt;
&lt;br /&gt;
  if L.TERM.PRT = &amp;#039;&amp;#039; then  ;* .. No printer..Clear Trans ON[[/OFF]] for PARALLEL&amp;#039;s&lt;br /&gt;
    TERM.TRANS.ON = &amp;#039;&amp;#039;&lt;br /&gt;
    TERM.TRANS.OFF = &amp;#039;&amp;#039;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  PROMPT &amp;quot;&amp;quot;  ;*  USUALLY NEEDED ANYWAY&lt;br /&gt;
  *  C.R = &amp;quot; Copyright 1986-1990 (c) J.R.Adrig, All Rights Reserved &amp;quot;&lt;br /&gt;
  *  DSI took over rights to this program...&lt;br /&gt;
  C.R = &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  * obsolete:  mat FKEY.ACTS = &amp;#039;&amp;#039;  ;*  Until otherwise set !&lt;br /&gt;
&lt;br /&gt;
  * .. How long to wait to get next char of function key?(loop)(GET.CH):&lt;br /&gt;
  readv FKEY.DELAY from RMS.CONTROL.FILE,&amp;quot;FKEY.DELAY&amp;quot;,1 else FKEY.DELAY = 10&lt;br /&gt;
&lt;br /&gt;
  *  This gets set in DSI.COMMON from APR.TEST to call historical versions of APR; PMTS, etc:&lt;br /&gt;
  DC$TEST.DATE  = &amp;#039;&amp;#039;  ;*  Clear it to make sure it&amp;#039;s not floating around.&lt;br /&gt;
  DC$TEST.FLAGS = &amp;#039;&amp;#039;  ;*  This too&lt;br /&gt;
&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
*  Initialized Global Common stuff in FORM.COMMON &amp;#039;just in case&amp;#039; (i.e. in case the&lt;br /&gt;
*  commons don&amp;#039;t get reset because of a fatal breakage in a Command / Audit).&lt;br /&gt;
&lt;br /&gt;
SET.FORM.COMMON:&lt;br /&gt;
  VAR.NAMES = &amp;#039;&amp;#039; ; mat VARS = &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  FORM$SAVE.VARS      = @FALSE  ;*  This is reset at the end of an Audit but not if it fails !&lt;br /&gt;
  mat FORM$PARAM.VARS = &amp;#039;&amp;#039;&lt;br /&gt;
  FORM$NUM.PARAMS     = 0&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
SET.TERMINAL.INFO:  ;*  SET TERMINAL DEPENDANT STUFF&lt;br /&gt;
  TERMTYPE = @TERM.TYPE ;* old:  L.TERM.TYPE&lt;br /&gt;
  begin case ;* ... FOR EVERY TYPE OF TERMINAL !&lt;br /&gt;
    case TERMTYPE = &amp;quot;F&amp;quot;   ;*  FUJITSU MONITOR !!!&lt;br /&gt;
    * ??     GOSUB SET.COLORS&lt;br /&gt;
    case TERMTYPE = &amp;quot;M&amp;quot;   ;*  &amp;#039;GEORGE&amp;#039; USING TVI912 !!!&lt;br /&gt;
      CLR = char(26)&lt;br /&gt;
      EL = SPACE(SCREEN.WIDTH - 2)  ;* Was 78 ?&lt;br /&gt;
    case TERMTYPE = &amp;quot;Q&amp;quot; ;* .. QVT102 (RMS)&lt;br /&gt;
      RN = @(-9):@(-13) ; RF = @(-9):@(-14)&lt;br /&gt;
  end case&lt;br /&gt;
  if L.COLOR = &amp;quot;Y&amp;quot; then gosub SET.COLORS&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
*   .. NOW SET UP &amp;#039;COLORS&amp;#039; !&lt;br /&gt;
&lt;br /&gt;
SET.COLORS:&lt;br /&gt;
  gosub READ.CONTROL.COLORS&lt;br /&gt;
  HD.CLR = @(-HD.CLR&amp;lt;1&amp;gt;)&lt;br /&gt;
  BD.CLR = @(-BD.CLR&amp;lt;1&amp;gt;)&lt;br /&gt;
  PR.CLR = @(-PR.CLR&amp;lt;1&amp;gt;)&lt;br /&gt;
  M1.CLR = @(-M1.CLR&amp;lt;1&amp;gt;)&lt;br /&gt;
  M2.CLR = @(-M2.CLR&amp;lt;1&amp;gt;)&lt;br /&gt;
  BK.CLR = @(-BK.CLR&amp;lt;1&amp;gt;)&lt;br /&gt;
  IN.CLR = @(-IN.CLR&amp;lt;1&amp;gt;)&lt;br /&gt;
  ER.CLR = @(-ER.CLR&amp;lt;1&amp;gt;)&lt;br /&gt;
  SP.CLR = @(-SP.CLR&amp;lt;1&amp;gt;)&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
* FUJITSU:(ALL MINUSS): 5:BLINK,13 RVSE,14 NORM,17 GREY BACK&lt;br /&gt;
*         46 BLUE, 47 RED, 48 PURPLE, 49 GREEN, 50 LT.BLUE&lt;br /&gt;
*         51 LT. GREEN, 52 WHITE&lt;br /&gt;
*   BACK: 54 BLUE, 55 RED, 56 PURP, 57 GREEN, 58 BLUE, 59 GREEN, 60 WHITE&lt;br /&gt;
&lt;br /&gt;
READ.CONTROL.COLORS:&lt;br /&gt;
  read HD.CLR from RMS.CONTROL.FILE,&amp;quot;HEAD.COLOR&amp;quot;   else HD.CLR = 39&lt;br /&gt;
  read BD.CLR from RMS.CONTROL.FILE,&amp;quot;BORD.COLOR&amp;quot;   else BD.CLR = 47&lt;br /&gt;
  read PR.CLR from RMS.CONTROL.FILE,&amp;quot;PROMPT.COLOR&amp;quot; else PR.CLR = 48&lt;br /&gt;
  read M1.CLR from RMS.CONTROL.FILE,&amp;quot;MSG1.COLOR&amp;quot;   else M1.CLR = 46&lt;br /&gt;
  read M2.CLR from RMS.CONTROL.FILE,&amp;quot;MSG2.COLOR&amp;quot;   else M2.CLR = 42&lt;br /&gt;
  read BK.CLR from RMS.CONTROL.FILE,&amp;quot;BACK.COLOR&amp;quot;   else BK.CLR = 33&lt;br /&gt;
  read IN.CLR from RMS.CONTROL.FILE,&amp;quot;INPUT.COLOR&amp;quot;  else IN.CLR = 43&lt;br /&gt;
  read ER.CLR from RMS.CONTROL.FILE,&amp;quot;ERR.COLOR&amp;quot;    else ER.CLR = 44&lt;br /&gt;
  read SP.CLR from RMS.CONTROL.FILE,&amp;quot;SPEC.COLOR&amp;quot;   else SP.CLR = 45&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
* 13.Sep.2006 jim:&lt;br /&gt;
*&lt;br /&gt;
*  This file is in &amp;#039;/u/local&amp;#039; ? It could be used to make datest &amp;#039;act like&amp;#039; dsi;&lt;br /&gt;
*  for example. Or is it just to avoid using &amp;#039;EXECUTE&amp;#039; often ?&lt;br /&gt;
*  Since most program now do NOT (or SHOULD not !) call STD.SETUP; it&amp;#039;s not&lt;br /&gt;
*  really a concern anymore ?&lt;br /&gt;
&lt;br /&gt;
[[ProcessControlLocal]]:&lt;br /&gt;
  open &amp;quot;CONTROL.LOCAL&amp;quot; to CONTROL.LOCAL.FILE then [[OpenedControlLocal]] = @TRUE else [[OpenedControlLocal]] = @FALSE&lt;br /&gt;
  gosub [[SetSystemName]]&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
[[SetSystemName]]:&lt;br /&gt;
  if index( SYSTEM(41), &amp;#039;Cache&amp;#039;, 1) then&lt;br /&gt;
    PLATFORM = &amp;#039;Cache&amp;#039;&lt;br /&gt;
  end else&lt;br /&gt;
    PLATFORM = &amp;#039;[[UniVerse]]&amp;#039;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  SYSTEM.NAME = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  [[SystemNameRecordID]] = &amp;quot;HOSTNAME&amp;quot;&lt;br /&gt;
  if [[OpenedControlLocal]] then&lt;br /&gt;
    readv SYSTEM.NAME from CONTROL.LOCAL.FILE, [[SystemNameRecordID]],1 else&lt;br /&gt;
      *  We need to set up the name&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
   * We do not have a system name yet; generate it:&lt;br /&gt;
&lt;br /&gt;
  if SYSTEM.NAME = &amp;quot;&amp;quot; then&lt;br /&gt;
    if PLATFORM = &amp;#039;Cache&amp;#039; then&lt;br /&gt;
      *&lt;br /&gt;
      * 19.Feb.2008 jim: During Cache testing with Lee, we found this to error when&lt;br /&gt;
      *                  called from Java !? Use Caution ! (Lee is going to check on this).&lt;br /&gt;
      *&lt;br /&gt;
      execute &amp;quot;[ write $zu(110)&amp;quot; capturing SYSTEM.NAME&lt;br /&gt;
      *&lt;br /&gt;
    end else&lt;br /&gt;
      execute \SH -c &amp;quot;uname -n&amp;quot;\ capturing SYSTEM.NAME&lt;br /&gt;
    end&lt;br /&gt;
    SYSTEM.NAME = SYSTEM.NAME&amp;lt;1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    if [[OpenedControlLocal]] then&lt;br /&gt;
      writev SYSTEM.NAME to CONTROL.LOCAL.FILE, [[SystemNameRecordID]], 1&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  RMS$PID = GET.PID()  ;*  Cache version is different !&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;/div&gt;</summary>
		<author><name>Conversion script</name></author>
	</entry>
</feed>