Scheduling Sequencer
Moderators: chulett, rschirm, roy
Scheduling Sequencer
HI All,
We got a seuencer job with parameters and i would like to schedule that job.We used to run this sequencer manually then we enter parameter values when its prompted.
Please let me know how to pass parameters when we schedule this sequencer job.
Any help would be appreciated.
Thanks.
We got a seuencer job with parameters and i would like to schedule that job.We used to run this sequencer manually then we enter parameter values when its prompted.
Please let me know how to pass parameters when we schedule this sequencer job.
Any help would be appreciated.
Thanks.
You need to feed the parameters to your sequence using some sort of job control logic to fetch the values from wherever you put them. One method is a parameter file, the other is a database table. If your parameters are derived at runtime, that is a third source. However you achieve your values for the parameters, you must use a job control program such as a Batch job to run your Sequencer, setting the appropriate values. Now, you schedule the Batch job instead of the Sequencer. The Batch job fetches the parameters and then runs the Sequencer.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 60
- Joined: Tue Jul 12, 2005 3:34 am
Create a text file that holds arguments. I'd suggest something like this:
Use DS BASIC inside the Batch job to open the file, read the parameters (see OPENSEQ, READSEQ, CLOSESEQ), derive any you need, the attach to the Sequencer job, set the appropriate parameters, run the job, and check the results. This is easy to see how to do if you create a Batch job from Director. Use the Add button to add the job control logic to the Batch job to run your chosen Sequence job. Now all you have to do is add the logic to get the parameters and use them. This forum is full of examples of people doing this.
Code: Select all
[Directories]
DirArc=c:\KBA\BOT\work\archive\${ProcessDate}
DirScriptCommon=c:\KBA\BOT\work\scripts
DirError=c:\KBA\BOT\work\errors
DirHash=c:\KBA\BOT\work\hash
DirLoad=c:\KBA\BOT\work\load
DirLog=c:\KBA\BOT\work\logs
DirPoll=c:\KBA\BOT\work\polling
DirReject=c:\KBA\BOT\work\rejects
DirScript=c:\KBA\BOT\work\scripts
DirSource=c:\KBA\BOT\work\source
DirTemp=c:\KBA\BOT\work\temp
DirWarn=c:\KBA\BOT\work\warnings
[Servers]
DBserverPSA=psahost.world.net
DBdatabasePSA=psaschema
DBdsnPSA=ODBCpsaschema
DBuseridPSA=datastage
DBpasswordPSA=fdk*392-a
DBserverCDW=cdwhost.world.net
DBdatabaseCDW=cdwschema
DBdsnCDW=ODBCcdwschema
DBuseridCDW=datastage
DBpasswordCDW=fdk*392-a
[EMail]
MailList=Kenneth.Bland@KennethBland.com Steve.Boyce@KennethBland.com
EmergencyMailList=Kenneth.Bland@KennethBland.com Steve.Boyce@KennethBland.com
PagerMailList=Kenneth.Bland@KennethBland.com Steve.Boyce@KennethBland.com
JobFailure=ATTENTION! DataStage job failed
JobStarted=INFORMATION DataStage job started
JobFinished=INFORMATION DataStage job finished
JobOverrun=ATTENTION! DataStage job overrun
JobOverThreshold=ATTENTION! DataStage job over threshold
MailSender=KennethBland
MailServerName=KBAExchangeServer
[Exception Handling]
JobRuntimeNotificationValue=30
JobRuntimeShutdownValue=60
JobWarningMessageNotificationValue=50
JobWarningMessageShutdownValue=200
[MISC]
NullDate=1799-01-01
SkipParameters=SourceSystemCode
SystemType=NT
NotifyStartStop=Y
PerformJobLinkStatisticsChecks=Y
PerformJobLinkStatisticsChecksDuringRuntime=Y
OutputJobLinkStatistics=Y
PerformDirectorySlashAppending=Y
PerformAuditTableUpdates=Y
AuditTableCriticality=WARN
AuditTableUpdateInterval=5
CompileJobsAtStartup=Y
CompileJobsAtRuntime=N
InspectJobsLogsDuringRuntime=Y
EnvironmentCommand=set
TokenReplacementVariables=fred barney wilma ProcessDate
TokenReplacementLeadDelimiter=${
TokenReplacementEndDelimiter=}
AuditTableUpdateCommand=AuditTableUpdate.bat
MaxParallelJobsGovernor=50
Use DS BASIC inside the Batch job to open the file, read the parameters (see OPENSEQ, READSEQ, CLOSESEQ), derive any you need, the attach to the Sequencer job, set the appropriate parameters, run the job, and check the results. This is easy to see how to do if you create a Batch job from Director. Use the Add button to add the job control logic to the Batch job to run your chosen Sequence job. Now all you have to do is add the logic to get the parameters and use them. This forum is full of examples of people doing this.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
KCBLAND,
Here is my environment:
DS Server is running on WINDOWS machine.
I am passing only four parameters in sequencer one time i.e User Name,Password,
SRC DSN and TRG DSN.
I am totally new to this routines,so could you please give me the code to schedure the the above sequencer.
Thanks for your help.
Here is my environment:
DS Server is running on WINDOWS machine.
I am passing only four parameters in sequencer one time i.e User Name,Password,
SRC DSN and TRG DSN.
I am totally new to this routines,so could you please give me the code to schedure the the above sequencer.
Thanks for your help.
You're new to the forum but please spend a few minutes with the Search facility. We've spent years building up a knowledge base of over 20000 posts. You'll find numerous examples of accessing files and tables from DS BASIC that are extremely simple to understand.
You're already 75% done just creating a Batch job and adding your Sequence to it from the drop down. All that's left is to put some lines at the top to open the parameter file, read the lines, and put your values into variables that you'll put into the job control lines where there's currently hardcoded values.
You're already 75% done just creating a Batch job and adding your Sequence to it from the drop down. All that's left is to put some lines at the top to open the parameter file, read the lines, and put your values into variables that you'll put into the job control lines where there's currently hardcoded values.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-param parameternameA=parametervalueA -param parameternameB=parametervalueB
Keep in mind that spaces in the parameter value require parameter values to be quoted when necessary. In addition, dates have to be in YYYY-MM-DD format. Also, you still have to figure out how to get the dsjob script to pass in derived values or values fetched from a table or file, unless you're going to just hardcode them into the script.
Keep in mind that spaces in the parameter value require parameter values to be quoted when necessary. In addition, dates have to be in YYYY-MM-DD format. Also, you still have to figure out how to get the dsjob script to pass in derived values or values fetched from a table or file, unless you're going to just hardcode them into the script.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Thank you very much.
For now i will hard code parameter values to schedule my sequencer.
You're already 75% done just creating a Batch job and adding your Sequence to it from the drop down. All that's left is to put some lines at the top to open the parameter file, read the lines, and put your values into variables that you'll put into the job control lines where there's currently hardcoded values.
I added this sequencer job in a batch job and created a parmeter file,
could you please give me code for opening file and read the lines and put values into variables.
Please help me.
For now i will hard code parameter values to schedule my sequencer.
You're already 75% done just creating a Batch job and adding your Sequence to it from the drop down. All that's left is to put some lines at the top to open the parameter file, read the lines, and put your values into variables that you'll put into the job control lines where there's currently hardcoded values.
I added this sequencer job in a batch job and created a parmeter file,
could you please give me code for opening file and read the lines and put values into variables.
Please help me.
Use the Search button on this forum. Put ANY of these words into it: OPENSEQ or READSEQ. You will see that numerous people have asked for the exact same help as you. There are plenty of examples, please avail yourself.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle