JCL

How to Copy a Dataset into Another Using IEBGENER

IBM utility IEBGENER can be used to copy the content of one dataset into another via batch. The basic JCL for this effect is as follows: //COPYFILE EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=input_dataset,DISP=SHR //SYSUT2 DD DSN=output_dataset,DISP=(,CATLG), // VOL=SER=volser, // SPACE=(CYL,(xx,yy),RLSE) //SYSIN DD DUMMY //SYSUDUMP DD SYSOUT=* //* You […]

JCL

How to Create an SMF report using DFSORT ICETOOL

The following JCL is an example on how to use IBM DFSORT ICETOOL utility to produce a report on SMF records (record type 80 in our example): //SMFRPTR EXEC PGM=ICETOOL //RAWSMF DD DISP=SHR,DSN=SYS2.WEEKLY.SMF(0) // DD DISP=SHR,DSN=SYS2.WEEKLY.SMF(-1) // DD DISP=SHR,DSN=SYS2.WEEKLY.SMF(-2) // DD DISP=SHR,DSN=SYS2.WEEKLY.SMF(-3) //TEMPSMF DD DSN=&&TEMPS,SPACE=(CYL,(15,15)),UNIT=SYSDA //REPORT DD DSN=USER1.SMF.REPORT,DISP=OLD //TOOLMSG DD […]

JCL

JCL to Clear SMF Datasets

Here’s a simple example of a batch job to clear the content of your SMF datasets: //SMFDP EXEC PGM=IFASMFDP //INDD1 DD DISP=SHR,DSN=SYS1.MAN1 //INDD2 DD DISP=SHR,DSN=SYS1.MAN2 //INDD3 DD DISP=SHR,DSN=SYS1.MAN3 //SYSPRINT DD SYSOUT=* //SYSIN DD * INDD(INDD1,OPTIONS(CLEAR)) INDD(INDD2,OPTIONS(CLEAR)) INDD(INDD3,OPTIONS(CLEAR)) Explanation: INDDx – are the DD cards that specify the SMF datasets. SYS1.MANx […]

JCL

Delete content of a sequential dataset using IDCAMS

The following JCL will delete the content of a sequential dataset without deleting it using the IDCAMS utility: //DELCONT  EXEC PGM=IDCAMS //DDDMMY   DD DUMMY //DDOUT    DD DISP=SHR,DSN=USER1.MYDATA.EXAMPLE //SYSPRINT DD SYSOUT=* //SYSOUT   DD SYSOUT=* //SYSIN    DD * REPRO IFILE(DDDMMY) OFILE(DDOUT)   Replace USER1.MYDATA.EXAMPLE by the sequential dataset you wish to delete […]

JCL

Copy content of one Dataset into another using IEBCOPY

The following JCL will allow you to copy the content of one dataset into another via batch job: //COPY EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //IN  DD DISP=SHR,DSN=USER1.MYDATA.EXAMPLE //OUT DD DISP=SHR,DSN=USER2.MYDATA.FORYOU //SYSIN DD * COPY INDD=IN,OUTDD=OUT Replace USER1.MYDATA.EXAMPLE and USER2.MYDATA.FORYOU by your own dataset names.