The output becomes
0502
1003
2004
3019 ------- Since we dont have any if then statement its unchanged
4019------- Since we dont have any if then statement its unchanged
but I want all the records to have the last 2 numbers to get incremented automatically ( 01 becomes 02 , 02 becomes 03 and 19 becomes 20 and so on ) and give me the output. For example If I have 10000 records I cant have if then statements 10000 times.
What I expect now is I sud have some option in
//SYSIN DD *
OPTION COPY
To do the purpose of incrementation.so that it can just check with the (3,2,CH,EQ,C'01') and increment it by 1.
Please let me know how can we handle this kind of problem.
Thanks for your input, Thats really nice of you, your solution for my problem works fine.
@ Kapil,
Thank you for your quick response, Yes now we have limit till 99 but in regard to your question my answer is we have been informed that we cant have more than 99 as this job is run monthly we might have to look this case in future. And in that case 99 becomes 100.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
jdeepak_mca wrote:
Hi Nelson,
Thanks for your input, Thats really nice of you, your solution for my problem works fine.
You really don't need 2 passes of data to get the desired results. A simple 1 pass of data is enough to get the desired results
jdeepak_mca wrote:
@ Kapil,
Thank you for your quick response, Yes now we have limit till 99 but in regard to your question my answer is we have been informed that we cant have more than 99 as this job is run monthly we might have to look this case in future. And in that case 99 becomes 100.
Thanks all,
Regards,
Deepak
You only have 2 bytes to accommodate the number, if it is 100 it would require 3 bytes. would you increase the size of the field? Ideally if you want to just limit the increment of the number upto 99, I suggest you use the following DFSORT control cards