Re: Quick error termination of an assembler routine (Was: Performance of Decimal Floating Point Instruction)

2017-05-16 Thread Peter Relson

Well, in reality you are right of course (who cares about the i-cache?) 
but
in theory one is branching around and NOT crashing, so not wasting the
i-cache is a desirable goal.
 

A program coded with any thought for performance would not be "branching 
around and NOT crashing". It would be branching out of line upon detecting 
the error so that the normal path takes no branch at all.

Thus instead of "BZNOERROR" (or JZ or whatever), "BNZ   ERROR".

Peter Relson
z/OS Core Technology Design


Re: Quick error termination of an assembler routine (Was: Performance of Decimal Floating Point Instruction)

2017-05-16 Thread Tony Thigpen

Peter,

I never have gotten a handle on "branch prediction" within the i-cache 
discussion. Are you saying that, for the most part, we should always try 
to code so that the normal path is to not-branch wherever possible?


(I know, within limits.)

Tony Thigpen

Peter Relson wrote on 05/16/2017 08:31 AM:


Well, in reality you are right of course (who cares about the i-cache?)
but
in theory one is branching around and NOT crashing, so not wasting the
i-cache is a desirable goal.


A program coded with any thought for performance would not be "branching
around and NOT crashing". It would be branching out of line upon detecting
the error so that the normal path takes no branch at all.

Thus instead of "BZNOERROR" (or JZ or whatever), "BNZ   ERROR".

Peter Relson
z/OS Core Technology Design




Re: Quick error termination of an assembler routine (Was: Performance of Decimal Floating Point Instruction)

2017-05-16 Thread Charles Mills
That's what makes the JNx *+2 technique kind of cool. It is both "branch on
error" and simultaneously "in line."

My "who cares about the i-cache" was premised on my earlier assertion that
S0C1'ing is appropriate only for quick testing and so forth, not as a
"production" technique.

Charles


-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Peter Relson
Sent: Tuesday, May 16, 2017 5:31 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Quick error termination of an assembler routine (Was:
Performance of Decimal Floating Point Instruction)


Well, in reality you are right of course (who cares about the i-cache?) 
but
in theory one is branching around and NOT crashing, so not wasting the
i-cache is a desirable goal.
 

A program coded with any thought for performance would not be "branching 
around and NOT crashing". It would be branching out of line upon detecting 
the error so that the normal path takes no branch at all.

Thus instead of "BZNOERROR" (or JZ or whatever), "BNZ   ERROR".


Re: Quick error termination of an assembler routine (Was: Performance of Decimal Floating Point Instruction)

2017-05-16 Thread Pieter Wiid
That's what the book says -- except for unconditional branches, BCT and BXLE
(and the relative and G variants) which predicts a branch.


-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Tony Thigpen
Sent: 16 May 2017 14:44
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Quick error termination of an assembler routine (Was:
Performance of Decimal Floating Point Instruction)

Peter,

I never have gotten a handle on "branch prediction" within the i-cache
discussion. Are you saying that, for the most part, we should always try to
code so that the normal path is to not-branch wherever possible?

(I know, within limits.)

Tony Thigpen

Peter Relson wrote on 05/16/2017 08:31 AM:
> 
> Well, in reality you are right of course (who cares about the 
> i-cache?) but in theory one is branching around and NOT crashing, so 
> not wasting the i-cache is a desirable goal.
> 
>
> A program coded with any thought for performance would not be 
> "branching around and NOT crashing". It would be branching out of line 
> upon detecting the error so that the normal path takes no branch at all.
>
> Thus instead of "BZNOERROR" (or JZ or whatever), "BNZ   ERROR".
>
> Peter Relson
> z/OS Core Technology Design
>
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: Quick error termination of an assembler routine (Was: Performance of Decimal Floating Point Instruction)

2017-05-16 Thread Paul Gilmartin
On 2017-05-16, at 07:59, Pieter Wiid wrote:

> That's what the book says -- except for unconditional branches, BCT and BXLE
> (and the relative and G variants) which predicts a branch.
>  
I have wondered in cases where the programmer knows a priori
that branch taken is more likely whether a branch around a
branch better exploits the branch prediction rules.  For
example, instead of:

 BCMASK,TARGET  Incorrectly predicts branch not taken

How about:

 BC15-MASK,*+8  Correctly predicts branch not taken
 B TARGET   Correctly predicts branch taken

Of course it would be better, if practical, to rearrange the code.

And next year's model may negate the effort with something such as
JIT analysis.

-- gil


Re: Quick error termination of an assembler routine (Was: Performance of Decimal Floating Point Instruction)

2017-05-16 Thread Charles Mills
I've wondered the same thing. Does it make sense to use two branches where
one would do, to make the conditional branch the unlikely path?

> And next year's model may negate the effort with something such as JIT
analysis.

I think even last year's model is more sophisticated than simply "always
assuming the branch will not be taken" but that is the default if all other
analyses fail.

Charles


-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Paul Gilmartin
Sent: Tuesday, May 16, 2017 7:32 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Quick error termination of an assembler routine (Was:
Performance of Decimal Floating Point Instruction)

On 2017-05-16, at 07:59, Pieter Wiid wrote:

> That's what the book says -- except for unconditional branches, BCT 
> and BXLE (and the relative and G variants) which predicts a branch.
>  
I have wondered in cases where the programmer knows a priori that branch
taken is more likely whether a branch around a branch better exploits the
branch prediction rules.  For example, instead of:

 BCMASK,TARGET  Incorrectly predicts branch not taken

How about:

 BC15-MASK,*+8  Correctly predicts branch not taken
 B TARGET   Correctly predicts branch taken

Of course it would be better, if practical, to rearrange the code.

And next year's model may negate the effort with something such as JIT
analysis.


Re: Quick error termination of an assembler routine (Was: Performance of Decimal Floating Point Instruction)

2017-05-16 Thread Tony Harminc
On 16 May 2017 at 10:31, Paul Gilmartin <
0014e0e4a59b-dmarc-requ...@listserv.uga.edu> wrote:

> I have wondered in cases where the programmer knows a priori
> that branch taken is more likely whether a branch around a
> branch better exploits the branch prediction rules.  For
> example, instead of:
>
>  BCMASK,TARGET  Incorrectly predicts branch not taken
>
> How about:
>
>  BC15-MASK,*+8  Correctly predicts branch not taken
>  B TARGET   Correctly predicts branch taken
>
> Of course it would be better, if practical, to rearrange the code.
>

Or to use the Branch Prediction [Relative] Preload instruction. Assuming
recent hardware, etc. etc.

Tony H.


random quest

2017-05-16 Thread Richard Kuebbing
So I need a set of 99,999 random numbers which are 5 digits and unique, i.e. no 
duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+% duplicates.

I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

Richard Kuebbing

Efforts and courage are not enough without purpose and direction. - John F. 
Kennedy
Fasten your seat belts, it's going to be a bumpy ride. - Bette Davis (as 
character Margo Channing) _All About Eve_1950
Furious activity is no substitute for understanding. - H. H. Williams
Our greatest danger in life is in permitting the urgent things to crowd out the 
important. - Charles E. Hummel
Quidquid latine dictum sit, altum videtur.



- The information contained in this 
communication (including any attachments hereto) is confidential and is 
intended solely for the personal and confidential use of the individual or 
entity to whom it is addressed. The information may also constitute a legally 
privileged confidential communication. If the reader of this message is not the 
intended recipient or an agent responsible for delivering it to the intended 
recipient, you are hereby notified that you have received this communication in 
error and that any review, dissemination, copying, or unauthorized use of this 
information, or the taking of any action in reliance on the contents of this 
information is strictly prohibited. If you have received this communication in 
error, please notify us immediately by e-mail, and delete the original message. 
Thank you


Re: random quest

2017-05-16 Thread Gibney, Dave
Sort the set by the 2nd or 3rd digit :) 99,999 5 digit numbers is, after all, 
all of the set.

> -Original Message-
> From: IBM Mainframe Assembler List [mailto:ASSEMBLER-
> l...@listserv.uga.edu] On Behalf Of Richard Kuebbing
> Sent: Tuesday, May 16, 2017 1:28 PM
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Subject: random quest
> 
> So I need a set of 99,999 random numbers which are 5 digits and unique, i.e.
> no duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets
> w/30+% duplicates.
> 
> I have seen website random.org.
> 
> Anyone have to ever done this thing?
> 
> Anyone have suggestions?
> 
> Richard Kuebbing
> 
> Efforts and courage are not enough without purpose and direction. - John F.
> Kennedy Fasten your seat belts, it's going to be a bumpy ride. - Bette Davis
> (as character Margo Channing) _All About Eve_1950 Furious activity is no
> substitute for understanding. - H. H. Williams Our greatest danger in life is 
> in
> permitting the urgent things to crowd out the important. - Charles E. Hummel
> Quidquid latine dictum sit, altum videtur.
> 
> 
> 
> - The information contained in this
> communication (including any attachments hereto) is confidential and is
> intended solely for the personal and confidential use of the individual or
> entity to whom it is addressed. The information may also constitute a legally
> privileged confidential communication. If the reader of this message is not
> the intended recipient or an agent responsible for delivering it to the
> intended recipient, you are hereby notified that you have received this
> communication in error and that any review, dissemination, copying, or
> unauthorized use of this information, or the taking of any action in reliance
> on the contents of this information is strictly prohibited. If you have 
> received
> this communication in error, please notify us immediately by e-mail, and
> delete the original message. Thank you


Re: random quest

2017-05-16 Thread Mark Boonie
Perhaps there's something about the question I don't understand, but if 
you want 99,999 unique 5-digit numbers then you'll end up with the numbers 
0 to 9.  Or do you just want the *order* of the numbers to be 
random?

- mb


Re: random quest

2017-05-16 Thread Paul Gilmartin
On 2017-05-16, at 14:35, Mark Boonie wrote:

> Perhaps there's something about the question I don't understand, but if 
> you want 99,999 unique 5-digit numbers then you'll end up with the numbers 
> 0 to 9.  Or do you just want the *order* of the numbers to be 
> random?
>  
There are 100,000 5-digit numbers, so one will be left out.

Start with an array of 100,000 5-digit numbers.  Select one at
random.  Move the last one into the position selected.  Select
one of the remaining 99,999 numbers at random.  Move the last
one into the position selected. ...

-- gil


Re: random quest

2017-05-16 Thread Charles Mills
Create an Excel spreadsheet. In A1 put 1. In A2 put 2. Drag the two cells
down to row 9. You now have all the numbers from 1 to 9 with no
duplicates.

Put =RAND() in B1. Drag it down to row 9. You now have 99,999
pseudo-random numbers in column B. Sort the spreadsheet on column B. Column
A is now the answer to your requirement.

If you need help cutting and pasting it into some particular format let me
know. If you are not comfortable with Excel let me know and I will just do
it for you and send you the result.

Charles


-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Richard Kuebbing
Sent: Tuesday, May 16, 2017 1:28 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: random quest

So I need a set of 99,999 random numbers which are 5 digits and unique, i.e.
no duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+%
duplicates.

I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

Richard Kuebbing

Efforts and courage are not enough without purpose and direction. - John F.
Kennedy
Fasten your seat belts, it's going to be a bumpy ride. - Bette Davis (as
character Margo Channing) _All About Eve_1950
Furious activity is no substitute for understanding. - H. H. Williams
Our greatest danger in life is in permitting the urgent things to crowd out
the important. - Charles E. Hummel
Quidquid latine dictum sit, altum videtur.



- The information contained in this
communication (including any attachments hereto) is confidential and is
intended solely for the personal and confidential use of the individual or
entity to whom it is addressed. The information may also constitute a
legally privileged confidential communication. If the reader of this message
is not the intended recipient or an agent responsible for delivering it to
the intended recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying, or
unauthorized use of this information, or the taking of any action in
reliance on the contents of this information is strictly prohibited. If you
have received this communication in error, please notify us immediately by
e-mail, and delete the original message. Thank you


Re: random quest

2017-05-16 Thread Farley, Peter x23353
1.  Use either CEERAN0 or FUNCTION RANDOM to generate a column of 99,999 
random numbers.  It's OK if there are duplicates.
2.  Add a second column using SORT with sequential numbers from 1 to 9 
(use the SEQNUM option). 
3.  SORT by the first column only and DO NOT specify the EQUALS option.
4.  Use the numbers in column 2 after sorting as your 99,999 randomly 
ordered numbers

You can combine steps 2, 3, and 4 in one SORT execution.  INREC to add the 
SEQNUM's as a second column, SORT by first column, OUTREC to select only the 
second column for output.

HTH

Peter

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Richard Kuebbing
Sent: Tuesday, May 16, 2017 4:28 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: random quest

So I need a set of 99,999 random numbers which are 5 digits and unique, i.e. no 
duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+% duplicates.

I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


Re: random quest

2017-05-16 Thread MELVYN MALTZ

Hi Richard,

I'll assume you'll want the five digit numbers in a random order

1) Have a look at the PPNO instruction

2) This technique will work, it might depend on whether you want to do this 
multiple times or just once
I'll assume you have a random number generator (rng), someone will have one 
if you don't

a) Build a table of numbers 1-9
b) Use the rng to select a number from 1-9, mark that entry as used and 
collect it
c) Use the rng again with range 1-8, select the nth unused and 
collect it
d) Repeat c and d dropping the range by one each time until you have none 
left


Regards,

Melvyn Maltz.

- Original Message - 
From: "Richard Kuebbing" 

To: 
Sent: Tuesday, May 16, 2017 9:28 PM
Subject: random quest


So I need a set of 99,999 random numbers which are 5 digits and unique, i.e. 
no duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+% 
duplicates.


I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

Richard Kuebbing

Efforts and courage are not enough without purpose and direction. - John F. 
Kennedy
Fasten your seat belts, it's going to be a bumpy ride. - Bette Davis (as 
character Margo Channing) _All About Eve_1950

Furious activity is no substitute for understanding. - H. H. Williams
Our greatest danger in life is in permitting the urgent things to crowd out 
the important. - Charles E. Hummel

Quidquid latine dictum sit, altum videtur.



- The information contained in this 
communication (including any attachments hereto) is confidential and is 
intended solely for the personal and confidential use of the individual or 
entity to whom it is addressed. The information may also constitute a 
legally privileged confidential communication. If the reader of this message 
is not the intended recipient or an agent responsible for delivering it to 
the intended recipient, you are hereby notified that you have received this 
communication in error and that any review, dissemination, copying, or 
unauthorized use of this information, or the taking of any action in 
reliance on the contents of this information is strictly prohibited. If you 
have received this communication in error, please notify us immediately by 
e-mail, and delete the original message. Thank you 


Re: random quest

2017-05-16 Thread Martin Ward

On 16/05/2017 21:28, Richard Kuebbing wrote:

So I need a set of 99,999 random numbers which are 5 digits and
unique, i.e. no duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both
give sets w/30+% duplicates.


There are only 90,000 unique 5 digit numbers: 10,000 to 99,999
inclusive.

--
Martin

Dr Martin Ward STRL Principal Lecturer & Reader in Software Engineering
mar...@gkc.org.uk  http://www.cse.dmu.ac.uk/~mward/  Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/
Mirrors:  http://www.gkc.org.uk  and  http://www.gkc.org.uk/gkc


Re: random quest

2017-05-16 Thread Paul Gilmartin
On 2017-05-16, at 14:50, Farley, Peter x23353 wrote:

> 1.Use either CEERAN0 or FUNCTION RANDOM to generate a column of 99,999 
> random numbers.  It's OK if there are duplicates.
> 2.Add a second column using SORT with sequential numbers from 1 to 9 
> (use the SEQNUM option). 
> 3.SORT by the first column only and DO NOT specify the EQUALS option.
> 4.Use the numbers in column 2 after sorting as your 99,999 randomly 
> ordered numbers
> 
> You can combine steps 2, 3, and 4 in one SORT execution.  INREC to add the 
> SEQNUM's as a second column, SORT by first column, OUTREC to select only the 
> second column for output.
>  
Are you sure that duplicates in the first column don't matter?
Consider the wildly unlikely case in which every number selected
in the first column is 42.  What is the order in column 2 after
the sort?

Well, the statement of the problem didn't require that all
permutations be equally likely, so I guess it might not matter.

-- gil


Re: random quest

2017-05-16 Thread Farley, Peter x23353
> -Original Message-
> From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] 
> On Behalf Of Paul Gilmartin
> Sent: Tuesday, May 16, 2017 5:03 PM
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Subject: Re: random quest
>
> > On 2017-05-16, at 14:50, Farley, Peter x23353 wrote:
> >
> > 1.  Use either CEERAN0 or FUNCTION RANDOM to generate a column of 99,999 
> > random numbers.  It's OK if there are duplicates.
> > 2.  Add a second column using SORT with sequential numbers from 1 to 9 
> > (use the SEQNUM option). 
> > 3.  SORT by the first column only and DO NOT specify the EQUALS option.
> > 4.  Use the numbers in column 2 after sorting as your 99,999 randomly 
> > ordered numbers
> > 
> > You can combine steps 2, 3, and 4 in one SORT execution.  INREC to add the 
> > SEQNUM's as a second column, SORT by first column, OUTREC to select only 
> > the second column for output.

> Are you sure that duplicates in the first column don't matter?

Yes.  The quoted ~30%+ duplicate ratio for the quoted RNG functions seems 
reasonable.

> Consider the wildly unlikely case in which every number selected in the first 
> column is 42.  What is the order in column 2 after the sort?

Highly unlikely using the quoted RNG's.  And even if they all came out as 42 
(another fan of HHGTTG I see), not providing the EQUALS option to SORT allows 
at least the *possibility* that you will get some order other than sequential 
in the output of column 2.  Unlikely I agree, but possible, especially if SORT 
is given only a low amount of memory with which to sort and must use work files 
for partial ordered sequences.

> Well, the statement of the problem didn't require that all permutations be 
> equally likely, so I guess it might not matter.

Exactly.

-- gil

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


Re: random quest

2017-05-16 Thread Richard Kuebbing
Correct - the order of the numbers must be random.

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Mark Boonie
Sent: Tuesday, May 16, 2017 4:35 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: random quest

Perhaps there's something about the question I don't understand, but if you 
want 99,999 unique 5-digit numbers then you'll end up with the numbers
0 to 9.  Or do you just want the *order* of the numbers to be random?

- mb


- The information contained in this 
communication (including any attachments hereto) is confidential and is 
intended solely for the personal and confidential use of the individual or 
entity to whom it is addressed. The information may also constitute a legally 
privileged confidential communication. If the reader of this message is not the 
intended recipient or an agent responsible for delivering it to the intended 
recipient, you are hereby notified that you have received this communication in 
error and that any review, dissemination, copying, or unauthorized use of this 
information, or the taking of any action in reliance on the contents of this 
information is strictly prohibited. If you have received this communication in 
error, please notify us immediately by e-mail, and delete the original message. 
Thank you


Re: random quest

2017-05-16 Thread Richard Kuebbing
Fantastic.  This looks to be the level of brilliance I was looking for - 
simplicity plus 100% solution.

So follow-up question.  I have a lot of advanced math in grad school, all 
inapplicable to this.  Is there any kind of measure of how "random" a set of 
numbers is?  Someone internal is bound to ask.  I am thinking of graphing the 
difference [=n(i+1)-n(i)] and looking at distribution.  The client(s) are 
business persons and are unlikely to ask.

Question 2:  I have a passion for documenting things.  Do you wish to have your 
name attached to this idea?

Tomorrow when I have time I will peruse all the answers.

Profound thanks

Peace be w/y'all

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Farley, Peter x23353
Sent: Tuesday, May 16, 2017 4:51 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: random quest

1.  Use either CEERAN0 or FUNCTION RANDOM to generate a column of 99,999 
random numbers.  It's OK if there are duplicates.
2.  Add a second column using SORT with sequential numbers from 1 to 9 
(use the SEQNUM option). 
3.  SORT by the first column only and DO NOT specify the EQUALS option.
4.  Use the numbers in column 2 after sorting as your 99,999 randomly 
ordered numbers

You can combine steps 2, 3, and 4 in one SORT execution.  INREC to add the 
SEQNUM's as a second column, SORT by first column, OUTREC to select only the 
second column for output.

HTH

Peter

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Richard Kuebbing
Sent: Tuesday, May 16, 2017 4:28 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: random quest

So I need a set of 99,999 random numbers which are 5 digits and unique, i.e. no 
duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+% duplicates.

I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


- The information contained in this 
communication (including any attachments hereto) is confidential and is 
intended solely for the personal and confidential use of the individual or 
entity to whom it is addressed. The information may also constitute a legally 
privileged confidential communication. If the reader of this message is not the 
intended recipient or an agent responsible for delivering it to the intended 
recipient, you are hereby notified that you have received this communication in 
error and that any review, dissemination, copying, or unauthorized use of this 
information, or the taking of any action in reliance on the contents of this 
information is strictly prohibited. If you have received this communication in 
error, please notify us immediately by e-mail, and delete the original message. 
Thank you


Re: random quest

2017-05-16 Thread Paul Gilmartin
On 2017-05-16, at 16:34, Richard Kuebbing wrote:

> Correct - the order of the numbers must be random.
>  
What's your criterion for "random"?  Must all possible permutations
have non-zero probability?  Must all possible permutations have
equal probability?  Does it suffice if there is "at least the
*possibility* that you will get some order other than sequential"?

Do you require a formal proof of the validity of the algorithm you
choose, that it meets your "random" criterion?

If Charles sends you a list tomorrow, do you promise not to ask for
another the day after?

If you need to generalize to more than 99,999 entries, must the
technique be (FSVO) robust under main storage constraint?

-- gil


Re: random quest

2017-05-16 Thread Paul Gilmartin
On 2017-05-16, at 16:46, Richard Kuebbing wrote:

> Fantastic.  This looks to be the level of brilliance I was looking for - 
> simplicity plus 100% solution.
> 
> So follow-up question.  I have a lot of advanced math in grad school, all 
> inapplicable to this.  Is there any kind of measure of how "random" a set of 
> numbers is?  Someone internal is bound to ask.  I am thinking of graphing the 
> difference [=n(i+1)-n(i)] and looking at distribution.  The client(s) are 
> business persons and are unlikely to ask.
>  
Do *not* look up "Kolmogorov complexity" on the Internet.

I would say that Melvyn's approach and mine are equivalent.
Both generate a decision tree with N! leaves, one for each
permutation, which are equally probable subject to the
quality of your random number generator.  The best you can
do is to expect all outcomes to be equally likely.  It's
harder to prove the same for Peter's approach (or Charles's)
unless you prohibit duplicate keys.

> Question 2:  I have a passion for documenting things.  Do you wish to have 
> your name attached to this idea?

-- gil


Re: random quest

2017-05-16 Thread Farley, Peter x23353
Q1: Mr. Google led me to this one: 
http://csrc.nist.gov/groups/ST/toolkit/rng/documentation_software.html   No 
idea in what language the software is written, did not DL it for myself, but 
the description makes it look quite formal and professional.  Plus it's fairly 
recent (2010), and if you pay USA federal taxes it's yours to use because your 
federal taxes paid for it.

Q2. Heavens, no.  Take the credit for yourself if you wish, or credit it to 
Mr. Google for plausible deniability.  My answer was just a regular application 
programmer's approach - KISS.  Perfect is the enemy of good enough, BTDTGTTS.

Peter

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Richard Kuebbing
Sent: Tuesday, May 16, 2017 6:46 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: random quest

Fantastic.  This looks to be the level of brilliance I was looking for - 
simplicity plus 100% solution.

So follow-up question.  I have a lot of advanced math in grad school, all 
inapplicable to this.  Is there any kind of measure of how "random" a set of 
numbers is?  Someone internal is bound to ask.  I am thinking of graphing the 
difference [=n(i+1)-n(i)] and looking at distribution.  The client(s) are 
business persons and are unlikely to ask.

Question 2:  I have a passion for documenting things.  Do you wish to have your 
name attached to this idea?

Tomorrow when I have time I will peruse all the answers.

Profound thanks

Peace be w/y'all

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Farley, Peter x23353
Sent: Tuesday, May 16, 2017 4:51 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: random quest

1.  Use either CEERAN0 or FUNCTION RANDOM to generate a column of 99,999 
random numbers.  It's OK if there are duplicates.
2.  Add a second column using SORT with sequential numbers from 1 to 9 
(use the SEQNUM option). 
3.  SORT by the first column only and DO NOT specify the EQUALS option.
4.  Use the numbers in column 2 after sorting as your 99,999 randomly 
ordered numbers

You can combine steps 2, 3, and 4 in one SORT execution.  INREC to add the 
SEQNUM's as a second column, SORT by first column, OUTREC to select only the 
second column for output.

HTH

Peter

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Richard Kuebbing
Sent: Tuesday, May 16, 2017 4:28 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: random quest

So I need a set of 99,999 random numbers which are 5 digits and unique, i.e. no 
duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+% duplicates.

I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


Re: random quest

2017-05-16 Thread MELVYN MALTZ

Hi Richard,

Paul is right, we came up with the same solution

There are several statistical tests for randomness, perhaps the easiest to 
calculate is MSSD (mean squared successive differences) and you are on the 
right track


You can attach my name

Melvyn.

- Original Message - 
From: "Richard Kuebbing" 

To: 
Sent: Tuesday, May 16, 2017 11:46 PM
Subject: Re: random quest


Fantastic.  This looks to be the level of brilliance I was looking for - 
simplicity plus 100% solution.


So follow-up question.  I have a lot of advanced math in grad school, all 
inapplicable to this.  Is there any kind of measure of how "random" a set of 
numbers is?  Someone internal is bound to ask.  I am thinking of graphing 
the difference [=n(i+1)-n(i)] and looking at distribution.  The client(s) 
are business persons and are unlikely to ask.


Question 2:  I have a passion for documenting things.  Do you wish to have 
your name attached to this idea?


Tomorrow when I have time I will peruse all the answers.

Profound thanks

Peace be w/y'all

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] 
On Behalf Of Farley, Peter x23353

Sent: Tuesday, May 16, 2017 4:51 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: random quest

1. Use either CEERAN0 or FUNCTION RANDOM to generate a column of 99,999 
random numbers.  It's OK if there are duplicates.
2. Add a second column using SORT with sequential numbers from 1 to 9 
(use the SEQNUM option).

3. SORT by the first column only and DO NOT specify the EQUALS option.
4. Use the numbers in column 2 after sorting as your 99,999 randomly ordered 
numbers


You can combine steps 2, 3, and 4 in one SORT execution.  INREC to add the 
SEQNUM's as a second column, SORT by first column, OUTREC to select only the 
second column for output.


HTH

Peter

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] 
On Behalf Of Richard Kuebbing

Sent: Tuesday, May 16, 2017 4:28 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: random quest

So I need a set of 99,999 random numbers which are 5 digits and unique, i.e. 
no duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+% 
duplicates.


I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

--

This message and any attachments are intended only for the use of the 
addressee and may contain information that is privileged and confidential. 
If the reader of the message is not the intended recipient or an authorized 
representative of the intended recipient, you are hereby notified that any 
dissemination of this communication is strictly prohibited. If you have 
received this communication in error, please notify us immediately by e-mail 
and delete the message and any attachments from your system.



- The information contained in this 
communication (including any attachments hereto) is confidential and is 
intended solely for the personal and confidential use of the individual or 
entity to whom it is addressed. The information may also constitute a 
legally privileged confidential communication. If the reader of this message 
is not the intended recipient or an agent responsible for delivering it to 
the intended recipient, you are hereby notified that you have received this 
communication in error and that any review, dissemination, copying, or 
unauthorized use of this information, or the taking of any action in 
reliance on the contents of this information is strictly prohibited. If you 
have received this communication in error, please notify us immediately by 
e-mail, and delete the original message. Thank you 


Re: random quest

2017-05-16 Thread Gary Weinhold

Another technique would be to use a rng with a range of say a billion numbers 
and assign them in order to each of the 10,000 numbers (the same as most 
previous suggestions) and then sort.  The advantage would fewer duplicates (if 
you think that might affect randomness).

I've needed similar techniques to generate data to test binary search algorithm 
performance against hash search algorithm performance.  The randomness of the 
order of the input data caused some cache line thrashing in the binary search 
which we felt was more realistic than just feeding the data in order.  For hash 
searches of course the order makes no difference.  But duplicates were not a 
problem for this problem.

In another way of looking at it, you are testing how well you shuffled a deck 
of 10,000 (instead of 52) cards.  According to theory, for a 52-card deck 7 cut 
and riffle shuffles have been considered sufficient for most card games.  But 
since you aren't simulating cut and riffle shuffles, proving that your order of 
numbers is random really relies on proving that your rng actually produces 
random numbers.  This is a very non-trivial task.   In my prior research I 
learned that some commonly used rng algorithms have serious flaws that were 
only discovered years after they'd made it into common usage.

Gary Weinhold
Senior Application Architect

DATAKINETICS | Data Performance & Optimization

Phone:  +1.613.523.5500 x216
Email:  weinh...@dkl.com

[http://www.dkl.com/wp-content/uploads/2015/07/dkl_logo.png]

Visit us online at www.DKL.com

[http://www.dkl.com/wp-content/uploads/2015/08/banner.png]

E-mail Notification: The information contained in this email and any 
attachments is confidential and may be subject to copyright or other 
intellectual property protection. If you are not the intended recipient, you 
are not authorized to use or disclose this information, and we request that you 
notify us by reply mail or telephone and delete the original message from your 
mail system.



__
On 2017-05-16 18:46, Richard Kuebbing wrote:

Fantastic.  This looks to be the level of brilliance I was looking for - 
simplicity plus 100% solution.

So follow-up question.  I have a lot of advanced math in grad school, all inapplicable to 
this.  Is there any kind of measure of how "random" a set of numbers is?  
Someone internal is bound to ask.  I am thinking of graphing the difference 
[=n(i+1)-n(i)] and looking at distribution.  The client(s) are business persons and are 
unlikely to ask.

Question 2:  I have a passion for documenting things.  Do you wish to have your 
name attached to this idea?

Tomorrow when I have time I will peruse all the answers.

Profound thanks

Peace be w/y'all

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Farley, Peter x23353
Sent: Tuesday, May 16, 2017 4:51 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: random quest

1.  Use either CEERAN0 or FUNCTION RANDOM to generate a column of 99,999 
random numbers.  It's OK if there are duplicates.
2.  Add a second column using SORT with sequential numbers from 1 to 9 
(use the SEQNUM option).
3.  SORT by the first column only and DO NOT specify the EQUALS option.
4.  Use the numbers in column 2 after sorting as your 99,999 randomly 
ordered numbers

You can combine steps 2, 3, and 4 in one SORT execution.  INREC to add the 
SEQNUM's as a second column, SORT by first column, OUTREC to select only the 
second column for output.

HTH

Peter

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Richard Kuebbing
Sent: Tuesday, May 16, 2017 4:28 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: random quest

So I need a set of 99,999 random numbers which are 5 digits and unique, i.e. no 
duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+% duplicates.

I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


- The information contained in this 
communication (including any attachments hereto) is confidential and is 
intended solely for the personal and confidential use of the individual or 
entity to whom it is addressed. The