‎2006 May 23 8:14 AM
i want some info how to set multiple jobs simultaneously.
i have one pgm which is taking much time in prod.
infact that pgm updates one table and picks from that table and sends to FTP file.
i have splitted those table updates into 4 parts , i mean i have taken 4 pgms to do this.
am splitting the table values into 4 parts and updating from these 4 pgms.
now i am calling the 4 pgms in background using submit.
now can reduce the half-of the time.
fine with this but i want to still reduce the time.
i want to schedule these 4 pgms simultaneously in background so that all the values will update at a time and can reduce the time
‎2006 May 23 8:34 AM
Hi srini,
you may program these jobs based upon an event. You should do this:
- with transaction sm62: define a custom event
- with transaction sm36: define these 4 jobs, based upon this event you've just created
- with transaction sm64: trigger the event
Alternatively, function modules 'JOB*' (and specially 'JOB_CLOSE' with parameter EVENT_ID) allow you to simulate transaction sm36.
I hope this helps. Best regards,
Alvaro
‎2006 May 23 8:34 AM
Hi srini,
you may program these jobs based upon an event. You should do this:
- with transaction sm62: define a custom event
- with transaction sm36: define these 4 jobs, based upon this event you've just created
- with transaction sm64: trigger the event
Alternatively, function modules 'JOB*' (and specially 'JOB_CLOSE' with parameter EVENT_ID) allow you to simulate transaction sm36.
I hope this helps. Best regards,
Alvaro
‎2006 May 23 8:35 AM
this is what i have been doing. thank in advance
JOBNAME = 'TEST_FLEX_1'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
JOBNAME = JOBNAME
SDLSTRTDT = SY-DATUM
SDLSTRTTM = NO_TIME
JOBCLASS = 'C'
IMPORTING
JOBCOUNT = JOBNUMBER
EXCEPTIONS
CANT_CREATE_JOB = 01
INVALID_JOB_DATA = 02
JOBNAME_MISSING = 03
OTHERS = 99 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF SY-SUBRC = 0 .
SUBMIT ZTESTPGM1 AND RETURN
USER SY-UNAME
VIA JOB JOBNAME NUMBER JOBNUMBER
WITH selection-table seltab.
SUBMIT ZTESTPGM_2 AND RETURN
USER SY-UNAME
VIA JOB JOBNAME NUMBER JOBNUMBER
WITH selection-table seltab.
SUBMIT ZTESTPGM_3 AND RETURN
USER SY-UNAME
VIA JOB JOBNAME NUMBER JOBNUMBER
WITH selection-table seltab.
SUBMIT ZTESTPGM_4 AND RETURN
USER SY-UNAME
VIA JOB JOBNAME NUMBER JOBNUMBER
WITH selection-table seltab.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
AT_OPMODE = ' '
AT_OPMODE_PERIODIC = ' '
CALENDAR_ID = ' '
EVENT_ID = ' '
EVENT_PARAM = ' '
EVENT_PERIODIC = ' '
JOBCOUNT = JOBNUMBER
JOBNAME = JOBNAME
LASTSTRTDT = NO_DATE
LASTSTRTTM = NO_TIME
PRDDAYS = 0
PRDHOURS = 0
PRDMINS = 0
PRDMONTHS = 0
PRDWEEKS = 0
PREDJOB_CHECKSTAT = ' '
PRED_JOBCOUNT = ' '
PRED_JOBNAME = ' '
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
STRTIMMED = 'X'
TARGETSYSTEM = ' '
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
START_ON_WORKDAY_NR = 0
WORKDAY_COUNT_DIRECTION = 0
RECIPIENT_OBJ =
TARGETSERVER = ' '
DONT_RELEASE = ' '
DIRECT_START =
IMPORTING
JOB_WAS_RELEASED = JOB_RELEASED
CHANGING
RET =
EXCEPTIONS
CANT_START_IMMEDIATE = 01
INVALID_STARTDATE = 01
JOBNAME_MISSING = 02
JOB_CLOSE_FAILED = 03
JOB_NOSTEPS = 04
JOB_NOTEX = 05
LOCK_FAILED = 06
OTHERS = 99
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2006 May 23 9:19 AM