Page 1 of 1

Job that created a dataset

PostPosted: Fri Mar 03, 2023 10:15 pm
by vbach
Hello,

Does anybody know if it is possible to get in a jcl the name of the job that created the dataset:
Example:

//SORT01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//CEEDUMP DD SYSOUT=C
//SORTMSG DD SYSOUT=*
//SORTJNF1 DD DSN=ABC.DE123F.GH123I(0),DISP=SHR
//SORTJNF2 DD DSN=JKL.MN123O.PQ123R(0),DISP=SHR <--- I need to get the name of the job that created this file

Re: Job that created a dataset

PostPosted: Sat Mar 04, 2023 4:46 am
by sergeyken
Please, clarify this sentence: "to get in a JCL the name of the job"

1) the job name to appear as a text within the JCL stream?

2) make the job name available to SORT utility in the same step?

3) print the job name as part of the JCL log, and/or of the SORT log?

4) something else?

Re: Job that created a dataset

PostPosted: Sat Mar 04, 2023 12:41 pm
by willy jensen
Not in JCL.
You can find the creation date using the IEHLIST utility or ISPF 3.4, then scan SMF records type 15 and 61 for that day for the datasetname. The latter is not a trivial exercise, so talk to your systems people, they might have something set up already.