Add Job using Job Scheduler (ADDJOBJS)

The Add Job using Job Scheduler (ADDJOBJS) command allows you to schedule batch jobs by adding an entry to the job schedule. Jobs can be a single job or a member of a group of jobs or an application. You can use this command to schedule a batch job to be submitted once, at a regular interval and so on, based on the schedule code you specify. You can schedule jobs with user-defined calendars, holiday exception calendars and fiscal year calendars.

The job schedule entry contains all of the information needed to submit the job, including the commands to process, the job description and user profile under which the job is run, the job queue to which the job is submitted, the message queue to which messages are sent and so on.

At the date and time you specify or IBM Advanced Job Scheduler for i calculates, the job is submitted to the specified job queue. This command does not guarantee that the job will begin running at the scheduled time, however. The job will not begin running if the job queue is held or attached to an inactive subsystem, or if the maximum number of active jobs allowed to run in the subsystem or on the system at one time has been reached.

Each job schedule entry is identified by a user-defined job, which is specified for the Job entry (JOB) parameter of this command.

Restrictions:

Parameters

Keyword Description Choices Notes
JOB Job entry Element list Required, Positional 1
Element 1: Job Name
Element 2: Group Name, *NONE
Element 3: Group sequence 1-99, *NONE
APP Application Name, *NONE, *JOBCTL Optional
SCDCDE Schedule code *DAILY, *CALENDAR, *DATE, *DAY, *NUMDAY, *MINUTES, *ONCE, *MONTHEND, *FIRST, *SECOND, *THIRD, *FOURTH, *FIFTH, *LAST, *FIRSTWRK, *LASTWRK, *ALTERNATE, *NONE, *JOBCTL Optional
TIME Scheduled time Values (up to 10 repetitions): 0-2400 Optional
ITVMIN Interval 1-720 Optional
CAL Calendar Name, *NONE, *JOBCTL Optional
HDYCAL Holiday calendar Name, *NONE, *JOBCTL Optional
FSCCAL Fiscal calendar Name, *NONE, *JOBCTL Optional
DAY Days Single values: *ALL, *NONE
Other values (up to 7 repetitions): *MON, *TUE, *WED, *THU, *FRI, *SAT, *SUN
Optional
SNGDAY Single day *MON, *TUE, *WED, *THU, *FRI, *SAT, *SUN Optional
ITVDAY Interval 1-99 Optional
DATE Dates of the year Values (up to 13 repetitions): Decimal number Optional
SNGDATE Single date Decimal number, *NEXT Optional
SAVE Save *YES, *NO Optional
DAYMONTH Day of the month Values (up to 13 repetitions): 1-31 Optional
WRKDAY Working days *NO, *YES Optional
FSCPERIOD Fiscal period Single values: *ALL
Other values (up to 13 repetitions): 1-13
Optional
TEXT Text Character value, *NONE Optional
CMD Command request Command string Optional
RMTLOCNAME Remote location name Name, *JOBCTL, *LCL Optional
RANGE Schedule range Element list Optional
Element 1: Start time and date Element list
Element 1: Beginning time 0-2400, *NONE
Element 2: Beginning date Character value, *NONE
Element 2: End time and date Element list
Element 1: Ending time 0-2400, *NONE
Element 2: Ending date Character value, *NONE
MAXRUN Maximum run time 1-9999, *NOMAX Optional
PGRRCPNORM Notification normal Single values: *NONE
Other values: Element list
Optional
Element 1: Notification recipient Name, *JOBCTL, *ONCALL
Element 2: Notification message Character value, *JOBCTL, *COMP
PGRRCPABN Notification abnormal Single values: *NONE
Other values: Element list
Optional
Element 1: Notification recipient Name, *JOBCTL, *ONCALL
Element 2: Notification message Character value, *JOBCTL, *COMP
PGRRCPSTR Notification start job Single values: *NONE
Other values: Element list
Optional
Element 1: Notification recipient Name, *JOBCTL, *ONCALL
Element 2: Start limit 1-999, *JOBCTL
PGRRCPERR Notification error message Single values: *NONE
Other values: Element list
Optional
Element 1: Notification recipient Name, *JOBCTL, *ONCALL
Element 2: Notification message Character value, *JOBCTL, *ERRMSG, *JOBLOG
ALTJOB Alternate job Single values: *NONE
Other values: Element list
Optional
Element 1: Job Name
Element 2: Group Name, *NONE
Element 3: Group sequence 1-99, *NONE
RPTDSTID Report distribution ID Name, *NONE Optional
RCYACN Recovery action *JOBCTL, *SBMRLS, *SBMHLD, *NOSBM Optional
JOBD Job description Single values: *JOBCTL, *USRPRF
Other values: Qualified object name
Optional
Qualifier 1: Job description Name
Qualifier 2: Library Name, *LIBL, *CURLIB
JOBQ Job queue Single values: *JOBCTL, *JOBD
Other values: Qualified object name
Optional
Qualifier 1: Job queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
JOBPTY Job priority (on JOBQ) 1-9, *JOBCTL, *JOBD Optional
OUTPTY Output priority (on OUTQ) 1-9, *JOBCTL, *JOBD Optional
PRTDEV Print device Name, *JOBCTL, *CURRENT, *USRPRF, *SYSVAL, *JOBD Optional
OUTQ Output queue Single values: *JOBCTL, *USRPRF, *DEV, *JOBD
Other values: Qualified object name
Optional
Qualifier 1: Output queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
USER User Name, *JOBCTL, *CURRENT, *JOBD Optional
PRTTXT Print text Character value, *JOBCTL, *BLANK, *JOBD, *SYSVAL Optional
RTGDTA Routing data Character value, *JOBCTL, *JOBD Optional
CURLIB Current library Name, *JOBCTL, *USRPRF, *CRTDFT Optional
LIBL Library list Name, *JOBCTL, *JOBD, *SYSVAL, *NONE Optional
LOG Message logging Element list Optional
Element 1: Level 0-4, *JOBCTL, *JOBD
Element 2: Severity 0-99, *JOBCTL, *JOBD
Element 3: Text *JOBCTL, *JOBD, *MSG, *SECLVL, *NOLIST
LOGCLPGM Log CL program commands *JOBCTL, *JOBD, *YES, *NO Optional
INQMSGRPY Inquiry message reply *JOBCTL, *JOBD, *RQD, *DFT, *SYSRPYL Optional
HOLD Hold on job queue *JOBCTL, *JOBD, *YES, *NO Optional
SWS Job switches Character value, *JOBCTL, *JOBD Optional
MSGQ Message queue Single values: *JOBCTL, *USRPRF, *NONE
Other values: Qualified object name
Optional
Qualifier 1: Message queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
ACGCDE Accounting code Character value, *JOBCTL, *JOBD, *USRPRF, *BLANK Optional
RUNPTY Run priority 01-99, *JOBCTL, *NOCHG Optional
INLASPGRP Initial ASP group Name, *JOBCTL, *CURRENT, *JOBD, *NONE Optional
ADLCMD Additional commands Values (up to 4 repetitions): Character value Optional

Job entry (JOB)

Specifies the name of the job schedule entry. You must specify a job name for every job and alternately can specify a group to which the job belongs as well as a sequence number for the job within the group.

The first job of a group must be sequence number 1. Subsequent sequence numbers should leave gaps (10, 20, 30 and so on) to allow job insertions if necessary.

This is a required parameter.

Element 1: Job

name
Specify the user-defined name of the job schedule entry.

Element 2: Group

*NONE
The job is not assigned to a group.
name
Specify the user-defined name of the group to which the job belongs.

Element 3: Group sequence

*NONE
There is not a sequence number assigned to the job.
1-99
Specify the sequence number of the job within the group.

Application (APP)

Specifies the name of the application to which the job specified for the Job (JOB) parameter belongs.

*JOBCTL
The application specified in the job controls is used as the application for this job.
*NONE
There is no application specified for this job.
name
Specify the name of the application to which the job that you are adding belongs.

Schedule code (SCDCDE)

Specifies the schedule code that you want to assign to the job.

Note: The days that a job runs as a result of selecting a schedule code can be modified by selecting a calendar in one of the calendar fields. You can review calendars by going to the Job Controls (JSJOBCTL) menu and selecting the calendar type you want to review.

*DAILY
The job is scheduled to run on a daily basis or on selected days every week. For example, it may be scheduled to run on Wednesday only, or every day of the week.
*CALENDAR
You are using a calendar to schedule the job. Calendars are specified in the Work with Calendars display.
*DATE
The job is scheduled to run on specific dates throughout the year. They are kept in the system in month day (MMDD) or day month (DDMM) format depending on the system value and will be submitted on the specified dates. Up to 13 dates can be scheduled.
*DAY
The job is to be run on particular calendar days of the month, every month. These are entered in day (dd) format.
*NUMDAY
The job runs every specified number of days. The number of days specified can range from 1 to 99.

Note: If the scheduled time to run is greater than the current time, IBM Advanced Job Scheduler for i will count that time as a whole day (if you enter an IBM Advanced Job Scheduler for i job on Monday at 3:00 p.m. to run every 2 days at 5:00 p.m., the job will run the first time on Tuesday at 5:00 p.m.).

*MINUTES
The job runs every specified number of minutes. The number of minutes is based on the number of minutes specified for the Interval (ITVMIN) parameter.
*ONCE
The job is to be run once. The Save (SAVE) parameter indicates whether the job is to be saved (*YES) or deleted (*NO) after it is run. If it is a job group, the SAVE parameter will not be shown and will assume saved (*YES). The date that the job is scheduled to be run is specified for the Single date (SNGDATE) parameter. Leaving the date blank will run the job when the scheduled time is reached.
*MONTHEND
The job runs on the last day of the month.
*FIRST
The job is to run on the first designated day of every month or specified fiscal period. This option is used in conjunction with the Single day (SNGDAY) parameter. For instance, if *TUE is specified for the SNGDAY parameter, the job will be scheduled to run on the first Tuesday of each month.
*SECOND
The job is to run on the second designated day of every month or specified fiscal period. This option is used in conjunction with the SNGDAY parameter. For instance, if *TUE is specified for the SNGDAY parameter, the job will be scheduled to run on the second Tuesday of each month.
*THIRD
The job is to run on the third designated day of every month or specified fiscal period. This option is used in conjunction with the SNGDAY parameter. For instance, if *TUE is specified for the SNGDAY parameter, the job will be scheduled to run on the third Tuesday of each month.
*FOURTH
The job is to run on the fourth designated day of every month or specified fiscal period. This option is used in conjunction with the SNGDAY parameter. For instance, if *TUE is specified for the SNGDAY parameter, the job will be scheduled to run on the fourth Tuesday of each month.
*FIFTH
The job is to run on the fifth designated day of every month or specified fiscal period. This option is used in conjunction with the SNGDAY parameter. For instance, if *TUE is specified for the SNGDAY parameter, the job will be scheduled to run on the fifth Tuesday of each month.

Note: If there is not a fifth occurrence in a month, the job will not run and will be scheduled for the next time there is a fifth occurrence of a selected day in a month.

*LAST
The job is to run on the last designated day of every month or specified fiscal period. This option is used in conjunction with the SNGDAY parameter. For instance, if *TUE is specified for the SNGDAY parameter, the job will be scheduled to run on the last Tuesday of each month.
*FIRSTWRK
The job is to run on the first working day of every month or specified fiscal period. This option is used in conjunction with the Working daysfield in the system controls.
*LASTWRK
The job is to run on the last working day of every month or specified fiscal periods. This option is used in conjunction with the Working daysfield in the system controls.
*ALTERNATE
The job is to run when a regular job terminates abnormally and has this job defined as its alternate job.
*NONE
The job is not a scheduled job. It can be a member of a group job waiting for submission, a job waiting for a predecessor job to run, or a job waiting for manual submission by a user.

Note: The schedule code *NONE replaces the schedule code *DEPJOB which was used in releases prior to V4R2.

*JOBCTL
The job is scheduled to run based on the schedule code specified in the job controls.

Scheduled time (TIME)

Specifies the time or times that you want the job to run on specified days. Times are entered in hour, minute (HHMM) format and can range from 0001 to 2400 (midnight).

You can enter multiple values for this parameter.

0-2400
Specify the time that you want IBM Advanced Job Scheduler for i to submit the job.

Interval (ITVMIN)

Specifies the number of minutes that you want to use as an interval with the *MINUTES schedule code. This field is required when the *MINUTES schedule code is used.

1-720
Specify the number of minutes between submissions of the job.

Calendar (CAL)

Specifies the name of the calendar that you want to use for the job. A calendar is a user-defined set of days or dates that can be used with all schedule codes except *NONE, *ALTERNATE and *NUMDAY. Calendars allow you to add multiple dates to a schedule in addition to normally scheduled dates.

*JOBCTL
The calendar that is used for this job is the calendar specified in the job controls.
*NONE
This job does not use a calendar.
name
Specify the name of the calendar that you want to use for this job.

Holiday calendar (HDYCAL)

Specifies the name of the holiday calendar that you want to use with a job. A holiday calendar is a user-defined set of exception days or dates. It can be used to determine whether a job will process.

*JOBCTL
The value specified for holiday calendar in the job controls is used for this job.
*NONE
This job does not use a holiday calendar.
name
Specify the name of the holiday calendar that you want to use for this job.

Fiscal calendar (FSCCAL)

Specifies the name of the fiscal year calendar that you want to use with the job specified for the Job (JOB) parameter. Fiscal year calendars are made up of 12 or 13 periods with starting and ending dates for each period.

*JOBCTL
The value specified for fiscal calendar in the job controls is used for this job.
*NONE
There is not a fiscal calendar for this job.
name
Specify the name of the user-defined fiscal year calendar that you want to use for this job.

Days (DAY)

Specifies the days that you want this job to process. Days are used with the *DAILY and *MINUTES schedule codes or job groups with a sequence number greater than 1.

You can enter multiple values for this parameter.

*ALL
The job runs on all days.
*MON
The job is scheduled to run on Monday.
*TUE
The job is scheduled to run on Tuesday.
*WED
The job is scheduled to run on Wednesday.
*THU
The job is scheduled to run on Thursday.
*FRI
The job is scheduled to run on Friday.
*SAT
The job is scheduled to run on Saturday.
*SUN
The job is scheduled to run on Sunday.

Single day (SNGDAY)

Specifies the day of the week that you want this job to process. Day of the week is used with the *FIRST, *SECOND, *THIRD, *FOURTH, *FIFTH and *LAST schedule codes.

Note: *SUN is the default day of the week when you specify *FIRST, *SECOND, *THIRD, *FOURTH, *FIFTH or *LAST.

*SUN
The job is scheduled to run on Sunday.
*MON
The job is scheduled to run on Monday.
*TUE
The job is scheduled to run on Tuesday.
*WED
The job is scheduled to run on Wednesday.
*THU
The job is scheduled to run on Thursday.
*FRI
The job is scheduled to run on Friday.
*SAT
The job is scheduled to run on Saturday.

Interval (ITVDAY)

Specifies the number of days that you want to use as an interval with the *NUMDAY schedule code. This field is required with the *NUMDAY schedule code.

1-99
Specify the number of days between submissions of the job.

Dates of the year (DATE)

Specifies the dates that a job is scheduled to be processed. Dates are entered in month, day (MMDD) format or (DDMM) format depending on the system value. The DATE parameter is required when the Schedule code (SCDCDE) parameter has the value *DATE.

You can enter multiple values for this parameter.

date
Specify a date that a job is to be submitted.

Single date (SNGDATE)

Specifies the date that a job is scheduled to be processed. Dates are entered in month, day (MMDD) format or (DDMM) format depending on the system format. The SNGDATE parameter is used when the Schedule code (SCDCDE) parameter contains *ONCE.

*NEXT
The job is to be processed at the next scheduled time.
date
Specify the single date that the job is to be submitted.

Save (SAVE)

Specifies whether this job is to be saved after it has run. The SAVE parameter is used with the *ONCE schedule code.

*YES
The job is to be saved in IBM Advanced Job Scheduler for i after it has run.
*NO
The job is to be deleted by IBM Advanced Job Scheduler for i after it has run.

Day of the month (DAYMONTH)

Specifies the days of the month that you want this job to process. Days of the month are used with the *DAY schedule code.

You can specify 13 values for this parameter.

1-31
Specify the day of the month that you the job to be processed.

Working days (WRKDAY)

Specifies whether the days specified for the Day of the month (DAYMONTH) parameter or Interval (ITVDAY) parameter are working days. Working days are used with the *DAY and *NUMDAY schedule codes respectively. For instance, when using the *DAY schedule code, if you specified DAYMONTH(05 10) and WRKDAY(*YES), the job would run on the fifth and tenth working day of each month. If you had specified *NO, the job would run each fifth and tenth calendar day of the month. Working days are specified in the system controls.

If you were using the *NUMDAY schedule code, the interval that you select would be based on working days or calendar days, depending on your selection in the WRKDAY parameter.

*NO
Do not use working days in conjunction with the DAYMONTH or INTERVAL parameter respectively.
*YES
Use working days in conjunction with the DAYMONTH or INTERVAL parameter respectively.

Fiscal period (FSCPERIOD)

Specifies the periods within a fiscal year for the job. Periods are used when a fiscal calendar name is specified for the Fiscal calendar (FSCCAL) parameter.

Single values

*ALL
All periods are to be included for the job.

Other values (up to 13 repetitions)

1-13
Specify the fiscal periods that you want to include for the job.

Text (TEXT)

Specifies the text related to the job.

*NONE
The job does not have any text description associated with it.
character-value
Specify the text description associated with the job.

Command request (CMD)

Specifies the command that you want to process in this job. You can specify a command, a call to a program or pass parameters to a called program. Commands are checked for validity and parameters are validated against the IBM Advanced Job Scheduler for i parameter file. Object existence is not checked on added or changed jobs.

command-string
Specify the command to be run.

Remote location name (RMTLOCNAME)

Specifies the location and network identification of the system on which to run the job.

Note: A value specified for the RMTLOCNAME parameter will be ignored when used with schedule code *ALTERNATE.

*JOBCTL
Use the remote location name specified in the job controls.
*LCL
Run the job on the local IBM i.
remote-location-name
Specify the name of the remote location associated with the system on which to run the job.
network-ID.remote-location-name
Specify the network identifier and the name of the remote location associated with the system. Specify these values using the format nnnnnnnn.cccccccc where nnnnnnnn is the network identifier and cccccccc is the remote location name.

Schedule range (RANGE)

Specifies the starting and ending time and date range for the job.

Note: If you are using the *MINUTES schedule code, the Beginning time value is used in conjunction with the Ending time. The *MINUTES schedule code is the only schedule code that uses these two values to indicate when a job starts and stops.

Element 1: Start time and date

Element 1: Beginning time

*NONE
No beginning time is specified for the job.
0-2400
Specify the beginning time for the job in hour, minute (HHMM) format.

Element 2: Beginning date

*NONE
There is not a beginning date specified for this job.
character-value
Specify the beginning date for this job in job format.

Element 2: End time and date

Element 1: Ending time

*NONE
There is not an ending time specified for this job.
0-2400
Specify the ending time for this job in hour, minute (HHMM) format.

Element 2: Ending date

*NONE
There is not an ending date specified for this job.
character-value
Specify the ending date for this job in job format.

Maximum run time (MAXRUN)

Specifies the maximum run duration in minutes for the job.

Note: A value specified for the MAXRUN prompt will be ignored when used with schedule code *ALTERNATE.

*NOMAX
There is no maximum duration for the job.
1-9999
Specify the number of minutes that is the maximum duration for this job. After this number of minutes has passed, IBM Advanced Job Scheduler for i will end the job whether it has completed or not.

Notification normal (PGRRCPNORM)

Specifies the notification recipient who is to receive normal completion messages for the job that you are adding or changing. This field is used in conjunction with the notification command.

Note: SMTP information must be specified before this feature may be used with the Send Distribution using JS (SNDDSTJS) command.

Note: The values that you specify for Notification recipient normal and Notification message are the substitution variables used for the &RCP and &MSGTXT variables respectively in the CHGNFYJS command.

You can specify the notification message that you want to send to the specified recipient when the job completes normally.

Single values

*NONE
No notification recipient is assigned to receive messages when this job completes normally.

Element 1: Notification recipient

*JOBCTL
You are using the notification recipient specified in the job controls.
*ONCALL
Only recipients that are on-call will receive the message.
name
Specify the name of a recipient who is to receive messages from the job when it completes normally.

Element 2: Notification message

*JOBCTL
The notification recipient is sent the notification message from the job controls.
*COMP
The completion status of the job is sent.
character-value
Specify the notification message that you want to send to the notification recipient when this job completes normally.

Notification abnormal (PGRRCPABN)

Specifies the notification recipient who is to receive abnormal completion messages for the job that you are adding or changing. This field is used in conjunction with the notification command.

Note: SMTP information must be specified before this feature may be used with the Send Distribution using JS (SNDDSTJS) command.

Note: The values that you specify for Notification recipient abnormal and Notification message are the substitution variables used for the &RCP and &MSGTXT variables respectively in the CHGNFYJS command.

You can specify the notification message that you want to send to the specified recipient when the job completes abnormally.

Single values

*NONE
No notification recipient is assigned to receive messages when this job completes abnormally.

Element 1: Notification recipient

*JOBCTL
You are using the notification recipient specified in the job controls.
*ONCALL
Only recipients that are on-call will receive the message.
name
Specify the name of a recipient who is to receive messages from the job when it completes abnormally.

Element 2: Notification message

*JOBCTL
The notification recipient is sent the notification message from the job controls.
*COMP
The completion status of the job is sent.
character-value
Specify the notification message that you want to send to the notification recipient when this job completes abnormally.

Notification start job (PGRRCPSTR)

Specifies the notification recipient who is to receive notification for the job that you are adding or changing if the job does not start within the limit after it has been submitted. This field is used in conjunction with the notification command.

Note: SMTP information must be specified before this feature may be used with the Send Distribution using JS (SNDDSTJS) command.

Note: The values that you specify for Notification recipient start job is the substitution variable used for the &RCP variable in the CHGNFYJS command. The &MSGTXT will be replaced with message IJS6059.

You can specify the start limit in minutes. This is the amount of time a job can be sitting on the job queue before a notification is issued.

Single values

*NONE
No notification recipient is assigned to receive messages when this job exceeds the start limit.

Element 1: Notification recipient

*JOBCTL
You are using the notification recipient specified in the job controls.
*ONCALL
Only recipients that are on-call will receive the message.
name
Specify the name of a recipient who is to receive messages if the job does not start within the limit after the job has been submitted.

Element 2: Start limit

*JOBCTL
The start limit in the job controls is used.
1-999
Specify the number of minutes that a job can be sitting on the job queue before a notification is issued.

Notification error message (PGRRCPERR)

Specifies the notification recipient who is to receive error messages for the job that you are adding or changing. Notification will occur when the job is waiting on an inquiry message and when error messages are received after processing a command for the job. This field is used in conjunction with the notification command.

Note: Error notification is not performed for jobs running on a remote system.

Note: SMTP information must be specified before this feature may be used with the Send Distribution using JS (SNDDSTJS) command.

Note: The values that you specify for the recipient and the message are the substitution variables used for the &RCP and &MSGTXT variables respectively in the CHGNFYJS command.

You can specify the notification message that you want to send to the specified recipient when the job encounters an error message.

Single values

*NONE
No notification recipient is assigned to receive error messages.

Element 1: Notification recipient

*JOBCTL
You are using the notification recipient specified in the job controls.
*ONCALL
Only recipients that are on-call will receive the message.
name
Specify the name of a recipient who is to receive error messages.

Element 2: Notification message

*JOBCTL
The notification recipient is sent the notification message from the job controls.
*ERRMSG
The actual error message is sent.
*JOBLOG
The job log of the job is sent in the body of the email message. This can only be used inconjuction with the Send Distribution using JS (SNDDSTJS) command.
character-value
Specify the notification message that you want to send to the notification recipient when this job encounters an error message.

Alternate job (ALTJOB)

Specifies the name of the alternate job for the job that you are adding. Alternate jobs only run when a regular job terminates abnormally. Jobs are not required to have alternate jobs. If you want to select a job from a job list when prompting this command, place the cursor on this parameter and press F4.

You can also specify a group and group sequence if the alternate job is a member of a group.

Single values

*NONE
The job does not have an alternate job.

Element 1: Job

name
Specify the name of the job that you want to be the alternate job for this job.

Element 2: Group

*NONE
The alternate job does not have an alternate group.
name
Specify the name of the group associated with the alternate job for this job.

Element 3: Group sequence

*NONE
The alternate job does not have a sequence number assigned.
1-99
Specify the sequence number assigned to the alternate job.

Report distribution ID (RPTDSTID)

Specifies the report distribution ID that is used to distribute the reports generated as a result of processing the job.

*NONE
The job does not have a report distribution ID.
name
Specify the report distribution ID that you want to associate with this job.

Recovery action (RCYACN)

Specifies the recovery action to be taken if the job cannot be submitted at the designated time because the system is powered down or in restricted state. The action specified on the parameter occurs at the next IPL or when the IBM Advanced Job Scheduler for i system becomes active.

Jobs submitted during IPL or when the system comes out of restricted state are submitted in the same order that they would have been had the jobs been submitted at the times specified in the job schedule entries. If multiple occurrences of a recurring job are missed, the job is submitted only once. The first missed occurrence of the job is calculated from the current date.

Since the scheduler portion of IPL need not be complete for the IPL of the system to be complete, other jobs may start on the system before all of the jobs have been submitted.

This parameter does not apply when a job is released after being held at the to be submitted.

Note: A value specified for the RCYACN parameter will be ignored when used with schedule code *ALTERNATE or *NONE.

*JOBCTL
The job uses the recovery action specified in the job controls.
*SBMRLS
The job is submitted in release state (RLS).
*SBMHLD
The job is submitted in the held state (HLD).
*NOSBM
The job is not submitted.

Specifying *NOSBM affects only missed occurrences of the job. If the job schedule entry is a recurring job, future occurrences are not affected.

Job description (JOBD)

Specifies the job description to be used with this job.

Single values

*JOBCTL
The job description specified in the job controls is used for this job.
*USRPRF
The job description in the user profile under which the submitted job runs is used as the job description of the submitted job.

Qualifier 1: Job description

name
Specify the name of the job description used for the job.

Qualifier 2: Library

*LIBL
The library list is used to locate the job description.
*CURLIB
The current library for the job is used to locate the job description. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the job description is located.

Job queue (JOBQ)

Specifies the job queue in which this job is to be placed.

Single values

*JOBCTL
The job queue specified in the job controls is used for this job.
*JOBD
The submitted job is placed on the job queue named in the specified job description.

Qualifier 1: Job queue

name
Specify the name of the job queue on which the submitted job is placed.

Qualifier 2: Library

*LIBL
The library list is used to locate the job queue.
*CURLIB
The current library for the job is used to locate the job queue. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the job queue is located.

Job priority (on JOBQ) (JOBPTY)

Specifies the job queue scheduling priority. Valid values range from 1 through 9, where 1 is the highest priority and 9 is the lowest priority.

*JOBCTL
The scheduling default specified in the job controls is used for the job.
*JOBD
The scheduling priority specified in the job description is used for the job.
1-9
Specify a value for the scheduling priority for the job.

Output priority (on OUTQ) (OUTPTY)

Specifies the output queue priority for spooled output files that are produced by this job. Valid values range from 1 through 9, where 1 is the highest priority and 9 is the lowest priority.

*JOBCTL
The output priority default specified in the job controls is used for the job.
*JOBD
The output priority specified in the job description is used for the job.
1-9
Specify a value for the output priority for the job.

Print device (PRTDEV)

Specifies the qualified name of the default printer device for this job.

*JOBCTL
The printer specified in the job controls is used by the job as the printer device.
*CURRENT
The same printer device being used by the job that is currently running is used for this job.
*USRPRF
The printer device specified in the user profile where the submitted job runs is used as the printer device for this job. The printer device name is obtained from the profile when this job is submitted.
*SYSVAL
The printer device specified in the system value, QPRTDEV, when this job is submitted is used.
*JOBD
The printer device specified in the job description is used for the submitted job.
name
Specify the name of the printer device used for the submitted job.

Output queue (OUTQ)

Specifies the output queue to be used for spooled output produced by the job. This parameter only applies to spooled printer files that specify *JOB for the output queue.

Single values

*JOBCTL
The output queue specified in the job controls is used as the job's output queue.
*USRPRF
The output queue in the user profile where the submitted job runs is used as the output queue for this job.
*DEV
The output queue associated with the printer device for the spooled file is used.
*JOBD
The output queue named in the job description used with the submitted job is the job's default output queue.

Qualifier 1: Output queue

name
Specify the name of the output queue to be used as the default output queue by the submitted

Qualifier 2: Library

*LIBL
The library list is used to locate the output queue.
*CURLIB
The current library for the job is used to locate the output queue. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the output queue is located.

User (USER)

Specifies the name of the user profile for the job being submitted. If *RQD is specified in the job description, *JOBD cannot be specified; a user name must be specified instead.

Note: The following IBM-supplied objects are not valid on this parameter:

*JOBCTL
The user profile specified in the job controls is used for the job being submitted.
*CURRENT
The same user profile used by the job that is currently running is used for the submitted job.
*JOBD
The user profile named in the specified job description is used for the job being submitted.
name
Specify the name of the user profile that is used for the job being submitted. You must be authorized to the user profile; the user profile must be authorized to the job description.

Print text (PRTTXT)

Specifies up to 30 characters of text that is printed at the bottom of each page of printed output and on separator pages.

*JOBCTL
The value in the job controls is used for this job.
*JOBD
The value in the job description is used for this job.
*SYSVAL
The system value, QPRTTXT, is used for this job.
*BLANK
No text is printed.
character-value
Specify the character string that is printed at the bottom of each page. A maximum of 30 characters can be entered, enclosed in apostrophes. The text on the listing will be centered in the same way it is entered.

Routing data (RTGDTA)

Specifies the routing data used to start the first routing step in the job. The routing data is used to determine the routing entry that identifies the program that the job runs.

*JOBCTL
The value in the job controls for routing data is used for this job.
*JOBD
The routing data specified in the job description is used to start the routing steps.
character-value
Specify the character string that is used as routing data for the job. A maximum of 80 characters can be entered, enclosed in apostrophes if necessary.

Current library (CURLIB)

Specifies the name of the current library associated with the job being run.

*JOBCTL
The current library specified in the job controls is used for the job being submitted.
*USRPRF
The current library in the user profile where the submitted job runs is used as the current library for the submitted job.
*CRTDFT
There is no current library for the submitted job. If objects are created in the current library, QGPL is used as the default current library.
name
Specify the name of a library used as the current library of the submitted job.

Library list (LIBL)

Specifies the name of the library list that is used to search for any operating system object names that were specified without a library qualifier. If you want to select a library list from a list when prompting this command, place the cursor on this parameter and press F4.

*JOBCTL
The library list specified in the job controls is used for the job being submitted.
*JOBD
The library list in the job description used with this job is used as the initial user part of the library list for the job.
*SYSVAL
The system default user library list is used by this job. It contains the library names that were specified in the system value, QUSRLIBL, at the time that the job is started.
*NONE
The user portion of the initial library list for this job will be empty.
name
Specify the name of the library list that you want to use for this job.

Message logging (LOG)

Specifies the message logging values used to determine the amount and type of information sent to the job log by this job. This parameter has three elements: the message (or logging) level, the message severity, and the level of message text. If no values are specified on this parameter, the values specified in the job description associated with this job are used.

Element 1: Level

*JOBCTL
The value specified in the job controls for logging is used for this job.
*JOBD
The value specified for message logging in the job description is used for this job.
0-4
Specify a value for the message logging level to be used for this job's messages. The possible logging levels are:
0
No data is logged.
1
The following information is logged: All messages sent to the job's external message queue with a severity level greater than or equal to the message severity specified (this includes the indications of job start, job end and job completion status).
2
The following information is logged:
  • Logging level 1 information.
  • Requests or commands being logged from a CL program for which messages are issued with a severity code greater than or equal to the severity level specified.
  • All messages associated with a request, or commands being logged from a CL program, that results in a high-level message with a severity level greater than or equal to the severity specified.
3
The following information is logged:
  • Logging level 1 information.
  • All requests or commands being logged from a CL program.
  • All messages associated with a request, or commands being logged from a CL program, that results in a high-level message with a severity level greater than or equal to the severity specified.
4
The following information is logged; All requests or commands being logged from a CL program and all messages with a severity code greater than or equal to the severity specified, including trace messages.

Note: A high-level message is one that is sent to the program message queue of the program that received the request or commands being logged from a CL program.

Element 2: Severity

*JOBCTL
The value specified in the job controls for message severity is used for this job.
*JOBD
The value specified for message logging in the job description is used for this job.
0-99
Specify the lowest severity level that causes an error message to be logged in the job's log.

Element 3: Text

*JOBCTL
The value specified in the job controls for message text is used for this job.
*JOBD
The value specified for message logging in the job description is used for this job.
*MSG
Only message text is written to the job's log or shown to the user.
*SECLVL
Both the message text and message help of the error message is written to the job's log or shown to the user.
*NOLIST
No job log is produced if the job completes normally. If the job ends abnormally (if the end of job code is 20 or higher), a job log is produced. The messages appearing in the job's log contain both message text and help text.

Log CL program commands (LOGCLPGM)

Specifies whether the commands that are run in a control language program are logged to the job log by way of the CL program's message queue. This parameter sets the status of the job's logging flag. If *JOB has been specified for the LOG parameter on the Create CL Program (CRTCLPGM) command, the value specified for this parameter is used. Other values for the LOG parameter override the value specified for this parameter. The commands are logged in the same manner as the requests.

*JOBCTL
The value in the job controls is used for this job.
*JOBD
The value specified in the job description is used.
*YES
The commands in a CL program are logged to the job log.
*NO
The commands in a CL program are not logged to the job log.

Inquiry message reply (INQMSGRPY)

Specifies the way that predefined messages that are sent as a result of running this job are answered. You can specify that no change is made in the way that predefined messages are answered, or that all inquiry messages require a reply, or that a default reply is issued, or that the system reply list is checked for a matching reply as each predefined inquiry message is sent.

*JOBCTL
The value in the job controls for inquiry message reply is used for this job.
*JOBD
The inquiry message reply control specified in the job description used with this job is used.
*RQD
A reply is required by the receiver of the inquiry message for all inquiry messages that occur when this command is run.
*DFT
The default message reply is used to answer any inquiry messages that occur when this command is run.
*SYSRPYL
The system reply list is checked to see if there is an entry for any inquiry message that is issued as a result of running this job that has a message identifier and any comparison data that match the inquiry message identifier and message data. If a match occurs, the reply value in that entry is used. If no entry exists for that message, a reply is required.

Hold on job queue (HOLD)

Specifies whether this job is held at the time that it is put on the job queue. A job placed on the job queue in the hold state is held until it is released by the Release Job (RLSJOB) command or ended, either by the End Job (ENDJOB) command or by the Clear Job Queue (CLRJOBQ) command.

*JOBCTL
The value in the job controls for hold on job queue is used for this job.
*JOBD
The value specified in the job description determines whether the job is held when it is put on the job queue.
*YES
The job is held when it is put on the job queue until it is released by a Release Job (RLSJOB) command or ended by an End Job (ENDJOB) command.
*NO
The job is not held when it is put on the job queue.

Job switches (SWS)

Specifies the first settings for a group of eight job switches used with this job. These switches can be set or tested in a CL program and used to control the flow of the program. Only 0's (off) and 1's (on) can be specified in the 8-digit character string.

*JOBCTL
The value in the job controls for job switches is used for this job.
*JOBD
The value specified in the job description is the first setting for the job's switches.
character-value
Specify any combination of eight zeros and ones that is used as the first switch setting for the submitted job.

Message queue (MSGQ)

Specifies the name of the message queue to which a completion message is sent when the submitted job has completed running, either normally or abnormally. If an abnormal ending occurs, the help information for the completion message specifies the possible causes.

Single values

*JOBCTL
The value in the job controls for message queue is used for this job.
*USRPRF
A completion message is sent to the message queue specified in the user profile of the submitter.
*NONE
No completion message is sent.

Qualifier 1: Message queue

name
Specify the name of the message queue to which the completion message is to be sent.

Qualifier 2: Library

*LIBL
The library list is used to locate the message queue.
*CURLIB
The current library for the job is used to locate the message queue. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the message queue is located.

Accounting code (ACGCDE)

Specifies the accounting code that is used when logging system resource use for jobs that use this description.

*JOBCTL
The accounting code for jobs using this description is obtained from the job controls.
*JOBD
The accounting code for jobs using this description is obtained from the job description.
*USRPRF
The accounting code for jobs using this description is obtained from the user profile associated with the job.
*BLANK
An accounting code of 15 blanks is assigned to jobs that use this description.
character-value
Specify the accounting code that you want to use for jobs using this description.

Run priority (RUNPTY)

Specifies the run priority for the job. Run priority is a value ranging from 1 (highest priority) through 99 (lowest priority), that represents the importance of the job when it competes with other jobs for machine resources. This value represents the relative (not absolute) importance of the job. If the job is rerouted, this value is reset according to the job's importance within the job class.

*JOBCTL
The run priority is obtained from the job controls.
*NOCHG
The run priority is not changed when job processing starts.
01-99
Specify the run priority to be used.

Initial ASP group (INLASPGRP)

Specifies the initial setting for the auxiliary storage pool (ASP) group name for the initial thread of the submitted job. A thread can use the Set ASP Group (SETASPGRP) command to change its library name space. When an ASP group is associated with a thread, all libraries in the independent ASPs in the ASP group are accessible and objects in those libraries can be referenced using regular library-qualified object name syntax. The libraries in the independent ASPs in the specified ASP group plus the libraries in the system ASP (ASP number 1) and basic user ASPs (ASP numbers 2-32) form the library name space for the thread.

*JOBCTL
The initial ASP group is obtained from the job controls.
*CURRENT
The ASP group name for the current thread is used for the submitted job.
*JOBD
The initial ASP group name specified in the job description is used for the submitted job.
*NONE
Specifies the initial thread of the submitted job will be started with no ASP group. The library name space will not include libraries from any ASP group. Only the libraries in the system ASP and any basic user ASPs will be in the library name space.
name
Specify the name of the ASP group to be set for the initial thread of the submitted job. The ASP group name is the name of the primary ASP device within the ASP group. All libraries from all ASPs in this ASP group will be included in the library name space.

Additional commands (ADLCMD)

Specifies additional commands that you want to process in this job. You can specify a command, a call to a program or pass parameters to a called program. Commands are checked for validity and parameters are validated against the IBM Advanced Job Scheduler for i parameter file. Object existence is not checked on added or changed jobs.

You can specify 4 values for this parameter.

character-value
Specify the additional command to be run.

Examples

Example 1: Adding a Job

ADDJOBJS   JOB(JOB01)  TIME(1000)

This command adds a job to the job schedule. In this example, job JOB01 is being added to the job schedule and is scheduled to run at 10:00 a.m.. Note that the default schedule code for this job is *DAILY and the DAY parameter is *ALL.

Example 2: Adding a Job with a *CALENDAR schedule code

ADDJOBJS   JOB(JOB02) SCDCDE(*CALENDAR)  CAL(CAL)
           TIME(1100)  CMD(WRKACTJOB)

This command adds the job JOB02 to the job scheduler. The job is scheduled to run at 11:00 a.m. using an *CALENDAR schedule and a calendar called CAL. When the job runs it processes the WRKACTJOB command.

Error messages

Unknown