"The ID"
Ok so my example was a little too simple.
The ID will consist of the data (GSV is a nice solution for this), the Serial number of the product (4-digit number), the batch, the section and the run number.
so something like this:
(Date)(Product)(Batch)(Section)(Run)
I think i want to do this with INSERT sting instruction, the only way i can think i can do this is with a cascading string, which is a lot of code for such a simple thing.
String1 = Date
String2 = String1 INSERT Product
String3 = String2 INSERT Batch
String4 = String3 INSERT Section
String5 = String4 INSERT Run
Each string will need to be of a known size so START can be correctly called out.
Is this the only way?
Not sure what you are going to do with the "ID".
1. Feed Strings to report history?
2. Print Human Readable Labels?
3. Print old-school bar codes?
4. Print 2-d high density data-matrix labels
….Yes CONCANTENATE is how to assemble strings
…. prepare all of the individual parts of the string, and then append them together.
My coarse point is only addressing the DATE portion of your string, as we have no knowledge of your companies product / batch / section /run data
If you want to limit the real data, or hide data from the casual consumer, and don't care about Y-3k, the smallest amount of place holders for a date code are is 4. This is how it was done years ago, when computer memory, and 1-d barcode was limited.
Example: 8J01
8 = last digit of current year
J = Oct (per you suggestion)
01 = October 01
You can also pull this off with Julian day-of-year
Today would be 8274 where
8 = Last digit of current year
274 = 274 day of this year
But all of the above is just a bad way to sort real data over time.
I suggest this format for your date code
YYYYMMDD
This will always net a larger number as time goes on, and sorts very well in text and numerical databases.
Today is 20181001
Tomorrow 20181002
Yesterday 20180930