John McKown wrote:

I concur with everything what John said.

>Well, assuming that performance is not an overriding concern, I would have two 
>steps. The first would be a DFSORT which sorts the records in order by the 
>field in question. 

And drop the duplicates too. DFSORT can do that for you.

>         ADDRESS TSO "FREE DDN(OUTPUT)"

I would insert this IF SYSDSN(hlq."VALUE".records) /= 'OK' THEN

DO/END these ALLOC statements inside the IF SYSDSN part

>         ADDRESS TSO "ALLOC DDN(OUTPUT) DSN(hlq."VALUE".records) ",
>            "NEW CATALOG SPACE(a b) CYL RECFM(f) LRECL(lrecl) BLKSIZE(0)"

So, ALLOC is run after a check.

Just curious, do you need to add BLKSIZE?

>Of course, you need to customize the ALLOC command. And in my JCL, I would 
>have a //OUTPUT DD DUMMY

For the first few datasets to practise on the ALLOC, I would like to see what 
is in OUTPUT. Then if everything is fine, I will let DUMMY it. 

Create another REXX program to read the input again and use SYSDSN to pickup 
any missed datasets.


>If you're really adventurous, I'll give you a UNIX solution. But most people 
>don't really want that.

Post it! [1] If they don't like it, they will just vanish and not be 
remembered... :-D

Groete / Greetings
Elardus Engelbrecht

[1] - I think one of my colleagues may like that.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to