Rpg programming l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 20

RPG Programming PowerPoint PPT Presentation


  • 174 Views
  • Uploaded on
  • Presentation posted in: General

RPG Programming. Test One Review. Chapter One. RPG: Report Program Generator Released in the early 60’s RPGII – released with System/3 RPGIII – 1970’s RPG/400 – Release with the AS/400 RPGIV - 1994 Higher Level Language Procedural Language. Chapter One.

Download Presentation

RPG Programming

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Rpg programming l.jpg

RPG Programming

Test One Review


Chapter one l.jpg

Chapter One

  • RPG: Report Program Generator

    • Released in the early 60’s

      • RPGII – released with System/3

      • RPGIII – 1970’s

      • RPG/400 – Release with the AS/400

      • RPGIV - 1994

    • Higher Level Language

    • Procedural Language


Chapter one3 l.jpg

Chapter One

  • First released with a Fixed Logic Cycle

  • Uses Indicators

    • Built in variables with value of 0 or 1

  • Now it is procedural

  • Program Variables – represents a location in the memory of the computer that can store data.


  • Chapter one4 l.jpg

    Chapter One

    • Printer Spacing Chart

      • Output Editing

    • Syntax errors: errors in your use of the rules of the language

    • Logic errors: errors in design

    • Debugging: discovering and correcting errors


    Chapter one5 l.jpg

    Chapter One

    • Use SEU to enter source code

    • Compile the course code

    • Call the compiled object


    Chapter two l.jpg

    Chapter Two

    • File Description Specifications (F Specs)

      • Identifies the files your program uses

      • Identifies how the files will be used

      • Recommended entries (F Prompt):

        • File Name

        • File Type

        • File Designation

        • File Format

        • Record Length

        • Device


    Chapter two7 l.jpg

    Chapter Two

    • Input Specifications (I Specs)

      • Record Identification Entries (I Prompt)

        • File Name

        • Sequence

      • Field Description Entries (J Prompt)

        • Field Location

        • Decimal Positions

        • Field Name


    Chapter two8 l.jpg

    Chapter Two

    • Calculation Specifications: Describes processing steps

      • Operation Code

      • Factor 2/ Extended Factor 2 (C or CX Prompt)


    Chapter two9 l.jpg

    Chapter Two

    • Op Codes:

      • EXCEPT: Directs the program to output lines from the O Specs

      • READ: Retrieve the next sequential record

      • DOW: Do while loop, requires an ENDDO to signal the end of the loop

      • EVAL: Used to assign a value to a variable

      • RETURN: Returns control to the program that called.


    Chapter two10 l.jpg

    Chapter Two

    • Output Specifications (O Specs)

      • Record Identification Entries (O Prompt)

        • File name

        • Type

        • Exception Name

        • Space and Skip Entries

      • Field Description Entries (P Prompt)

        • Field Name

        • Constants

        • End Position

        • Edit Codes


    Chapter two11 l.jpg

    Chapter Two

    • Output Editing: Formatting output values

      • Edit Codes

      • Edit Words


    Chapter three l.jpg

    Chapter Three

    • Definition Specifications (D Specs): used to define additional fields used in programming but are not from an input file.

      • Standalone Fields:

        • Numeric Literal

        • Character Literal

        • Figurative Constants

          • *BLANKS, *HIVAL, *ZERO, *ON, *OFF…


    Chapter three13 l.jpg

    Chapter Three

    • Initial Value: Value field contains at programs start.

    • Data Types (p. 43)

    • Defining Constants:

      • Value never changes during processing

      • Defined with no specified length


    Chapter three14 l.jpg

    Chapter Three

    • Data Structures: means of organizing multiple fields within a single section of contiguous portions of memory


    Chapter four l.jpg

    Chapter Four

    • EVAL: Assigns a value to a field

      • Uses the Extended Factor 2 format

      • Supports the following arithmetic operators

        • + addition

        • - subtraction

        • * Multiplication

        • / Division

        • **Exponentiation

        • () Parentheses

        • <> Relational Symbols

        • AND OR Logical operators


    Chapter four16 l.jpg

    Chapter Four

    • Truncation: loss of digits from the right/or left end of a result field

      • High order Truncation

      • Low order Truncation


    Chapter four17 l.jpg

    Chapter Four

    • Determining Field Sizes: (See chart)

    • Rounding (Half Adjusting)

      • (H)

    • Result Decimal Position Rule

      • (R)

    • Line Continuation Character +


    Chapter four18 l.jpg

    Chapter Four

    • Character assignment also works with the Eval Statement.

    • Can also assign values with figurative constants: (*Blanks, *Zero, etc..)


    Chapter four19 l.jpg

    Chapter Four

    • Data Type Conversion

      • MOVE Operation: Value in Factor2 is copied to the result field, character by character from right to left.

      • MOVEL Operation: Value in Factor2 is copied to the result field, character by character from left to right.


    Chapter four20 l.jpg

    Chapter Four

    • Built in Functions:

      • %ABS (Absolute Value)

      • %DIV (Divide, return Integer result)

      • %REM (Divide, return Remainder)


  • Login