jcl interview questions
JCL interview questions
what is the use of different dispositional parameters(DISP) ??
the dispositional parameters are used to tell the disposition of your dataset whether the dataset is NEW or OLD or MOD(dataset may or may not exists) or SHR.
the following is the syntax to specify the disposition of a dataset
//ddname DD DSN=hubpages.example.jcl1,DISP=(disp_parameter,normal_termination,abnormal_termination)
- NEW : when the dataset is not exists in the disk and you are going to create the dataset in the JCL then we will give the DISP as NEW like following :
eg: //ddname DD DSN=hubpages.example.jcl1,DISP=(NEW,CATLG,DELETE) SPACE=(CYL,(1,5),RLSE), UNIT=DISK, DCB=(RECFM=FB,LERECL=80,BLKSIZE=800)
2. OLD : when the dataset is already exists in the disk then we will use the DISP=OLD
eg: //ddname DD DSN=hubpages.example.jcl1,DISP=OLD
3. SHR: when the dataset already exists in the disk we will use DISP=SHR
eg: //ddname DD DSN=hubpages.example.jcl1,DISP=SHR
but the difference between the OLD and SHR is the way the dataset can be accesses by multiple users at same time.
for eg: i have created one job and other person also created one job these both jobs are going to run at same time and these are going to use same dataset hubpages.example.jcl1and both the jobs purpose is just read the what ever data present in the dataset, not writing any thing into the dataset hubpages.example.jcl1 at that time we will use DISP=SHR. this means that when this job is using this dataset another jobs also can use this dataset at same time.
OLD is opposite to SHR. when my job purpose is to write data to the file hubpages.example.jcl1 not read so in this case when one is writing others should not allow to write or read from the same file. So in this case we have to apply lock to the dataset so that no body can able to access the dataset when the other job is using the dataset for to write.
Simply OLD holds exclusive control on dataset.
4. MOD: if the dataset is not created already MOD will create the specified dataset. if the dataset already exists then it will append the data that we will write on to it.
I will be updating this page with more questions please do check this page..
Go to the next page of JCL interview questions
- jcl interview questions page2
what is S322 abend how you will resolve?? Basically s322 is timeout abend this means that the job has taken probably long time to execute. i.e ., more than alloted CPU time. CPU time is the time which has...