Newsletters   Subscriptions  Forums  Store  Media Kit  About Us  Contact  Search   Home 
fhg
Volume 4, Number 15 -- May 5, 2004

Closing Files in ILE Service Programs


Hey, Ted:

We're moving all our new development to RPG IV and ILE, and as part of this process we are looking at putting our commonly used processes into service programs. Many of these functions require access to database files. For example, one function would retrieve the price of an item according to the area in which it is being sold, the date for which the price is applicable, and whether any discounts have been set up. This is quite a complicated procedure, and we want a simple function we can call that will prevent us having to code it separately each time.

We have put this calculation into a subprocedure, which uses the passed parameters to retrieve the correct information, using three files. This subprocedure then has been put into a service program, and so far, so good--the price is returned to the program. The problem becomes apparent when the calling program ends-- the three files used within the service program are still open. I assume the files are open because there is no program cycle processing that will ever close them. Short of manually opening and closing these files (which I guess would be very inefficient), I can't see any way around this problem. Am I missing something obvious?

--Simon


The files will remain open until the activation group in which they are open is destroyed. If you assign the service program and the calling programs to the proper activation groups, you won't have to explicitly close the files.

When you create the service program, specify ACTGRP(*CALLER) to make the service program run in the caller's activation group. This is the default setting for service programs.

Here is the key: make sure that calling programs do not run in the default activation group. The usual way to achieve this objective is by creating them to run in either a *NEW or named activation group. It's okay to create calling programs with ACTGRP(*CALLER) if they will always run under programs that run in *NEW or named activation groups. The problem with running your service program in the default activation group is that the only way to destroy the default activation group, and thereby to close your files, is by ending the job.

There are two ways to destroy an activation group: one is to end the job that contains the activation group, and the other is to use the Reclaim Activation Group (RCLACTGRP) command.

For more information about activation groups, see "What You Should Know About Activation Groups" and "ILE Strategies."

--Ted

Sponsored By
GST

Mirrored LTO-2 Backup

GST, Inc.
Phone: 866-478-4621 or 949-900-1090 (for sales x 300)
Web: http://www.gstinc.com
Email: sales@gstinc.com

---------------------------------------------------------------------

SUMMARY

High-performance end of GST's dual-drive subsystems offers fault tolerant mirrored backups plus off-line copy and cascading for LTO.

· Dual LTO-2 drives.
· Capacity to 800GB
· Speed up to 252GB/hour
· Mirrored Backup supports DR.
· LVD, HVD and Fibre connectivity.
· Starts at $14,500 USD.

---------------------------------------------------------------------

THE BIG PICTURE

· Dual LTO-1 or LTO-2 tape drives in external enclosure.
· Capacity: LTO-2 is 200GB native (400GB compresed).
· Speed: LTO-2 is 126GB/hour native (252GB/hr compressed).
· Mirrored backup provides disaster recovery support.
· Added functions: off-line copy plus cascading.
· LCD operator panel improves backup efficiency.
· 2-level media protection with LTO-1 and LTO-2.
· Roadmap to LTO-3 and LTO-4.
· LTO range: single drive to enterprise-wide libraries.
· Supports LVD, HVD, and FC connections.

Our Dual LTO Tape Subsystem is part of GST's SafeDR™ family. Dual drives generate identical sets of backup cartridges so that one set can be safeguarded remotely for disaster recovery while the other set is retained onsite for faster restores; other tape functions add off-line copy and cascading capabilities. An LCD panel provides an advanced operator interface for visibility over backup operations.

The Dual LTO Tape Subsystem can backup a wide variety of servers. They connect natively with LVD (low voltage differential), HVD (high voltage differential), and FC (Fibre Channel) interfaces.

MODEL OVERVIEW

GST's Dual LTO Tape Subsystem is available in a variety of models. Each LTO technology (LTO-1, LTO-2) is available in two server-to-SCSI Adapter interfaces and one fibre interface:

LOW VOLTAGE DIFFERENTIAL (LVD). Maximum SCSI negotiation of 160MB/s; the total server-to-storage peripheral connectivity is 12 meters.

HIGH VOLTAGE DIFFERENTIAL (HVD). Maximum SCSI negotiation of 40MB/s; the total server-to-storage peripheral connectivity is 25 meters.

FIBRE CHANNEL (FC). 2Gbit fibre interface.

LTO TECHNOLOGY

LTO tape technologies supported are LTO-1 and the newer LTO-2. Native capacities for LTO-1 and LTO-2 are 100GB and 200GB (200GB, 400GB compressed) with speeds of 54GB/hour and 126GB/hour (108GB/hour, 252GB/hour compressed). A 4-generation roadmap provides for a native capacity of 800GB per cartridge (1.6TB compressed) and a transfer rate of up to 576GB/hour (1,152GB/hour compressed).

Cartridges use linear (serpentine) tape format providing fewer moving parts, durability and reduced maintenance costs. The version of LTO technology that GST uses is best suited for high-capacity backup, restore and archiving. Enhancements in the areas of timing-based servos, hardware data compression, optimized track layouts and ECC error correction help improve capacities, performance and reliability.

KEY BENEFITS

IMPROVED DR - Mirrored backup capability produces simultaneous sets of identical backup cartridges with no performance penalty; this permits storage of one set off-site for better disaster recovery and storage of the other set on-site for rapid restore.

FAULT-TOLERANT BACKUP AND RESTORE - Dual-drive configurations ensure against drive failure since the second drive continues to operate, ensuring the backup is completed successfully.

ADDED TAPE FUNCTIONS - For dual-drive subsystems, key added tape functions include: dual-drive mirroring for mirrored backups, off-line copying/verifying with no processor penalty, and cascading to extend unattended backup capacity by switching from one drive to the other (doubling capacity).

SPACE SAVER - The small dimensions and light weight of the configuration facilitate the optimum use of datacenter space.

MEDIA INVESTMENT PROTECTION - For IT sites with an investment in LTO-1 media, the newer LTO-2 technology is backward-read compatible, and forward-read compatible with future generations.

KEY FEATURES

DUAL DRIVE CONTROLLER - Manages mirroring, off-line copying, cascading, and the LCD Display Panel.

LCD DISPLAY PANEL - Multi-function LCD Display Panel continuously displays key drive and backup job conditions.

CONVENIENT DRIVE INTERFACE - RS232 interface for updating firmware and optimizing drive performance.

SERVICE AND SUPPORT - A variety of support programs provide installation and onsite service; includes GST's Accelerated Ship Program (GASP) to get replacement units on the scene rapidly.

WARRANTY - Purchase price includes a built-in manufacturer's warranty of three years.

GST, Inc.
Phone: 866-478-4621 or 949-900-1090 (for sales x 300)
Web: http://www.gstinc.com
Email: sales@gstinc.com


Editors: Howard Arner, Joe Hertvik, Ted Holt,
Shannon O'Donnell, Kevin Vandever
Managing Editor: Shannon Pastore
Contributing Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

THIS ISSUE
SPONSORED BY:

T.L. Ashford
Guild Companies
GST
WorksRight Sofware
Damon Technologies


BACK ISSUES

TABLE OF
CONTENTS
Using RPG As Your ASP Language, Part 2

Proper CL Error-Handling

Closing Files in ILE Service Programs

Admin Alert: Hitting the Limits of the QNTC File System

OS/400 Alert: Fix Central Is Now Firewall-Enabled



Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, 50 Park Terrace East, Suite 8F, New York, NY 10034
Privacy Statement