Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
REXX tool to extract all files starting with XXX.YYYY

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
KeshavKunal

New User


Joined: 21 Jul 2020
Posts: 4
Location: India

PostPosted: Tue Jul 21, 2020 3:43 pm    Post subject: REXX tool to extract all files starting with XXX.YYYY
Reply with quote

Hi All,

I am new to REXX and need help in extracting the file names which start with XXXX.YYYY.ZZZZ
Back to top
View user's profile Send private message

Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1091
Location: Dublin, Ireland

PostPosted: Tue Jul 21, 2020 4:23 pm    Post subject:
Reply with quote

I'm not sure what you mean by "extract". Do you just want to find the dataset (not file) names or read the data within them? In any case, you could try:
Code:
X = outtrap("cat.")   
   /* get dataset names in stem cat. */                         
   ADDRESS TSO ,           
     "LISTC ALL LEVEL (XXXX.YYYY.ZZZZ) "           
               
   if RC ¬= 0               
       then do             
        say 'LISTC failed.'
       end                 
                           
   X = OUTTRAP("OFF")     

  do i = 1 to cat.0
    /* read datasets in here, if required.. */
  end


Garry
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10701
Location: italy

PostPosted: Tue Jul 21, 2020 4:36 pm    Post subject: Reply to: REXX tool to extract all files starting with XXX.YYYY
Reply with quote

simpler to use IGGCSI00 ...
well documented in the IBM manuals, pretty easy to use,

WORKING EXAMPLES her on the forum ( a complete script posted by expat - IIRC )

and in SYS1.SAMPLIB
Back to top
View user's profile Send private message
KeshavKunal

New User


Joined: 21 Jul 2020
Posts: 4
Location: India

PostPosted: Tue Jul 21, 2020 6:28 pm    Post subject:
Reply with quote

Thanks for the details & sorry for confusion.

My requirement is to get all the file names which start with "XXXX.YYYY.ZZZZ" and then perform operation on those files.


Garry Carroll wrote:
I'm not sure what you mean by "extract". Do you just want to find the dataset (not file) names or read the data within them? In any case, you could try:
Code:
X = outtrap("cat.")   
   /* get dataset names in stem cat. */                         
   ADDRESS TSO ,           
     "LISTC ALL LEVEL (XXXX.YYYY.ZZZZ) "           
               
   if RC ¬= 0               
       then do             
        say 'LISTC failed.'
       end                 
                           
   X = OUTTRAP("OFF")     

  do i = 1 to cat.0
    /* read datasets in here, if required.. */
  end


Garry
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue Jul 21, 2020 7:08 pm    Post subject: Re: Reply to: REXX tool to extract all files starting with XXX.YYYY
Reply with quote

enrico-sorichetti wrote:
simpler to use IGGCSI00 ...
well documented in the IBM manuals, pretty easy to use,

WORKING EXAMPLES her on the forum ( a complete script posted by expat - IIRC )

and in SYS1.SAMPLIB


Search for CSI00 and author Expat
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Group comparison/update between two f... premnath DFSORT/ICETOOL 8 Thu Oct 22, 2020 4:27 am
No new posts Need assistance formatting when joini... chillmo SYNCSORT 8 Wed Oct 21, 2020 10:56 am
No new posts REXX script to beautify XML jzhardy CLIST & REXX 1 Sun Oct 11, 2020 1:23 pm
No new posts Combining more 4 files with sorted or... bshkris DFSORT/ICETOOL 3 Thu Oct 08, 2020 10:57 am
No new posts JCL to extract repeating records saikarthik94 DFSORT/ICETOOL 6 Mon Oct 05, 2020 8:05 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us