Page 1 of 3

JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 5:51 am
by coldplay1991
I have a step which gets the records

myddname dd disp=(old,delete),dsn=*.unldstep.smfunld.outdd.
how do i proceed towards getting that written to the existing gdg i have.
i want to be able to create a generation like xxxxxx.something(+1)
and then when i am in the utility panel, 3.4, it shows all the list of datasets starting with xxxxxx.

thanks

Re: JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 6:07 am
by BillyBoyo
First of all, watch the DISP of your dataset. (OLD,DELETE) is "read once" only.

Are you saying you have a dataset which you want to copy to a GDG? You seem to have generally the right idea about it, so what is the problem you are having?

Re: JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 9:44 am
by dick scherrer
Hello and welcome to the forum,

Are you running some process to unload some smf data? Is the unloaded data for your use only? If so, why not create the new generation during the unload (i.e. the +1)?

If the unload file is not your own personal file, you need to remove the (old,delete) - whoever does own this may be highly displeased if you delete the dataset.

If you have not done so already, you need to define a new Generaton Data Group. Suggest you speak with your storage management people for the proper way to do this on your system.

Re: JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 11:39 am
by steve-myers
This most likely is a task performed by an experienced systems programnmer, not by a newbie. It is generally done like this to retrieve SMF data from the SMF datasets.

The JCL manuals have examples of creating GDG datasets, and there is no difference for datasets that contain SMF data other than the somewhat unusual DCB attributes used by these datasets.

Most shops have prescribed rules about this; since we do not know these rules we probably should not assist you.

Re: JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 6:39 pm
by coldplay1991
Thanks for the information.

Here is what I have

                   
//UNLDSTEP EXEC SMFUNLD                                           
//SMFUNLD.OUTDD DD DISP=(NEW,PASS),DSN=&&SMFTEMP,                 
//           SPACE=(CYL,(20,20)),RECFM=VB,LRECL=8192             
//myddname        DD DISP=(OLD,DELETE),DSN=*.UNLDSTEP.SMFUNLD.OUTDD


I dont know what comes next. I have my generation data group defined and exists , it is XYZS0000.ACCOUNTLOG.
There has be something like (+1) at the end that write it to a generation. This SMF dump data I meant.

Re: JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 6:53 pm
by MrSpock
OK, so from what I can tell, you have a temporary dataset "DSN=&&SMFTEMP" being created in this step. Following good coding practices, it would make sense to now add another step, checking that your step UNLDSTEP ended successfully, and then copying the temporary dataset to the GDG. What is the issue?

FYI, "XYZS0000.ACCOUNTLOG" can't possibly be a valid GDG base name.

Re: JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 7:01 pm
by coldplay1991
It gives a JCL error because something is wrong with the syntax.
No it is the valid one.

The GDG base (XXXXXX.ACCOUNTLOG) is an entry in the catalog,
not a dataset in its own right, so it doesn't exist on any particular
volume: ISPF 3.4 indicates such entries with "??????". (It does the same
for other catalog-only constructs such as VSAM clusters etc).

"A generation data group (GDG) base is allocated in a catalog before
the generation data sets are cataloged. Each GDG is represented by a GDG
base entry. Use the access method services DEFINE command to allocate the
GDG base."

Re: JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 7:06 pm
by NicC
Each section of a dataset name cannot exceed 8 bytes - ACCOUNTLOG is 10 bytes - error

Re: JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 7:19 pm
by coldplay1991
Ok for instance the GDG name is:
OXF0015.XXXXXLOG

Re: JCL to output smf records as generation

PostPosted: Tue Nov 15, 2011 8:05 pm
by MrSpock
//UNLDSTEP EXEC SMFUNLD                                           
//SMFUNLD.OUTDD DD DISP=(NEW,PASS),DSN=&&SMFTEMP,                 
//           SPACE=(CYL,(20,20)),RECFM=VB,LRECL=8192             
//myddname        DD DISP=(OLD,DELETE),DSN=*.UNLDSTEP.SMFUNLD.OUTDD
//*
// IF (UNLDSTEP.RC = 0) THEN
//COPYIT EXEC PGM=SYNCGENR or ICEGENER or IEBGENER or SORT or IDCAMS ...
//SYSUT1 DD DSN=&&SMFTEMP,DISP=(OLD,DELETE)
//SYSUT2 DD DSN=OXF0015.XXXXXLOG(+1),DISP=(,CATLG,DELETE),....
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// ENDIF