Overview:
JDEdwards includes a job scheduling system with their software, known as SLEEPER; however, the system was designed more for MIS than for the average user. IBM also has a job scheduling utility, but that tool is also too complicated for the average user to understand. That is why a more user-friendly interface for scheduling the submitting of batch jobs was needed.

The custom written tool uses the JDEdwards familiar Dream Writer interface, so users already have a basic understanding of how the tool works. The Auto Report job scheduler allows any program, whether it be a JDEdwards report, custom written report, World Writer report, or even an AS/400 query report, to be automatically submitted to batch and run unattended. The job can be set up to run one time, every day, once per month, or the 1st day or last day of every month.
 

The Auto Report job scheduler was written by T. Davis Consulting Inc. so that reports, either JDEdwards reports, custom written reports, World Writer reports, or even AS400 query reports, can be automatically submitted to batch and run unattended. The auto reports job scheduler runs in conjunction with IBM scheduled jobs, which is a function of the IBM AS400 operating system. The IBM scheduler utility (see WRKJOBSCDE command) is responsible for submitting auto job batches, and it is the IBM utility that will dictate the time, date, and periods that each report batch will be submitted.

Program PX001008:
Program PX001008 was designed to allow Dream Writer reports to be set up for automatic job scheduling. Query 400 reports can also be scheduled. The program and version name are entered into a data file with an install code and report code associated with the programs (see Reports Control file). As many programs as desired can be all run from one version of program PX001008. For example, all of your month end reports can be scheduled to run at the same time each month. Submitting Dream Writer PX001008 version ZJDE00001 will then run all of the reports that are listed in file F0005RPT with install code MEND/ME.

In order to have a Dream Writer PX001008 version run automatically every week, every month, or whatever schedule you would like, requires that the system operator set up a SCHEDULED job in the IBM job scheduler. Or, you can submit PX001008 manually on the first of the month or whenever you want. Option 10 on menu REPORTS will display the current IBM scheduled job.

Processing options:
Only two processing options are required by program PX001008 - install code and reports code. These two codes must correspond to the same codes in file F0005RPTS (see Reports Control file). When Dream Writer program PX001008 version ZJDE00001 in this example, is submitted, all of the reports that have RPTS in the install code and AF in the reports code will be run. To automate this even further, the system operator must set the same version of PX001008 to be submitted by the IBM job scheduler. Otherwise, this version of PX001008 can be run anytime.

Auto scheduler PX001008 processing options


The REPORTS menu:
All of the auto reports scheduler system functions can be accessed from menu REPORTS. Option 2 displays the F0005RPTS file, which contains the program and version information that is associated with each install code. All programs/versions with the same install code and report code will be submitted and run together by Dream Writer PX001008.

Option 3 is a standard Dream Writer program, but this Dream Writer program (PX001008) does not produce a report. Instead, program PX001008 submits other reports to run. The actual reports that it runs are specified in the processing options of PX001008 (see program PX001008 description). In the processing options, an install code and a reports code are entered. These two codes are then associated with the same codes in file F0005RPT, which can be modified by using option 2 on menu REPORTS.

When one of the versions of program PX001008 is submitted, the program will in turn submit each of the reports/programs that is associated with the install code and reports code entered into the processing options of the PX001008 Dream Writer processing options.

The REPORTS menu


The Reports control file F0005RPT (option 2 from the REPORTS menu)
The reports control file is where all auto reports must be defined. You can display this screen from either option 2 of the REPORTS menu, or by using fast path command AUTOR. Each report that you want to have run automatically must be entered into this table. This is a customer designed table by PBD Inc. Each field in the table must be entered correctly.

Install Code & Report Code: install code is any identifying 4 character code that will tie together all of the reports that will be run in one batch. In the following example, AUTO is the install code. Install code is used in conjunction with report code. In this example, report code is 02. So, all of the records found in the control file that have AUTO/02 will be run together. They are submitted by program PX001008.

  • Job name: this can be anything that helps to identify what the job running is.
  • User name: the user profile name of the person who will be running this report (receives completion messages).
  • Job queue: the name of the job queue that the job will be running in (usually should be PMBATCH).
  • Update dates: indicates whether or not to update the dream write data selection dates. Values allowed here are W=weekly, M=monthly, Y=yearly, or C=current. If your report depends on a specific time period, then putting one of these values in this field will cause the program to automatically generate a date range and update the Dream Writer (this works for Dream Writer only, and will generate calendars dates only).

Program name and Version name: these fields are either the JDEdwards program ID and version (as taken from the

Dream Writer report that you are defining) or a Query/400 name and the literal QUERY400. For JDE reports, the program name will start with a 99% of the time this is VERY important, because if you enter the program ID starting with a , your Dream Writer data selection will not be used. If your report is a query/400 report, enter the name of the query in program name, and

the literal QUERY400 in version name (this is the same for all queries).

The reports control file


The IBM job scheduler
The IBM job scheduler is an IBM utility that comes shipped with the AS400. Only an authorized user profile on the system may add or changed IBM scheduled jobs; however, option 10 from menu REPORTS does allow users to view when all auto report scheduled jobs will run. There are several that have been pre-defined and are run on a schedule each month. The screen seen here is an example of what the IBM scheduled jobs screen looks like. At PBD, there are currently five regularly scheduled jobs on the system. They have all been named with the same starting characters in order to associate them with the version of PX001008 that they will run. AUTO01 for example will execute version AUTO01 of Dream Writer program PX001008.


  IBM scheduled jobs display


  • AUTO01: runs daily, Monday through Friday at 11:30 a.m
  • AUTO02: runs every Sunday at noon
  • AUTO03: runs daily, Tuesday through Saturday at 9:00 a.m.
  • AUTO04: runs twice a week, Wednesday and Sunday, at 1:00 a.m.
  • AUTO05: runs on the last day of every month, at 11:00 p.m.  


Instructions on the AS400 - page 1


Instructions on the AS400 - page 2