## Increment a number by 11 only !

Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

### Increment a number by 11 only !

Need help on the below requirement -

I have a 12 digit number in that last 5 digits has to be incremented by +11. This needs to happen 10,000 times. Is there a way to do it using sort.
I am giving a example below -

12345678911 == example for first number based on this it should increment by 11 and generate 10, 000 numbers.
12345678922 == next number incremented by 11 (11 + 11 = 22)
12345678933 == next number incremented by 11 (22 + 11 = 33)
----
----

Thanks.
ranga_subham

Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

### Re: Increment a number by 11 only !

If there is only one record on your dataset, look at OUTFIL REPEAT= and SEQNUM on OVERLAY in your documentation.

BillyBoyo
Global moderator

Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

### Re: Increment a number by 11 only !

Hi,

Nice Idea. Thanks.
Yes. Dataset has only one record (12345678911). how to use overlay in this situation please?

Thanks.
ranga_subham

Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

### Re: Increment a number by 11 only !

OK, the OVERLAY is quite easy. The next problem, though is that 10,000 times 11 gives a six-digit result, and you only want to change five digits. The answer to that impacts the detail of the OVERLAY.
BillyBoyo
Global moderator

Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

### Re: Increment a number by 11 only !

Hi,

Thanks again. I won't mind to limit it to 9999 times to avoid this risk factor.
ranga_subham

Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

### Re: Increment a number by 11 only !

10,000 * 11 = 110,0000
9,999 * 11 = 10,9989
9,090 * 11 = 99.990

Even taking 9,090, unless the current number starts with nnn00000 to nnn00009 it will overflow the five low-order digits.
BillyBoyo
Global moderator

Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times