View previous topic :: View next topic
|
Author |
Message |
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
Hi Expat, Thanks for the information and changing the Title as well (My mistake)
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Although, this may be one of those very rare occasions where a creation date / time field may be appropriate. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
Andy Robinson
New User
Joined: 04 Apr 2013 Posts: 5 Location: US
|
|
|
|
"Use SMF" is not a reasonable suggestion for most users. If all you need is the creation date of a GDG generation (generational dataset or GDS), and you know the name of the specific GDS or GDSs, try this:
Code: |
/* REXX */
parse arg dataset .
if (left(dataset, 1) <> "'") then do
dataset = ("'" || dataset || "'")
end /* if */
listError = listdsi(dataset)
say dataset "was created on" SYSCREATE
exit (listError)
|
Although if this works, the information should be in LISTCAT ALL, as well. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello Andy,
The title says "Can we check the creation time of a GDG Generation" |
|
Back to top |
|
|
Andy Robinson
New User
Joined: 04 Apr 2013 Posts: 5 Location: US
|
|
|
|
Curses, and I was so sure I was demonstrating my superior mastery with that trivial bit of Rexx code! |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Actually, using creation time for some processing is just little too much, for any platform - let alone the zOS!
And that's why SMF came in to the play... |
|
Back to top |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
HI Vasanthz,
Thanks a bunch for all you responses on this.. this really helped me a lot ..
I appologies for my delayed response as I put this req on hold due to other priorities tasks however I have resumed this activity now and working to get the time (rest of my tool has created,now lookign for the time of creation) .. I had a word with SM guy here he gave me one job i.e. a SAS job and Taking much considerable time to run ..
I tried your way(only first step as of now) and looks like it has fetched the dat for me but I cant try your next step as it is DFSORT and we have SYNCSORT here? .. the Date and time are not in display format in the output datset I got ,
Would you please show me a way to display the values with syncsort ..
Thanks |
|
Back to top |
|
|
|