fromdsn idea for new option.

Discussion of the Co:Z Toolkit Dataset Pipes utilities
Post Reply
Posts: 48
Joined: Tue Jun 12, 2007 2:46 pm

fromdsn idea for new option.

Post by john.mckown »

I am once again doing "weird and wonderful" things using z/OS UNIX an Co:Z Data Set Pipes. I am doing some work with our DFHSM environment. I run two DFHSM LIST commands via the tsocmd command. For example: tsocmd "hsend list datasetname mcds ods(hlq.dfhsm.mcds.list)". This sends the LIST command to the DFHSM started task. Eventually the output is placed in HLQ.DFHSM.MCDS.LIST. But I don't know when. I can tell when it appears by using the catsearch command. But I can't really tell when DFHSM is finished with it. So I generally just do a "fromdsn" similar to: fromdsn hlq.dfhsm.mcds.list >|mcds.list . If the command fails, it is usually because it is in use by DFHSM. So I wait a while and try again. What might be nice would be an option to have the fromdsn command wait for the data set to be available if it is "in use". It could do this by doing a ISGQUERY on the data set name and then doing a dynamic allocation when it is not in use. Perhaps a -w (for wait) option, with an option number indicating the maximum number of second/minutes/whatever to wait before failing. Might even be interesting to do something like:

1) check to see if dsn exists, if not then wait & loop until it does or the timeout expires
2) check to see if available (not allocated or with DISP=SHR), if not then wait & loop as above
3) dynamic allocate and continue current processing.

This would simply allow me to do the tsocmd above to issue the DFHSM LIST command, then do the fromdsn to get the output I want. If not immediately available, I could just do something else on another window (say in TSO, or 2n UNIX shell), knowing that the fromdsn will eventually get the data.
Post Reply