14- RPGLE – Using C procedures to manipulate IFS files
To manipulate IFS files in RPGLE using C procedures, you can utilize C APIs like open(), read(), write(), and close(). These APIs allow you to perform operations such as creating, opening, reading, writing, and closing IFS stream files. Here’s a brief overview: Creating and Opening Files: Use the open() API to create or open an […]
04 – SQL way of creating and maintaining Database objects
Using SQL to create and maintain database objects on AS/400 (now known as IBM iSeries or IBM Power Systems) is efficient and flexible. Here’s a guide on how to create, manipulate, and manage database objects using SQL: 1. Creating Database Objects Creating a Table Use the CREATE TABLE statement to define a new table. sql […]
03 – DDS way of creating and maintaining Database objects
Data Description Specifications (DDS) is a powerful tool for creating and maintaining database objects on the AS/400 (now IBM iSeries or IBM Power Systems). Here’s a step-by-step guide to using DDS: 1. Access PDM (Programming Development Manager) Step: Use the PDM tool to access the source file that contains the DDS specifications. 2. Edit the […]
13 – RPGLE – XML processing
Processing XML in RPGLE (RPG IV) involves parsing and generating XML documents. IBM iSeries provides tools and APIs to work with XML efficiently. Here are some common methods for XML processing in RPGLE: 1. Generating XML You can generate XML by building the XML document as a string or using SQL functions. Building XML as […]
12 – RPGLE – Error Handling
In RPGLE (RPG IV), effective error handling is crucial for creating robust and reliable programs. Here are some common strategies and techniques for handling errors in RPGLE: 1. Using the *PSSR Subroutine The *PSSR subroutine is a special error-handling routine that gets executed automatically when an error occurs in the program. rpg **FREE // Declare […]
11 – Embedded SQL Programming
Embedded SQL in RPGLE allows you to incorporate SQL statements directly within your RPG programs. This powerful feature combines the strengths of both SQL and RPGLE, making it easier to perform complex database operations. Here’s an overview of how to use embedded SQL in RPGLE: 1. Introduction to Embedded SQL Embedded SQL: SQL statements are […]
10 – RPGLE – Reports
rpg **FREE // Define the printer file FMYPRTF O E PRINTER OFLIND(*INOF); // Define a physical file to read data from FMYFILE IF E DISK ; DCL-S lineCount INT(10) INZ(0); DCL-S totalPages INT(10) INZ(1); // Open the printer file OPEN MYPRTF; […]
09- RPGLE – Subfiles
Subfiles in RPGLE (RPG IV) are a powerful feature that allows you to display and manage lists of data on a screen. They are particularly useful for handling large datasets in a user-friendly manner. Here’s an overview of how to work with subfiles in RPGLE: Key Concepts Subfile: A subfile is a temporary storage area […]