On Sun, 3 Jun 2012 17:06:35 +0200, Giovanni Santuz wrote:
>
>RD =RANDOM(1,99999)
>HSMDS = 'TWRK.TEMP.D'!!RD
>"HLIST DSNAME('"ODSN"') ODS('"HSMDS"')"
>CALL READ_HSMDS
> 
Is RANDOM() the best way to do this, given that there's a 50%
chance of collision in 372 tries?  Would it be better (and more
informative) to generate a DSN using date/timestamps (despite
a certainty of collision if the script is run twice in one second)?

The real shame here is that DFSMShsm does not support using
a temporary DSN (or z/OS UNIX (USS) file or pipeline) by providing
either an OUTDDNAME or an OUTVOL parameter.

>READ_HSMDS:
>"ALLOC DATASET('"HSMDS"') File(HSMDS) SHR "
>"EXECIO 0 DISKR HSMDS (OPEN"
>"EXECIO * DISKR HSMDS (STEM HSMI."
>"EXECIO 0 DISKR HSMDS (FINIS     "

Can't the above 3 commands be collapsed into one (OPEN
is utterly superfluous -- assembler habit?):

    "EXECIO * DISKR HSMDS (FINIS STEM HSMI."

>X = MSG(OFF)
>"DELETE '"HSMDS"'"
>X = MSG(ON)
>"FREE DD(HSMDS)"
>RETURN
>
I read in:

    http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2U390/2.6

    Title: z/OS V1R12.0 DFSMShsm Managing Your Own Data
    Document Number: SC35-0420-09
    2.6 HLIST: Listing information from the BCDS and MCDS
        ...
    The HLIST command is a long-running command that can tie up your TSO 
terminal if its output is directed to TERM. 

Should I infer from this that conversely it runs concurrently
in background and does not tie up the terminal  if output is
directed to SYSOUT or ODS?  If so the above EXEC needs a
WAIT to guarantee that the output is complete.  (Or does
ENQ SHR handle this?)

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to