Topic
  • 8 replies
  • Latest Post - ‏2012-09-12T06:17:58Z by fknubben
fknubben
fknubben
7 Posts

Pinned topic LPEX Editor (OPM COBOL) and Ctrl-V (paste)

‏2012-09-10T14:21:06Z |
Hi,

having some fun with the LPEX editor and don't know if I can do anything about it.

In SEU I can copy a piece of text and paste this over existing text. This then only updates the characters replaced by the text that is being pasted.

In the LPEX editor I can't seem to replicate this behaviour. Instead, the editor seems to insert the text, rather than "paste over". And if I use ctrl-v in the sequence number area or the indicator position then things get even stranger - it seems the paste stops at the end of that 'field' rather than continuing on in the next part of the line.

I have looked for it but I cannot find any settings that might control this. Does anyone know how to trick the LPEX editor into the SEU behaviour?
Updated on 2012-09-12T06:17:58Z at 2012-09-12T06:17:58Z by fknubben
  • PWConner
    PWConner
    60 Posts

    Re: LPEX Editor (OPM COBOL) and Ctrl-V (paste)

    ‏2012-09-10T14:36:14Z  
    As far as "pasting over" I highlight the characters I want to replace before I press ctrl-v.

    The behavior you notice when pasting in an indicator position can be modified via window>preferences>remote systems>remote systems LPEX editor>check box "Column sensitive editing"
    There are pros and cons either way you set the check box. Play with both settings for awhile to see which you prefer. I don't think the setting applies to the sequence number area.
  • eric.simpson
    eric.simpson
    130 Posts

    Re: LPEX Editor (OPM COBOL) and Ctrl-V (paste)

    ‏2012-09-10T15:15:52Z  
    The LPEX Editor also provides block copy/paste actions. You can look at the Edit>Select menu for selecting text and Edit>Selected menu for doing copy/move/overlay actions.
  • Arthur Adams
    Arthur Adams
    10 Posts

    Re: LPEX Editor (OPM COBOL) and Ctrl-V (paste)

    ‏2012-09-10T15:48:07Z  
    All of the old SEU editing commands are available by moving the cursor into the line number fields and typing the command just as you would in SEU. I wouldn't recommend this though because the LPEX editor is far superior to SEU. However, this type of copy is the one instance where I would use the SEU option.

    Simply (as you would in SEU) type C on the line to copy and O or OO on the line or lines to be overwritten.
  • fknubben
    fknubben
    7 Posts

    Re: LPEX Editor (OPM COBOL) and Ctrl-V (paste)

    ‏2012-09-11T10:05:14Z  
    all, thanks for your answers so far, and I have tried a few of these options, but none of them seem to match the ease of use in SEU in this case.
    Could well have to do with the style of programming I am using, i must admit!

    take an example - I have this

    
    0126.00        WORKING-STORAGE SECTION. 0127.00 <1>    01  WSAA-SUBR               PIC X(10) VALUE 
    'S0017CTL'. 0128.00 <1>    01  WSAA-SCREEN             PIC X(05) VALUE 
    'S0017'. 0129.00 <1>    01  WSAA-PROG               PIC X(05) VALUE 
    'S0017'. 0130.00 <1>    01  WSAA-NEXTPROG           PIC X(05) VALUE 
    'P0017'. 0131.00        01  WSAA-VERSION            PIC X(02) VALUE 
    '02'.
    


    and want to comment out these lines like such:

    
    0126.00        WORKING-STORAGE SECTION. 0127.00 *******01  WSAA-SUBR               PIC X(10) VALUE 
    'S0017CTL'. 0128.00 *******01  WSAA-SCREEN             PIC X(05) VALUE 
    'S0017'. 0129.00 *******01  WSAA-PROG               PIC X(05) VALUE 
    'S0017'. 0130.00 *******01  WSAA-NEXTPROG           PIC X(05) VALUE 
    'P0017'. 0131.00 *******01  WSAA-VERSION            PIC X(02) VALUE 
    '02'.
    


    then in SEU I used to manually change the first line to have all those asterisks. Subsequently I select those characters and do a ctrl-c. From then on, using the arrow down key and ctrl-v is a very speedy way to comment out a bunch of lines.

    I've tried the LPEX built-in comment out option, but that only puts an asterisk in the indicator position rather than all columns preceding the line of code.

    
    0126.00        WORKING-STORAGE SECTION. 0127.00       *01  WSAA-SUBR               PIC X(10) VALUE 
    'S0017CTL'. 0128.00       *01  WSAA-SCREEN             PIC X(05) VALUE 
    'S0017'. 0129.00       *01  WSAA-PROG               PIC X(05) VALUE 
    'S0017'. 0130.00       *01  WSAA-NEXTPROG           PIC X(05) VALUE 
    'P0017'. 0131.00       *01  WSAA-VERSION            PIC X(02) VALUE 
    '02'.
    


    When using the C& O/OO it leaves existing characters in place, like such:

    
    0126.00        WORKING-STORAGE SECTION. 0127.00 <1>****01  WSAA-SUBR               PIC X(10) VALUE 
    'S0017CTL'. 0128.00 <1>****01  WSAA-SCREEN             PIC X(05) VALUE 
    'S0017'. 0129.00 <1>****01  WSAA-PROG               PIC X(05) VALUE 
    'S0017'. 0130.00 <1>****01  WSAA-NEXTPROG           PIC X(05) VALUE 
    'P0017'. 0131.00 <1>****01  WSAA-VERSION            PIC X(02) VALUE 
    '02'.
    


    and the "Column sensitive editing" doesn't seem to play very well, presumably because it has still treats the sequence area and the indicator area as seperate entities.

    None of the above therefore do what I want to do....
    I have noticed there is also an option to select a Rectangle - Alt-R and various options that come with that. i haven't found a way yet to get it to do what I want, but maybe there is a way...
  • PWConner
    PWConner
    60 Posts

    Re: LPEX Editor (OPM COBOL) and Ctrl-V (paste)

    ‏2012-09-11T12:37:01Z  
    • fknubben
    • ‏2012-09-11T10:05:14Z
    all, thanks for your answers so far, and I have tried a few of these options, but none of them seem to match the ease of use in SEU in this case.
    Could well have to do with the style of programming I am using, i must admit!

    take an example - I have this

    <pre class="jive-pre"> 0126.00 WORKING-STORAGE SECTION. 0127.00 <1> 01 WSAA-SUBR PIC X(10) VALUE 'S0017CTL'. 0128.00 <1> 01 WSAA-SCREEN PIC X(05) VALUE 'S0017'. 0129.00 <1> 01 WSAA-PROG PIC X(05) VALUE 'S0017'. 0130.00 <1> 01 WSAA-NEXTPROG PIC X(05) VALUE 'P0017'. 0131.00 01 WSAA-VERSION PIC X(02) VALUE '02'. </pre>

    and want to comment out these lines like such:

    <pre class="jive-pre"> 0126.00 WORKING-STORAGE SECTION. 0127.00 *******01 WSAA-SUBR PIC X(10) VALUE 'S0017CTL'. 0128.00 *******01 WSAA-SCREEN PIC X(05) VALUE 'S0017'. 0129.00 *******01 WSAA-PROG PIC X(05) VALUE 'S0017'. 0130.00 *******01 WSAA-NEXTPROG PIC X(05) VALUE 'P0017'. 0131.00 *******01 WSAA-VERSION PIC X(02) VALUE '02'. </pre>

    then in SEU I used to manually change the first line to have all those asterisks. Subsequently I select those characters and do a ctrl-c. From then on, using the arrow down key and ctrl-v is a very speedy way to comment out a bunch of lines.

    I've tried the LPEX built-in comment out option, but that only puts an asterisk in the indicator position rather than all columns preceding the line of code.

    <pre class="jive-pre"> 0126.00 WORKING-STORAGE SECTION. 0127.00 *01 WSAA-SUBR PIC X(10) VALUE 'S0017CTL'. 0128.00 *01 WSAA-SCREEN PIC X(05) VALUE 'S0017'. 0129.00 *01 WSAA-PROG PIC X(05) VALUE 'S0017'. 0130.00 *01 WSAA-NEXTPROG PIC X(05) VALUE 'P0017'. 0131.00 *01 WSAA-VERSION PIC X(02) VALUE '02'. </pre>

    When using the C& O/OO it leaves existing characters in place, like such:

    <pre class="jive-pre"> 0126.00 WORKING-STORAGE SECTION. 0127.00 <1>****01 WSAA-SUBR PIC X(10) VALUE 'S0017CTL'. 0128.00 <1>****01 WSAA-SCREEN PIC X(05) VALUE 'S0017'. 0129.00 <1>****01 WSAA-PROG PIC X(05) VALUE 'S0017'. 0130.00 <1>****01 WSAA-NEXTPROG PIC X(05) VALUE 'P0017'. 0131.00 <1>****01 WSAA-VERSION PIC X(02) VALUE '02'. </pre>

    and the "Column sensitive editing" doesn't seem to play very well, presumably because it has still treats the sequence area and the indicator area as seperate entities.

    None of the above therefore do what I want to do....
    I have noticed there is also an option to select a Rectangle - Alt-R and various options that come with that. i haven't found a way yet to get it to do what I want, but maybe there is a way...
    Use alt-r. Once a block is selected right-click in the editor. Choose selected> fill selection... key '*' and press enter. See if you like that option.
  • fknubben
    fknubben
    7 Posts

    Re: LPEX Editor (OPM COBOL) and Ctrl-V (paste)

    ‏2012-09-11T13:47:34Z  
    • PWConner
    • ‏2012-09-11T12:37:01Z
    Use alt-r. Once a block is selected right-click in the editor. Choose selected> fill selection... key '*' and press enter. See if you like that option.
    YES! thank you. That seems to do the trick quite well.
  • JonParis
    JonParis
    50 Posts

    Re: LPEX Editor (OPM COBOL) and Ctrl-V (paste)

    ‏2012-09-11T14:22:16Z  
    • fknubben
    • ‏2012-09-11T13:47:34Z
    YES! thank you. That seems to do the trick quite well.
    I'm glad you have an answer but I can't help wondering why you are so determined to get exactly what you had before. Normally people use big blobby lumps of *s to make the line stand out. But in LPEX the minute the line is a comment it changes color - isn't that obvious enough?

    All of which is a long-winded way of saying that it is often bad idea to try and make LPEX behave exactly like SEU - it isn't and never will be. The classic example being CC between two different sources. Always make sure that the old way is indeed "better", or for that matter necessary, before you spend too much time trying to make a sows ear out of a silk purse.
  • fknubben
    fknubben
    7 Posts

    Re: LPEX Editor (OPM COBOL) and Ctrl-V (paste)

    ‏2012-09-12T06:17:58Z  
    • JonParis
    • ‏2012-09-11T14:22:16Z
    I'm glad you have an answer but I can't help wondering why you are so determined to get exactly what you had before. Normally people use big blobby lumps of *s to make the line stand out. But in LPEX the minute the line is a comment it changes color - isn't that obvious enough?

    All of which is a long-winded way of saying that it is often bad idea to try and make LPEX behave exactly like SEU - it isn't and never will be. The classic example being CC between two different sources. Always make sure that the old way is indeed "better", or for that matter necessary, before you spend too much time trying to make a sows ear out of a silk purse.
    Jon, I understand what you are saying.

    Trouble is, we are still in a mix&match situation where some people use RDp and others SEU. So in order to accommodate for 'readability' on the green screen side, I have no choice as of yet.
    My long term plan is to not even have commented out lines altogether as I want to go to a revision based source control system. But think it may be some time before that is going to happen.