08- RPGLE – File Manipulation
rpg **FREE // Read the first record READ MYFILE; DOW NOT %EOF(MYFILE); // Process the record DSPLY ‘Record read: ‘ + %CHAR(MyRecordField); // Read the next record READ MYFILE; ENDDO; Random Read with CHAIN: rpg **FREE // Keyed access CHAIN myKey MYFILE; IF %FOUND(MYFILE); DSPLY ‘Record found: ‘ + %CHAR(MyRecordField); ELSE; DSPLY ‘Record not found’; […]
07 – RPGLE – Arrays & Data Structures
In RPGLE (RPG IV), arrays and data structures are fundamental concepts that help manage and manipulate collections of data. Here’s an overview of how to work with arrays and data structures in RPGLE: Arrays in RPGLE Arrays in RPGLE are used to store multiple values of the same type. They can be one-dimensional or multi-dimensional. […]
06 RPGLE – Built-in functions
DCL-S str CHAR(20) INZ(‘Hello World’); DCL-S subStr CHAR(5); subStr = %SUBST(str:1:5); // Result is ‘Hello’ Date and Time Functions %DATE: Converts a character, numeric, or timestamp value to a date. rpg DCL-S date DATE; date = %DATE(‘2024-12-23’); // Converts to date value %TIMESTAMP: Converts a character or numeric value to a timestamp. rpg DCL-S timestamp […]
05 – Introduction to RPGLE Programming
RPGLE (RPG IV) stands for Report Program Generator Language Extension, and it is an advanced version of the RPG programming language used primarily on IBM’s AS/400 systems (now known as IBM iSeries or IBM Power Systems). Here’s an introduction to RPGLE programming: History and Evolution RPG II: The original RPG, introduced in the 1960s, was […]
02 – Application Development Tools
AS/400 (now IBM iSeries or IBM Power Systems) offers a variety of application development tools to help developers create robust and efficient applications. Here are some key tools: 1. Rational Developer for i (RDi) Description: An Eclipse-based integrated development environment (IDE) that provides features like syntax highlighting, debugging, and project management. Usage: Used for developing […]
01 – AS/400 Basics & Terminologies
Basics AS/400: Originally named “Application System/400,” it is a multiuser, multitasking system designed for industries requiring secure data storage and processing. Integrated DB2 Database: Comes with an integrated DB2 database management system. Menu-Driven Interfaces: User-friendly menu-driven interfaces for ease of use. Multi-User Support: Supports multiple users simultaneously. Security: High levels of security for sensitive data. […]