Wednesday, September 1, 2010

GDG, MF Job zOS

What is a Generation Data Group (GDG)? Generation Data Group is a group of chronologically or functionally related datasets. GDGs are processed periodically, often by adding a new generation, retaining previous generations, and sometimes discarding the oldest generation.

Can we DELETE all the Generations of a GDG at once, WITHOUT
deleting the GDG itself ?

Yes , we can do that by using following step :

//step1 dd pgm=iefbr14
//gdggen dd dsn=base-gdg-file,DISP=(MOD,DELETE,DELETE)

The above code will delete all the generations except the 
base GDG.TO delete base GDG you need to use IDCAMS.

What will happen to the step of a job if u code COND=ONLY?

//s1       exec pgm=ex1
//s2       exec pgm=ex2
//s3       exec pgm=ex3,cond=only
//s4       exec pgm=ex4

1) if s1 executes sucess, s2 got abend ,then executes s3.and
 stops execution

2) if s1 got abend, s2 dont executes ,then s3 executes.and
stops execution

3) if s1 executes sucess ,s2 executes sucess,then s3 wont
executes. and go to s4.....

If we are specifing joblib as well as steplib in job
then at the time of execution how the process will complete?

The JOBLIB statement is placed after the JOB statement and
is effective for all JOB steps. It cancot be placed a
cateloged procedure. The STEPLIB statememnt is placed after
the EXEC statement and is effective for that job step only.
Unlike the JOBLIB statement, the STEPLIB can be placed in a
cataloged procedure.

If both the JOBLIB and STEPLIB statement are coded, then the
STEPLIB specification will override the JOBLIB specification
for that job step.

The job will execute and 
steplib will overide the joblib. means job will ignore the 
load module kept in it, job will pick up the load module 
from the steplib for that particular step where steplib is 
mentioned.
The specification  of the  STEPLIB will continue for any steps.

 For how long a job can be executed continuously in a mainframe ?

Nearly 248 DAYS
MVS JCL (Utilities)
IEBGENER - COPY PS FILES
//PSCOPY JOB 'IBMMFS','MAC',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //STEP1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=IBMMFS.MAC.PS,DISP=SHR //SYSUT2 DD DSN=IBMMFS.MAC.PSCOPY,DISP=SHR //SYSIN DD DUMMY //
IEBCOPY - LOADING/UNLOADING
000001 //PSLOAD JOB 'IBMMFS','MAC',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID 000002 //STEP1 EXEC PGM=IEBCOPY 000003 //SYSPRINT DD SYSOUT=* 000004 //SYSUT1 DD DSN=IBMMFS.MAC.PS,DISP=SHR 000005 //SYSUT2 DD DSN=IBMMFS.MAC.PSLOAD,DISP=(NEW,CATLG,DELETE), 000006 // UNIT=TAPE,VOLUME=SER=260141,SPACE=(TRK,(4,2,0)), 000007 // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800) 000008 //SYSIN DD * 000009 COPY INDD=SYSUT1,OUTDD=SYSUT2 000010 /* 000011 //
IEBCOPY - COMPRESS
000001 //COMPRS JOB 'IBMMFS','MAC',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID 000002 //STEP1 EXEC PGM=IEBCOPY 000003 //SYSPRINT DD SYSOUT=* 000004 //SYSUT1 DD DSN=IBMMFS.MAC.PS,DISP=SHR 000005 //SYSIN DD * 000006 COPY INDD=SYSUT1,OUTDD=SYSUT1 000007 /* 000008 //
IEBCOPY - COPY SELECTED PDS MEMBERS
000001 //PDSCPY JOB 'IBMMFS','MAC',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID 000002 //STEP1 EXEC PGM=IEBCOPY 000003 //SYSPRINT DD SYSOUT=* 000004 //SYSUT1 DD DSN=IBMMFS.MAC.PDS,DISP=SHR 000005 //SYSUT2 DD DSN=IBMMFS.MAC.PDSCPY,DISP=SHR 000006 //SYSIN DD * 000007 COPY INDD=SYSUT1,OUTDD=SYSUT2 000008 SELECT MEMBER=(COBOL,COMP,RUN) <= SELECT <-> EXCLUDE 000009 /* 000010 //

No comments: