SCHEDULING WITH STREAMX ----------------------- With the launch of version 2.5 from VESOFT of it’s MPEX, SECURITY and VEAUDIT software comes a wealth of new features. MPEX is now POSIX compatible ready for users going to MPE 5.0. SECURITY now incorporates abbreviated HELLOs, and LOGON security now no longer relies on LOGON UDCs. VEAUDIT has been enhanced to operate on volume sets and report on POSIX file problems for 5.0 users. A new ace in the VESOFT pack is it’s implementation of scheduling keywords in commands such as STREAM (via STREAMX), ALARM and SCHEDULE. With these keywords tasks such as STREAMing a job every Tuesday to aviod having a permanent job in the scheduled jobs queue, or re-arming ALARMs every 9AM to tell users its OK to log in, are a thing of the past. VESOFT’s scheduling is an enhancement to MPE’s scheduling keywords ;IN, ;AT, ;DAY and ;DATE by adding new keywords ;WHEN, ;REPEAT and ;WHENEVER. The ;WHEN keyword allows the user to schedule a job, command or alarm when a condition becomes true. The other new keywords are for ‘repetitive’ schedules instead of ‘once only’ schedules. The ;REPEAT keyword allows the user to specify which days a job, command or alarm is to be repeated upon. The keyword takes a day/day list or shorthand day list such as ‘WEEKDAY’ or ‘DAILY’. The ;WHENEVER keyword allows a user to schedule a job, command or alarm whenever an event becomes true. This keyword adds great sophistication to the seemingly simple MPE scheduler. Right, lets have some examples: %STREAM FULLBKUP.JCL.SYS;AT=11:00PM;REPEAT=WEEKDAYS Schedules the jcl FULLBKUP.JCL.SYS to be streamed at 11PM Monday to Friday %SCHEDULE “AT=2:00AM;REPEAT=DAILY”,“EDITPRG,MANAGER.SYS”,YESPURGE K#######.@.@ Schedules a YESPURGE of EDITOR K files for 2AM every day %ALARM “”,“The system will be down at 4.30 on Fridays”;AT=9AM;REPEAT=FRI Schedules an ALARM for 9AM Fridays informing users to log out at 4.30PM %SCHEDULE “WHENEVER=FEXISTS(‘LABELS.PUB.SYS’)”,“LABELPRT,MANAGER.SYS”,PRINT LABELS;OUT=(LAZER;DEV=104,13,1) Schedules a task to print out labels to the LAZER printer whenever the file LABELS.PUB.SYS exists %STREAM SLIPPRNT.JCL.WAGES;WHENEVER=HPDAY=2 AND BETWEEN(HPDATE,15,21) AND HPHOUR=14 AND HPMINUTE=0 Streams the WAGESLIP printout job for the 3rd Monday of the month at 2PM %ALARM “JSCOUNT(‘@.@&ONLINE-LDEV=20’)>0”,“Please log off, Thank you.”; WHENEVER(HPMINUTE MOD 5)=0 AND (BETWEEN(HPDAY,2,6)) AND HPHOUR = 17 Schedules an alarm asking users except Ldev 20, to log off. This alarm is scheduled to run every 5 minutes between 5 and 6PM Monday to Friday, unless everyone logs out %SCHEDULE “AT=8AM;REPEAT=SUN,SAT”,“SETUP,OPERATOR.SYS”,MANY *OUTFENCE 5 *LIMIT 4,36 Schedules a MANY in OPERATOR.SYS for Saturday and Sunday at 8AM to drop the outfence and up the limits ready for weekend users %ALARM “9.00AM”,“Reminder: Managers meeting in the conference room”;WHENEVER=HPDATE=1 AND HPMONTH MOD 2 = 0 Schedules an ALARM for 9AM at the beginning of every even month (2,4,6,8,10,12) to remind you about a meeting %SCHEDULE “WHENEVER=(HPMINUTE MOD 15)=0”,“STDPRINT,MANAGER.SYS”,ALTSPOOLFILE $STDLIST.@.@;DEV=LP2;PRI=14 Schedules every 15 minutes an ALTSPOOLFILE to print any $STDLIST’s on device LP2 at a priority of 14 %STREAM MNTHENDJ.JCL.SALES;WHENEVER=HPHOUR=0 AND HPMINUTE=0 AND DATEDAY(DATEADD(DATEBUILD(HPYEAR,HPMONTH,1),0,1,-1))=HPDATE Streams the MNTHENDJ JCL for the last day of the month at 12AM %STREAM HOLIDAYS.JCL.SYS;WHENEVER=POS(STRWRITE(TODAY:‘%0Y%0M%0D’) ,‘950101950414950417950501950529950828951225951226’)>1 AND HPHOUR = 0 AND HPMINUTE = 15 Schedules a jcl HOLIDAYS.JCL.SYS to be streamed if the date today matches a date in our table of holidays. Along with the new scheduling features, existing commands have been enhanced to control them. MPEX %LISTJOB and %SHOWJOB have been enhanced to view the new scheduled jobs, %SHOWSCHED is a new command just for that purpose. Usersets have also been enhanced to include a new job state #A to signify a VESOFT scheduled job. Additional information displayed by %SHOWSCHED is the job no for the last time that job ran. This doubles as an added reference tool for jobs that ran months ago!! The %SHOWSCHED command like all VESOFT commands can take a userset. The %SHOWSCHED for the above examples looks like: Last -Days- #A Job Name Submitted By Job# SMTWRFA -Time- 1 FULLBKUP,BATCH.SYS ADE,MANAGER.PROFILE J348 -MTWRF- 11:00P 2 EDITPRG,MANAGER.SYS ADE,MANAGER.PROFILE SMTWRFA 2:00A 3 SLIPPRNT,BATCH.WAGES ADE,MANAGER.PROFILE WHENEVER HPDAY=2 AND BETWEEN(HPDATE,15,21) AND HPHOUR=14 AND HPMINUTE=0 4 SETUP,OPERATOR.SYS ADE,MANAGER.PROFILE S-----A 8:00A 5 STDPRINT,MANAGER.SYS ADE,MANAGER.PROFILE J512 WHENEVER(HPMINUTE MOD 15)=0 6 MNTHENDJ,BATCH.SALES ADE,MANAGER.PROFILE J123 WHENEVER HPHOUR=0 AND HPMINUTE=0 AND DATEDAY(DATEADD(DATEBUILD(HPYEAR,HPMONTH,1),0,1,-1))=HPDATE 7 HOLIDAYJ,BATCH.SYS ADE,MANAGER.PROFILE J90 WHENEVER POS(STRWRITE(TODAY:‘%0Y%0M%0D’),‘950101950414950417950501950529950828951225951226’)>1 AND HPHOUR=0 AND HPMINUTE=15 To remove a schedule from the list %ABORTJOB has been enhanced to operate with the new scheduled jobs i.e. %ABORTJOB #A7 To remove the VESOFT scheduled job numbered 7. The new schedule is incorporated into the background job BACKG. This means that no extra jobs are needed. One nice feature of the scheduler is its ability to ‘catch up’ on itself. When BACKG is re-started after a period of in-activity, any schedules that should of been done in that period are executed. The beauty of VESOFT’s implementation of scheduling is that it works from the command line. This means no more going in and out of packages to add or remove a schedule, they can be done on the fly from the CI!. To create a schedule file, you can simply go into EDITOR and create a file called SCHEDULE holding all your streams with explanations of each i.e. COMMENT ************************************************ COMMENT * OVERNIGHT JOB FOR BACKING UP DAYS FILES COMMENT * TO DAT. COMMENT * COMMENT * JCL = FULLBKUP.JCL.SYS COMMENT * COMMENT * RUN = MONDAY TO FRIDAY AT 11PM COMMENT * COMMENT * STRMS = COMMENT ************************************************ STREAM FULLBKUP.JCL.SYS;AT=11:00PM;REPEAT=WEEKDAY this schedule file can then be executed at any time to update or restart your schedules.