Menu Processor

Environment

Last Revised: 09/15/17

Programs started from the Dynamo Menu Processor, using the background script, or by calling CDS011 use the following local and global variables.

Local/Global Variable Name Description
Local Y$ Templated Task Control Variable.
Local Y5$ Job title passed from menu processor.
Local XXXX Numeric channel number for files opened by Menu Processor.  The variable name is the last 4 characters of the file name.  For example, a file named XXCM01 opened to channel 2 by the Menu would define the numeric variable CM01 with a value of 2.  This enables all disc I/O commands to use CM01 as the channel number.
Local XXXX$ String variable initialized with template of file opened by Menu.  Using example from above, CM01$ would contain the template for the file (if one exists).  This enables all disc readrecord/writerecord commands to use CM01$ for the template variable.
Local XXXXK$ String variable initialized to the key generation string used in the BBx KGEN() function.  Using the example from above, CM01K$ would contain the key generation string for the file opened to channel CM01.
Local S084$ Templated Printer Selection variable if the menu processor opened a printer.  This is useful should the application want to close and re-open the printer using the same options as the initial open suppressing some or all operator entries.
Local Y6$ Templated Printer Control variable if the menu processor opened a printer.
Local Y6 Same as Y6.MAXL.  Deprecated but still set for compatibility.
Global BBXDIR Contains the directory where the pro5 or bbj executable config.bbx is located.    It includes a trailing slash, i.e., /u/basis/pro5/. On Unix systems, it is specified in the /usr/cdi/.config file. When using Visual Pro5, the Windows shortcut should contain the complete path the vpro5.exe.
Global CDSM00 Contains the record maintained using Dynamo Configuration Maintenance (SMC).
Global DT_LOGIN_ICON Set in config.bbx file to the path to an icon (.ico) file that will be displayed in the upper left corner of the Dynamo Tools graphical login window. The Dynamo Tools icon will be displayed if this global is not set.
Global DT_LOGIN_GRAPHIC Set in config.bbx file to the path to an image file that will be displayed on the Dynamo Tools graphical login window. The image can be up to 420 px wide by 72 px high. The Dynamo by Excellware graphic will be displayed if this global is not set.
Global DT_LOGIN_TITLE Set in config.bbx file to text that will replace the default value of "Dynamo Login" which appears on the title of the graphical login window.
Global SMSAPP Contains the base path to Dynamo Tools on the Application Server. If running in a single tier environment, then SMSAPP will be the same as SMSDIR.  SMSAPP cannot have a data server prefix.
Global SMSBIN Contains the directory where profiles, termcap, and ip and termset scripts are defined. It is typically the same as SMSDIR/bin, except when SMSDIR is across a data server in which case SMSBIN is local to the interpreter.
Global SMSDIR Contains the directory where the run-time components of Dynamo Tools are installed, as specified in the SMS configuration file: /usr/cdi/.config on Unix systems.  This will be the current directory.  It includes a trailing slash, i.e., /u/CDI/. On a multi-tier environment, SMSDIR will include a data server prefix, i.e., /<bbds>/u/CDI/.
Global SMSLOG Contains the directory where all Dynamo Tool log files are created. The default value is SMSAPP/log/. SMSLOG cannot include a data server prefix.
Global SMSTMP Contains the directory where temporary files are defined. Note that this should also be linked to the Web Server Document Root folder. The default value is SMSAPP/tmp/. SMSTMP cannot include a data server prefix. Dynamo Tools defines all temporary files in this folder.
Global SMS_SM01 Contains the SM01 operator information record.  Retrieve using template: DIM SM01$:STBL("TPL_CD/CDSM01"); SM01$=STBL("SMS_SM01").
Global SMS_SM08 Contains the SM08 task control record.  Retrieve using CALL "CDS091",Y$,Y5$,SM08$.
Global SMS_SERVER For Linux, Unix and AIX servers, the hostname of the server is set to this global.  The server name may be a simple host name such as 'server' or a fully qualified host name such as 'linuxserver.excellware.com' based on the /etc/hosts file or the name service configuration.  Not set when using CDS011 unless INFO(3,4) is available.
Global SMS_SERVERIP For Linux, Unix and AIX servers, the IP address of the first ethernet adapter of the server.  This global will not be normalized with leading zeros, so a typical value might be 192.168.254.2.  Not set when using CDS011 for maximum performance.
Global SMS_SYSCTL Contains the System Control Record as maintained using System Control Maintenance on SMC menu.  Retrieve using template: DIM SYSCTL$:STBL("TPL_CDSYSCTL"); SYSCTL$=STBL("SMS_SYSCTL").  Note that this variable is scheduled to be replaced with SM00 in a future release. 
Global SMS_CLEARTO This global is set by the menu processor as a placeholder, used to indicate that any global variable set after this variable, can be cleared when changing companies.  Note you can also clear application global variables by changing to the current company, which can be done by entering XX at any menu.
Global SMS_COLOR Set to color values for the current operator and company code based on the colors specified in Operator Preference Maintenance.
Global SMS_FILES Set to a list of channel numbers and file names opened by CDS095.  Used by CDS095 to know what file a channel is currently opened to.  Cleared by menu processor upon returning to a menu from an application.  View variable contents using ?STBL("SMS_FILES").
Global SMS_MINCHAN Set to the lowest channel number (11 to 30000) that Dynamo Tools will use. Can be set within CONFIG.BBX or programmatically to reduce chance of conflict with applications that use hard-coded channel numbers.
Global SMS_MSGTIM Used by Dynamo Message Processor to keep track of when to check next for a Dynamo message.
Global SMS_PFX Optional.  Set by the menu processor to any project or other temporary prefix entered by the user using the menu P option.
Global SMS_PRE Optional.  Used by CDS095 when opening a data file and typically contains the pro5 data server prefix such as "/<servername,port=1100>" which is used as a prefix to the file name.
Global SMS_TITLE Optional. Displayed in title of window when running BBj thin client or VPro5. Defaults to "Dynamo" if not set.
Global SMS_ALTEK Optional.  Used only when you are not able to use the standard Dynamo editing key assignments such as when Dynamo Tools are used in an environment with other application software that use different editing key values than Dynamo.  The editing keys include the Insert, Delete, Home, End, PgUp, PgDn, and 4 arrow keys.  Set this global within the config.bbx file being used as shown in the example below.
SET SMS_ALTEK=D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5
This global must be exactly 40 characters long, and represent the hexadecimal values for the 10 un-shifted editing keys, followed by the 10 shifted editing keys.  The keys are in the following order: ArrowLeft, ArrowRight, ArrowUp, ArrowDown, Home, End, PageUp, PageDown, Insert, Delete.
Global SMS_EXTDSK In most cases, the Dynamo Tools profile file is executed upon user login which will launch the Dynamo Tools menu. In some cases it is preferred to launch a user application instead, in which case program /u/CDI/CD/CDS000 or /u/CDI/CD/bbj/CDS000 should be called once during the login process. The SMS_EXTDSK global is set by CDS000 to the current disk drive letter on Windows systems at the time CDS000 is called to establish the Dynamo Tools Environment. See SMS_EXTDIR and SMS_EXTPFX below.
Global SMS_EXTDIR Similar to SMS_EXTDSK above, the SMS_EXTDIR global is used to store the default home directory when establishing the Dynamo Tools environment at the time CDS000 is called by an external program. This applies to both Windows and Unix systems.
Global SMS_EXTPFX Similar to SMS_EXTDIR above, the SMS_EXTPFX global is set by CDS000 to the PFX value that exists before adding any prefix segments required by Dynamo Tools. In most cases, the user application need not be concerned with this global variable. However, if the application ever changes the PFX, it should make the identical change to SMS_EXTPFX.
Global TPL_<Path_Name> Global set when file is opened and contains the template for the data file or program.  Note that the SMxx files in the main SMSDIR directory are stored in company code CD, so this global includes CD.  Examples: TPL_DS/DSCM01, TPL_CD/CDSM01, TPL_CD/CDS187.
Global VSIFAX Contains the folder where Esker VSI*FAX software has been installed.  Used by printer selection routine CDS084.  It includes a trailing slash.
Global XXDD00 This global contains the Company Control record for company code XX.  It is maintained using Company Information Maintenance (SMC).  It is set by the menu processor upon login and when changing companies.
Y$ Task Control Variable
Y.COMPCODE$ Two character company code
Y.DATE$ Menu date in MM/DD/YY format
Y.DOCCTLNO$ Documentation Control Number - menu selections since main menu as in 1.2.7.3 or SMU.5
Y.SELTYPE$ Selection Type from Menu Maintenance
Y.ERRSTS Error status - set by error routine CDS063 and used by application to control branching upon return from call to error routine
Y.ESCALLOW$ Escapes allowed as specified in Menu Maintenance, Y or blank
Y.PASSPARM$ Pass Parameter - as specified in Menu Maintenance
Y.TERMID$ 4 character normalized terminal ID, i.e., T012
Y.JDATE Menu date in julian format
Y.HQBRN$ Headquarters/Branch indicator (H/Q/N) as specified in Dynamo Configuration Maintenance on SMC menu.
Y.ATCTR Set by printer selection routine CDS084 as column number to use when printing Y.COMPNAME$ in the center of the printed line
Y.REVVID$ Reverse Video support (Y/N) - from Terminal Type Maintenance (SMC)
Y.ROWS Maximum number of physical rows of display - from FIN()
Y.CP$ Compresses print support (Y/N) - from Terminal Type Maintenance (SMC)
Y.MONOCOL$ Monochrome/Color indicator (M/C) - from Terminal Type Maintenance (SMC)
Y.SECLEV Security level of the user for the active application. See SM08.APPSEVLEV for the security level of application as set in Menu Control Maintenance (SMC).
Y.TERMTYPE$ Terminal Type from Terminal Type Maintenance (SMC). It is derived from the $TERM environment variable on Unix/Linux systems. Set to "S" for SYSWINDOW and bbj thin client.
Y.OPERID$ Operator ID based on operating system login or operator entered login, from Operator Information Maintenance (SMC)
Y.AUTOLOGIN$ Autologin Y/N - indicates if operating system login ID was same as Dynamo login ID and Dynamo login was bypassed
Y.SYSCLASS$ System Class based on Business Basic Port#.  Numeric system classes are Unix/Linux, Alpha are DOS/Windows 
System ClassPort#System
01005SCO Xenix 386
01007SCO Unixware
01027Dell Unixware
01076SCO Unixware 7
02176Caldera Unix (BBj)
11004SCO OpenServer 5
11006SCO Unix
21013AIX 3.2.5
31014AIX on PowerPC 601, 603
31024AIX on PowerPC 604
31074AIX on PowerPC 601, 603
31084AIX on PowerPC 604
32184AIX (BBj)
41045Linux
41085Linux (libc 5.4.33)
42145Linux (BBj)
51012HP-UX
51072HP-UX
52172HP-UX (BBj)
61059SUN Solaris Sparc
61069SUN Solaris Intel
61079SUN Solaris Sparc
62169SUN Solaris Intel (BBj)
62179SUN Solaris Sparc (BBj)
A1051MS DOS 386 Single User
B1052MS DOS 386 Multi-User
C1053MS DOS - Netware
D1065MS Windows - Netware
D1066MS Windows
D2166MS Windows (BBj)
Y.APPID$ Application ID - from Menu Maintenance (SMU)
Y.VDTSFX$ Video Display Terminal Suffix - from Menu Maintenance (SMU) and VDT Format Maintenance (FMS)
Y.DATEINDEX Date Index from Menu Maintenance (SMU) - Index 0 indicates system date.  A date index of 1 through 9 can be used for module dates which can be maintained by including a menu selection that runs CDS900 on the menu with the non-zero index.
Y.AT80 Cursor position to center Y.COMPNAME$ over 80 columns
Y.AT66 Cursor position to center Y.COMPNAME$ over 66 columns - used when printing double wide characters over 132 columns
Y.AT132 Cursor position to center Y.COMPNAME$ over 132 columns
Y.COMPNAME$ Company or Organization name as maintained with Company Information Maintenance (SMC)