1. A computer program product for determining a length of a set of data, the computer program product comprising: a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising: loading from memory to a register data that is within a specified block of memory, the data being at least a portion of the set of data for which the length is to be determined; obtaining a count of an amount of data loaded in the register; determining, by a processor, a termination value for the data loaded in the register, the determining comprising checking the data to determine whether the register includes a termination character, and based on the register including a termination character, setting the termination value to a location of the termination character, and based on the register not including the termination character, setting the termination value to a pre-specified value; checking whether there is additional data to be counted based on at least one of the count and the termination value; based on the checking indicating additional data is to be counted, incrementing the count based on the additional data, the count providing the length of the set of data; and based on the checking indicating additional data is not to be counted, using the count as a length of the set of data.