Operating System - OpenVMS
1828340 Members
3152 Online
109976 Solutions
New Discussion

Re: How to limit entry-numbers to max. 3 digits

 
M.Pohl
Occasional Contributor

How to limit entry-numbers to max. 3 digits

Thanks all for the answers, but the problem is, the customer has a lot of scripts which ask the entry numbers only with 3 digits.
The customer dont like to chance all the scripts.
If I delete and create the queue,it will be start count with jobnumber 1?
Which is the best solution for the customer?
Or is there no way to change the scripts to 4 digits?
Thanks for help
9 REPLIES 9
Sheldon Smith
HPE Pro

Re: How to limit entry-numbers to max. 3 digits

The only way to get job numbers back to starting with 1 is to stop the queue manager and restart it with the /NEW queue database qualifier.
Redefine all the queues (printer, batch, (other?)), resubmit all the jobs.

Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company

Accept or Kudo

Jim_McKinney
Honored Contributor

Re: How to limit entry-numbers to max. 3 digits

> If I delete and create the queue,it will be start count with jobnumber 1?

No. Sheldon is correct. You must rebuild the entire queue management database. The entry numbers encompass all queues - not just the one you're interested in.

> Which is the best solution for the customer?


Though the customer doesn't want to change their scripts, it is the only reliable way to deal with this. Even if you rebuild the queue manager's database to restore the 3 digit entry number behavior, if the system ever experiences a time when there are more than 999 entries in the queue database, expansion of the entry field will occur again.

> Or is there no way to change the scripts to 4 digits?

Yes. You would have to post an example of their scripting in order for someone to advise how best to make such a change.
John Abbott_2
Esteemed Contributor

Re: How to limit entry-numbers to max. 3 digits

>Or is there no way to change the scripts to 4 digits?

Your mileage will vary, but as a hint of what's possible with a good tool, I've found the freeware FIND with /REPLACE very powerful and extremely useful to change source code/scripts in bulk.

As an example, we have buckets of DCL scripts that call a 4GL program, from one version of the 4GL to another, the input string format changed, rather than edit all those scripts we used FIND/REPLACE to change them quickly.

http://h71000.www7.hp.com/freeware/freeware70/find/

Kind Regardsd
John.
Don't do what Donny Dont does
John Gillings
Honored Contributor

Re: How to limit entry-numbers to max. 3 digits

Sorry, these scripts have made an invalid assumption that entry numbers can only reach 999. Of course OpenVMS is NOT limited to only 1000 print and batch entries! We have customers with more than 10,000 *queues*.

Entry numbers are a 32 bit unsigned number and can therefore be up to 10 digits long. Any program or procedure that assumes less has a large bug which needs to be fixed urgently.

You can play games to rebuild your queue manager data base to reset entry numbers, but be sure this bug WILL continue to cause you headaches in the future. Better to fix it now.
A crucible of informative mistakes
M.Pohl
Occasional Contributor

Re: How to limit entry-numbers to max. 3 digits

Thanks for the answers,
but one question more to this problem: Last year we chanced from Openvms 7.2 to 7.3.
Is it possible that the new version permits entrynumbers with 4 digits in opposite to the Version 7.2 (only 3 digits?) ??

Thanks
Manfred
Marc Van den Broeck
Trusted Contributor

Re: How to limit entry-numbers to max. 3 digits

Manfred,

Version 7.2 and versions before had more than 3-digit entry numbers.

Rgds
Marc
Jan van den Ende
Honored Contributor

Re: How to limit entry-numbers to max. 3 digits

Manfred,

to put it "a little" stronger than Marc did,
I remember having entries with BIG numbers way back on VaxVMS V5.something.

If the number grew over 10000 (needing the 5th digit) it suddenly jumped to 1000nnnn.

hth,

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Hein van den Heuvel
Honored Contributor

Re: How to limit entry-numbers to max. 3 digits


Jan wrote:
"If the number grew over 10000 (needing the 5th digit) it suddenly jumped to 1000nnnn."

This is what I have in my notes:
---------
An entry number can be interpreted as follows:

X-QQ-NNNN where NNNN = 0 to 9999, normal entry number range

QQ = 00 to 04, queue manager number (qman id - 1)
X = 0 to 9, to extend 0 to 9999 range
----------

M.Phol,

strictly speaking even changing to 4 digits is incorrect, but likely to work for most environments.
OpenVMS does not 'promiss' any particular range.
The formula above suggests that you should use a free format integer up to 7 positions, but I would probably code for 9 digits.

fwiw,
Hein.
Jan van den Ende
Honored Contributor

Re: How to limit entry-numbers to max. 3 digits

Thanks for that Hein, another hole in my knowledge filled!

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.