50% found this document useful (2 votes)
1K views4 pages

NetBatch Tutorial

NetBatch is a batch job scheduling program that allows scheduling jobs to run on NonStop servers. The document provides instructions on starting the NetBatch scheduler, initializing it by adding classes and executors, submitting jobs with options like start time and frequency, and controlling jobs using commands. It concludes with shutting down the scheduler when jobs are complete.

Uploaded by

kumar327
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
50% found this document useful (2 votes)
1K views4 pages

NetBatch Tutorial

NetBatch is a batch job scheduling program that allows scheduling jobs to run on NonStop servers. The document provides instructions on starting the NetBatch scheduler, initializing it by adding classes and executors, submitting jobs with options like start time and frequency, and controlling jobs using commands. It concludes with shutting down the scheduler when jobs are complete.

Uploaded by

kumar327
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Home|Tandem|MyTandemResources|NetBatchTutorial

********************************************************************************************

SchedulingJobsforDummies!

(UsingNetBatch)

********************************************************************************************

Contents:

IntroductiontoNetBatch
StartingtheScheduler
Communicatingwiththescheduler
Initializingthescheduler
SubmittingandRunningJobs
JobControlcommand
Windingup

IntroductiontoNetBatch:
=========================
NetBatchisabatchjobschedulingprogramthatallowsyoutoschedule(andrun!)batchjobs.
NonStopserversare(famousforand)usedforOLTPapplicationsbuteveninOLTPenvironmentyou
willhavecertainjobsthatyouneedtodoinbatch,likeprintingannual/monthlyreports,
generatingsystemperformancestatistics,etc.

StartingtheScheduler:
=======================
IssuethefollowingcommandonTACLprompttostartthescheduler.

TACL>NETBATCH/NAME$NBS,NOWAIT,CPU0/SUBVOL!

SUBVOListhesubvolumeonyoursystemwhereyouwantNetBatchtostoreitslogfiles,andabang
(!)
aftersubvolumenameinstructstheschedulertocoldstart(purgeandrecreateallitsfiles).

Thereisnothingspecialaboutthename$NBSyoucangiveanynameyouwishtorunyour
schedulerwith.

Communicatingwiththescheduler:
=================================
BATCHCOMistheutilityusedforcommunicatingwiththeNetBatchscheduler.

TACL>BATCHCOM$NBS

ThiswilldisplaytheBatchcombannerandtheBatchcompromptwhichisaclosingcurlybracket
'}'

Initializingthescheduler:
===========================
YoucanhaveanobeyfilecontainingthecommandsandyoucanobeythefileatBatchcomprompt
like

1>OBEYSUBVOL.NBOBEY

Again,SUBVOL.NBOBEYisonlyarepresentativenameyoucanhaveanyexistingobeyfile'sname.

Or,youcanmanuallyenterallcommandsoneatatimeattheBatchcomprompt.Thecommandsare

ADDSCHEDULER

STARTSCHEDULER
ADDCLASSDEFAULT
ADDEXECUTORE1,CPU0
ADDEXECUTORE2,CPU1
STARTEXECUTOR*
Thismakesyourschedulerreadytoacceptjobsthatyouwanttorun.

ACLASSinNetBatchisacollectionofrelated/unrelatedjobs.AlljobsinNetBatchneedto
belongtoaCLASS.
Hence,youcanmentionaclasstothetimeofsubmittingajob.Ifyoudon't,thejobwillbe
addedtothe
classDEFAULThenceitismandatorytohavethatclassaddedtothescheduler.

AnExecutorisalogicalpipeline(oraqueue)toaCPU.ACPUmaybelinkedtomultiple
EXECUTORs,whereas
anEXECUTORislinkedtoonlyoneCPU.ACLASScanbelinkedtoanEXECUTOR.Thiswayyoucan
controlthe
CPUonwhichtheNetBatchjobs(belongingtothatclass)run.Ifyoudon'tlinkaCLASStoan
EXECUTOR,
thejobsintheCLASSwillrunonanyavailableEXECUTOR.

SubmittingandRunningjobs:
============================
YoucansubmitjobstotheschedulerbyusingtheSUBMITJOBorSUBMITJOBcommandat
Batchcomprompt.Commandsforsubmittingjobscanbeaslongandcomplexasyoudesire.
Wewillseesomesampleones.

ADDJOB1,EPDELAY,SM"10SECONDS"

ThisjobisnamedJOB1anditisidenticaltoissuingthecommand

DELAY10SECONDS

attheTACLprompt.EPstandsforExecutorProgram,theprogram
thatisgoingtoexecuteyourjobs.Remember,NetBatchisascheduler,itdecides
whentorunwhichjobsandmanagesresourcesassociated,itdoesnot'run'jobs.Alljobs
shouldhaveanexecutorprogram.Unlessspecificallymentionedwhileaddingthejob,TACListhe
ExecutorProgram.

SMstandsforstartupmessage,themessagethatisrequiredbytheEPtodothe
desiredjob.Herethedesiredjobisonlytoissueadelayof10seconds.

Here,thejobexecutesimmediatelyuponissuingtheabovecommand.

Note:EP(executorprogram)isTACLbydefault.

ADDJOB2,EPDELAY,SM"2SECONDS",EVERY5MINUTES,AFTER13:00

Herethejobismadetorunevery5minutesafter1pm.Thejobwillnotrunimmediately
uponsubmission.Youcan,ifyouwish,alsogiveEVERY10HOURS(orEVERY10DAYS
forthatmatter).

NobodysaidyoucanuseonlyDELAYastheEP.YoucanuseANY100or700codefileas
anEPforajobdependinguponthejobrequirements.

ADDJOB3,EPFUP,SM"INFO*",OUT$DATA09.SUBVOL.FUPOUT

TheabovejobusesFUPastheexecutorprogramandisidenticaltoissuingcommandFUPINFO*
ontheTACLprompt.Theoutputofthisjob(i.e.theoutputofFUPINFO*command)goestoadisk
file.

Note:BydefaulttheoutputofallthejobsscheduledbyNetBatchgoestothespoolerlocation
$S.#BATCH

Ifyouhaveajobthatusesmultipleexecutorprogramsyoucanuseanobeyfileand
useTACLastheexecutorprogram(EP).

ADDJOB4,IN$DATA09.SUBVOL.INFILE,AT16:00


AndthecontentsofINFILEcanbeanythingthatcanbeobeyedatTACL.

SampleINFILE:

DELAY2SECONDS
FILEINFO
#PUSHVAR
#SETVAR"THISISANINFILE"
#OUTPUTVVAR
WHO
TIME
FUPINFO*
VOLUME

TheATattributeofthisjobspecifiesthatthejobistobeexecutedEXACTLYatthattime.
(youmaynotalwaysbeabletosettheATattributeofajob,duetorestrictionsplacedonthe
scheduler
byyoursystemadministrator.Similarly,theRUNNOWcommandmaytooberestricted)

JobControlCommands:
=====================
Youcanseethestatusofyoursubmittedjobsusing

STATUS<JOBNAME>or

STATUS*(forstatusofalljobs)

commandontheBatchcomprompt.

Itistobenotedherethatajob,ifnotarecursivejob(i.e.notwithEVERYattribute),
getsdeletedafterfirst(andonly)execution.

Youcandeleteajobusing

DELETE<JOBNAME>or

DELETEJOB*(fordeletingalljobs)

commandontheBATCHCOMprompt.

YoucanputtheexecutionofajobinHOLDstateusing

ALTER<JOBNAME>,HOLDON

AjobinHOLDstatewillnotstartexecutionunlessitsHOLDattributeisremovedby

ALTER<JOBNAME>,HOLDOFF

WindingUp:
===========
AfteryouaredonewiththeNetBatchschedulingandafteralljobsscheduledbyNetBatchhave
completed
executionandyounolongerneedthescheduleryoucanusethefollowingBatchcomcommands

SHUTDOWN

EXIT

ThefirstcommandshutsdowntheschedulerandthesecondcommandendstheBatchcomsession.

Formoreadvancedtopics,refertotheNetBatchManualsinNTL/TIM.

Privacy

You might also like