Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we check the creation time of a GDG Generation
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Fri Jun 21, 2013 3:38 pm    Post subject: Can we check the creation time of a GDG Generation
Reply with quote

Hi All,

I checked this topic in forum but couldnt find my answer (May be either I missed soemthing or its not there)

I am creating a tool where I need to see the creation time of a Genration(Non VSAM) of Sevral GDGs or a single GDG ..

Would any body suggest If i can do this thru any command, Programing or any trick?..
I checked LISTC command output but the creation time is not there I believe.


Thanks in Advance !!

Sumit Chaturvedi
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 21, 2013 3:54 pm    Post subject:
Reply with quote

SMF record types 15 or 61 would probably be your best bet

Why do you need to know this information ???

I have changed the title from VERSION to the correct term - GENERATION
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Fri Jun 21, 2013 5:09 pm    Post subject:
Reply with quote

Hi Expat, Thanks for the information and changing the Title as well (My mistake) icon_smile.gif

Can you please show me a way to extract the record type 15(0F) from SMF?

I need this because I am in process of automating one Manual process which we do atleast once in eachday or depending on the request from agencies.

We sends many files daily to Agencies these jobs are trigered by the file sent by agencies itself and then process thru business, write the results and transfer back to agency.. Some time(almost daily) they need a/multiple file deletion at mainframe end so they provide the info like Agency name , time of file , amount etc.. Behalf of the agency email we searchs the job and file corresponds to the agency name and take the matching time job and pick the file from there to delete it .. this process takes 30-40 mins when we do manually

I am automating this process so that whenever the email arrives it is done automatically... For that I want to match the file creation time since there may be more then one file for same day

Hope I am clear above!!!
Thanks

Sumit
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Jun 21, 2013 6:47 pm    Post subject:
Reply with quote

thesumitk wrote:
We sends many files daily to Agencies these jobs are trigered by the file sent by agencies itself and then process thru business, write the results and transfer back to agency.. Some time(almost daily) they need a/multiple file deletion at mainframe end so they provide the info like Agency name , time of file , amount etc.

This, I confess, I do not understand.

Why do you retain the output data sets on your machine after getting an ack from the agency that it has received it? Is your shop effectively providing a back-up service for them? Is the process (mal)designed so that there is no other link between input and output than the creation time of the latter?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 21, 2013 7:08 pm    Post subject:
Reply with quote

If it is a GDS, why bother to manually delete it, it will roll off anyway at some stage.

As for the SMF data, you need to ask your site support people about that as there are quite often many restrictions on who can access this data.
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Fri Jun 21, 2013 7:57 pm    Post subject:
Reply with quote

In 3.4 I use line-command STATS. Maybe it's only in our shop?

Code:
Title: Data Set Statistics                  Date 13/06/21 13.172 Time 10:22
                                                                           
 Data Set Name: dataset.name.here                                         
       Vol Ser: TPO160                                                     
        Device: 3390                                                       
                                                                           
 Created: 2007/01/18    Last Used: 2013/06/19    Expires: ***None***       
                                                                           
 Dsorg: PO                                                                 
 Recfm: FB                                                                 
                                                                           
 Recsize:    80                                                           
 Blksize:  9040                                                           
                                                                           
 Allocated tracks:    330    Percent used:   5    Extents:   5             
                                                                           
 Updated/Created by: TSO9999  at: 08:39                                   
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Jun 24, 2013 6:07 pm    Post subject:
Reply with quote

Yup, that should be shop specific Gary. It's not standard ISPF command and does not work at my shop.

OTOH, creation time is not easily found. If the file was written as an output file, you could search SMF records, as expat said -- but as an application developer you rarely have the privileges to interrogate SMF records. And worse, as the SMF records are written continuously so you'll need to find the records for the day in question first.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Fri Jun 28, 2013 4:31 pm    Post subject:
Reply with quote

Thanks All for your inputs !!


I had to go off at work due to some reasons , I am back today

I appologies for confusions and not being clear in my requirement,

we have an application which sends many files daily to Agencies(within my shop's network) .

This transfer process is two wa process.. Agencies process the files sent by us .. for example : when the file recieved by agencies, it contains 100 records for customers , there is One customer who has $100 amount overdue on his card , Now agecy worked on this data and the example records now cotains $50 as overdue, This modified file sent to my LPAR again and after updating the data from FM or DB2 , we again sent this file to agency.. This is how it works here (Hoep I am clear).

Now please see below my my requirement

1- Some time agency send the files which are not correct or need modification so they want to remove the file from My LPAR.. So that they can send a fresh one.

2- I and My team use to delete them manually which takes a long time since agency dont know the dataset name or Mainframe , they only sends the amount of file , Agency name and some other information , behalf of that information we use to recognize the file (searching in procs, jcls) and delet the file once matched.

3- My Plan is to automate this process which will coem under Process Improvement chain. I am writing a rexx program to delete the file but need the creation time of the file.

total 687 jobs use to send the file to agency while we have only 5 GDG base used by these jobs and every time we have to dig in to the libraries to search for the right job and then see the runtime in SAR , Check the agency name by browsing the file , verify the amount and time of file .. once evrything is matched we takes the backup and delete it .

I have the SMF dataset for record type 15 and 61, Today I tried to ccopied it in my PS at Disk but the SMF data set has 32767 lenght record
and as we know that for JCL the maximum is 32760, Still I tried to copy it in output having 32760 length assuming truncation but I cant open the Data set which I created .. It says invalid record length.

I know it is very long post but writing to explain in detail.

PLease assist if possible .. Thanks in Advance !!
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Jun 28, 2013 5:34 pm    Post subject:
Reply with quote

Having a long post is not that much problem but using some acronyms which can have more than one meaning makes it tough to understand. For example here
Quote:
This modified file sent to my LPAR again and after updating the data from FM or DB2
what is FM - File Manager? And is it "from FM or DB2" OR "to FM or DB2"?

Quote:
1- Some time agency send the files which are not correct or need modification so they want to remove the file from My LPAR.. So that they can send a fresh one.
If they send you the file again before you have removed the existing file - what happens? They should be sending the files with "same values" always, yes? And how do you check the file is arrived? If they are sending only those files which are "corrected", can that not be of help by renaming all the existing files and cheking what has arrived, no? This might not work if multiple files, of one type, are sent in a single day.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Fri Jun 28, 2013 5:46 pm    Post subject:
Reply with quote

Hi Anuj,

Thanks for your note !!

This modified file sent to my LPAR again and after updating the data from FM or DB2 --> Fm is File Maintenance application where we keep all the files updated and feed to downstream applications So it is a "TO" for FM and and DB2

I am really not much clear about what happens after deleting the file or the file is deleted before the same file arrives,

We do not check if any file has arrived or not , We only check when we recieves a delete request for any file

Renaming of files will not help in this case...
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Jun 28, 2013 7:34 pm    Post subject:
Reply with quote

thesumitk wrote:
I am really not much clear about what happens after deleting the file or the file is deleted before the same file arrives
I think you should spend some time to get this information -- this might help you in getting that done what you're looking forward to...
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Jun 28, 2013 10:10 pm    Post subject:
Reply with quote

Presumably the processing time is necessary, but not sufficient, to identify the data set. When the data set is received from the agency, add to it a header or trailer containing all information that the agency would use to identify it, including transmission time. Your scheduler can submit a job to execute when the data set is created on your machine.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Sat Jun 29, 2013 10:52 am    Post subject:
Reply with quote

Could you please let me know about the SMF record ?
How I can investigate the record for creation time of a particular file ? will this be possible?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Sat Jun 29, 2013 5:11 pm    Post subject:
Reply with quote

SMF records are described in z/OS V1R13.0 MVS System Management Facilities (SMF) However, it is NOT easy to extract data from SMF and the data is only written at intervals specified at your site. If you think you are going to be able to find a file created 5 minutes ago in the SMF records, usually the answer will be that you cannot.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Mon Jul 01, 2013 2:20 pm    Post subject:
Reply with quote

I remmber I have seen the post some where.. They were able to get the success extracting the time form SMF thru SORT.. But My badluck I cant search that post now .. I tried a lot but not able to see
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Jul 01, 2013 10:17 pm    Post subject: Reply to: Can we check the creation time of a GDG Generation
Reply with quote

If you have a look at the Smart DFSORT Tricks, you'll find an example of processing a sub-set of SMF data. Is that what you were thinking of?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 02, 2013 11:42 am    Post subject:
Reply with quote

Although, this may be one of those very rare occasions where a creation date / time field may be appropriate.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue Jul 02, 2013 3:21 pm    Post subject:
Reply with quote

Hello,
Smart DFSORT tricks has the generic job for SMF record type 14.

Record type 15 is similar to 14 and you need to add dataset filtration criteria and the field for creation time.

Code:
//SORT  EXEC PGM=SORT,REGION=5000K                     
//SYSPRINT DD  SYSOUT=*                                 
//SYSOUT   DD  SYSOUT=*                                 
//SORTIN   DD  DISP=SHR,DSN=SMF DATASET WITH TYPE 15 RECORDS
//SORTOUT  DD  DISP=(NEW,PASS),DSN=&&TEMP,             
//             SPACE=(CYL,(50,20),RLSE),DCB=*.SORTIN   
//SYSIN    DD   *                                       
   SORT FIELDS=COPY                                     
   INCLUDE COND=(6,1,BI,EQ,15,&,69,5,CH,EQ,             
                 C'WELLS')                             
/*                                                     
//JS020    EXEC PGM=ICETOOL                             
//TOOLMSG  DD SYSOUT=*                                 
//DFSMSG   DD SYSOUT=*                                 
//SMF15    DD DSN=&&TEMP,DISP=(OLD,DELETE,DELETE)       
//SMF15RPT DD SYSOUT=*                                 
//SYSOUT   DD SYSOUT=*                                 
//TOOLIN   DD *                                         
  DISPLAY FROM(SMF15) LIST(SMF15RPT) -                 
  TITLE('SMF TYPE-15 RECORDS') DATE(4MD/) -             
  HEADER('DATE') ON(11,4,DT1,E'9999/99/99') -           
  HEADER('CREATION TIME') ON(49,4,TM1,E'99:99:99') -   
  HEADER('SYS') ON(15,4,CH) -                           
  HEADER('JOBNAME') ON(19,8,CH) -                       
  HEADER('DATASETNAME') ON(69,44,CH)                   
/*                                                     


Points to remember,
1. You need to adjust the length of the field in this line,
INCLUDE COND=(6,1,BI,EQ,15,&,69,5,CH,EQ,
based on the dataset qualifier you are looking for.
In this case, I was searching for datasets that being with WELLS, hence used the length as 5.

2. The creation time in the output is the time when the dataset was created. However the DATE IN THE REPORT is the date in which the SMF record was moved into the SMF buffer.

Sample output:
Code:
SMF TYPE-15 RECORDS        2013/07/02                             
                                                                 
      DATE   CREATION TIME   SYS    JOBNAME    DATASETNAME       
----------   -------------   ----   --------   -------------------
2013/07/02        00:10:43   LPAR   WELLS      WELLS.PLAY.DATASET
2013/07/02        00:27:27   LPAR   WELLS      WELLS.PLAY.DATASET
2013/07/02        00:28:28   LPAR   WELLS      WELLS.PLAY.DATASET
2013/07/02        00:29:28   LPAR   WELLS      WELLS.PLAY.DATASET
2013/07/02        00:30:28   LPAR   WELLS      WELLS.PLAY.DATASET
2013/07/02        00:31:29   LPAR   WELLS      WELLS.PLAY.DATASET
2013/07/02        02:05:59   LPAR   WELLS      WELLS.PLAY.DATASET


Hope it helps.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 02, 2013 3:38 pm    Post subject:
Reply with quote

vasanthz

I think the problem with using SMF data is that the OP wants the results on the same day rather than waiting for the dumped SMF data to be made available from overnight.

A lot of places will not allow general access to the MANx datasets, even for read access.

Maybe the best solution would be to look at the data receipt process and create a dataset name that identifies the agency code, date and time of creation.

This however may cause a lot of work to implement.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue Jul 02, 2013 4:31 pm    Post subject:
Reply with quote

Quote:
A lot of places will not allow general access to the MANx datasets, even for read access.

True.

same day would not be possible, correct.
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 -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts cics & real time monitoring icehat CICS 5 Wed Sep 07, 2016 2:29 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us