Examples in RPG/RPGLE video Tutorial

www.go4as400.com


[ Chapter 5 - Source Physical File ]

Example 1. How to create a File and insert data in it.

[ Chapter 6 - STRSQL ]

Example 1. How to insert/update/delete data using SQL statement.

Example 2. How to use SQL built in functions e.g. SUBSTR.

Example 3. How to JOIN two files using SQL statement.

[ Chapter 7 - Access Path and Logical Files ]

Example 1. How to create a Logical File.

Example 2. How to insert data in Logical File.

[ Chapter 8 - Multimember Physical File ]

Example 1. How to create a new member in a File.

[ Chapter 9 - Copy File ]

Example 1. Copy records to from one file to another file with same file structure

Example 1. Copy records to a file with different file structure and more fields

Example 1. Copy records to a file with different file structure and less fields

Example 1. Copy records to a file with different file structure with FMT option = *NOCHK

[ Chapter 11 - C Spec - RPG ]

Example 1. Initialize operation

Example 2. Assign value to variable - Example 1

Example 3. Assign value to variable - Example 2

Example 4. Initialize operation - Z-ADD opcode

Example 5. Arithmetic operation - ADD

Example 6. Arithmetic operation - Subtract

Example 7. Arithmetic operation - Multiply

Example 8. Arithmetic operation - Divisio

Example 9. Arithmetic operation - Division Remainder

Example 10. String operation - CAT (Concatenate Two Character Strings)

Example 11. String operation - SUBST (Substring the Character String)

Example 12. String operation - SCAN (Scan Characters)

Example 13. String operation - CHECK (Check Characters)

Example 14. String operation - CHEKR (Check Reverse)

Example 15. IF-ELSE-ENDIF Conditional Statement

Example 16. SELECT - WHEN - OTHER - ENDSL Operation

Example 17. DO loop

Example 18. DOW (Do while) loop

Example 19. DOU (Do Until) loop

Example 20. ITER in DO loop

Example 21. LEAVE in DO loop

[ Chapter 12 - SEU line commands ]

Example 1. Line command example

[ Chapter 13 - F Spec - RPG ]

Example 1. Read a file

Example 2. Insert a record in the file

Example 3. Update a record in the file

Example 4. Delete a record in the file

[ Chapter 14 - Printer File Concept ]

Example 1. Program described Printer file example

Example 2. Overflow Line number example

[ Chapter 15 - H spec - RPG ]

Example 1. H-Spec

[ Chapter 16 - E Spec - RPG ]

Example 1. Compile time Array - example 1

Example 2. Compile time Array - example 2

Example 3. Pre-Run time Array example

Example 4. Run time Array example

[ Chapter 22 - Subfile Introduction ]

Example 1. Load-all Subfile Example

Example 2. Expandable Subfile Example

Example 3. Single Page Subfile Example

Example 4. Message Subfile Example

[ Chapter 23 - Actions on Subfile ]

Example 1. Pop-up window by Subfile Action

Example 2. Subfile validation

[ Chapter 24 - Window Subfile ]

Example 1. Prompt window without cursor location

Example 2. Prompt window with cursor location

[ Chapter 25 - Printer File Concept ]

Example 1. First print program

Example 2. 2nd print program - Multiple Header records

Example 2. 3rd print program - Overflow example

[ Chapter 26 - Embedded SQL in RPG ]

Example 1.1 Read a file using Standard method

Example 1.2 Read a file using Embedded SQL

Example 2.1 Insert record in File using Standard method

Example 2.2 Insert record in File using Embedded SQL

Example 3.1 Update a record in File using Standard method

Example 3.2 Update a record in File using Embedded SQL

Example 4.1 Delete a record in File using Standard method

Example 4.2 Delete a record in File using Embedded SQL

Example 5. Embedded SQL example - Multiple Fields in SELECT statement

Example 6. Embedded SQL example - UPDATE + SELECT Statement

Example 7. Embedded SQL - UPDATE with Input parameter

Example 8. Embedded SQL - INSERT + DELETE Statement

Example 9. Embedded SQL Example - Use of SQLCOD

[ Chapter 28 - C spec - RPG IV ]

Example 1. RPG IV - C Spec - Conditional Operation

Example 2. RPG IV - C Spec - Iterative Operation

Example 3. RPG IV - Built in Function - %CHAR

Example 4. RPG IV - Built in Function - %DEC

Example 5. RPG IV - Built in Function - %SUBST

Example 6. RPG IV - Built in Function - %TRIM

Example 7. RPG IV - Built in Function - %TRIML

Example 8. RPG IV - Built in Function - %TRIMR

Example 9. RPG IV -Built in Function - %LEN

Example 10. RPG IV - Built in Function - %SCAN

Example 11. RPG IV - Built in Function - %REPLACE

Example 12. RPG IV - Built in Function - %XLATE

Example 13. RPG IV - Built in Function - %CHECK

Example 14. RPG IV - Built in Function - %EDITC

Example 15.1. RPG IV - Built in Function - %EDITW

Example 16. RPG IV - Built in Function - %EDITW

Example 17. RPG IV - Built in Function - %EDITW

Example 18. RPG IV - Built in Function - %EDITW

[ Chapter 29 - C spec - Date Calculation - RPG IV ]

Example 01. Example 1 - Validate numeric to see if it is a valid date

Example 02. Example 2 - Validate numeric to see if it is a valid date

Example 03. TEST Opcode - Example 1 - Find transaction by cutoff date

Example 04. TEST Opcode - Example 2 - Find the transactions between Date 1 and Date 2

Example 05. Date datatype(DL) - Example 1

Example 06. Date datatype(DL) with DATFMT & DATSEP - Example 2

Example 07. Example 1 - Find Today's Date, Current Time & Current Timestamp

Example 08. Example 1 - Add Days, Months, Years to DATE

Example 09. Example 2 - Add Hours, Minutes, Seconds to TIME

Example 10. Example 3 - Add Year to TIMESTAMP

Example 11. Example 1 - Subtract Days, Months, Years from DATE

Example 12. Example 2 - Subtract Hours, Minutes, Seconds from TIME

Example 13. Example 3 - Subtract Year from TIMESTAMP

Example 14. Example 1 - Extract Day, Month and Year from DATE

Example 15. Example 2 - Extract Hours, Minutes, Seconds from TIME

Example 16. Example 1 - Extract Microsecondsÿfrom TIMESTAMP

Example 17. Example 1 - %Date - Find Today's Date

Example 18. Example 2 - Built in Function - Convert number to Date

Example 19. Example 1 - Built in Function - Find Today's Date

Example 20. Example 2 - Last day of month, Beginning of the month, Last date of previous month, Beginning date of the previous month

Example 21. Example 1 - %Timestamp - Find Current Timestamp

Example 22. Example 2 - %Timestamp - Convert numberexpression to Timestamp

Example 23. Example 1 - %Hours

[ Chapter 30 - H spec - RPGIV ]

Example 1. H SPEC - Example - DATEDIT without Date Separator parameter

Example 2. H SPEC - Example - DATEEDIT with Date Separator parameter

Example 3. H SPEC - Example - DATEFMT without Date Separator

Example 4. H SPEC - Example - Without DATFMT

Example 5. H SPEC- Example - DECEDIT with DEFAULT Decimal character

Example 6. H SPEC - Example - DECEDIT with different Decimal character

Example 7. H SPEC - Example - Without OPTION(SRCSTMT) - Re-numbering of program statements

Example 8. H SPEC - Example - With OPTION(SRCSTMT)

Example 9. H SPEC - Example - Without OPTION(NODEBUGIO)

Example 10. H SPEC - Example - With OPTION(NODEBUGIO)

[ Chapter 31 - F Spec - File operation - RPG IV ]

Example 1. RPGIII vs RPGIV - READ + %EOF( )

Example 2. RPGIII vs RPGIV - READP + %EOF( )

Example 3. RPGIII vs RPGIV -CHAIN + %FOUND( )

Example 4. RPGIII vs RPGIV - SETLL + %FOUND( )

Example 5. RPGIII vs RPGIV - SETLL + %FOUND( ) - 2

Example 6. RPGIII vs RPGIV - SETGT + %FOUND( )

Example 7. RPGIII vs RPGIV - SETLL + %EQUAL( )

[ Chapter 32 - D Spec - RPG IV ]

Example 1.1 - Define program variables I

Example 1.2 - Define program variables II

Example 1.3 - Use Data structure to break fields into subfields

Example 2 - D SPEC Keywords - INZ

Example 3 - Program described data structure

Example 4 - Externally described data structure

Example 5 - Program status data structure

Example 6 - File information data structure

[ Chapter 33 - Exception Handling - RPG IV ]

Example 1.1 - Error Indicator

Example 1.2 - Error Indicator

Example 2.1 - Operator Extender

Example 2.2 - Operator Extender E

Example 3 - Monitor Group

Example 4.1 - INFSR(PSSR)

Example 4.2 - INFSR(PSSR)

Example 4.3 - INFSR(PSSR)

Example 4.4 - INFSR(@ERROR)

Example 5 - Default exception handler - Example

[ Chapter 34 - H spec - RPGIV ]

I Spec - Example -1

I Spec - Example -2

[ Chapter 35 - O Spec - RPG IV ]

Example -1 - Overflow Example

Example -2- Printer file Override Example

[ Chapter 36 - ILE Concept ]

Example 1 - New Activation group

Example 2 - Named Activation group

Example 3 - Caller Activation group

Example 5.1 - Module example - Reusability of Code

Example 5.2 - Subprocedure defined in the main procedure itself

Example 5.3 - Module with Only subprocedures

Example 6 - Service Program Example

Example 7 - CopyBook

Example 8 - CALL program in FREE FORMAT


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy