Yet another idea, why not using binary/integer and write the hex value into
the field?
D MyDS DS
D MyChar 8A
D MyInt 20U 0
Or
DCL-DS MyDS;
MyChar Char(8);
MyInt Uns(20);
End-DS
MyInt = yourNextNumValue;
EvalR YouCounter = MyChar;
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Gad
Miron
Gesendet: Thursday, 18.6 2015 07:22
An: midrange-l@xxxxxxxxxxxx
Betreff: Re: The case of outnumbered numerator
Hello Guys
Woa, I see my inquiry spawned many responses and provoked some debates,
Looks like it touched a sore spot - which it surly is for me
So first thank you all , (Mark, Paul ,Jon ,Roger ,John ,Sam ) and others I
surly have missed .
Some clarifications are due I guess so see following my answers to Mark's
detailed inquiries
1. what problem(s) are you trying to solve?
problem of the numerator exceeding 999999 (due in 2 years I
estimate).
2. why is this "number" stored as a "character" field?
That was (I guess) the method deemed best 25 years ago.
3. why not simply convert that field to "packed" and that would give
you 11 digits?
Because this will entail changing quite a few (hundreds)
PGMs/Screens/Reports
4. where is this current "next number" value maintained and stored, in
a database table,
or in a data area, or some other place?
When a new item is to be inserted the program(s) looks for the
last item in
the file and increment it by 1.
5. how and where is this field used?
This field is a unique identifier of an item (Musical/Literary
work).
a good analog is sku.
6. how and where and when is this value updated?
This field is never updated.
Answering Jon suggesting of using Character first numerator (A00001, A00002
etc.)
Yes, this solves the overflow programs but I would like new inserted items
to have bigger IDs so one could easily tell which item is older then the
other .
(I know this is just a mental limitation of mine but still it would be nice
..)
And again, THANK YOU all guys
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.