As I am pretty cranky about getting things right, I have put some work into finding out exactly how the JDM Vin number is created.
Most have been told on this forum that it is the chassis number, and although it includes the chassis number, it isn't just the chassis number.
To work it out exactly, use the model code first three letters, then the next five letters, next, include the letter for the Plant, then the chassis number.
That should give you a 17 digit VIN number which can be checked by Nissan's VIN checker.