1 / 20

RPG Programming

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.

cora-briggs
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RPG Programming Test One Review

  2. 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

  3. 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.

  4. 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

  5. Chapter One • Use SEU to enter source code • Compile the course code • Call the compiled object

  6. 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

  7. 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

  8. Chapter Two • Calculation Specifications: Describes processing steps • Operation Code • Factor 2/ Extended Factor 2 (C or CX Prompt)

  9. 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.

  10. 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

  11. Chapter Two • Output Editing: Formatting output values • Edit Codes • Edit Words

  12. 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…

  13. 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

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

  15. 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

  16. Chapter Four • Truncation: loss of digits from the right/or left end of a result field • High order Truncation • Low order Truncation

  17. Chapter Four • Determining Field Sizes: (See chart) • Rounding (Half Adjusting) • (H) • Result Decimal Position Rule • (R) • Line Continuation Character +

  18. Chapter Four • Character assignment also works with the Eval Statement. • Can also assign values with figurative constants: (*Blanks, *Zero, etc..)

  19. 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.

  20. Chapter Four • Built in Functions: • %ABS (Absolute Value) • %DIV (Divide, return Integer result) • %REM (Divide, return Remainder)

More Related