10-29-2013 04:49 PM
I need to create a unique identifier with a set number of characters - leading with zeroes. So I use the _n_ variable to get the number for each record. But I need to convert the _n_ variable to an 8-digit character leading with zeroes. So _n_=1, I need a value of 00000001. If _n_ if 2345, then the value is 00002345.
10-29-2013 05:01 PM
Sorry but I'm a novice at this. I did the following:
Identifier = put(_N_, Z8.);
I'm still getting 1, 2, 3, 4, etc. Not 00000001, 00000002, etc.
10-29-2013 05:14 PM
Try the following instead:
If you've run this a bunch of times you may need to re-create your original X data set.
I find that for debugging its easier to create new datasets rather than re-write old ones.
Here's some code that shows you it does work for sure: