APIs by Example: Retrieve Open Files

In this installment of Carsten Flensburg’s APIs by Example, Carsten demonstrates the use of the List Open Files (QDMLOPNF) API.

The QDMLOPNF API lists the files that are currently open in your job and returns the same information as that displayed by the DSPJOB OPTION(*OPNF) command. The advantage to retrieving this information with an API is that you can use the returned information in your program logic rather than simply displaying it to the user.

The API is demonstrated in the form of a utility program that you can call from your own program when you need to retrieve the open file list.

Download the save file containing the source code.

Read the entire article

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s