Well, there's LIST <g, d & r>.

Seriously, there are actually cases where CLIST still makes sense. I just wish 
that they'd enhance REXX to have the same capability.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Kirk Wolf <[email protected]>
Sent: Thursday, August 15, 2019 10:38 AM
To: [email protected]
Subject: Re: WEEDING OUT DSNS WITH CATALOG ENTRIES ONLY

As an opportunity to show that REXX isn't the only way to script something
on z/OS, here is an example of using a z/OS Unix shell script in a batch
job to do this.

The COZBATCH utility is our alternative to BPXBATCH that simplifies batch
shell scripts.
"catsearch" is a little Unix shell command that produces output like ISPF
3.4 - it uses IGGCSI00 for searching the catalog and then it gathers the
DSCBs to get label information.   Combining this with the z/OS Unix "awk"
scripting program allows you to filter the output and print and format
lines for the DSN and VOLUME of uncataloged datasets.

//UNIX EXEC PGM=COZBATCH    # a better BPXBATCH
//STEPLIB DD DISP=SHR,DSN=DOVETAIL.COZ.LOADLIB
//STDIN   DD *
# This is just a z/OS Unix shell script:
# Search the catalog and print those entries not found on the volume
catsearch -l "*.**" |
  awk '$2 == "??" { printf("%-44s %s\n",$3,$1); }'
/*
//STDOUT  DD DISP=(,PASS),DSN=&&OUT1,DCB=(RECFM=FB,LRECL=80)
//

It would be trivial to have awk generate IDCAMS commands to delete
uncataloged entries.

Kirk Wolf
Dovetailed Technologies
http://secure-web.cisco.com/1bx9oM1LpoLUkcEMUGPQqAgvrd4MwoNQF-ZdQUbvjeu7kTOBtXsBAo5h4v5OC35u0w7HaY3KPg8fJlZZWAJYGgmRjJG1PQhw7VLXqlkRgYEEGVEj1f27P5v2JrZuK6D88YoJndf_swqQti3YYqbpSq48pczlPZ0yqGg0RZhuvosFBHd39NLUKOdqIxwU61qcIk96K4-9Z3aRUccK2urGFnXEikF0-LrA1lwEJM8pe81AP7yvN4yEJ9ChqMulN-DVpU_q9mHq0Fh3v_oIdINnYvHikS1mznHyrL63j85bqMlCp3N6zOXI8ahgCLvshyCdXQd7cOUjuWtabrB_fHiYHCy6iRzRed0pS9BZs4sas7Dhgl2FIrCuFB1RThR1-AS2YFrPYMuV3HJToXHP8QdbVzuvkg6qyqsYGJ4LuDE-bxgE3Zx9XIMt_X8VBdDtuy855/http%3A%2F%2Fdovetail.com

PS> Co:Z can be downloaded and used free under our Community License:
http://secure-web.cisco.com/1w1NYPRqZ3vq1L1aoisGhYxOhP8CqcJE74kCp-jRwhdIIvYl-qqsxF8vBjd3Qtwpqh5h-ehbwO2lJecsY4SWKobOxVqeZv6-ytuCC2TIoLZft3XPmXDqHE03_iCUwKAR6ddZTc6XtFA6GoWayFRR-4eQyuLbSAY7kmdhKvcD8KwLe7JD6pSTOEL1e-YHOrdyA5iV8yI-q4KS4oBOYc-r0aWRzBq-GGWZ9Fjbkexq9q8WyNBXrjsSOTw3UKPx2omwq2xlUIUN6BrShGx6VYAwCrSiqQVpwy8L_PGpTuJ-08j6arRRMHzh7vfc2Cs_jxH_X6-mpZ8jQlm8X_WtWI6fr-9eVHLLaox3-mexmOsF_jVPM-DLfXzzgelMLPwD9f3OwmyXjiPCn7bEHHkJij4hhCw6OHkv_OMjE8prchmvvxuqpghmTFjeHyfKhtAafiShT/http%3A%2F%2Fdovetail.com%2Fsupport.html
For more info on:
    catsearch command
https://secure-web.cisco.com/1G0_5oLlmmGTPB_0FIFHhVI3CcK7fN-9SR-AXkZOdYycOb4qdi9MwydtcaVyR99uetSoClur_W8my-JsQYafpkcuzW2b28HXP1roWHC4vmPhPBxa58eRC5fCVKzPGkGsBbTRZ58shFpQpejJbhg7HSiDiRIvgGQjPChUkUiW9MTXH6quiO5qxsKEJiQygYOsCfr2SJPxNOeX9lazSX_8A6zqByO6of7HQz2Iru7XlqfGJ6vo-yieTVN2HKld3l21pEMG_EtEy6S_BY1KWcZd-j09u7eFndj-eoP1gN4VV4O08sFj0CbqhvoJcEifbGQoVRP-ldGwXmtXhpBD5rLeluOSDO5XdCp_bweeTLV1bB7MVVtU79lASKkXz3VPsH2iF--RfwcGuEtL7ICOj0geRbNEJXhJToNnLHV0bJ8X2HyC06nv1Ktji40dfFrcBNvRM/https%3A%2F%2Fdovetail.com%2Fdocs%2Fdspipes%2Fdsp-ref_catsearch.html
    COZBATCH 
https://secure-web.cisco.com/1N8QOuOLNQYsfKtGpUt8zvD-zkE5uZyyijyGQ1WuWuEuLEJ-9GWPixIkdhmcVAYUwrXtxJuRuRg2egaV9HIPiFxYycRY8W3ZpGojHmJGPm_yhwJ-6l7wW2r9HILr5oGjqsB7Nyw4hLYaPhaJCUJBtiiRIVQs2p1kZJ485oUnEZ8TMX__lR9_XF1s2AzgoFQNYWhB01UIMFNM09ShdfpmgTb3kxB10gleJn9srHvrtEj5ctT_WHA-RzCcRaXr0weFTRVNtQ6BhKh7ppuieTfRJtSoM2kYwP8VtK5BPN_fV6AHd5w-SrtOtJPvifURLyaO-jKW7h7j49YpxpTh56ZJZUTlKeJDZxT8UjXrbieKwZ1WA_4n6z2bDxdWSH2BkiiZ1YRXNS3VHS1QSUV90vWHUwPZV4WZuPkGG8psUywojNUNS46SZd-8vH9h2Eu1w89UH/https%3A%2F%2Fdovetail.com%2Fproducts%2Fcozbatch.html




On Thu, Aug 15, 2019 at 8:10 AM Pew, Curtis G <[email protected]>
wrote:

> On Aug 15, 2019, at 7:00 AM, esmie moo <
> [email protected]> wrote:
> >
> > Yes.  I am trying to find any dsns that exist in the catalog but don't
> exist on the disk.  I know that we have some ancient applications which
> refer to procs that have dsns which are cataloged but do not exist on the
> disk.
>
> I’m going to recommend Rocket Mainstar Catalog RecoveryPlus for this. It
> won’t just identify the DSNs, it will generate the IDCAMS statements needed
> to clean everything up. It can also find and fix more serious problems with
> your catalogs.
>
> This is one of those products you don’t need often but saves a lot of time
> and effort when you do need it.
>
>
> --
> Pew, Curtis G
> [email protected]
>
>
>
>
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

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

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

Reply via email to