Can an IDMS program access a sequential file?

book

Article ID: 140960

calendar_today

Updated On:

Products

CA IDMS

Issue/Introduction

Can an online program running in an IDMS address space (e.g. ADS, dc-cobol), directly access a sequential file?

Environment

Release: All releases
Component: CA IDMS 

Resolution

Accessing a sequential file from an online program (ADS, dc-cobol, pl/1 or assembler) running in an IDMS address space can work but it is strongly discouraged.
The DML Reference for COBOL manual documents that statements normally associated with file I/O are not supported.
Attempting such actions may work in an isolated test environment but in reality, the entire IDMS CV will wait while an I/O is completed.
Furthermore, if an I/O error occurs, the CV will abend.

ALTERNATIVES

Use WRITE PRINTER to write to a SYSOUTL line

It is possible to set up a line/pterm/lterm combination which an online program can write to as if it were a normal IDMS printer, but in reality is a sequential file.
See the files in the write_printer directory in the attached .zip file below for sample source.
This method cannot be used to read from a file.

Native VSAM support

It is possible to define IDMS database entities so that a native defined VSAM file can be accessed using IDMS DML verbs.
This is documented at Native VSAM Considerations.
Sample definitions are in the native_vsam directory of the attached .zip file below. 
Note that this is not the same as using VSAM as the file access method for a normal IDMS database file.

Submit a batch job

The program can write the file content to a suitably defined database and then submit a batch job to read that data and write it to the file.
This is the recommended method.               

Attachments

1574931660394__KD140960.zip get_app