Hi,
Just a few days ago I have had to produce something like that for someone
that wanted to know where some files were being created. For some time now
that I try to use SORT to solve this kind of requests.
This is what I used to get the desired results (just for the 02/09/2023 SMF
records), using SORT to read the SMF records directly (bypassing IFASMFDP):
//SYMNAMES DD *
SMF-TYPE,6,1,BI
TYPE014,X'0E'
TYPE015,X'0F'
SMF-DATE,12,3,PD
SMF-ID,15,4,CH
SMF-JOBNAME,19,8,CH
SMF-USERID,35,8,CH
SMF-OPEN-TIME,49,4,BI
SMF-DSN,69,44,CH
SMF-HLQ,69,8,CH
SMF-OPEN-DATE,269,04,PD
SMF-STEPNAME,331,8,CH
SMF-PGMNAME,339,8,CH
SMF-JOBID,347,8,CH
/*
and
//SYSIN DD *
SORT FIELDS=COPY
OPTION VLSHRT
INCLUDE COND=(SMF-TYPE,EQ,TYPE015,&, * SMF 015
SMF-OPEN-DATE,EQ,0123040,&, * SMF DATE = 09/02/23 Julian
SMF-HLQ,EQ,C'DSNHLQ.') * DSN = DSNHLQ.**
*
OUTFIL FNAMES=OUT001,
CONVERT,REMOVECC,
OUTREC=(SMF-TYPE,TO=ZD,
X,
SMF-OPEN-DATE,DT1,
X,
SMF-OPEN-TIME,TM1,
X,
SMF-ID,
X,
SMF-JOBNAME,
X,
SMF-USERID,
X,
SMF-DSN,
X,
SMF-STEPNAME,
X,
SMF-PGMNAME,
X,
SMF-JOBID)
/*
This will give you a file with records like these:
015 20230209 000507 PROD JOBP080D OPCPUSR DSNHLQ.UCS9900.SORTSPS.G4852V00
PS020 SORT J0641824
015 20230209 000529 PROD JOBP085D OPCPUSR DSNHLQ.UCS0000.D91ICFO.G4859V00
PS010 BATCHPEM J0641898
015 20230209 000538 PROD JOBP831D OPCPUSR DSNHLQ.ZDD831.ZD1655I
ZDF831RO IDCAMS J0641929
015 20230209 000538 PROD JOBP923D OPCPUSR DSNHLQ.UCS9999.ZD1802I
ZDD923C1 IDCAMS J0641933
It is highly probable that Kolusu can enhance this SORT
Best Regards,
Jack
On Wed, 15 Feb 2023 at 06:38, Bruce Hewson <
[email protected]> wrote:
> Hi Bill,
>
> my MXG code:-
>
> options ls=160 ;
>
> MACRO STOPOVER MISSOVER %
>
> MACRO _DSNLIST
> 'dataset.name.one'
> 'cluster.name.two.DATA'
> %
>
>
>
> %LET MACKEEP=%QUOTE(
> MACRO _LTY64X _NULL_ %
> MACRO _ETY64X %
> MACRO _VAR1415
> dsnresult (
> KEEP=DSNAME JOB SYSTEM OPENTIME SMFTIME
> PROGRAM DDNAME OPEN SMF64SMB
> ACBIN ACBOUT SITUATN
> JCTJOBID STEPNAME ID
> )
> %
> MACRO _ETY1415
> IF DSNAME IN ( _DSNLIST )
> THEN OUTPUT work.dsnresult ;
> %
> MACRO _ETY1718
> OPENTIME = READTIME;
> IF DSNAME IN ( _DSNLIST )
> THEN OUTPUT work.dsnresult ;
> %
> MACRO _ETY64
> DSNAME = ENTRNAME;
> IF DSNAME IN ( _DSNLIST )
> THEN OUTPUT work.dsnresult ;
> %
> MACRO _ETY77
> DSNAME = RNAME ;
> OPENTIME = STARTIME ;
> PROGRAM = QNAME ;
> DDNAME = SYSOWN1 ;
> JOB = JOBOWN1 ;
> IF DSNAME IN ( _DSNLIST )
> THEN OUTPUT work.dsnresult ;
> %
> MACRO _ETY64X ;
> %
> );
>
> %include sourclib(vmac1415,vmac1718,vmac64,vmac77);
> %include sourclib(vmacsmf,imackeep);
>
> DATA
> _VAR1415
> _VAR1718
> _VAR64
> _VAR77
> _SMF
> _CDE1415
> _CDE1718
> _CDE64
> _CDE77
>
> proc sort data=work.dsnresult ;
> by opentime ;
>
>
> options linesize=150 nocaps;
>
> proc print uniform noobs split='*' ;
> var dsname
> job
> stepname
> system
> opentime
> smftime
> program
> ddname
> open
> acbin
> acbout
> SMF64SMB
> jctjobid
> id
> ;
> title 'Dataset access report';
>
>
>
> hopefully it does not lose the formatting.
>
> Regards
> Bruce Hewson
>
> On Tue, 14 Feb 2023 04:29:15 -0600, Bill Giannelli <
> [email protected]> wrote:
>
> >Is there a way to determine what job created a dataset?
> >thanks
> >Bill
> >
> >----------------------------------------------------------------------
> >For IBM-MAIN subscribe / signoff / archive access instructions,
> >send email to [email protected] with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN