Midrange Systems Design - IBM iSeries i5

Support Sales Home
Submit Jobs - Download - Program Source
right click save as msdsbmjob.cl

Helps you manage your applications. It allows the user to control which printer the reports will be printed on and how many copies will be printed. Just before a job is submitted, a prompt will ask the user "outq" & "Copies". The benefit, it allows the user to control their jobs. If you do not give the end user control, they will buy a PC and get the control required. The data processing department does not own the computer, they just provide a service to the rest of the company. Lighten up, quit hiding the power of the i5. and share it.

After installing you should execute
UPDDTA AMUS00
and add users authority to programmers so they can run interactive & control the jobq and priority.

SBMJOBS Submit Job Example
The command to submit a job is SBMJOBS. Put this command in you CLP programs instead of IBM's SBMJOB.

SBMJOBS JOBNAM(MSD04) COMMAND('DSPLIB LIB(MSD04) OUTPUT(*PRINT)')

You can prompt SBMJOBS just like you would SBMJOB. When the above command is executed, the following will be displayed.

Report:            Submit Job    www.5-10.com           8/12/00 08:43:30
 Outq.................. STEVE
 Copies................ 1
 Hold Y/N.............. N (Hold and not print until released)
 Save Y/N.............. N (Save after printing)
 Print Text............ *NONE
 Out Schedule Priority. 5 (1-9)
Job:
 Hold on Job Queue y/N. N        (Run at night)
 Schedule Date......... *CURRENT (*current, *mon...) F4=Calendar
 Schedule Time......... *CURRENT (1300 is 1:00pm, *current)
 Job Date.............. *SCHEDULE (No slashes, *schedule) F4=Calendar
 Job Priority.......... 5 (1-9)
 Jobq.................. *JOBD
 For user.............. *CURRENT (*current)
 Current Library....... *CURRENT
 Job Description....... *USRPRF
 Job Name.............. TEST
 CPI...................
 Command............... DSPLIB LIB(MSD04) OUTPUT(*PRINT)

 F1=Help F3=Cancel,

OUTQ Output queue to put your report. Available outq's are

COPIES Number of copies all reports will print
1 - 99 are valid entries

HOLD Hold report Y/N
Y - Hold the report on the out queue
N - Print the report

SAVE Save Y/N
Y = Save the report after printing.
N = delete the report from the out queue after printing

OUTPTY Report outq schedule priority
1 - 9, 1 will schedule before 9

JOBHLD Run at night
N = Submits to normal jobq.
Y = Submits to NITES jobq.
This allows users to run jobs after the nightly billing has finished. The NITES queue will be on hold during the day. It is released by your billing job. Then it is re-holds after all jobs in the NITES queue is complete. You will need to create the NITES Queue, and put the following commands at the end of your nightly billing job.
RLSJOBQ JOBQ(NITES)
SBMJOB CMD(HLDJOBQ JOBQ(NITES)) JOB(HLDJOBQ) JOBQ(NITES) JOBPTY(9)

SCHMDY Schedule Date
Use this field to specify when a job is to run. Example, you want to run something on Sunday when the system is not busy.
*Current - eligible to run on today
010194 - eligible to run on 01/01/94
*mon *tue *wed *thu *fri *sat *sun -
Becomes eligible to run next Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday.
F4 will not work unless you have down loaded the calendar program. Use it to Popup a calendar and select the date you wish the job to run on.

 Saturday August 12, 2000
 Sun Mon Tue Wed Thr Fri Sat
           1   2   3   4   5
   6   7   8   9  10  11  12
  13  14  15  16  17  18  19
  20  21  22  23  24  25  26
  27  28  29  30  31

 Select   8/12/2000
 F1=Help F3=Exit Rollup/down
                             

SCHTIM Schedule time
The time of the day the job becomes eligible to run. The time is military, hour, minute, second.
*current - Immediately eligible to run.
062993 - Eligible June 29th, 1993 to run.

JOBDATE Job Date
Most reports print the job date in the report heading Change this date if you want a specific date to print.
*SCHEDULE The date the job started running.
*CURRENT The date the job was submitted. RPG uses the job date as the UDATE & *DATE.
F4 will not work unless you have down loaded the calendar program. Use it to Popup a calendar and select the date you wish the job to run on.

JOBPTY Job schedule Priority
Valid range from 1 to 9, 1=high, 5=normal, 9=low priority.
Only authorized users can change this field. If you have the menu system, go to user update and change the "Submit Job Change Priority" field. If you do not have the menu system, you can UPDDTA AMUS00 and add users that you want to have this authority,

JOBQ Job Queue
Key in the job queue name.
Only authorized users can change this field. If you have the menu system, go to user update and change the "Submit Job Change Priority" field. If you do not have the menu system, you can UPDDTA AMUS00 and add users that you want to have this authority,

CURLIB Current Library
The current library is always at the top of your library list. The current library is restored when the job terminates. Programmers are the only users would need to change this field.
Only authorized users can change this field. If you have the menu system, go to user update and change the "Submit Job Change Priority" field. If you do not have the menu system, you can UPDDTA AMUS00 and add users that you want to have this authority.

CPI Character per inch
No longer used

F24 Run Interactive
Only authorized users see this message. It allows programmers to debug batch jobs interactively. If you have the menu system, go to user update and change the "Submit Job Run Interactive" field. If you do not have the menu system, you can UPDDTA AMUS00 and add users that you want to have this authority.

How it works
The submitted job is ran under a shell (control program). The shell overrides the printer file & calls then executes your command.

Limitations
Overrides in to printer files in your commands must say SECURE(*YES). Parameters are not passed well. Information that needs passed should be put in the local data area. Example:

  Cl prompting program.
      chgvar %sst(*lda 101 6) &date
  RPG print program.
     I           UDS
     I                                      101 1060DATE