/***************************************************************************/
/* CBL.LXL -  LANGUAGE SENSITIVE EDITOR PROFILE FOR COBOL/370              */
/***************************************************************************/
TRACE OFF

/* this is a COBOL file */
'SET DOCTYPE CBL'

/* Cobol classes - DO NOT MODIFY!! */
'SET CLASSES CODE FWDLINK BWDLINK SKIPLINK BLANK ERROR COMMENT ',
'DIRECTIVE DIVISION SECTION AREAA AREAB PREPROCESSOR'

'SET RULERTEXT ----+-*A-1-B--+----2----+----3----+----4----+----5' ||,
               '----+----6----+----7--|-+----8'
'SET RULER ON'

                                                /* MENU ITEMS CREATION     */
MENU.1  = "~Options.Automatic_~indenting..."
MENU.2  = "~Options.~Language_editing."
MENU.3  = "~Options.~Language_editing.~Token_highlighting"
MENU.4  = "~Options.~Language_editing.Automatic_~indenting"
MENU.5  = "~Options.~Language_editing.~Lexical_errors"
MENU.6  = "~View." || 'SEPARATOR'
MENU.7  = "~View.~Comments"
MENU.8  = "~View.Di~visions"
MENU.9  = "~View.Da~ta_Division"
MENU.10 = "~View.~Outline"
MENU.11 = "~View.S~QL_and_CICS"
MENU.12 = "~Help.COBO~L_help"
MENUITEMS = 12

MENUCMD.1  = '2 EVFECBL3 AIDLG'
MENUCMD.2  = '7'
MENUCMD.3  = 'EVFECBL3 TOKOPT'
MENUCMD.4  = 'EVFECBL3 AIOPT'
MENUCMD.5  = 'EVFECBL3 LEOPT'
MENUCMD.6  = '2'
MENUCMD.7  = '3 ;INCLUDE COMMENT ;EXCLUDE'
MENUCMD.8  = '4 ;INCLUDE DIVISION SECTION ;EXCLUDE'
MENUCMD.9  = '5 ;MACRO DATADIV'
MENUCMD.10 = '6 ;INCLUDE AREAA ;EXCLUDE'
MENUCMD.11 = '7 ;INCLUDE PREPROCESSOR ;EXCLUDE'
MENUCMD.12 = '6 EVFECBL3 LANGHELP'

HELPID.   = 0
HELPID.1  = 16093
HELPID.2  = 16099
HELPID.3  = 16100
HELPID.4  = 16101
HELPID.5  = 16108
HELPID.7  = 16073
HELPID.8  = 16073
HELPID.9  = 0
HELPID.10 = 16073
HELPID.11 = 16073
HELPID.12 = 16137

GROUPS. = ''
GROUPS.7  = 'COMMENT'
GROUPS.8  = 'DIVISION SECTION'
GROUPS.10 = 'AREAA'
GROUPS.11 = 'PREPROCESSOR'

/********************************************************************/
/* Conditionally add Menu items for data and transaction assistants */
/********************************************************************/
file_name = 'IWZALXDA'
'LXCHKDLL' file_name
if rc = 0 then do
   MENUITEMS = 15
   MENU.13  = "~Edit." || 'SEPARATOR'
   MENUCMD.13  = '6'
   MENU.14  = "~Edit.~Insert_Code."
   MENUCMD.14  = '7'
   MENU.15 = "~Edit.~Insert_Code.~SQL_..."
   MENUCMD.15 = '8 IWZALXDA'
   file_name = 'LXTA'
   'LXCHKDLL' file_name
   if rc = 0 then do
      MENUITEMS = 16
      MENU.16 = "~Edit.~Insert_Code.~CICS_ECI_..."
      MENUCMD.16 = '9 LXTA'
      end
   end
else do
   file_name = 'LXTA'
   'LXCHKDLL' file_name
   if rc = 0 then do
      MENUITEMS = 15
      MENU.13  = "~Edit." || 'SEPARATOR'
      MENUCMD.13  = '6'
      MENU.14  = "~Edit.~Insert_Code."
      MENUCMD.14  = '7'
      MENUITEMS = 15
      MENU.15 = "~Edit.~Insert_Code.~CICS_ECI_..."
      MENUCMD.15 = '8 LXTA'
      end
end

DO I = 1 TO MENUITEMS
   'SET ACTIONBAR.' || MENU.I MENUCMD.I
   IF HELPID.I > 0 THEN
      'SET HELP.' HELPID.I
   IF GROUPS.I <> '' THEN
      'SET GROUP.' GROUPS.I
END
                                                /* GET MENU IDS FOR OPTIONS*/
MENUIDSTR = ' ACTIONBARID.' || MENU.3 'INTO ID3',
            ' ACTIONBARID.' || MENU.4 'INTO ID4',
            ' ACTIONBARID.' || MENU.5 'INTO ID5',
            ' ACTIONBARID.' || MENU.12 'INTO ID12'
'EXTRACT' MENUIDSTR
MENUIDSTR = ID3 ID4 ID5 ID12

DROP MENU. MENUCMD. HELPID. MENUITEMS I         /* RELEASE EXCESS MEMORY   */
DROP ID3 ID4 ID5 ID12
                                                /* SETUP FULL PARSE COMMAND*/
'SET FULLPARSE  SUBMIT READ STOP "Tokenize file" EVFECBL3 ALL'
'SET PARSER     EVFECBL3 PARSE'                 /* SETUP INCREMENTAL PARSE */

                                                /* AUTOINDENT NEW LINE     */
'SET SYNONYM.OPENLINE MULT ;PRIMITIVE ENDLINE;SPLITJOIN SPLIT;PRIMITIVE NEWLINE;EVFECBL3 AINEW'
                                                /* AUTOINDENT EXISTING LINE*/
'SET SYNONYM.NEWLINE EVFECBL3 AIEXIST'

'SET ACTION.F1 EVFECBL3 HELP'                   /* HELP ON TOKEN AT CURSOR */

                                                /* INITIAL FONTS SETTINGS  */
'SET FONT.!  BLACK/WHITE                    "Default style"'
'SET FONT._  BLACK/WHITE                    "Layout spaces"'
'SET FONT.E  BRIGHT RED/WHITE               "Error token"'
'SET FONT.S  BLACK/WHITE                    "Sequence number"'
'SET FONT.I  CYAN/WHITE                     "Indicator area"'
'SET FONT.D  UNDERLINE BRIGHT BLUE/WHITE    "Compiler directive"'
'SET FONT.C  CYAN/WHITE                     "Comment"'
'SET FONT.B  BLACK/WHITE                    "Separator"'
'SET FONT.U  BLACK/WHITE                    "User defined"'
'SET FONT.T  CYAN/WHITE                     "Pseudo-text"'
'SET FONT.N  PINK/WHITE                     "Numeric literal"'
'SET FONT.L  PINK/WHITE                     "Nonnumeric literal"'
'SET FONT.P  PINK/WHITE                     "Picture string"'
'SET FONT.H  GREEN/WHITE                    "Preprocessor string"'
'SET FONT.R  BRIGHT BLUE/WHITE              "Reserved word"'
'SET FONT.F  BRIGHT BLUE/WHITE              "Function name"'

'SET TABS 7 8 12 EVERY 4'                       /* INITIAL TAB SETTINGS    */

'EVFECBL3 INIT' MENUIDSTR                       /* INITILIAZE LS COMPONENT */
'SET INSERTING OFF'                             /* REPLACE MODE            */
'TRIGGER FULLPARSE'                             /* INITIAL FULL PARSE      */

'LXR NAVIG.LX'
