ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Getting Started

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

  • Getting Started

    How do get started writing "free"?
    Everyday's a school day, what grade are you in?

  • #2
    Re: Getting Started

    Hi Redvan:

    I suggest you go here:

    Read the doccument "a path to free" (last line of the utilities section on the right)
    Down load jcrcmds utilities and work with jcr5pfree and jcr5free.

    Craig Rutledge is really on top of things and thanks to him for providing all of that for free


    Best of luck
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

    Comment


    • #3
      Re: Getting Started

      If you use Rdi / Rdp, then a very easy way to see the "free representation of code is to click SOURCE and then CONVERT TO FREE FORMAT. If you have some lines of code that wont convert (and you will) you will see a lot of /free & /end-free directives in the converted code. But you should be able to see the structure of many of the opcodes your program used in free format.

      Some things to remember about /free:

      1. Every line of code must end in a semi-colon.
      2. As compared to fixed format, just keep in mind that opcodes are listed first in free format.
      3. You will not be using indicators for opcode functions. You will use other built in functions to handle certain things such as end of file, record not found, and error conditions.


      Basically, just jump in.

      One of the most confusing issues a person new to free format will encounter is the infamous "mystery" RPG compiler error. This is an error where the compiler points to a line of code that look perfectly fine. And it will be perfectly fine. The issue is almost always that the line preceding the one flagged in error is missing a semi-colon.

      I created a style guide on my site, which can be found at http://www.provatosys.com/RPG Style Guide.rtf When you get into free format, you are literally freed up in your coding style. Unfortunately, this can lead to some really lousing looking code, so peruse the stye guide so that you dont go down the path of some of the bad habits. Things like proper code indentation, field naming and letter capitalization / notation, and even sub-procedure naming are really important standards that need to be understood from the get-go.
      Michael Catalani
      IS Director, eCommerce & Web Development
      Acceptance Insurance Corporation
      www.AcceptanceInsurance.com
      www.ProvatoSys.com

      Comment


      • #4
        Re: Getting Started

        GLS,
        Thanks, that was a good read.
        Everyday's a school day, what grade are you in?

        Comment


        • #5
          Re: Getting Started

          Michael,
          Very informative, thanks.
          Everyday's a school day, what grade are you in?

          Comment


          • #6
            Re: Getting Started

            ... and, if you are able...
            as Michael said "Jump right in" ...
            and as Biggie told me a few years back (when I mentioned that at that time I had a /free ban) "Just do it... and apologize later". Once your boss sees the productivity increase, he/she won't complain.

            p.s. Don't be confused... the opcode "eval" does not need to be coded.
            This means that
            Code:
            a = b + c
            is the same as
            Code:
            eval a = b + c
            Last edited by kitvb1; July 12, 2011, 01:03 AM.
            Regards

            Kit
            http://www.ecofitonline.com
            DeskfIT - ChangefIT - XrefIT
            ___________________________________
            There are only 3 kinds of people -
            Those that can count and those that can't.

            Comment


            • #7
              Re: Getting Started

              here's a couple of powerpoints that might be of use to you.
              Attached Files
              I'm not anti-social, I just don't like people -Tommy Holden

              Comment


              • #8
                Re: Getting Started

                Thanks Kit, for replies to both.
                Everyday's a school day, what grade are you in?

                Comment


                • #9
                  Re: Getting Started

                  Thanks Tom.
                  Everyday's a school day, what grade are you in?

                  Comment


                  • #10
                    Re: Getting Started

                    Ok, dumb question #1; Craig Rutledge speaks of all the new BIF's that replace this, that and the other things.

                    Where are these listed, the misinformation site?
                    Everyday's a school day, what grade are you in?

                    Comment


                    • #11
                      Re: Getting Started

                      Hi RedVan:

                      Try this (there is a pull-down list box for other versions):


                      Best of Luck
                      GLS
                      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

                      Comment


                      • #12
                        Re: Getting Started

                        BINGO!
                        Fantastic, exactly what I was hoping for.

                        Thank you!
                        Everyday's a school day, what grade are you in?

                        Comment


                        • #13
                          Re: Getting Started

                          There is also a list of them on the index page look at tab marked "Built in Functions"
                          http://www.code400.com/

                          j
                          amie
                          All my answers were extracted from the "Big Dummy's Guide to the As400"
                          and I take no responsibility for any of them.

                          www.code400.com

                          Comment

                          Working...
                          X