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

  1. /******************************************************************************
  2.  * SEU Prefix commands                                                        *
  3.  *                                                                            *
  4.  * Arguments:  cmd  - prefix command to be executed.  This may be any of the  *
  5.  *                    following:  add                                         *
  6.  *                                delete                                      *
  7.  *                                target                                      *
  8.  *                                show                                        *
  9.  *                                exclude                                     *
  10.  *                                shift                                       *
  11.  *                                duplicate                                   *
  12.  *                                current                                     *
  13.  *                                window                                      *
  14.  *                                scroll                                      *
  15.  *                                locate                                      *
  16.  *                                skeleton                                    *
  17.  *                                print                                       *
  18.  *                                                                            *
  19.  *             parm - command specific parameters                             *
  20.  *                                                                            *
  21.  *****************************************************************************/
  22. arg cmd parm
  23.  
  24. markno = 0                             /* global mark count */
  25. 'extract prefixentry'                  /* get text in prefix entry field */
  26. parse upper var prefixentry pe         /* uppercase text */
  27. count = getcount(pe)                   /* pull out numeric part of command */
  28.  
  29. select
  30.    /* Add command.  This command inserts one or more lines into the file.
  31.       Parameters: [skeleton] - indicates an insert skeleton command */
  32.    when "ADD" = cmd then do
  33.  
  34.       'set prefixentry'                /* reset prefix entry field */
  35.       'extract class'                  /* get the class of this line */
  36.       if pos("PFXSHOW",class) \= 0 then do
  37.                                        /* this is an exclude header */
  38.          if nextline("next visible") then
  39.                                        /* move to next visible line */
  40.             'prev class PFXEXCLUDE'    /* find previous exclude line */
  41.          else do                       /* no more visible lines */
  42.             do forever                 /* loop through file */
  43.                if \nextline() then     /* if at end of file */
  44.                   leave                /* get out of loop */
  45.                'extract class'         /* get class of line */
  46.                if pos("PFXEXCLUDE",class) = 0 then do
  47.                                        /* if not exclude line */
  48.                   'prev'               /* go back one */
  49.                   leave                /* get out of loop */
  50.                end
  51.             end
  52.          end
  53.       end
  54.       if "SKELETON" = parm then do     /* if insert skeleton */
  55.          'extract global.skeleton into skeleton'
  56.                                        /* get skeleton line */
  57.          do i = 1 to count             /* insert count lines */
  58.             'insert 'skeleton
  59.          end
  60.       end
  61.       else
  62.          'add 'count                   /* insert count lines */
  63.       exit                             /* done */
  64.    end
  65.  
  66.    /* Target command.  This command executes a block copy, move or overlay.
  67.       Parameters: before | after | overlay [block] */
  68.    when "TARGET" = cmd then do
  69.       parse var parm target block
  70.  
  71.       call setmark                     /* set a mark */
  72.  
  73.       'top'                            /* go to top of file */
  74.       src = findprefix("C M")          /* search for copy or move */
  75.       if src = "" then                 /* if not found issue error */
  76.          call errormsg(1 pe)
  77.       'block clear'                    /* clear current block */
  78.       'block mark element'             /* mark the current element */
  79.       c1 = substr(src,1,1)             /* get first char of copy or move */
  80.       clear = ((c1 = "C") & (pos("R",src) = 0))
  81.                                        /* set flag if entry field should be cleared */
  82.       if clear then call setmark       /* set a mark */
  83.       if c1 = substr(src,2,1) then do  /* if block copy or move... */
  84.          if \nextline() |,
  85.             findprefix(substr(src,1,2)) = "" then call errormsg(2 src)
  86.                                        /* find matching block */
  87.          if clear then call setmark    /* if copy, set another mark */
  88.       end
  89.       else do                          /* not block copy or move... */
  90.          lines = getcount(src) - 1     /* get number of lines */
  91.          if lines > 0 then
  92.             'scroll down 'lines        /* scroll down to last line */
  93.       end
  94.       'block mark element'             /* set block on last line */
  95.  
  96.       if c1 = "C" then                 /* set type of block operation */
  97.          action = "COPY"
  98.       else
  99.          action = "MOVE"
  100.  
  101.       'mark find PFXMARK1'             /* locate target */
  102.       if target = "OVERLAY" then do
  103.          'block overlay transparent retain'
  104.          do i = 1 to count - 1
  105.             'next'
  106.             'block overlay transparent retain'
  107.          end
  108.          if action = "MOVE" then
  109.             'block delete'
  110.       end
  111.       else do
  112.          'block 'action target         /* issue copy or move */
  113.          do i = 1 to count - 1         /* repeat as necessary */
  114.             'block copy 'target
  115.          end
  116.       end
  117.       if RC = -3 then                  /* if copy/move into itself, error */
  118.          call errormsg(6 action)
  119.       'block clear'
  120.  
  121.    end
  122.  
  123.    /* Delete command.  This command deletes one or more lines.
  124.       Parameters:  [block] - indicate block delete */
  125.    when "DELETE" = cmd then do
  126.       'block clear'                    /* clear the current block */
  127.       'block mark element'             /* mark this element */
  128.       if parm = "BLOCK" then do        /* if block delete... */
  129.          if \nextline() | findprefix("DD") = "" then call errormsg(2 pe)
  130.                                        /* look for end of block */
  131.       end
  132.       else do                          /* else not block delete */
  133.          lines = count - 1
  134.          if lines > 0 then
  135.             'scroll down' lines        /* find last line to be deleted */
  136.       end
  137.       'extract class'                  /* get the class of the last line */
  138.       if pos("PFXSHOW",class) \= 0 then do
  139.                                        /* this is an exclude header */
  140.          if nextline("next visible") then
  141.                                        /* move to next visible line */
  142.             'prev class PFXEXCLUDE'    /* find previous exclude line */
  143.          else do                       /* no more visible lines */
  144.             do forever                 /* loop through file */
  145.                if \nextline() then     /* if at end of file */
  146.                   leave                /* get out of loop */
  147.                'extract class'         /* get class of line */
  148.                if pos("PFXEXCLUDE",class) = 0 then do
  149.                                        /* if not exclude line */
  150.                   'prev'               /* go back one */
  151.                   leave                /* get out of loop */
  152.                end
  153.             end
  154.          end
  155.       end
  156.       'extract deleting'               /* get deleting command */
  157.       'set deleting'                   /* remove it */
  158.       'block mark element'             /* mark the delete block */
  159.       'block delete'                   /* delete the block */
  160.       if headers() then                /* if there are still header lines */
  161.          'set deleting' deleting       /* restore deleting command */
  162.       exit                             /* all done */
  163.    end
  164.  
  165.    /* Show command.  This command shows one or more excluded lines.
  166.       Parameters: all | first | last - indicates which part of the excluded
  167.                                        block to show. */
  168.    when "SHOW" = cmd then do
  169.       'extract class'                  /* get class of current line */
  170.       if pos("PFXSHOW",class) == 0 then
  171.          call errormsg(3)              /* issue error if not exclude header */
  172.       call setmark                     /* set a mark on this line */
  173.       'set prefixentry'                /* clear the prefix entry text */
  174.  
  175.       if parm = "LAST" then do         /* if show last command */
  176.          do forever                    /* look for end of block */
  177.             if \nextline() then leave  /* if no more lines, leave */
  178.             'extract class'            /* get class of line */
  179.             if pos("PFXEXCLUDE",class) = 0 then do
  180.                                        /* if not part of block, leave */
  181.                'prev'
  182.                leave
  183.             end
  184.          end
  185.          dir = 'prev'                  /* set direction */
  186.       end
  187.       else do
  188.          dir = 'next'                  /* set direction */
  189.          'next'
  190.       end
  191.  
  192.       if parm = "ALL" then             /* if showing whole block */
  193.          'extract elements into count' /* set count to file size */
  194.  
  195.       do i = 1 to count                /* loop through the lines */
  196.          'extract class'               /* get class of line */
  197.          if pos("PFXEXCLUDE",class) == 0 then leave
  198.                                        /* if not an excluded line, leave */
  199.          parse var class pre "PFXEXCLUDE" post
  200.          'set class 'pre post          /* remove PFXEXCLUDE from class */
  201.          if \nextline(dir) then leave  /* if no more lines, leave */
  202.       end
  203.  
  204.       if "FIRST" = parm then do        /* if show fisrt command */
  205.          call beginchange              /* make sure changes not recorded */
  206.          'prev'                        /* back up a line */
  207.          'add'                         /* add a new exclude header */
  208.          'set class PFXSHOW'           /* set exclude header class */
  209.          'set show on'                 /* make it a show line */
  210.          call setmark                  /* mark this line */
  211.          'mark find PFXMARK1'          /* find old header */
  212.          call deleteheader             /* delete it */
  213.          'mark find PFXMARK2'          /* find new header */
  214.          'mark clear PFXMARK2'         /* change mark name to PFXMARK1 */
  215.          markno = 0
  216.          call setmark
  217.          call endchange                /* restore recording status */
  218.       end
  219.       else                             /* not a show first */
  220.          'mark find PFXMARK1'          /* find header */
  221.  
  222.       call excludeheader               /* set exclude header text */
  223.    end
  224.  
  225.    /* Exclude command.  This command excludes one or more lines.
  226.       Parameters - [ALL | BLOCK] - indicates exclude all or block exclude */
  227.    when "EXCLUDE" = cmd then do
  228.       'extract classes'                /* Add PFXEXCLUDE and PFXSHOW classes */
  229.       if pos("PFXEXCLUDE",classes) = 0 then
  230.          'set classes 'classes' PFXSHOW PFXEXCLUDE'
  231.       'extract highlight'              /* Add PFXSHOW to highlight classes */
  232.       if pos("PFXSHOW",highlight) = 0 then
  233.          'set highlight 'highlight' PFXSHOW'
  234.       'extract exclude'                /* Add PFXEXCLUDE to exclude classes */
  235.       if pos("PFXEXCLUDE",exclude) = 0 then
  236.          'set exclude 'exclude' PFXEXCLUDE'
  237.       'extract protect'                /* Add PFXSHOW to protect classes */
  238.       if pos("PFXSHOW",protect) = 0 then
  239.          'set protect 'protect' PFXSHOW'
  240.  
  241.       'extract class'                  /* get class of current line */
  242.       if pos("PFXEXCLUDE",class) > 0 then do
  243.          'set prefixentry'             /* clear prefix entry field */
  244.          exit                          /* quit if line already hidden */
  245.       end
  246.  
  247.       call setmark                     /* set a mark */
  248.       'extract element into startline' /* get element number */
  249.  
  250.       if parm = "BLOCK" then do        /* if block exclude... */
  251.          if \nextline() |,
  252.             findprefix(substr(pe,1,2)) = "" then call errormsg(2 pe)
  253.                                        /* if block not found issue error */
  254.          'set prefixentry'             /* clear prefix entry field text */
  255.          'extract element into endline'/* get element number of end of block */
  256.          count = endline - startline + 1
  257.                                        /* calculate number of lines to exclude*/
  258.       end
  259.       else if parm = "ALL" then        /* if excluding all the lines */
  260.          'extract elements into count' /* get file size */
  261.  
  262.       call beginchange                 /* make sure changes not recorded */
  263.       'mark find PFXMARK1'             /* find first line to exclude */
  264.       'splitjoin split'                /* open a new line before it */
  265.       'set class PFXSHOW'              /* set exclude header class */
  266.       'set show on'                    /* make it a show line */
  267.       call endchange                   /* restore recording */
  268.  
  269.       'next'                           /* move to next line */
  270.       do i = 1 to count                /* loop through and exclude the lines */
  271.          'extract class'
  272.          if pos("PFXSHOW",class) > 0 then leave
  273.          'set class 'class' PFXEXCLUDE'
  274.          if \nextline() then leave
  275.       end
  276.  
  277.       call excludeheader               /* set exclude header */
  278.    end
  279.  
  280.    /* Shift command.  This command shifts one or more lines.
  281.       Parameters: right | left - indicates shift direction
  282.                   trunc | notrunc - indicates if shift should truncate line
  283.                   [block] - indicates block shift */
  284.    when "SHIFT" = cmd then do
  285.       parse var parm dir trunc type
  286.  
  287.       call setmark                     /* set a mark on this line */
  288.       'block clear'                    /* clear the current block */
  289.       'block mark element'             /* mark this line */
  290.  
  291.       if type = "BLOCK" then do        /* if block shift */
  292.          if \nextline() |,
  293.             findprefix(substr(pe,1,2)) = "" then call errormsg(2 pe)
  294.                                        /* search for end of block */
  295.          'set prefixentry'             /* clear prefix entry field text */
  296.          'block mark element'          /* mark the block */
  297.       end
  298.  
  299.       truncate = trunc \= "NOTRUNC"    /* set truncation flag */
  300.       if truncate then do              /* if truncate... */
  301.          'extract limiterror into savelimiterror'
  302.                                        /* save limiterror mode */
  303.          'set limiterror truncate'     /* set limiterror mode to truncate */
  304.          trunc = ""                    /* no option needed for turncate */
  305.       end
  306.  
  307.       'block shift 'dir count trunc' clear'
  308.                                        /* issue shift command */
  309.  
  310.       if truncate then                 /* if truncate, restore limiterror */
  311.          'set limiterror 'savelimiterror
  312.    end
  313.  
  314.    /* Duplicate command.  This command duplicates the current line one or more times
  315.       Parameters:  none */
  316.    when "DUPLICATE" = cmd then do
  317.       call setmark                     /* set a mark on this line */
  318.       'block clear'                    /* clear the current block */
  319.       'block mark element'             /* mark this line */
  320.  
  321.       if parm = "BLOCK" then do        /* if block repeat... */
  322.                                        /* look for end of block */
  323.          if \nextline() | findprefix(substr(pe,1,3)) = "" then
  324.             call errormsg(2 pe)
  325.          'set prefixentry'             /* clear prefix entry field */
  326.          'block mark element'          /* mark the block */
  327.       end
  328.  
  329.       do i = 1 to count                /* copy the line count times */
  330.          'block copy after'
  331.       end
  332.       'block clear'                    /* clear the block */
  333.    end
  334.  
  335.    /* Current command.  This command sets the current line.
  336.       Parameters:  none */
  337.    when "CURRENT" = cmd then do
  338.       call setmark                     /* set a mark on this line */
  339.  
  340.       'set focus.next 1 '     /* get top row */
  341.       'mark find PFXMARK1'             /* make this the current line */
  342.    end
  343.  
  344.    /* Window command.  This command scrolls the window to a specified column
  345.       Parameters:  none */
  346.    when "WINDOW" = cmd then do
  347.       'set prefixentry'                /* clear prefix entry field */
  348.       'primitive beginline'            /* go to the beginning of the line */
  349.       col = count - 1
  350.       if col > 0 then                  /* if necessary, */
  351.          'scroll right 'col            /* scroll to specified column */
  352.       exit                             /* all done */
  353.    end
  354.  
  355.    /* Scroll command.  This command scrolls to a specified number of lines
  356.       Parameters:  up | down - indicates direction */
  357.    when "SCROLL" = cmd then do
  358.       'set prefixentry'                /* clear prefix entry field */
  359.       'scroll 'parm count              /* scroll to desired line */
  360.       exit                             /* all done */
  361.    end
  362.  
  363.    /* Locate command.  This command locates a specified line number or
  364.                        sequence number.
  365.       Parameters:  none */
  366.    when "LOCATE" = cmd then do
  367.       'set prefixentry'                /* clear prefix entry field */
  368.       'extract prefixformat'           /* get prefixformat */
  369.       if pos("9",prefixformat) > 0 then/* if sequence numbers */
  370.          findtype = prefixnumber       /* locate sequence number */
  371.       else
  372.          findtype = element            /* locate line */
  373.       'find 'findtype count            /* locate desired line */
  374.       exit                             /* all done */
  375.    end
  376.  
  377.    /* Skeleton command.  This command sets the current line to be the
  378.                          skeleton line.
  379.       Parameters:  none */
  380.    when "SKELETON" = cmd then do
  381.       'set prefixentry'                /* clear prefix entry field */
  382.       'extract content into skeleton'  /* get line text */
  383.       'set global.skeleton 'skeleton   /* save line text */
  384.       exit                             /* all done */
  385.    end
  386.  
  387.    /* Print command.  This command prints one or more lines.
  388.       Parameters:  [block] - indicate block print */
  389.    when "PRINT" = cmd then do
  390.       call setmark                     /* set a mark on this line */
  391.       'set prefixentry'                /* reset prefix entry field */
  392.       'block clear'                    /* clear the current block */
  393.       'block mark element'             /* mark this element */
  394.       if parm = "BLOCK" then do        /* if block print... */
  395.          if \nextline() | findprefix("LPP") = "" then call errormsg(2 pe)
  396.                                        /* look for end of block */
  397.          'set prefixentry'             /* clear prefix entry field text */
  398.       end
  399.       else do                          /* else not block print */
  400.          lines = count - 1
  401.          if lines > 0 then
  402.             'scroll down' lines        /* find last line to be printed */
  403.       end
  404.       'block mark element'             /* mark the print block */
  405.       'print selected'                 /* print the block */
  406.       'block clear'                    /* clear the block */
  407.       'mark find PFXMARK1'             /* restore the original position */
  408.    end
  409. end
  410.  
  411. call setmark                           /* save the current position */
  412. do i = 1 to (markno - 1)               /* loop through the marked lines */
  413.    'extract mark.PFXMARK'i' into markcol'
  414.    if markcol \= 0 then do             /* if mark not deleted */
  415.       'mark find PFXMARK'i             /* find the mark */
  416.       'set prefixentry'                /* clear the prefix entry field */
  417.    end
  418. end
  419. 'mark find PFXMARK'markno              /* restore the current position */
  420.  
  421. cleanup:
  422.  
  423. do i = 1 to markno                     /* loop through and delete marks */
  424.    'mark clear PFXMARK'i
  425. end
  426.  
  427. exit                                   /* all done */
  428.  
  429. /******************************************************************************
  430.  *                                                                            *
  431.  * function getcount(str)                                                     *
  432.  *                                                                            *
  433.  * This function returns the numeric part of a character string.  If there is *
  434.  * no numeric part, then 1 is returned.                                       *
  435.  *                                                                            *
  436.  ******************************************************************************/
  437. getcount:
  438.  
  439. procedure
  440.  
  441. arg count
  442.  
  443. do while datatype(substr(count,1,1)) \= "NUM"
  444.    if length(count) = 1 then
  445.       count = 1
  446.    else
  447.       count = substr(count,2)
  448. end
  449.  
  450. do while datatype(substr(count,length(count))) \= "NUM"
  451.    if length(count) = 1 then
  452.       count = 1
  453.    else
  454.       count = delstr(count,length(count))
  455. end
  456.  
  457. return abs(count)
  458.  
  459. /******************************************************************************
  460.  *                                                                            *
  461.  * setmark routine                                                            *
  462.  *                                                                            *
  463.  * This routine sets a mark on the current line.  It uses the global variable *
  464.  * markno to give the mark a unique name.                                     *
  465.  *                                                                            *
  466.  ******************************************************************************/
  467. setmark:
  468.  
  469. procedure expose markno
  470.  
  471. markno = markno + 1
  472. 'extract element into e'
  473. 'mark set PFXMARK'markno e '-1'
  474. return
  475.  
  476. /******************************************************************************
  477.  *                                                                            *
  478.  * function findprefix(str)                                                   *
  479.  *                                                                            *
  480.  * This function looks for a line whose prefix entry field contains text that *
  481.  * begins with str.  If str contains more than one string, then the first     *
  482.  * line that matches either is returned.  The actual prefix text is returned  *
  483.  * by this function.                                                          *
  484.  *                                                                            *
  485.  ******************************************************************************/
  486. findprefix:
  487.  
  488. procedure
  489.  
  490. arg parm
  491.  
  492. do forever
  493.    'extract prefixentry into pe'
  494.    parse upper var pe upperpe
  495.    cmds = parm
  496.    do while length(cmds) > 0
  497.       parse var cmds cmd cmds
  498.       if length(upperpe) >= length(cmd) then
  499.          if cmd = substr(upperpe,1,length(cmd)) then
  500.             return upperpe
  501.    end
  502.    'find prefixentry'
  503.    if RC \= 0 then return ""
  504. end
  505.  
  506. /******************************************************************************
  507.  *                                                                            *
  508.  * beginchange routine                                                        *
  509.  *                                                                            *
  510.  * This routine changes the recording state so that changes will not be       *
  511.  * recorded.                                                                  *
  512.  *                                                                            *
  513.  ******************************************************************************/
  514. beginchange:
  515.  
  516. procedure expose savechanges saverecording
  517.  
  518. 'extract changes into savechanges'
  519. 'extract recording into saverecording'
  520.  
  521. 'set recording off'
  522. return
  523.  
  524. /******************************************************************************
  525.  *                                                                            *
  526.  * endchange routine                                                          *
  527.  *                                                                            *
  528.  * This routine restored the recording state to that before beginchange was   *
  529.  * called.                                                                    *
  530.  *                                                                            *
  531.  ******************************************************************************/
  532. endchange:
  533.  
  534. procedure expose saverecording savechanges
  535.  
  536. 'set recording 'saverecording
  537. 'set changes 'savechanges
  538. return
  539.  
  540. /******************************************************************************
  541.  *                                                                            *
  542.  * excludeheader routine                                                      *
  543.  *                                                                            *
  544.  * This routine counts the number of excluded line is a block and sets the    *
  545.  * exclude header text appropriately.                                         *
  546.  *                                                                            *
  547.  ******************************************************************************/
  548. excludeheader:
  549.  
  550. procedure
  551.  
  552. 'mark find PFXMARK1'
  553. lines = 0
  554. do forever
  555.    if \nextline() then leave
  556.    'extract class'
  557.    if pos("PFXEXCLUDE",class) == 0 then leave
  558.    lines = lines + 1
  559. end
  560.  
  561. call beginchange
  562. 'mark find PFXMARK1'
  563. if 0 = lines then do
  564.    call deleteheader
  565.    call endchange
  566.    exit
  567. end
  568. 'extract limiterror into savelimiterror'
  569. 'set limiterror ignore'
  570. if 1 = lines then
  571.    'set content 'seumsg(4)
  572. else
  573.    'set content 'seumsg(5 lines)
  574. 'set limiterror 'savelimiterror
  575. call endchange
  576.  
  577. 'extract deleting'
  578. if deleting = "" then do
  579.    'macroload pfxdel.lx'
  580.    'set deleting pfxdel'
  581. end
  582.  
  583. return
  584.  
  585. /******************************************************************************
  586.  *                                                                            *
  587.  * deleteheader routine                                                       *
  588.  *                                                                            *
  589.  * This routine deletes the current exclude header line.                      *
  590.  *                                                                            *
  591.  ******************************************************************************/
  592. deleteheader:
  593.  
  594. procedure
  595.  
  596. 'extract deleting'
  597. 'set deleting'
  598. 'delete'
  599. if headers() then
  600.    'set deleting 'deleting
  601.  
  602. return
  603.  
  604. /******************************************************************************
  605.  *                                                                            *
  606.  * function headers()                                                         *
  607.  *                                                                            *
  608.  * This function returns TRUE if there are any headers remaining.             *
  609.  *                                                                            *
  610.  ******************************************************************************/
  611. headers:
  612.  
  613. procedure
  614.  
  615. 'extract classes'
  616. if (pos("PFXSHOW",classes) = 0) then
  617.    return 0
  618.  
  619. 'extract element into e'
  620. 'mark set PFXMARKH' e '-1'
  621. 'top'
  622. 'next class PFXSHOW'
  623. 'extract class'
  624. 'mark find PFXMARKH'
  625. 'mark clear PFXMARKH'
  626.  
  627. return (pos("PFXSHOW",class) \= 0)
  628.  
  629. /******************************************************************************
  630.  *                                                                            *
  631.  * function nextline(dir)                                                     *
  632.  *                                                                            *
  633.  * This function accepts a direction (prev or next) and move to the previous  *
  634.  * or next line.  It returns TRUE if the operation completed successfully.    *
  635.  *                                                                            *
  636.  ******************************************************************************/
  637. nextline:
  638.  
  639. procedure
  640.  
  641. arg dir parm
  642.  
  643. if dir \= "PREV" then
  644.    dir = 'next'
  645.  
  646. 'extract element into preve'
  647. dir parm
  648. 'extract element'
  649. return element \= preve
  650.  
  651. /******************************************************************************
  652.  *                                                                            *
  653.  * errormsg(msgno insert) routine                                             *
  654.  *                                                                            *
  655.  * This routine issues an error message msgno and exits.                      *
  656.  *                                                                            *
  657.  ******************************************************************************/
  658. errormsg:
  659.  
  660. arg msgno insert
  661.  
  662. 'msg 'seumsg(msgno insert)
  663. signal cleanup
  664.  
  665.