System i (AS/400, iSeries, i5) RPGIV Programming

Course Details:

Course code: ISR4P View/Download data sheet (PDF)
Duration: 4 Days Book Course
Price: £2,200 Return to Courses

Course Outline:

RPG Development Process, differences between RPG & RPGLE
Fixed form H, F, D, C specifications
Free form statement alternatives CTL-, DCL-F, DCL-x
Batch update programming
Copying data and program testing
External definitions
Arithmetic and conditional processing with:
Operational Extenders
Defining program variables with Legacy & Traditional methods
Introduction to variable definitions with modern methods
Data conversion and string handling built in functions
Legacy & modern EVAL options
Parameter definitions, prototyped and legacy methods
Report Programming, interaction with DDS and sub-total logic
Field conditioning
CHG & OVR commands
Random File access, operation codes and built in functions
Sub routine coding
Flexible Sequential File handling
Composite keys
Running CL commands from RPG
Overriding file details with file keywords
Generate multiple spool files from one print file and one program
Display file, DDS overview with Window Keywords
Enquiry Program
Program Linkage & prototyped calls
File maintenance program, Record locking and Validation
Finding runtime errors with green screen debug tools

Pre-requisites:

Delegates should ideally have attended the Systems Facilities course prior to attending this course. It is expected that delegates will have a working knowledge of the development environment – Objects, libraries, members, spool files, editing source (5250 or RDi).
Basic understanding of the database:
      • Physical and Logical Files
      • File structure (DSPFD, DSPFFD, DSPDBR)
      • Data – Query or SQL
      • File definition (DDS, possibly DDL)
 If new to programming then it is advised that program design concepts have also been covered (ideally by attending the Program Design course – ISPGD).

Course content:

Report Program Generator

  • Understand the structure of an RPG-Program
  • Use and understand basic H-Spec and F-Spec coding
  • Be aware of free format alternatives to H, F, D, P specifications:
               CTL, DCL-xx Statements
  • Understand the difference between RPG & RPGLE source type
  • Understand the difference between fixed and free-format code
  • Edit, compile and run a simple RPGLE Program
  • Print source code and review compiled program code
  • Find errors in source code when compile fails
  • Define the terms RPG, ILE, OPM, SEU, PDM

Introduction to RPG Programming

  • Use and understand the meaning of:
              DOW… ENDDO, EVAL, READ, UPDATE, RETURN
  • Use the BIFs: %TRIM, %FIELDS, %EOF
  • Understand the difference between sequential and random file processing
  • Intercept end of file condition
  • Design and write a basic sequential file processing program
  • Copy data and carry out program testing
  • Rename variables from external definitions with: PREFIX, RENAME

Arithmetic and Conditional processing

  • Use and understand the meaning of:
              IF…ELSE…ENDIF   SETLL    DELETE
              SELECT…WHEN…OTHER…ENDSL
  • Use and understand the operators:
              AND  OR  NOT
  • Use and understand the Arithmetic operations:
              ADD, SUB, MULT, DIV, EVAL, +,  -,  *,  /,  +=,  -=,  *=,  /=
  • Use BIFs: %ERROR, %EQUAL
  • Use H-Spec Keywords: EXPROPTS, TRUNCNBR
  • Code Operational extenders h,r,m,e

Parameters, Variables & BIFs                     

  • Define a program variable (D-Specification)
  • Review the basic DCL statement
  • Understand and use keywords INZ, LIKE
  • Use the BIFs:
              %TRIM, %CHAR, %EDITC, %DEC, %SUBST
  • USE figurative constants (*BLANK, *ZEROS)
  • Understand legacy EVAL options & EVALR:
              MOVE, MOVEL, Z-ADD, SETON, SETOFF
  • Understand need for operational extender p
  • Be aware of additional built in functions such as:
              %XLATE, %CHECK, %CHECKR, %SCAN, %REPLACE,
              %SCANRPL, %DATE, %TIME, %DIV, %REM
  • Code a Main procedure interface and prototype

Report Program  

  • Understand basic DDS for a print file
  • Understand how print file and RPG interact
  • Use and understand the difference between:
              CHGPRTF & OVRPRTF
  • Design a report program
  • Use and understand WRITE
  • Code print file in RPG with OFLIND
  • Activate and De-activate Conditioning indicators on device file
  • Give meaningful names to conditioning indicators for a device file (INDDS)

Report program and Sub-totals

  • Understand and use:
              CHAIN    CLEAR
              BEGSR    ENDSR    EXSR
  • Use the built in function %FOUND()
  • Check for when a variable has changed 
  • Include a sub-total into a report

Flexible File Handling

  • Use and define a prototyped call: CALLP
  • Use QCMDEXC to run CL commands in RPG
  • Understand additional file commands: 
              SETLL, SETGT, KLIST, KFLD, READE, REDPE, READPE, READP, OPEN, %OPEN()
  • New File keywords EXTFILE, USROPN, EXTDESC
  • Use OVRPRTF from within an RPG Program
  • Generate multiple spool file entries from one print file and one program           

Enquiry program

  • Understand basic DDS display file coding
  • Code an enquiry program with 3 screens
  • Use the op codes: DOU… ENDDO & EXFMT
  • Understand and F-Spec for a display file
  • Control / arrest the path of function keys 

Linking Programs                     

  • Understand DDS window keywords
  • Use a window in an RPG program 
  • Link programs together 
  • Use prototyped calls

File Maintenance

  • Understand the logic and code a basic file maintenance interactive program
  • Understand the concept of record locking
  • Intercept record locking errors
  • Structure and code validation routines
  • Intercept and override DDS validation  

Finding Runtime Errors 

  • Enable a program for debug
  • Start debug (STRDBG)
  • Set break points and check variables
  • Track program logic

 

Follow on Courses:

To further your RPG4 programming skills consider the Advanced RPG4 Programming course (ISR4A).

Schedule:       

   2024                      
Public schedule Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Northampton     11 23   10            
                                                              We can offer dates for this course on request – Please contact us for details.

 

Schedule:

2024
 
Jan  
Feb  
Mar 11
Apr 23
May  
Jun 10
Jul  
Aug  
Sep  
Oct  
Nov  
Dec  
We can offer dates for this course on request – Please contact us for details

 

Book course:

ISR4P RPGIV Programming booking form
Please double check this!
Please tick the box below to confirm that you agree to the Privacy Policy of Sierra Training.
Please tick the box below to confirm that you agree to the Terms & Conditions of Sierra Training.
Sending