39.0 MAKEMENU Command The MAKEMENU command allows the B34S user to customize an input window menu or form. The input window can be used by the user to build a B34S control file. A library of MAKEMENU programs can be accessed from the Display Manager or executed from a batch program. The MAKEMENU command allows the user to build %B34SLET statements, which can be placed inside B34S shell code to turn on or turn off features. The files MENU.MAC and GRAPH.MAC provides a good examples of what can be done. MENU.MAC contains a number of templates which can be used as examples for users to build their applications. The MAKEMENU command was built with the Interacter Forms Manager Subroutines and its use relies heavily on the B34S MACRO facility. The screens produced by MAKEMENU have alternatively been called "menus", "forms", "Data entry screens", "Dialogues". A major design feature of the MAKEMENU command is that the strings input into the fields of the "form" can be placed in the control commands of B34S and other programs using programming commands. Thus, in a real sence, the MAKEMENU command is actually a screen driven command generator that can be modified in the field. Form of MAKEMENU command: B34SEXEC MAKEMENU options parameters$ FIELD options parameters$ BOX options parameters$ PARMCARDS$ B34SRETURN$ B34SRUN$ General Comments: 1. After the MAKEMENU command is called a B34S "Input Menu" or "Form" is displayed. Users use the tab key to jump between fields in this form. Fn5 gives help for each field in addition to what is displayed at the bottom of the screen. Fn1 gives a general help. The shift before the tab key allows jumping up the Form. 2. Enter either executes the command or saves the command in the program buffer where it can be further edited and / or run. Most menus/forms have Run and Escape push buttons that can be used in place of the enter or esc key. 3. Each field can optionally be preceeded or followed with other commands. If in the FIELD sentence LETNAME is in effect, the field will be made into a %B34SLET. If LETNAME is not in effect, the field is copied directly to the command file if it is not blank. PRELINES and the PRESTRING is added and after the field the POSTSTRING and POSTLINES are added. 4. If field info contains the keywords B34SEXEC, B34SRETURN, etc, or the delimiters $ or ; the B34S parser will not pass these statements. Hence the user must use alternative inplace strings to pass delimiter info. The defaults are A34S for B34S and ^ for $. The parameters B34SSTRING and DELIMITS can be used to reset these strings. B34SSTRING and DELIMITS can also be used in any field in the command language that contains ' '. 5. MAKEMENU runs directly from the parser in a manner similar to that of the options command. If other B34S commands are required to be run before MAKEMENU, then these commands must have been terminated with B34SRUN$ in place of B34SEEND$ to insure that they have been executed prior to MAKEMENU running. 6. MAKEMENU can be programed to build %B34SLET statements which can turn on B34S code that is passed between PGMCARDS$ and B34SRETURN$ The alternative is to write B34S commands directly. 7. Field debug information can be obtained by giving command. b34sexec options debugsubs(INFOMDEBUG)$ b34seend$ The commands to use the menu facility currently supported are: Fn1 Calls field-specific help. Fn2 Calls Cycling menu choices. Space bar can also be used. Fn5 Calls command-specific help. Fn6 Gets choices in choice field. Enter Run command. ESC Terminate Fn7 Backward to a prior page. Fn8 Foward to the next page Fn9 Gets variable list. Tab Jumps to next field without an input check. Shift-tab Go back in field. Fn5, Fn6 and Fn9 can also be used to provide access to help. 8. The BOX sentence and tabbed menus are features are not backward compatible. The TABBED menu cannot currently be used with forms with more than one page. Options on MAKEMENU sentence. GETMENU Gets a menu that was saved. This command only works if SAVEMENU is in effect on OPTIONS command. SETDEFAULTS If the SETDEFAULTS option is present the defaults for MENUTEXTCOLOR, MENUFRAME, MENUTITLECOLOR, MENUFIELDCOLOR, MENUTEXTFRAME, MENURTEXTCOLOR, MENURTEXTFRAME, MENUETEXTCOLOR, MENUETEXTFRAME, MENURFIELDCOLOR, MENURFRAME, MENUEFIELDCOLOR, MENUEFRAME, MBOXFRAME, MENUFIELDFRAME and FHCOLOR can be set for the run. Different settings can be used for text and non-text usage. If SETDEFAULTS is not present, these commands work only for the specific menu. RESETDEFAULTS If the SETDEFAULTS option is present menu colors are reset. Parameters on MAKEMENU sentence. Note: The following four parameters are needed for tabbed menus. FORMT(k,ncol,nrow) Sets form type. Keyword k can be set as FULL, WINDOW or TABBED. FULL is the default. If WINDOW is set, ncol and nrow must be set. TABPOSITION( ) Sets tab position as TOP, BOTTOM, RIGHT. TOP is the default. TABHELPPOSITION Sets tab help, position. Default =20. If more than one row of tabs is produced, TABHELPPOSITION will have to be reduced. TLABELS(' ',' ') Provides up to 20 tab labels. This must be supplied for TABBED menus. Max size =24. For tabbed menus, LIMITF and LIMITB set the last field and last box. For tabbed menus, the BOX and FIELD sentences must contain one LIMITB( ) and LIMITB( ) parameters respectively. For example given TLABELS('Option One','Option Two') at least one field sentence must have LIMITF(1) set and one have LIMIT(2) set. Fields after the LIMIT(2) field will be common to both tabbed forms. **************************************************************** COMMANDN(' ') Provides up to 70 characters as a header for menu. COMMANDH(' ', ' ') Provides up to 70 cols of general help per ' ' which is accessed with the F1 key. A max of 10 ' ' can be supplied. B34SSTRING(key) Sets an inplace string of 4 letters that will be replaced with the name B34S when the command is written. This allows placing B34SEXEC inside quotes. The default is A34S, which means that A34SEXEC would be seen as B34SEXEC. DELIMITS( ) Sets an inplace character, which will be replaced by $. Default = ^. Note: Commands to be used if SETDEFAULTS is in effect: MENUTEXTCOLOR( ) Sets color of menu. Defaults to display manager color. Two arguments can be supplied. The first is the foreground, the second the background. MENUTEXTFRAME( ) Sets three arguments for text frames. See TEXTFRAME. MENUFIELDCOLOR() Sets color of input field. Defaults to command menu color. Two arguments can be supplied. The first is the foreground, the second the background. MENUFIELDFRAME() Sets three arguments for field frames. See FIELDFRAME. MBOXFRAME(k1,k2,k3,k4) k1 = frame type default = single k2 = primary color default = green. k3 = secondary color default = black. k4 = clear color default = black. Sets frame characteristics for use with BOXFRAME For k1 use key words: 0 NONE 1 SINGLE 2 DOUBLE 3 SINGLE2 4 DROPSHADOW 5 FIELD3D1 6 FIELD3D2 7 BUTTON3D1 8 BUTTON3D2 9 WINDOW3D1 10 WINDOW3D2 For k2 - k4 use usual color code. Note: The next 4 parameters are for the RUN button MENURTEXTCOLOR( ) Sets color of menu. Defaults to display manager color. Two arguments can be supplied. The first is the foreground, the second the background. MENURTEXTFRAME( ) Sets three arguments for text frames. See TEXTFRAME. MENURFIELDCOLOR() Sets color of input field. Defaults to command menu color. Two arguments can be supplied. The first is the foreground, the second the background. MENURFIELDFRAME() Sets three arguments for field frames. See FIELDFRAME. Note: The next 4 parameters are for the ESCAPE MENUETEXTCOLOR( ) Sets color of menu. Defaults to display manager color. Two arguments can be supplied. The first is the foreground, the second the background. MENUETEXTFRAME( ) Sets three arguments for text frames. See TEXTFRAME. MENUEFIELDCOLOR() Sets color of input field. Defaults to command menu color. Two arguments can be supplied. The first is the foreground, the second the background. MENUEFIELDFRAME() Sets three arguments for field frames. See FIELDFRAME. MENUBORDER( ) Sets menu border. Three arguments are passed. The first is the frame type, the second and third are the frame promary and secondary colors. MENUTITLECOLOR() Sets menu title color. Default to display manager color. Two arguments can be supplied. The first is the foreground color, the second is the background color. FHCOLOR(k1,k2,k3,k4,k5,k6) k1 sets attribute of help text. Allowable values are BOLD, FLASH, ITALICS, REVERSE, UNDERLINE. k2 and k3 set foreground and background colors k4 = frame type. For choices see FRAME k5 = frame foreground k6 = frame background Makemenu colors can be set using Display Manager names. The background color of the menu is the same as the Display Manager background. Text colors can be different. FIELD sentence. The FIELD sentence allows the user to setup custom menus and using the B34S MACRO facility, selectively setup commands. There must be at least one FIELD sentence. FIELD sentence options. OPTIONAL Sets the field as optional. This is the default. REQUIRED Sets the field as required. Field will flash until it gets filled. FIELD sentence parameters. FIELDCOLOR( ) Sets the field color. For codes see WCOLOR in OPTIONS. Two arguments can be supplied. The first is the foreground, the second the background. FIELDFRAME(k1,k2,k3) Specifies a frame for the input field. k1 sets frame type. k2 sets foreground color. k3 sets background color. TEXTCOLOR( ) Sets color for text. Default is MENUCOLOR. For codes see WCOLOR in OPTIONS. Two arguments can be supplied. The first argument is the foreground. The second argument is the background. TEXTFRAME(k1,k2,k3) Specifies a frame for the text field. k1 sets frame type. k2 sets foreground color. k3 sets background color. TYPE(key) Sets field type. The parameter key must be set as INFO, INPUT, HIDDEN. Default = INFO. PAGE(n1) Sets menu page. Default = 1. ROW(n2) Sets row in which to display information. n2 must be in the range 1-24. ROW is a required parameter. ROW should not usually be made > 22. COL1(n3) Sets the column in which to start to display information concerning field. COL1 defaults = 2. COL2(n4) Sets the column for input field if TYPE=INPUT. TEXT(' ') Sets field identifier. TEXTID(' ') Sets text for field help at bottom of menu. DEFAULT(key) If present, sets initial value. Key must be a quoted string to set a value. Size of field is determined by # of blanks inside ' '. Size cannot be bigger than 79-n4. FIELDHELP(' ') Up to 70 columns in side ' ' can be supplied. Up to 20 ' ' can be supplied. FIELDHELP is accessed with the Fn5 key. FIELDTYPE(key) Sets type of data field. Key is set as: REAL - for real variable. INTEGER - for integer variable. CHARACTER - for character variable. QSTRING - for quoted string ' '. DQSTRING - for quoted string "' '". VARNAME - for active variable name. VARLIST - for active variable list. QVARLIST - for active variable list inside ' '. DQVARLIST - for active variable list inside "' '". CHOICES - for a choice list. For version 7.xx Fn 6 used to select. EFILE - for an existing file name. EFILE will place file in single quotes. This cannot be placed in a letname but is designed to be placed in an OPEN statement. QEFILE - for an existing file name. QEFILE will place file in double quotes. This is for use with a letname. HIDDEN - for a hidden field. CHARTEST - for character test. B34SDSN - For B34S files of form xx.b34. B34SMACDSN - For B34S files of form xx.mac. SCADSN - For SCA FSAVE files of form xxx.fsv MEMBER - Member of xxx.mac or xxx.fsv file name picked up from prior step CHECKBOX - Check box. Sets choice codes. RCHECKBOX - Radio Check box. Set all boxes in a group. For # 1 set INTRANGE(n) where n = # in group. CYCLING - Cycling menu. VERTICAL - Vertical fixed menu with INTRANGE(n) lines showing. RUN - Push Button returning enter. ESCAPE - Push Button returning esc. Note: The advantage of a CYCLING menu is that the program has total control over the input. A CHOICES menu still allows the user to directly input the keyword with an error. A CYCLING menu is used when the choice is clear. VERTICAL and CYCLING menus put choices in CHOICECODE. CHOICES ( ) is not used. A CHOICES menu should be used when the keyword (in CHOICECODE) is not clear. The text in CHOICES will help. CYCLING can be used for order of GLS etc. If VERTICAL is used, must input max # to show in INTRANGE( ). A RCHECKBOX is a special type of check box where the other checkboxes are turned off in one checkbox in the group is turned on. Note: The options B34SDSN, B34SMACDSN, SCADSN, and MEMBER have not been activated yet. If HIDDEN is supplied, the field will not display but will print. If EFILE is supplied, the field will be tested to see if it exists. If VARLIST or VARNAME are supplied, the user gets a list of choices. Default = CHARACTER. If CHARTEST is supplied, the field is tested against POSTSTRING. If FIELD = POSTSTRING then PRELINE, PRESTRING and POSTLINE are placed in the commmand file. Otherwise nothing is done. If the same field is looked at over and over, it is possible to program a number of choices. When a number of CHARTEST tests are required, use TYPE=HIDDEN and REQUIRED. It is important that the size of DEFAULT(' ') has exactly 3 spaces if YES is what is tested against. A max of 10 VARLIST fields can be supplied. If VARLIST is supplied, the output field is automatically set as ROW + 1 col 2 - 73 for each 8 variables. Fields are allocated. User must adjust next field accordingly. If CHECKBOX is supplied, the default setting is off, to set otherwise place a character in default which should have a width of 1. MAXVAR=i1 Sets maximum number of variables in VARLIST. Default = 9. This option is currently not supported. INTRANGE(i2,i3) Sets integer range if FIELDTYPE(INTEGER). INTRANGE(i2) sets max number to show for VERTICAL field. Sets max number in a RCHECKBOX group. After first RCHECKBOX set INTRANGE(0). REALRANGE(r1,r2) Sets real range if FIELDTYPE(REAL). CHOICES(' ',' ') Sets choices if field is type choices. Currrent max of 30. CHOICES can be seen with Fn6 key. CHOICECODE(' ',' ') Sets choice codes if field is type CHOICES, Vertical, CYCLING or CHECKBOX. Current max of 30. LETNAME(key) If present, sets the field as input into a %B34SLET variable key. If the LETNAME option is used PRELINE and POSTLINE options cannot be used. PRELINE(' ',' ') Sets pre-line, which will be placed on the prior line. Any number of prelines can be set. POSTSLINE(' ',' ') Sets post-line, which will be placed on the following line. Any number of post lines can be set. PRESTRING(' ') Sets pre-string. This will be placed right before field. POSTSTRING(' ') Sets post-string. This will be placed after field. JUMPDOWN(n) Jumps down n fields if field is blank. LIMITF(n) Contains a tab number. Common fields should be given codes higher than any value given on the LIMITF parameter on the FIELD sentence and placed after the last tabbed field. BOX sentence The BOX sentence allows drawing of up to 20 boxes per form. By the use of the LIMITB parameter, boxes can be set for a specific tab. The BOX sentence requires that the POSITION parameter be set. POSITION(n1,n2,n3,n4) where n1 = left hand column position (1-80) n2 = top row position (1-22) n3 = box width (1-80) n4 = box height (1-22) Note: To draw horizontal or vertical lines set n3=1 or n4=1. LIMITB(n) Contains a tab number. Common fields should be given codes higher than any value given on LIMITF parameter on MAKEMENU sentence and placed after the last tabbed field. BOXFRAME(k1,k2,k3,k4) k1 = frame type default = single k2 = primary color default = green. k3 = secondary color default = black. k4 = clear color default = black. Sets frame characteristics. Default set with MBOXFRAME For k1 use key words: 0 NONE 1 SINGLE 2 DOUBLE 3 SINGLE2 4 DROPSHADOW 5 FIELD3D1 6 FIELD3D2 7 BUTTON3D1 8 BUTTON3D2 9 WINDOW3D1 10 WINDOW3D2 For k2 - k4 user usual color code. PAGE(n1) - Sets menu page. Default = 1. Note: If tabbed forms are used, there can only be one page. A tabbed form, while more complex, is a better alternative to a mulitpage form. The advantage of a page form is that the internal limit on the number of fields can be extended. PGMCARDS sentence The B34S commands to execute are placed after the PGMCARDS$ sentence (or the DATACARDS$ sentence). The B34S parser will strip out all comment cards. If the user wants to have B34S MACRO statements, or (nested) B34SRETURN$ statements between the structure PGMCARDS$ B34SRETURN$, the special comment form: /$$# /$# /;;# /;# must be used. The B34S parser will strip out the /$$#, /$# etc and leave the rest of the line in the PGMCARDS file. B34SRETURN sentence See PGMCARDS sentence above. The special parameter _NULL_ or _null_ can be used as a "place sitter" in code. _NULL_ will not be be flagged as not parsed. The code %B34SLET TEST=_NULL_$ implies a CHARTEST field setting TEST to something else B34SEXEC PARANAME %B34SEVAL(&TEST) $ will resolve to B34SEXEC PARNAME _NULL_ if the condition for the CHARTEST is not met and B34SEXEC PARNAME SOMECODE $ otherwise. The file MENU.MAC can be studied for MAKEMENU examples. A few simple situations are given below. The MAKEMENU command is designed for the expert B34S user who wants to make the B34S program accessible to a larger audience for a specific (usually simple) application. The casual B34S user will be using the MAKEMENU command without knowing it. Sample 1. MAKEMENU setup for LIST command. %b34slet ibatch = %b34sget(ib34sg,ibatch,1)$ B34SEXEC MAKEMENU COMMANDN('List Command') COMMANDH('Input series to list. For futher detail see help command.' 'A maximum of 10 series can be supplied. ')$ FIELD TYPE=HIDDEN PAGE=1 ROW=1 COL1=1 PRELINE('%A34SLET IN1 = 0^' '%A34SLET IN2 = 0^' '%A34SLET IIN3 = 0^' '%A34SLET IIN4 = 0^' '%A34SLET IN3 = 0^' '%A34SLET IN4 = 0^' '%A34SLET IPOBS= 0^' '%A34SLET Ilist2=0^' '%A34SLET CCOM =0^' )$ FIELD TYPE=INFO PAGE=1 ROW=1 COL1=1 textcolor=yellowchr TEXT('Specify series to list.')$ %b34sif(&ibatch.eq.4)%then$ box position(2,4,78,13) boxframe(window3d1,yellowchr,white,black)$ %b34sendif$ %b34sif(&ibatch.eq.5)%then$ box position(2,4,78,13) boxframe(window3d1,yellowchr,black,black)$ %b34sendif$ FIELD TYPE=INPUT PAGE=1 ROW=4 COL1=2 LETNAME(IN1) FIELDTYPE=INTEGER DEFAULT=' ' INTRANGE(0,999999999) COL2=24 TEXTID='Zero defaults to first observation' TEXT('Beginning obs.:') OPTIONAL $ FIELD TYPE=INPUT PAGE=1 ROW=5 COL1=2 LETNAME(IN2) FIELDTYPE=INTEGER DEFAULT=' ' INTRANGE(0,999999999) COL2=24 TEXTID='Zero defaults to last observation' TEXT('Ending obs.:') OPTIONAL $ field type=input fieldtype=checkbox page=1 row=6 col1=2 choicecode('%A34SLET ipobs=0^','%A34SLET ipobs=1^') col2=24 fieldhelp('Allows turning off date info for time series.') textid('Hit space bar to display observation number') text('Print obs number:') default=(' ') $ FIELD TYPE=INFO PAGE=1 ROW=7 COL1=2 COL2=23 TEXTID='Optional title' TEXT('Specify a title on next line:') $ FIELD TYPE=INPUT PAGE=1 ROW=8 COL1=2 LETNAME(ccom) FIELDTYPE=DQSTRING PRELINE('%A34SLET ilist2=1^') DEFAULT= ' ' COL2=2 TEXTID=' ' OPTIONAL $ FIELD TYPE=INFO PAGE=1 ROW=9 COL1=2 TEXT('Optionally specify series to list. Blank lists all.')$ FIELD TYPE=INPUT PAGE=1 ROW=10 COL1=2 LETNAME(IN3) FIELDTYPE=QVARLIST DEFAULT=' ' TEXTHELP('Up to ten series can be supplied.' 'If this field is left blank, all series listed.') COL2=2 TEXTID='Optionally specify variable names' TEXT(' ') OPTIONAL PRELINE('%A34SLET IIN3=1^') $ FIELD TYPE=INPUT PAGE=1 ROW=11 COL1=2 LETNAME(IN4) FIELDTYPE=QVARLIST DEFAULT=' ' TEXTHELP('Up to ten series can be supplied.' 'If this field is left blank, all series listed.') COL2=2 TEXTID='Optionally specify variable names' TEXT(' ') OPTIONAL PRELINE('%A34SLET IIN4=1^') $ /$EXIT GROUP FIELD TYPE=INPUT FIELDTYPE=RUN PAGE=1 ROW=13 COL1=1 COL2=25 FIELDHELP('Run') TEXTID('Run Command. ') text('Push to Run Command:') DEFAULT=' ' $ FIELD TYPE=INPUT FIELDTYPE=ESCAPE PAGE=1 ROW=13 COL1=30 COL2=55 FIELDHELP('Escape ') TEXTID('Terminate command. ') text('Push to Escape Command:') DEFAULT=' ' $ /$EXIT GROUP PGMCARDS$ /$# B34SEXEC LIST /$# %B34SIF(&IN1.NE.0)%THEN $ /$# IBEGIN=%B34SEVAL(&IN1) /$# %B34SENDIF $ /$# %B34SIF(&IN2.NE.0)%THEN $ /$# IEND =%B34SEVAL(&IN2) /$# %B34SENDIF $ /$# %B34SIF(&IPOBS.NE.0)%THEN $ /$# PRINTOBS /$# %B34SENDIF $ /$# %B34SIF(&ILIST2.NE.0)%THEN $ /$# COMMENT( /$# %B34SEVAL(&CCOM) /$# ) /$# %B34SENDIF $ /$# $ /$# %B34SIF(&IIN3.NE.0)%THEN $ /$# %B34SIF(&IIN3.NE.0)%THEN $ /$# VAR = /$# %B34SEVAL(&IN3) /$# %B34SENDIF $ /$# %B34SIF(&IIN4.NE.0)%THEN $ /$# %B34SEVAL(&IN4) /$# %B34SENDIF $ /$# $ /$# %B34SENDIF $ /$# B34SEEND$ B34SRETURN$ B34SEEND$ Sample 2. Menu for line printer graph B34SEXEC MAKEMENU COMMANDN('Line Printer Graph Command') COMMANDH('Input series to graph. For futher detail see help command.', 'A maximum of two series can be supplied.')$ FIELD TYPE=INFO PAGE=1 ROW=2 COL1=2 TEXTCOLOR=YELLOWCHR TEXT(' Line printer graph of two series ') TEXTID(' ')$ FIELD TYPE=HIDDEN PAGE=1 ROW=1 COL1=1 PRELINE('%A34SLET IN1 = 0^') $ FIELD TYPE=HIDDEN PAGE=1 ROW=1 COL1=1 PRELINE('%A34SLET IN2 = 0^') $ FIELD TYPE=HIDDEN PAGE=1 ROW=1 COL1=1 PRELINE('%A34SLET IN4 = 0^') $ FIELD TYPE=HIDDEN PAGE=1 ROW=1 COL1=1 PRELINE('%A34SLET IIN4 = 0^') $ FIELD TYPE=INPUT PAGE=1 ROW=4 COL1=2 LETNAME(IN1) FIELDTYPE=INTEGER DEFAULT=' ' INTRANGE(0,999999999) COL2=24 TEXTID='Blank defaults to 1' TEXT('Beginning obs.:') $ FIELD TYPE=INPUT PAGE=1 ROW=5 COL1=2 LETNAME(IN2) FIELDTYPE=INTEGER DEFAULT=' ' COL2=24 TEXTID='Blank defaults to last observation' INTRANGE(0,999999999) TEXT('Ending obs.:') OPTIONAL $ FIELD TYPE=INPUT PAGE=1 ROW=6 COL1=2 LETNAME(IN3) FIELDTYPE=QVARLIST DEFAULT=' ' COL2=24 TEXTID='Specify two variable names here' TEXT('Variables to graph:') REQUIRED $ FIELD TYPE=INFO PAGE=1 ROW=7 COL1=2 COL2=23 TEXTID='Optional title' TEXT('Specify a title on next line:') $ FIELD TYPE=INPUT PAGE=1 ROW=8 COL1=2 LETNAME(IN4) FIELDTYPE=DQSTRING PRELINE('%A34SLET IIN4=1^') DEFAULT= ' ' COL2=2 TEXTID=' ' OPTIONAL $ /$EXIT GROUP FIELD TYPE=INPUT FIELDTYPE=RUN PAGE=1 ROW=10 COL1=1 COL2=25 FIELDHELP('Run') TEXTID('Run Command. ') text('Push to Run Command:') DEFAULT=' ' $ FIELD TYPE=INPUT FIELDTYPE=ESCAPE PAGE=1 ROW=10 COL1=30 COL2=55 FIELDHELP('Escape ') TEXTID('Terminate command. ') text('Push to Escape Command:') DEFAULT=' ' $ /$EXIT GROUP PGMCARDS$ /$# B34SEXEC PLOT GRAPH /$# %B34SIF(&IN1.NE.0)%THEN $ /$# IBEGIN=%B34SEVAL(&IN1) /$# %B34SENDIF $ /$# %B34SIF(&IN2.NE.0)%THEN $ /$# IEND =%B34SEVAL(&IN2) /$# %B34SENDIF $ /$# $ /$# VAR =%B34SEVAL(&IN3)$ /$# %B34SIF(&IIN4.NE.0)%THEN $ /$# TITLE = /$# %B34SEVAL(&IN4) $ /$# %B34SENDIF $ /$# B34SEEND$ B34SRETURN$ B34SEEND$ Sample 3. Setup to run a simple regression B34SEXEC MAKEMENU COMMANDN('Simple OLS Model') COMMANDH('See help command for futher detail on regression options.')$ FIELD TYPE=INFO FIELDTYPE=CHARACTER PAGE=1 ROW=1 COL1=1 COL2=1 OPTIONAL TEXT('Simple OLS regression model.') TEXTCOLOR=YELLOWCHR $ FIELD TYPE=HIDDEN FIELDTYPE=CHARACTER PAGE=1 ROW=3 COL1=1 PRELINE('A34SEXEC RR ')$ FIELD TYPE=INPUT FIELDTYPE=INTEGER PAGE=1 ROW=3 COL1=1 COL2=23 OPTIONAL TEXTID('Blank defaults to observation 1.') INTRANGE(0,999999999) TEXT('Beginning observation:') PRELINE('IBEGIN=') DEFAULT=' ' $ FIELD TYPE=INPUT FIELDTYPE=INTEGER PAGE=1 ROW=4 COL1=1 COL2=23 OPTIONAL INTRANGE(0,999999999) TEXTID('Blank defaults to last observation.') TEXT(' Last observation:') PRELINE('IEND=') DEFAULT=' ' $ FIELD TYPE=INPUT FIELDTYPE= CHARTEST PAGE=1 ROW=5 COL1=1 COL2=23 TEXTID('Enter YES to suppress the intercept of model') TEXT('Force no intercept:') PRELINE('NOINT') DEFAULT=(' ') POSTSTRING('YES') $ FIELD TYPE=HIDDEN FIELDTYPE=CHARACTER PAGE=1 ROW=6 COL1=1 PRELINE('^') $ FIELD TYPE=INPUT FIELDTYPE= CHARTEST PAGE=1 ROW=6 COL1=1 COL2=23 TEXTID('Enter YES for Hinich (1982) Nonlinearity test') TEXT(' Nonlinearity Test:') PRELINE('BISPEC ITURNO IAUTO ^') DEFAULT=(' ') POSTSTRING('YES') $ FIELD TYPE=INPUT FIELDTYPE=VARNAME PAGE=1 ROW=7 COL1=1 COL2=23 REQUIRED TEXTID('Be sure variable is currently active') TEXT(' Left hand variable:') DEFAULT=' ' PRELINE('MODEL ') POSTLINE('=')$ FIELD TYPE=INPUT FIELDTYPE=VARLIST PAGE=1 ROW=8 COL1=1 COL2=23 REQUIRED TEXTID('Be sure variable is currently active') TEXT(' Right hand variables:') DEFAULT=' ' $ FIELD TYPE=INPUT FIELDTYPE=VARLIST PAGE=1 ROW=9 COL1=1 COL2=1 OPTIONAL TEXTID('Be sure variable is currently active') TEXT('Right hand variables:') DEFAULT= ' ' $ FIELD TYPE=HIDDEN FIELDTYPE=CHARACTER PAGE=1 ROW=10 COL1=1 COL2=22 OPTIONAL POSTLINE('^ A34SEEND^')$ B34SEEND$ Sample # 4 Menu with choices b34sexec makemenu commandn('Load Citibase from extract file') FHCOLOR(REDCHR) Commandh('This command allows user to load series listed in an extract' 'file of the master Citibase file into B34S using RATS386.')$ field type=input fieldtype=dqstring page=1 row=2 col1=1 col2=11 default='_citinew.lst ' preline('A34SEXEC citibase citilist( ') postline(')^ loadciti') textid=('Specify name of extract file') optional text('File name:')$ FIELD TYPE=INPUT FIELDTYPE=CHOICES PAGE=1 ROW=3 COL1=1 COL2=17 FIELDHELP('Field sets various frequency options.') TEXTID('Hit Alt key to see choices for final frequency') TEXT('Final Frequency:') CHOICES('Monthly ', 'Quarterly', 'Yearly ') CHOICECODE(' MONTHLY', 'QUARTERLY', ' YEARLY') PRELINE(' ') POSTSTRING(' ') DEFAULT=( 'QUARTERLY') $ FIELD TYPE=INPUT FIELDTYPE=CHOICES PAGE=1 ROW=4 COL1=1 COL2=12 FIELDHELP('Field sets whether RATS386 list info messages.') TEXTID('Hit Alt key to see choices for info messages.') TEXT('Info level:') CHOICES('Verbose ', 'Noverbose') CHOICECODE(' VERBOSE', 'NOVERBOSE') PRELINE(' ') POSTSTRING(' ') DEFAULT=(' VERBOSE') $ FIELD TYPE=INPUT FIELDTYPE=CHOICES PAGE=1 ROW=5 COL1=1 COL2=14 FIELDHELP('Field sets how to treat missing data.') TEXTID('Hit Alt key to see choices for missing data.') TEXT('Missing data:') CHOICES('Keep missing data', 'Drop missing data') CHOICECODE('KEEPMISS', 'DROPMISS') PRELINE(' ') POSTSTRING(' ') DEFAULT=('DROPMISS') $ FIELD TYPE=INPUT FIELDTYPE= CHARTEST PAGE=1 ROW=6 COL1=1 COL2=23 TEXTID('Enter YES to turn off listing of Rats output in B34S') TEXT('No RATS list in B34S:') PRELINE( 'NORATSLIST') DEFAULT=(' ') POSTSTRING('YES') $ FIELD TYPE=INPUT FIELDTYPE=CHOICES PAGE=1 ROW=7 COL1=1 COL2=16 FIELDHELP('Field sets various compact options.') TEXTID('Hit Alt key to see choices for compact options') TEXT('Compact option:') CHOICES('Average data ', 'Sum data ', 'Geometric ', 'First data point ', 'Last data point ', 'Maximum data point ', 'Minumum data point ', 'Select point (default=1)') CHOICECODE(' COMPACT=AVERAGE', ' COMPACT=SUM', ' COMPACT=GEOMETRIC', ' COMPACT=FIRST', ' COMPACT=LAST', ' COMPACT=MAXIMUM', ' COMPACT=MINIMUM', ' SELECT=1 ') PRELINE(' ') POSTSTRING(' ') DEFAULT=( ' COMPACT=AVERAGE') $ FIELD TYPE=INPUT PAGE=1 ROW=8 COL1=1 FIELDTYPE=INTEGER DEFAULT='1945' INTRANGE(1,9999) COL2=13 TEXTID='Sets base year for RATS386 ALLOC command' TEXT(' Base year:') PRELINE('BASEYEAR=' ) OPTIONAL $ FIELD TYPE=INPUT FIELDTYPE=INTEGER PAGE=1 ROW=9 COL1=1 COL2=13 OPTIONAL INTRANGE(0,999999999) TEXTID('Sets baseperiod for RATS386 CAL command.') TEXT('Base period:') PRELINE('BASEPERIOD=') DEFAULT='1 ' $ FIELD TYPE=INPUT FIELDTYPE=INTEGER PAGE=1 ROW=10 COL1=1 COL2=13 OPTIONAL INTRANGE(0,999999999) TEXTID('Sets endyear for RATS386 ALLOC command.') TEXT(' End year:') PRELINE('ENDYEAR=') DEFAULT='1996 ' $ FIELD TYPE=INPUT FIELDTYPE=INTEGER PAGE=1 ROW=11 COL1=1 COL2=13 OPTIONAL INTRANGE(0,999999999) TEXTID('Sets end year for RATS386 ALLOC command.') TEXT(' End period:') PRELINE('ENDPERIOD=') DEFAULT='1 ' $ FIELD TYPE=HIDDEN ROW=1 COL1=12 COL2=1 PRELINE(' ^ A34SRUN^') $ FIELD TYPE=INPUT FIELDTYPE= CHARTEST PAGE=1 ROW=13 COL1=1 COL2=23 TEXTID('Enter YES to add labels to B34S output.') TEXT('List label in B34S:') PRELINE( 'A34SEXEC citibase^ addlabels ^ A34SRUN^') DEFAULT=(' ') POSTSTRING('YES') $ /$EXIT GROUP FIELD TYPE=INPUT FIELDTYPE=RUN PAGE=1 ROW=15 COL1=1 COL2=25 FIELDHELP('Run') TEXTID('Run Command. ') text('Push to Run Command:') DEFAULT=' ' $ FIELD TYPE=INPUT FIELDTYPE=ESCAPE PAGE=1 ROW=15 COL1=30 COL2=55 FIELDHELP('Escape ') TEXTID('Terminate command. ') text('Push to Escape Command:') DEFAULT=' ' $ /$EXIT GROUP b34seend$ Sample # 5 Menu showing Box and vertical %b34slet batch = %b34sget(ib34sg,ibatch,1)$ B34SEXEC MAKEMENU COMMANDN('Sets Kedit - Keditw under windows 95/NT') COMMANDH('See help command for further detail on B34S Editors.')$ FIELD TYPE=INFO FIELDTYPE=CHARACTER PAGE=1 ROW=2 COL1=1 COL2=1 OPTIONAL TEXT('Set KEDIT or KEDITW under Windows 95 / NT') TEXTCOLOR=YELLOWCHR $ field type=hidden page=1 row=1 col1=1 preline('%A34SLET kedit = 0 ^')$ FIELD TYPE=INFO FIELDTYPE=CHARACTER PAGE=1 ROW=4 COL1=1 COL2=1 OPTIONAL TEXT('This command is useful only under Windows 95 / NT') TEXTCOLOR=YELLOWCHR $ FIELD TYPE=INFO FIELDTYPE=CHARACTER PAGE=1 ROW=6 COL1=1 COL2=1 OPTIONAL TEXT('The usual setting is KEDIT.') TEXTCOLOR=YELLOWCHR $ /$ Non Windows 95 path %b34sif(&batch.eq.4)%then$ box position(2,9,66,10) boxframe(window3d1,yellowchr,white,black)$ FIELD TYPE=INPUT FIELDTYPE= vertical PAGE=1 ROW=10 COL1=1 COL2=23 TEXTID('Hit space bar to select choice.') intrange(4) TEXT('Set Editor:') choicecode('kedit' , 'keditw', 'notepad') DEFAULT= (' ') prestring('%A34SLET kedit = ') poststring('^') $ %b34sendif$ /$ Windows 95 path %b34sif(&batch.eq.5)%then$ box position(2,9,66,10) boxframe(window3d1,yellowchr,black,black)$ FIELD TYPE=INPUT FIELDTYPE= vertical PAGE=1 ROW=10 COL1=1 COL2=23 TEXTID('Hit space bar to select choice.') intrange(4) TEXT('Set Editor:') choicecode('kedit' , 'keditw', 'edit ') DEFAULT= (' ') prestring('%A34SLET kedit = ') poststring('^') $ %b34sendif$ /$EXIT GROUP FIELD TYPE=INPUT FIELDTYPE=RUN PAGE=1 ROW=16 COL1=1 COL2=25 FIELDHELP('Run') TEXTID('Run Command. ') text('Push to Run Command:') DEFAULT=' ' $ FIELD TYPE=INPUT FIELDTYPE=ESCAPE PAGE=1 ROW=16 COL1=30 COL2=55 FIELDHELP('Escape ') TEXTID('Terminate command. ') text('Push to Escape Command:') DEFAULT=' ' $ /$EXIT GROUP pgmcards$ /$# %b34sif(&kedit.eq.kedit)%then$ /$# b34sexec options editor('KEDIT') $ b34seend$ /$# %b34sendif $ /$# %b34sif(&kedit.eq.keditw)%then$ /$# b34sexec options editor('KEDITW')$ b34seend$ /$# %b34sendif $ /$# %b34sif(&kedit.eq.edit)%then$ /$# b34sexec options editor('EDIT') $ b34seend$ /$# %b34sendif $ /$# %b34sif(&kedit.eq.notepad)%then$ /$# b34sexec options editor('NOTEPAD')$ b34seend$ /$# %b34sendif $ b34sreturn$ b34srun$