Moving BRMS to New AS400 System

When buying a new machine, a migration process is usually required to move the environment on the old machine to the new machine. This also includes moving the BRMS information to the new machine so that the BRMS does not start logging from blank.

Here’s the way I usually do in transferring all BRMS information from the old machine to the new machine (make sure the BRMS requirements are installed on the new machine):

Continue reading Moving BRMS to New AS400 System

Housekeeping AS400 File PART 1 – Clear Data

Housekeeping is an important part of a system or data. With housekeeping, we expected to maintain system stability and reliability.

The housekeeping method that will be discussed first is to clear files or to clear the entire contents of the record. For this section, if we have several files that can be done by deleting all the data in the file, then the following methods can be used:

Using SQL statement


Using Command CLRPFM

If the file is large enough, it is advisable to submit a job with SBMJOB. This command will be executed if there is no locking in the file.

Using Swap Empty File

Prepare a blank file using the CRTDUPOBJ command to another library / temporary library. In the example below, duplicate FILEA from LIBA to LIBB.

Ensure the following conditions:

  • If the file does not contain multiple logical files, duplicate the logical files to a temporary library. To check the logical file in the file, use the DSPDBR command
  • If files in the source library are journaled, the files in the temporary libraries are journalized using the STRJRNPF command

Swap files using the MOVOBJ command, with steps, Move File FILE along with logical files (if any) in LIBA to LIBC (second temporary library), then move FILEA along with logical files (if any) in LIBB to LIBA (empty files are moved to source library).

Of the three methods above in the clear file, I prefer to use the swap object method. But it also depends on how long your application downtime can be accepted. Doing a study first is highly recommended.

Removing Deleted Record on AS400 Physical File

When we delete a record using SQL, the record does not actually disappear immediately from the table / file. There are several ways to delete a deleted record in a file, including:

Using the RGZPFM command, with exclusive lock. This command is suitable for processing files that are not locked continuously.

Pastikan tidak ada locking pada File yang akan di reorganize.

RGZPFM with Share Update, is used if the file to be reorganized has a continuous locks and requires downtime to release the locks.

Copy File (CPYF) Command

AS400 table is a *FILE object, the CPYF command is used to copy all or part of the table structure in the database to another table. The following is the copy file command that I usually use:

Member Option > MBROPT

# MBROPT(*ADD) - Copy all record source files to the target file
# MBROPT(*REPLACE) - Copy all the record source files to the target file starting with delete member files first

Create File > CRTFILE

# CRTFILE(*YES) - Create a new file in the target library
# CRTFILE(*NO) - If file is already available in the target library

Copy From – To Record Number > FROMRCD – TORCD

# FROMRCD (*START/<rrn>) - *START if you want to copy the first record from the source file, or <rrn> relative record number if you want from a specific record number
# TORCD (*END/<rrn>) - *END if you want to copy until the last record from the source file, or <rrn> relative record number if you want to reach a certain record number

Record Format Field Mapping – FMTOPT

This parameter is used if the source file format is different from the target file format
# FMTOPT (*NOCHK) - Copy files based on the length of the existing records
# FMTOPT (*MAP *DROP) - Copy files based on existing field names (*MAP) and ignore non-existent fields (*DROP)



Recovery Point Object and Recovery Time Object

Disaster Recovery always been associated with Recovery Point Objects and Recovery Time Objects (RPO and RTO).

Source: MIMIX Documentation

Recovery Point Object (RPO) is the last point in time that an IT system can be recovered. In this section, the technology used determines how far behind the data or even the loss of a company when there is a disruption to the main system. RPO is used in technologies such as backup, storage replication, data replication and others.

Recovery Time Object (RTO) is related to the time it takes for an IT system to operate normally again when a planned / unplanned interruption occurs. For unplanned interruptions, error detection, data recovery and bringing the application back online are included in RTO.

Logika Bergantung Logistik