Awhile ago, I received a suggestion put forward by a reader of this newsletter. The reader needed to create a spreadsheet containing all job schedule entries on the system. As it turned out, the Work with Job Schedule Entries (WRKJOBSCDE) command does not support an output file option. You can display the command’s output either on a screen or written to a spooled file—that’s it.
For other purposes, it would also at times come in handy to be able to limit the WRKJOBSCDE command’s output to a certain selection of job schedule entries. You’d, for example, want to list all entries in a specific status or all entries run under a certain user profile. Given these requirements, I’ve created the List Job Schedule Entries (LSTJOBSCDE) command, which returns its output in the database file specified as input to the command, as well as supports a number of selection criteria. If the specified output file does not already exist, the LSTJOBSCDE command will create it.