Portal | Manuals | 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: 1083
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: 10697
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 CA Sysview - JCL or Rexx - Read or Ex... Jasi CA Products 4 Wed Aug 05, 2020 9:19 pm
This topic is locked: you cannot edit posts or make replies. Invoke REXX thru JCL to expand the co... spizen556 CLIST & REXX 2 Sun Jul 26, 2020 3:53 pm
No new posts Unable to scroll in REXX panel KeshavKunal CLIST & REXX 4 Tue Jul 21, 2020 3:55 pm
No new posts Extract SRCOM with PIF (IWSz) jhonatan1090 IBM Tools 0 Mon Jul 20, 2020 7:23 pm
No new posts Extract part of data from file and wr... sathyajes DFSORT/ICETOOL 9 Thu Jul 16, 2020 10:49 am

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