home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / viscobv7.zip / vac22os2 / ibmcobol / macros / cbl.lxl < prev    next >
Text File  |  1998-02-24  |  7KB  |  201 lines

  1. /***************************************************************************/
  2. /* CBL.LXL -  LANGUAGE SENSITIVE EDITOR PROFILE FOR COBOL/370              */
  3. /***************************************************************************/
  4. TRACE OFF
  5.  
  6. /* this is a COBOL file */
  7. 'SET DOCTYPE cbl'
  8. 'SET PROFILE cbl'
  9.  
  10. /* Cobol classes - DO NOT MODIFY!! */
  11. 'SET CLASSES CODE FWDLINK BWDLINK SKIPLINK BLANK ERROR COMMENT ',
  12. 'DIRECTIVE DIVISION SECTION AREAA AREAB PREPROCESSOR'
  13.  
  14. 'SET RULERTEXT ----+-*A-1-B--+----2----+----3----+----4----+----5' ||,
  15.                '----+----6----+----7--|-+----8'
  16. 'SET RULER ON'
  17.  
  18.                                                 /* MENU ITEMS CREATION     */
  19. MENU.1  = "LP_OPTIONS.Automatic_~indenting..."
  20. MENU.2  = "LP_OPTIONS.~Language_editing."
  21. MENU.3  = "LP_OPTIONS.~Language_editing.~Token_highlighting"
  22. MENU.4  = "LP_OPTIONS.~Language_editing.Automatic_~indenting"
  23. MENU.5  = "LP_OPTIONS.~Language_editing.~Lexical_errors"
  24. MENU.6  = "LP_VIEW." || 'SEPARATOR'
  25. MENU.7  = "LP_VIEW.~Comments"
  26. MENU.8  = "LP_VIEW.Di~visions"
  27. MENU.9  = "LP_VIEW.Data_Divisio~n"
  28. MENU.10 = "LP_VIEW.~Outline"
  29. MENU.11 = "LP_VIEW.S~QL_and_CICS"
  30. MENU.12 = "LP_HELP.COBO~L_help"
  31. MENUITEMS = 12
  32.  
  33. MENUCMD.1  = '2 CBLPAR AIDLG'
  34. MENUCMD.2  = '7'
  35. MENUCMD.3  = 'CBLPAR TOKOPT'
  36. MENUCMD.4  = 'CBLPAR AIOPT'
  37. MENUCMD.5  = 'CBLPAR LEOPT'
  38. MENUCMD.6  = '2'
  39. MENUCMD.7  = '3 ;INCLUDE COMMENT ;SET EXCLUDE'
  40. MENUCMD.8  = '4 ;INCLUDE DIVISION SECTION ;SET EXCLUDE'
  41. MENUCMD.9  = '5 ;MACRO datadiv'
  42. MENUCMD.10 = '6 ;INCLUDE AREAA ;SET EXCLUDE'
  43. MENUCMD.11 = '7 ;INCLUDE PREPROCESSOR ;SET EXCLUDE'
  44. MENUCMD.12 = '6 CBLPAR LANGHELP'
  45.  
  46. HELPID.   = 0
  47. HELPID.1  = 16093
  48. HELPID.2  = 16099
  49. HELPID.3  = 16100
  50. HELPID.4  = 16101
  51. HELPID.5  = 16109
  52. HELPID.7  = 16073
  53. HELPID.8  = 16073
  54. HELPID.9  = 0
  55. HELPID.10 = 16073
  56. HELPID.11 = 16073
  57. HELPID.12 = 16137
  58.  
  59. GROUPS. = ''
  60. GROUPS.7  = 'COMMENT PARSED'
  61. GROUPS.8  = 'DIVISION SECTION PARSED'
  62. GROUPS.9  = 'PARSED'
  63. GROUPS.10 = 'AREAA PARSED'
  64. GROUPS.11 = 'PREPROCESSOR PARSED'
  65.  
  66. /********************************************************************/
  67. /* Conditionally add Menu items for data and transaction assistants */
  68. /********************************************************************/
  69. nextitem = 12;
  70. nextpos = 5;
  71. /* Determine if running under VisualAge for COBOL product */
  72. 'extract messages into messages';
  73. 'extract beeplength into beeplength';
  74. 'set messages off';
  75. 'set beeplength 0';
  76. 'macroload cbv.lxl';
  77. macroload_rc = rc;
  78. was_cbv = macroload_rc;
  79. 'set messages' messages;
  80. 'set beeplength' beeplength;
  81. if macroload_rc = 0 then
  82.   do;
  83.   'macrodrop cbv.lxl';
  84.   file_name = 'LZIWZADA'
  85.   'CHKDLL' file_name
  86.   da_rc = rc;
  87.   file_name = 'LZIWZATA'
  88.   'CHKDLL' file_name
  89.   ta_rc = rc;
  90.   end;
  91. else
  92.   do;
  93.   da_rc = 4;
  94.   ta_rc = 4;
  95.   end;
  96. if da_rc = 0 | ta_rc = 0 then
  97.   do;
  98.   nextitem = nextitem + 1;
  99.   nextpos = nextpos + 1;
  100.   MENU.nextitem  = "LP_EDIT." || 'SEPARATOR'
  101.   MENUCMD.nextitem  = nextpos;
  102.   nextitem = nextitem + 1;
  103.   nextpos = nextpos + 1;
  104.   MENU.nextitem  = "LP_EDIT.~Insert_Code."
  105.   MENUCMD.nextitem  = nextpos;
  106.   if da_rc = 0 then
  107.     do;
  108.     nextitem = nextitem + 1;
  109.     nextpos = nextpos + 1;
  110.     MENU.nextitem = "LP_EDIT.~Insert_Code.~SQL_..."
  111.     MENUCMD.nextitem = nextpos 'IWZADA'
  112.     'SET TOOLBAR.Insert_SQL BITMAP LZIWZADA_8999 HELP "Insert SQL Logic" IWZADA'
  113.     end;
  114.   if ta_rc = 0 then
  115.     do;
  116.     nextitem = nextitem + 1;
  117.     nextpos = nextpos + 1;
  118.     MENU.nextitem = "LP_EDIT.~Insert_Code.~CICS_ECI_..."
  119.     MENUCMD.nextitem = nextpos 'IWZATA'
  120.     'SET TOOLBAR.Insert_CICS_ECI BITMAP LZIWZATA_1247 HELP "Insert CICS ECI Logic" IWZATA'
  121.     end;
  122.   MENUITEMS = nextitem;
  123.   end;
  124.  
  125. DO I = 1 TO MENUITEMS
  126.    'SET ACTIONBAR.' || MENU.I MENUCMD.I
  127.    IF HELPID.I > 0 THEN
  128.       'SET HELP.' HELPID.I
  129.    IF GROUPS.I <> '' THEN
  130.       'SET GROUP.' GROUPS.I
  131. END
  132.                                                 /* GET MENU IDS FOR OPTIONS*/
  133. MENUIDSTR = ' ACTIONBARID.' || MENU.3 'INTO ID3',
  134.             ' ACTIONBARID.' || MENU.4 'INTO ID4',
  135.             ' ACTIONBARID.' || MENU.5 'INTO ID5',
  136.             ' ACTIONBARID.' || MENU.12 'INTO ID12'
  137. 'EXTRACT' MENUIDSTR
  138. MENUIDSTR = ID3 ID4 ID5 ID12
  139.  
  140. DROP MENU. MENUCMD. HELPID. MENUITEMS I         /* RELEASE EXCESS MEMORY   */
  141. DROP ID3 ID4 ID5 ID12
  142.                                                 /* SETUP FULL PARSE COMMAND*/
  143. 'SET FULLPARSE  CBLPAR ALL'
  144. 'SET PARSER     CBLPAR PARSE'                   /* SETUP INCREMENTAL PARSE */
  145.  
  146.                                                 /* AUTOINDENT NEW LINE     */
  147. 'SET SYNONYM.OPENLINE MULT ;PRIMITIVE ENDLINE;SPLITJOIN SPLIT;PRIMITIVE NEWLINE;CBLPAR AINEW'
  148. 'SET SYNONYM.SPLITLINE MULT ;SPLITJOIN SPLIT;PRIMITIVE NEWLINE;CBLPAR AINEW'
  149. 'SET SYNONYM.NEWLINE CBLPAR AIEXIST'            /* AUTOINDENT EXISTING LINE*/
  150.  
  151. 'SET ACTION.F1 CBLPAR HELP'                     /* HELP ON TOKEN AT CURSOR */
  152.  
  153.                                                 /* INITIAL FONTS SETTINGS  */
  154. 'SET FONT.!  BLACK/WHITE                    "Default style"'
  155. 'SET FONT._  BLACK/WHITE                    "Layout spaces"'
  156. 'SET FONT.E  BRIGHT RED/WHITE               "Error token"'
  157. 'SET FONT.S  BLACK/LIGHT GREY               "Sequence number"'
  158. 'SET FONT.I  CYAN/WHITE                     "Indicator area"'
  159. 'SET FONT.D  UNDERLINE BRIGHT BLUE/WHITE    "Compiler directive"'
  160. 'SET FONT.C  CYAN/WHITE                     "Comment"'
  161. 'SET FONT.B  BLACK/WHITE                    "Separator"'
  162. 'SET FONT.U  BLACK/WHITE                    "User defined"'
  163. 'SET FONT.T  CYAN/WHITE                     "Pseudo-text"'
  164. 'SET FONT.N  PINK/WHITE                     "Numeric literal"'
  165. 'SET FONT.L  PINK/WHITE                     "Nonnumeric literal"'
  166. 'SET FONT.P  PINK/WHITE                     "Picture string"'
  167. 'SET FONT.H  GREEN/WHITE                    "Preprocessor string"'
  168. 'SET FONT.R  BRIGHT BLUE/WHITE              "Reserved word"'
  169. 'SET FONT.F  BRIGHT BLUE/WHITE              "Function name"'
  170.  
  171. 'SET TABS 7 8 12 EVERY 4'                       /* INITIAL TAB SETTINGS    */
  172.  
  173. 'CBLPAR INIT' MENUIDSTR                         /* INITILIAZE LS COMPONENT */
  174. 'SET INSERTING OFF'                             /* REPLACE MODE            */
  175. 'TRIGGER FULLPARSE'                             /* INITIAL FULL PARSE      */
  176.  
  177. 'LXR NAVIG.LX'
  178. if was_cbv = 0 then /* test if running under COBOL product */
  179.   do;
  180.   macroload_rc = 4;
  181.   'extract classes into classes';
  182.   if wordpos('CPYFILE',classes) > 0 then /* needed parser support */
  183.     do;
  184.     'extract loadedmacros into loadedmacros';
  185.     if wordpos('COPYFILE.LX',translate(loadedmacros)) = 0 then
  186.       do;
  187.       'macroload copyfile.lx';
  188.       macroload_rc = rc;
  189.       end;
  190.     else
  191.       macroload_rc = 0;
  192.     end;
  193.   if macroload_rc = 0 then
  194.     'macro copyfile.lx init short nostale base fast';
  195.   else
  196.     do;
  197.     'msg Internal error, copy file expansion facility not available';
  198.     'alarm';
  199.     end;
  200.   end;
  201.