REXX Find a member that contains a file



IBM's Command List programming language & Restructured Extended Executor

REXX Find a member that contains a file

Postby villasg » Wed May 02, 2018 7:26 pm

Hi,

I try to find a member pds that contains a dataset name using rexx language ? Thank's
villasg
 
Posts: 2
Joined: Wed May 02, 2018 7:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX Find a member that contains a file

 

Re: REXX Find a member that contains a file

Postby Terry Heinze » Wed May 02, 2018 9:21 pm

If this is a 1 time only task, you could always use the SRCHFOR function in ISPF:
 Menu  Functions  Confirm  Utilities  Help
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
MNPC#1  DSLIST    xxxxxx.AAA.CNTL                       Row 0000014 of 0000257
Command ===> SRCHFOR DATASET                                  Scroll ===> CSR
           Name     Prompt       Size   Created          Changed          ID
_________ AMSPRINT *Found          22  2015/09/21  2015/09/21 15:49:00  xxxxxx
_________ AMSTEST                  19  2014/02/28  2017/08/17 14:37:00  xxxxxx
_________ AMSXSTCC                 33  2017/02/03  2017/06/26 15:53:00  xxxxxx
_________ AMSXSTRC                 38  2017/06/26  2017/06/26 15:53:00  xxxxxx
_________ ANLIMGJB                 36  2018/04/27  2018/04/30 14:09:00  xxxxxx
_________ ANLIMGPR                578  2018/04/27  2018/04/30 14:22:00  xxxxxx
_________ BIGGERPE *Found          55  2015/01/20  2018/05/01 15:56:00  xxxxxx
_________ BIGGERPO *Found          54  2013/11/25  2017/11/24 09:13:00  xxxxxx
_________ CCTEST                    1  2017/06/14  2017/06/14 08:40:00  xxxxxx
_________ CLASS                    30  2017/03/21  2017/03/21 14:12:00  xxxxxx
_________ CMPLWOXP                 85  2014/07/18  2015/01/16 14:16:00  xxxxxx
_________ CMPLWXP                  86  2014/12/29  2015/02/05 08:31:00  xxxxxx
_________ CNTAMS                   18  2016/12/13  2016/12/13 13:35:00  xxxxxx
_________ CNTSYNC                  18  2016/12/13  2016/12/13 11:30:00  xxxxxx
_________ COPY                     26  2014/02/20  2017/03/01 10:32:00  xxxxxx
_________ COPYEMF                  61  2017/01/27  2018/04/23 10:04:00  xxxxxx
_________ COPYENV                  47  2018/04/23  2018/04/23 10:38:00  xxxxxx
_________ CPYBKPOS                 62  2015/11/12  2018/01/18 14:10:00  xxxxxx
.... Terry
Terry Heinze
 
Posts: 209
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 10 times
Been thanked: 11 times

Re: REXX Find a member that contains a file

Postby Pedro » Wed May 02, 2018 9:35 pm

Use the SUPERC utility to search the PDS. From rexx, you can allocate the DD's required and use the TSO CALL command to launch SUPERC.
Pedro Vera
User avatar
Pedro
 
Posts: 586
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 42 times

Re: REXX Find a member that contains a file

Postby villasg » Wed May 02, 2018 10:13 pm

Thank's for your answer but I have to introduce it into a rexx development
villasg
 
Posts: 2
Joined: Wed May 02, 2018 7:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX Find a member that contains a file

Postby prino » Wed May 02, 2018 11:14 pm

Invoke ISRSUPC from REXX...
"alloc f(olddd) da("!g.0dsn_o.i") shr reu"
"alloc f(newdd) da("!g.0dsn_n.i") shr reu"
"alloc f(sysin) da('"ispdyn"(superc"!g.0su.pid")') shr reu"
"alloc f(outdd) dummy reu"

"call *(isrsupc) 'DELTAL,LINECMP,"s_sparm"'"

select
  /***************************************************************
  * No differences or error on OLDDD                             *
  ***************************************************************/
  when rc =  0 |,
       rc = 28 then
    do
      "del" !g.0dsn_o.i
    end

Sheesh, was that so hard?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 562
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 24 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post