When You say:
sri222 wrote:I have added header and trailer in my jcl. In header i have mentioned a sequence number.
Are you referring to JCL
or an input file? You need to understand that JCL is just a medium through which programs are/can be executed, it doesn't contain File data
of any form, rather it can contain instream data as input to various programs, or data sets which can be input or output to/from various programs, which can be triggered using a JCL.
Ignoring, the JCL part mentioned in your post, and only going by the understanding (which may be wrong) that you have an input file in which you want a count that needs to be updated on every run; a fairly simple solution would be to write a small COBOL program which:
1. Takes the input file (which has the count) you are referring to in your post as input.
2. Reads the count.
3. Does a +1 to the count.
4. Rewrites the updated count back in the file.
Please note, the above solution ignores a few things such as- an assumption is made that the input file contains only the current count of 'job runs' (since you haven't mentioned any more details about the input; if other data is present, it can be handled in the program basis the logic coded); second assumption, you do understand that JCL alone can not do any mathematical operation (AFAIK), and you'll need a program to do that for you; another assumption, what is the maximum projected value for your job runs or in simpler words, what is the maximum length of this count
variable referred to.
sri222 wrote: i have tried to increment a particular number. but i want for every job run. this should be done through jcl only. my lrecl=80, blocksize=800. i have header in 1st positon. please help me
If you have already worked out a solution; please show us what you have done, and maybe we'll be able to guide you better.