List of datasets created before the date specified

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
phaniyelugula
Member
Posts: 20
Joined: Mon Dec 30, 2013 6:03 pm

List of datasets created before the date specified

Post by phaniyelugula » Wed Jan 15, 2014 10:36 am

Hi All,

I am trying to the list of datasets with the follwoing requirements.

Input 1 – Date in the format of mm/dd/yyyy
Input 2 – High level qualifier of the dataset.

Output : List of datasets created before the date specified in Input 1 with high level quali-fier provided in Input 2.

but i dont have any idea of how to get it, I have heard that it can e done easily using REXX. Can you please help me out in JCL

phaniyelugula
Member
Posts: 20
Joined: Mon Dec 30, 2013 6:03 pm

Post by phaniyelugula » Wed Jan 15, 2014 12:49 pm

Using the following code im able to achieve half of the requirement( regarding high level qualifier)

Code: Select all

//LISTDS   EXEC PGM=IKJEFT1B                     
//SYSTSPRT DD SYSOUT=*                                 
//SYSTSIN  DD *                                  
 EXEC 'SYS1.SAMPLIB(IGGCSIRX)' EXEC              
IN5637S.P*.**                                    
//*                                            
Output im getting

Code: Select all

READY                                                                    
 EXEC 'SYS1.SAMPLIB(IGGCSIRX)' EXEC                                      
ENTER FILTER KEY                                                         
CATALOG  ICFCAT.TSO5                                                     
                                                                         
         NONVSAM  IN5637S.PL1                                  TSO004    
         NONVSAM  IN5637S.PL1.INOUT.AMBLT.OUTPUT               TSO005    
         NONVSAM  IN5637S.PL1.INOUT.AMBLT.OUTPUT.BK            TSO004    
         NONVSAM  IN5637S.PL1.INOUT.IBANIN                     TSO002    
         NONVSAM  IN5637S.PL1.LOADLIB                          TSO007    
READY                                                                    
END                                                                      
Is there any other way which is better than this??
and i have no idea of how to filter according to the date..

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Wed Jan 15, 2014 2:18 pm

It cannot be done 'in JCL'. JCL is not a programming language and you need one of those UNLESS date filtering can be done using IDCAMS or whatever program you use to get the list of dataset names.
Regards
Nic

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others