How to find dataset creation date through JCL ??



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to find dataset creation date through JCL ??

Postby gauthamnagpur18 » Fri Nov 12, 2010 6:00 pm

Hi ,

I have a PS dataset . I need to find the creation date of that dataset through JCL . I am a fresher . I dunno how to do ??


Thanks
Gautham
gauthamnagpur18
 
Posts: 93
Joined: Sat Oct 23, 2010 1:28 pm
Location: Chennai, India
Has thanked: 3 times
Been thanked: 2 times

Re: How to find dataset creation date through JCL ??

 

Re: How to find dataset creation date through JCL ??

Postby mickeywhite » Fri Nov 12, 2010 6:23 pm

Quick off my head.
run idcams list on the high level of the dataset name, example DSN=FIRST.SECOND.THIRD.FOURTH ,
then just use FIRST.SECOND.THIRD and don''t put the last level of the dataset name on the idcam statment card. THEN look in the SYSPRINT dd output file and parse for the work CREATION.
The output will have every dataset name with those high level prefixes, so you will have to first search for the specific dataset in the ouput, then the word CREATION
code below:
000004 //STEP00B  EXEC PGM=IDCAMS
000005 //SYSUT2   DD SYSOUT=*
000006 //SYSPRINT DD DSN=FIRST.IDCAMLST.OUTPUT,
000007 //            DISP=(,CATLG,DELETE),
000008 //            UNIT=DISK,
000009 //            SPACE=(CYL,(25,25),RLSE)
000010 //SYSIN    DD *
000011  LISTCAT -
000012         LVL(FIRST.SECOND.THIRD) ALL
000013 /*
000014 //
mickeywhite
 
Posts: 11
Joined: Tue Nov 02, 2010 8:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to find dataset creation date through JCL ??

Postby gauthamnagpur18 » Fri Nov 12, 2010 7:33 pm

Thanks mickeywhite. I got it . But i need only creation date . But it is showing many parameters like expiration date etc . Whether it is possible to get only creation date .



Thanks
Gautham
gauthamnagpur18
 
Posts: 93
Joined: Sat Oct 23, 2010 1:28 pm
Location: Chennai, India
Has thanked: 3 times
Been thanked: 2 times

Re: How to find dataset creation date through JCL ??

Postby Bill Dennis » Fri Nov 12, 2010 8:15 pm

That date is when the CATALOG ENTRY was created. It may not be the true creation date of the file if it was uncataloged/recataloged.

A listing of the VTOC (pgm=IEHLIST) will show the actual date for disk files. For tape files list the tape management catalog.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to find dataset creation date through JCL ??

Postby steve-myers » Fri Nov 12, 2010 9:39 pm

//A       EXEC PGM=IKJEFT01
//SYSTSPRT DD  SYSOUT=*
//SYSTSIN  DD  *
 LISTDS xxx HISTORY
I don't regard the format of the creation date (yyyy.ddd) as very useful, but IDCAMS is juat as useless, IEHLIST is much harder to use than Mr. Dennis implies.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: How to find dataset creation date through JCL ??

Postby gauthamnagpur18 » Fri Nov 12, 2010 10:36 pm

Hi ,

I have used above steve-myers code.

but it is throwing error .

I gave

//STEP02 EXEC PGM=IKJEFT01         
//SYSTSPRT DD  SYSOUT=*           
//SYSTSIN  DD  *                   
 LISTDS(TEST.GAUTHAM.OUT) HISTORY 
                                   
/*                                 


but it is showing some error like this in SYSTSPRT

READY                             
 LISTDS(TEST.GAUTHAM.OUT) HISTORY 
INVALID COMMAND NAME SYNTAX       
READY                             
READY                             
END                               



Help me out .
gauthamnagpur18
 
Posts: 93
Joined: Sat Oct 23, 2010 1:28 pm
Location: Chennai, India
Has thanked: 3 times
Been thanked: 2 times

Re: How to find dataset creation date through JCL ??

Postby NicC » Sat Nov 13, 2010 12:09 am

Try doing it as Steve showed - he does not indicate the use of () around the DSN. However, if you are specifying the full name then you will have to use quotes around the DSN.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: How to find dataset creation date through JCL ??

Postby steve-myers » Sat Nov 13, 2010 12:21 am

The problem is the lack of a blank between the LISTDS and the (. As NicC says, you will probably have to place TEST.GAUTHAM.OUT in quotes. You can use the parenthesis to indicate you want to specify multiple data sets: LISTDS ('TEST.GAUTHAM.OUT' 'some.other.dataset') HISTORY, but they are not required for a single data set name.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: How to find dataset creation date through JCL ??

Postby gauthamnagpur18 » Thu Nov 25, 2010 10:51 pm

I got it .Thanks steve-myers.
gauthamnagpur18
 
Posts: 93
Joined: Sat Oct 23, 2010 1:28 pm
Location: Chennai, India
Has thanked: 3 times
Been thanked: 2 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post