space
Previous Page | Next Page

Overview of the IMS DATA Step Interface

The DL/I FILE Statement

If you are unfamiliar with the FILE statement, refer to SAS Language Reference: Dictionary for more information.

The FILE statement identifies an external file to which information specified by a PUT statement is written. In an IMS DATA step, the DL/I FILE statement specifies a PSB, which in turn identifies a DL/I database or message queue to be accessed by a DL/I update call. The call is formatted using the values and variables specified in the DL/I INFILE statement, which must precede the DL/I FILE statement in the DATA step. The update call is issued when the corresponding DL/I PUT statement is executed. In other words, to issue an update call you use a DL/I INFILE, DL/I FILE, and DL/I PUT statement.

The following is the form of the DL/I FILE statement:

FILE PSBname DLI;

PSBname

specifies the same PSB referenced in the DATA step's DL/I INFILE statement. Refer to The DL/I INFILE Statement for more information. A PSB name must be specified.

DLI

tells SAS that the output file is a DL/I database or message queue. DL/I must be specified and must be after the PSB name.

No other options (including standard FILE statement options) are recognized in the DL/I FILE statement.

The DL/I FILE statement references a PSB that identifies a database or message queue to which a corresponding DL/I PUT statement writes.

The most recently executed FILE statement determines the current output file. If you are using more than one output file in a DATA step, there must be a FILE statement for each file. Change the current output file from one to another by executing a different FILE statement. To return to the original output file, repeat the original FILE statement. The current output file does not change until a new FILE statement executes, regardless of the number of PUT statements executed.

space
Previous Page | Next Page | Top of Page