Start Group using JS (STRGRPJS)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Start Group using Job Scheduler (STRGRPJS) command allows you to start a job group. The group will start with the first job you specify and submit all jobs that follow the job. For instance, if a group contains 10 jobs, and you specify sequence number 5 for the Job (JOB) parameter, then jobs 5 through 10 will be submitted as a result of the STRGRPJS command. If you want to process the entire group, you should specify the name of the job that has sequence number 1. You can specify the submission time and parameter data associated with the group.

Top

Parameters

Keyword Description Choices Notes
JOB Job entry Element list Required, Key, Positional 1
Element 1: Job Name
Element 2: Group Name
Element 3: Group sequence 1-99
TIME Submit time *SCHED, *IMMED Optional, Positional 2
DAY Based on day of week *CURRENT, *DATE, *MON, *TUE, *WED, *THU, *FRI, *SAT, *SUN Optional
DATE Based on date Character value, *CURRENT Optional
PARM Parameters Single values: *NONE
Other values (up to 50 repetitions): Element list
Optional
Element 1: Parameter name Name
Element 2: Parameter data Character value
Top

Job entry (JOB)

Specifies the name of the job, the group of which the job is a member and the sequence of the job within the group. You must specify all elements of the parameter.

This is a required parameter.

Element 1: Job

name
Specify the name of the job in the group that you want to submit.

Element 2: Group

name
Specify the name of the group that you are starting.

Element 3: Group sequence

1-99
Specify the sequence number of the job in the group that you want to start processing.
Top

Submit time (TIME)

Specifies the time that you want this group to be submitted. A group can be submitted immediately or at the next scheduled time.

*SCHED
The group is to be submitted by IBM Advanced Job Scheduler for i at the next scheduled time.
*IMMED
The group is submitted immediately. This is the default for a sequence number greater than 1.
Top

Based on day of week (DAY)

Specifies the day of the week that you want to base the running of the group jobs. For instance, if *MON is specified, the only group jobs that will run after the initial job will be those that contain *MON in the list of days of the week to process.

*CURRENT
The day of the week is based on the current day.
*DATE
Use a specific date for base the running of the group jobs.
*MON
The group run is based on Monday.
*TUE
The group run is based on Tuesday.
*WED
The group run is based on Wednesday.
*THU
The group run is based on Thursday.
*FRI
The group run is based on Friday.
*SAT
The group run is based on Saturday.
*SUN
The group run is based on Sunday.
Top

Based on date (DATE)

Specifies the date that you want to base the running of the group jobs. For instance, if Monday December 21, 2009 is specified, the only group jobs that will run after the initial job will be those that contain *MON in the list of days of the week to process or those that use a predefined schedule and December 21, 2009 would be calculated from the predefined schedule.

*CURRENT
The current date is used to base the running of the group jobs.
date
Specify the date in job format with or without date separators, such as 12/01/09 or 120109, that you want to base the running of group jobs.
Top

Parameters (PARM)

Specifies the name of the parameter that you want to use for the submitted group. Parameters that you specify must be defined in IBM Advanced Job Scheduler for i .

Any character is valid for entry into this field. Validity will be checked to the extent of the use of the parameter within your programs or of the IBM Advanced Job Scheduler for i job when submitted. The number of characters in the parameter data should correspond with the length placed in the Parameter lengthfield when the parameter was added to IBM Advanced Job Scheduler for i . Data entered in shorter length than the Parameter lengthfield will pass data padded with blanks to the length of the parameter. Leading blanks and embedded blanks will be passed to the parameter in your request data exactly as keyed. Apostrophes ( ' ) used in parameter data must appear in pairs to be valid. If only one apostrophe is used, the parameter will be rejected with the error "Quotes ('') in Parameter Data Must Appear In Pairs". You must correct this error before continuing.

Single values

*NONE
The group that you are submitting does require any parameters entered here.

Other values (up to 50 repetitions)

Element 1: Parameter name

name
Specify the parameter that you want to use with this group.

Element 2: Parameter data

character-value
Specify the parameter data for the parameter.
Top

Examples

STRGRPJS   JOB(JOB02 APDAILY 20)  TIME(*IMMED)

This command starts a group called APDAILY immediately, starting with the job sequence number 20.

Top

Error messages

Unknown
Top