hai I would like to pass a value in JOblevel how can i do that
Let me explain
I have a parameter in joblevel as SEQ_NO i put this as a default value of 1
When i run a job it inserted 20 records with the seq_no as 20
Now when I run the job again my seq_no in parameter is still 1 .It should become(default value) 21 in the next run How should i send this value into the parameter in joblevel
This will help me
Thanks
passing a value in parameter
Moderators: chulett, rschirm, roy
You need to store your sequence number somewhere when the job finishes and then the next time the job runs it knows where to get the sequence value. Consider using job control to feed it to the job, or use a stage variable and in the initialize cell do a routine call to go fetch the starting value.
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
1)If you are running the jobs from a sequencer, you can set a job parameter at the sequencer level. At the end of a run, you can update
the job parameter right before the job finishes. Kenneth, is this true?
2)Create a data set file on your disk. Every time, your job runs, it'll read it from that file right after starting. Right before the job ends, it'll write the final value to that file.
Kenneth, are there other ways?
the job parameter right before the job finishes. Kenneth, is this true?
2)Create a data set file on your disk. Every time, your job runs, it'll read it from that file right after starting. Right before the job ends, it'll write the final value to that file.
Kenneth, are there other ways?
You can't really update a job parameter at the end of a job.
As Kenneth said you can store the value somewhere - a file (probably not a dataset) or in the database.
At the start of the job sequence you obtain this value and pass it in the job parameter.
At the end of the job you store the new value ready to be used next time the job runs. You can derive the new value in a few ways - 1) old value plus number of rows processed, but be sure the numbers used are contiguous as spreading across partitions may have left gaps and therefore the total may be wrong, or b) get the maximum value actually used.
As Kenneth said you can store the value somewhere - a file (probably not a dataset) or in the database.
At the start of the job sequence you obtain this value and pass it in the job parameter.
At the end of the job you store the new value ready to be used next time the job runs. You can derive the new value in a few ways - 1) old value plus number of rows processed, but be sure the numbers used are contiguous as spreading across partitions may have left gaps and therefore the total may be wrong, or b) get the maximum value actually used.