IAM File Load Process
After successfully defining an IAM Data Set, the next step is to load data into the data set. Generally, the file load process is where the data set is populated with records, and the index structure is built. For IAM data sets, this portion of the index is called the prime index. Once the load is completed, the prime index for the data set is established, and will not change. The load process is restrictive, in that the only I/O operation allowed is to write new records into the data set. For KSDS type of files, the records must be written in ascending key sequence. The file load must write one or more records to the data set, and subsequently successfully close the data set for it to be considered a loaded data set. Once loaded, the data set can be processed with the full range of I/O operations.
IAM data sets can be loaded by any program designed to load VSAM clusters. This includes system utility programs, such as IDCAMS REPRO and the SORT, as well as application programs. Each I/O request must be checked for successful completion, including the OPEN and the CLOSE. As will be explained in the subsequent paragraphs, critical file structure related processing occurs during Open and Close processing. If these processes do not complete successfully the data set cannot be used. Failures during the file load process will generally result in the data set having to be reloaded.