ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

WDSC editor ?take? control over my CL code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • WDSC editor ?take? control over my CL code

    Hi all,

    How can I avoid the LPEX editor to ?take? control when I enter CL codes into a CL program? I simply like to have my code nested and NOT always starting in column 14 ?

    My code should look like

    Code:
    Pgm (&PmJnam &PmjUsr &PmJnum)
    
       Dcl &PmJnam *char (10)
       Dcl &PmJusr *char (10)
       Dcl &PmJnum *char (6)
    
       WrkJob     JOB(&pmJnum/&pmJusr/&pmJnam)
       MonMsg cpf0000 Exec(Do)
         SNDPGMMSG  MSGID(SMS1081) MSGF(USRMSG) TOPGMQ(*PRV (SMS105))
       EndDo
       Return
    Endpgm
    And NOT like this if I enter the same code by use of WDSC (LPEX editor)

    Code:
                 Pgm        (&PmJnam &PmjUsr &PmJnum)
    
                 Dcl        &PmJnam *char (10)
                 Dcl        &PmJusr *char (10)
                 Dcl        &PmJnum *char (6)
     
                 WrkJob     JOB(&pmJnum/&pmJusr/&pmJnam)
                 MonMsg     cpf0000 Exec(Do)
                    SNDPGMMSG  MSGID(SMS1081) MSGF(USRMSG) TOPGMQ(*PRV (SMS105))
                 EndDo
                 Return
                 EndPgm
    Any ideas?


    regards,

    Bent

  • #2
    Re: WDSC editor ?take? control over my CL code

    and the problem is? If you're that picky then use seu...I see you're trying to use indentations. Looks like wsdc is like prompting in SEU.
    Bill
    "A good friend will bail you out of jail,
    A true friend would be sitting beside you saying,
    'Wow, that was fun.'"

    Comment


    • #3
      Re: WDSC editor ?take? control over my CL code

      Hi Bill

      To me programming should be like writing a book or a letter. I?m not happy when the editor put in extra spaces in my code. If I write the following ?if? statement the editor should keep the code the way I entered it:

      Code:
      If (&a = &b) then(do)
         Chgvar &aa (&aa !< ?xxxx?)
      enddo
      and not formatting it like this:

      Code:
         If         (&a = &b) then(do)
            Chgvar     &aa (&aa !< 'xxxx')
         enddo
      Imagine a word processing program putting extra spaces in the document you are writing!

      We have many CL programs where the code is structured after a technique not having a lot of spaces between the command and the keywords. We would like to continue this way and we also would like to use WDSC for editing ALL our codes in the future.

      Regards,

      Bent

      Comment


      • #4
        Re: WDSC editor ?take? control over my CL code

        Yes I agree with you. It makes for better and easier veiwing of the code. Not much you can do about it I guess.

        I have seen some CL code where the "writer" never even prompted the line, left out the parameter constants like:

        dcl &parm 10
        chgvar &parm 'qwerty'

        It was ugly. Like you, I do indentation in my /free le code. makes for better understanding.

        Good Luck
        Bill
        Bill
        "A good friend will bail you out of jail,
        A true friend would be sitting beside you saying,
        'Wow, that was fun.'"

        Comment


        • #5
          Re: WDSC editor ?take? control over my CL code

          Imagine a word processing program putting extra spaces in the document you are writing!
          You mean like MS Word? haha

          You could always write your code with a plain text editor
          Your future President
          Bryce

          ---------------------------------------------
          http://www.bravobryce.com

          Comment


          • #6
            Re: WDSC editor ?take? control over my CL code

            No I was talking about DisplayWrite

            You are right that I simply can use another editor but then I will also loose the syntax checking and the command prompt option

            Bent

            Comment


            • #7
              Re: WDSC editor ?take? control over my CL code

              PSSHHH....those "neat" features are for amateurs anyway

              Besides, syntax checking is the reason they created compilers

              ...Well, atleast one of the reasons anyway.
              Your future President
              Bryce

              ---------------------------------------------
              http://www.bravobryce.com

              Comment


              • #8
                Re: WDSC editor ?take? control over my CL code

                Originally posted by bryce4president View Post
                PSSHHH....those "neat" features are for amateurs anyway

                Besides, syntax checking is the reason they created compilers

                ...Well, atleast one of the reasons anyway.
                Ah, the innocence of youth! I remember those days. <snif...snif>

                "Time passes, but sometimes it beats the <crap> out of you as it goes."

                Comment


                • #9
                  Re: WDSC editor ?take? control over my CL code

                  How can I avoid the LPEX editor to ?take? control when I enter CL codes into a CL program? I simply like to have my code nested and NOT always starting in column 14 ?
                  Most of the formatting can be controlled by choosing the desired settings.
                  Windows/Preferences/Remote Systems/Remote Systems/CL

                  If all else fails, you can dis-associate the CL type from the CL parser, and use the text parser instead.

                  Comment


                  • #10
                    Re: WDSC editor ?take? control over my CL code

                    I like that too.. but, to get around it there's a give and take. You can setup your CL(LE) as TXT type files, enter your code then change it to CL(LE) to compile. It works, just a little pain in the glutes. Also, you'll have to "reformat" the line if you actually have to go back and modify it.

                    Comment


                    • #11
                      Re: WDSC editor ?take? control over my CL code

                      Originally posted by arrow483 View Post
                      Most of the formatting can be controlled by choosing the desired settings.
                      Windows/Preferences/Remote Systems/Remote Systems/CL

                      If all else fails, you can dis-associate the CL type from the CL parser, and use the text parser instead.

                      Windows/
                      Preferences/
                      RemoteSystems/
                      Remote Systems LPEX Editor/
                      iSeries Parser/
                      CL/


                      Just turn off the Automatic functions that you don't want.

                      I keep these on and tweak the position so that the program handles the auto indent for me.
                      "Automatic indent"
                      "Automatic Formatting"

                      The auto indent uses the position of the first character on the previous line when it picks the indent location for the following line.

                      Sometimes I'll type an ENDDO at the horizontal position I would like the following indented lines to begin from. Then remove the ENDDO after I have finished typing the next line.

                      Code:
                      Pgm (&PmJnam &PmjUsr &PmJnum)
                         Dcl &PmJnam *char (10)
                         Dcl &PmJusr *char (10)
                         Dcl &PmJnum *char (6)
                         Dcl &Type *char (1)
                      
                        ENDDO
                        IF COND(&Type *EQ 'A') THEN(DO)
                      After you type the IF line the preceding ENDDO can be removed. As long as you don't modify the IF line, the next line will be indented by your Automatic Indent Blanks setting.

                      When you type the ENDDO for the IF group it will automatically be adjusted to match the horizontal position of the IF line.

                      I am currently using WDSC 7.0.

                      Hope this helps,
                      Chris

                      Comment


                      • #12
                        Re: WDSC editor ?take? control over my CL code

                        Originally posted by bryce4president View Post
                        You mean like MS Word?
                        Originally posted by Bent View Post
                        No I was talking about DisplayWrite
                        Somehow I don't think Bryce ever heard of DisplayWrite.
                        http://www.linkedin.com/in/chippermiller

                        Comment


                        • #13
                          Re: WDSC editor ?take? control over my CL code

                          Display who?
                          Your future President
                          Bryce

                          ---------------------------------------------
                          http://www.bravobryce.com

                          Comment

                          Working...
                          X