JCL经典面试题库new.docx
- 文档编号:9849865
- 上传时间:2023-05-21
- 格式:DOCX
- 页数:83
- 大小:63.31KB
JCL经典面试题库new.docx
《JCL经典面试题库new.docx》由会员分享,可在线阅读,更多相关《JCL经典面试题库new.docx(83页珍藏版)》请在冰点文库上搜索。
JCL经典面试题库new
JCL经典面试题库
Q6)WhenshouldDISP=MODisused?
A6)DISP=MODisusedtoeitherextendanexistingsequentialdatasetortocreateadatasetifitdoesnotexist.Ifthedatasetexists,thenrecordsareappendedtothedatasetattheendoftheexistingdataset.Ifthedatasetdoesnotexist,thesystemtreatsMODasifitwereNEW,providedthatthevolumeparameterhasnotbeenused.Ifthevolumeparameterisused,thesystemterminatesthejobanddoesnotcreatethenewdataset.MODcanbeusedtoaddtoadatasetthatextendsontoseveralvolumes.AlwaysspecifyadispositionofCATLGwithMODforcatalogeddatasets,eveniftheyarealreadycataloged,sothatanyadditionalvolumeserialnumberswillberecordedinthecatalog.
、什么时候使用DISP=MOD?
DISP=MOD既可以扩展一个顺序DATASET,也可以创建一个没有存在的DATASET,对于一个存在的DATASET,记录被追加到末尾(要求必须是顺序数据集)。
如果没存在系统将把MOD当成NEW看,提供一个没有使用的空间参数。
如果空间参数使用过了,系统则终止JOB并且不创建DATASET,MOD可以被用来扩展一个DATASET的空间。
经常用MOD为一个编目的DATASET指定CATLG的属性,既使它已经编目了,因此在编目中可以增加任何连续的空间来写记录。
Q7)Howisadatasetpassedfromonesteptoanother?
A7)AdatasetispassedfromonesteptoanotherbasedonwhatiscodedontheDISPparameter.ThedatasetcanonlybepassedtosubsequentstepsifPASSwasusedonthedispositionparameter.
DATASET怎么从一个STEP传递到另一个STEP?
传递由DISP参数决定,使用DATASET只能被传递到下一个STEP
//STEPAEXECPGM=FILL
//DD1DDDSN=SWITH.GROUP1,…,DISP=(,PASS)
…
//STEPBEXECPGM=CHAR
//DD2DDDSN=STEPA.DD1,DISP=(OLD,CATLG,DELETE)
Q8)Howaredatasetsconcatenated?
A8)DatasetsareconcatenatedbywritinganormalDDstatementforthefirstdatasetandthenaddingaDDstatementwithoutaDDNAMEforeachdatasettobeconcatenatedintheordertheyaretoberead.Thefollowingisanexampleofthreedatasetsconcatenated:
//YEARDATDDDSN=JAN.DATA,DISP=SHR
//DDDSN=FEB.DATA,DISP=SHR
//DDDSN=MAR.DATA,DISP=SHR
DATASET怎么级联的?
DATASET级联是通过先写一个一般的DD语句,然后加上一个没有DDNAME的DD语句,看作读取顺序被级联。
如上例所示。
Q9)WhatisthedifferencebetweentheJOBLIBandtheSTEPLIBstatements?
A9)TheJOBLIBstatementisplacedaftertheJOBstatementandiseffectiveforalljobsteps.Itcannotbeplacedina
catalogedprocedure.TheSTEPLIBstatementisplacedaftertheEXECstatementandiseffectiveforthatjobstep
only.UnliketheJOBLIBstatement,theSTEPLIBcanbeplacedinacatalogedprocedure.
JOBLIB语句和STEPLIB语句有什么区别
JOBLIB语句是在JOB语句之后,对于所有的steps都有效,并且不能放在编目过程中,STEPLIB语句是在EXEC语句之后,只对当前的step有效,不同于JOBLIB,它可以放在编目过程中。
JOBLIB:
创建或指定一个私有库,系统到里面去找EXEC语句PGM参数指定的程序名,私有库中找不到再去系统库中查找。
指定的私有库必须是PDS数据集,里面存放可执行程序。
紧跟在JOB语句之后,可指定多个,不能放在JCL过程里面。
对于所有过程都有效。
STEPLIB:
定义某作业步的私有库,私有库中找不到直接转到系统库,忽略JOBLIB
Q10)NamesomeoftheJCLstatementsthatarenotallowedinprocs.?
A10)SomeoftheJCLstatementswhicharenotallowedinproceduresare:
1.JOB,Delimiter(/*),orNullstatements
2.JOBLIBorJOBCATDDstatements
3.DD*orDATAstatements
4.AnyJES2orJES3controlstatements
在procs哪些JCL语句不能命名
在过程中不允许的JCL语句:
1.JOB,分隔符(/*),或空语句
2.JOBLIB或JOBCATDD语句(JOBCAT语句为本JOB提供一个专用的目录,系统查找数据集时,先到专用目录中去查找)
3.DD*或DATA语句
4.任何JES2或JES3控制语句
Q11)Whatisprimaryallocationforadataset?
A11)Thespaceallocatedwhenthedatasetisfirstcreated.
一个数据集的初次分配是什么
数据集建立时的空间
(来源:
http:
//www.newcoin.info/)
Q12)Whatisthedifferencebetweenprimaryandsecondaryallocationsforadataset?
A12)Secondaryallocationisdonewhenmorespaceisrequiredthanwhathasalreadybeenallocated.
一个数据集的主分配和从分配有什么区别
从分配是当要求更多空间时所分配的
Q13)Howmanyextentsarepossibleforasequentialfile?
ForaVSAMfile?
A13)16extentsonavolumeforasequentialfileand123foraVSAMfile.
一个顺序文件有多少extents,VSAM?
顺序文件为在一个卷上为16extents,VSAM文件为123
Q14)Whatdoesadispositionof(NEW,CATLG,DELETE)mean?
-GS
A14)Thatthisisanewdatasetandneedstobeallocated,toCATLGthedatasetifthestepissuccessfulandtodeletethedatasetifthestepabends.
(NEW,CATLG,DELETE)的意思是什么
创建一个新的数据集,在作业步正常结束时编目,异常终止时删除
Q15)Whatdoesadispositionof(NEW,CATLG,KEEP)mean?
-GS
A15)Thatthisisanewdatasetandneedstobeallocated,toCATLGthedatasetifthestepissuccessfulandtoKEEPbutnotCATLGthedatasetifthestepabends.Thusifthestepabends,thedatasetwouldnotbecataloguedandwewouldneedtosupplythevol.serthenexttimewerefertoit.
(NEW,CATLG,KEEP)的意思是什么
创建一个新的数据集,在作业步正常结束时编目然后保留在相应的卷上,异常终止时不编目。
所以当作业步异常终止时,数据集不编目,并需要为下次提供相应的卷序列号
Q16)HowdoyouaccessafilethathadadispositionofKEEP?
-GS
A16)NeedtosupplyVolumeSerialNumber
怎样才能访问一个KEEP的文件
需要提供卷序列号VOL=SER=xxxx.
Q17)MOD,DELETE;Whatdoesadispositionof(,DELETE)mean?
A17)TheMODwillcausethedatasettobecreated(ifitdoesnotexist),andthenthetwoDELETEswillcausethedatasettobedeletedwhetherthestepabendsornot.Thisdispositionisusedtoclearoutadatasetatthebeginningofajob.
解释一下MOD,DELETE,(,DELETE)
MOD一个新的数据集的创建(如果这个数据集不存在),2个DELETEs是无论数据集是否异常终止,都删除
Disposition用于开始一个作业时删除数据集
Q18)WhatistheDDstatementforaoutputfile?
A18)Unlessallocatedearlier,willhavethefollowingparameters:
DISP=(NEW,CATLG,DELETE),UNIT,SPACE&DCB
一个输出文件的DD语句是什么
如果不存在的话,则必须要有
DISP=(NEW,CATLG,DELETE),UNIT,SPACE&DCB
Q20)WhatisDISP=(NEW,PASS,DELETE)?
A20)Thisisanewfileandcreateit,ifthestepterminatesnormally,passittothesubsequentstepsandifstepabends,deleteit.ThisdatasetwillnotexistbeyondtheJCL.
解释一下DISP=(NEW,PASS,DELETE)
创建一个新的数据集,如果作业步正常终止,那么保留传递到同一祖业的后续作业步中使用,如果异常终止,则删除。
数据集将不再存在
Q21)Howdoyoucreateatemporarydataset?
Wherewillyouusethem?
A21)TemporarydatasetscanbecreatedeitherbynotspecifyinganyDSNAMEorbyspecifyingthetemporaryfileindicatorasinDSN=&&TEMP.Weusethemtocarrytheoutputofonesteptoanotherstepinthesamejob.Thedatasetwillnotberetainedoncethejobcompletes.
如何建立一个临时数据集,在那里会用到他们
创建了临时数据集时不需要指定的DSNAME,或用指定的临时文件DSN=&&TEMP,在同一个JOB中,我们用它来将输出数据从一个作业步传到另一个作业步,
在作业完成后该数据集删除
Q22)HowdoyourestartaPROCfromaparticularstep?
-GS
A22)Injobcard,specifyRESTART=PROCSTEP.STEPNAMEwherePROCSTEP=nameoftheJCLstepthatinvokedthePROCandSTEPNAME=nameofthePROCstepwhereyouwantexecutiontostart
在一个特殊作业步中如何restart一个PROC
在JOB中,指定RESTART=PROCSTEP.STEPNAME,PROCSTEP为JCL作业部的名字,执行作业步时可以调用PROC和STEPNAME
Q23)Howdoyouskipaparticularstepinaproc/JOB?
-GS
A23)CanuseeitherconditioncodesorusethejclcontrolstatementIF(onlyinESAJCL)\
如何skip一个特殊作业步skip
使用任何一个条件代码(COND)或JCL控制语句IF
Q24)APROChasfivesteps.Step3hasaconditioncode.Howcanyouoverride/nullifythisconditioncode?
-GS
A24)ProvidetheoverrideontheEXECstmtintheJCLasfollows:
//STEP001EXECprocname,COND.stepname=value
AllparametersonanEXECstmtintheprocsuchasCOND,PARMhavetobeoverriddenlikethis.
一个PROC有5个作业步,Step3有一个条件代码,如何oerride/nullify这个条件代码
在EXEC语句中用override如下:
//STEP001EXECprocname,COND.stepname=value
象COND,PARM这样的EXEC语句必须这样覆盖
Q31)WhydoyouwanttospecifytheREGIONparameterinaJCLstep?
-GS
A31)TooverridetheREGIONdefinedattheJOBcardlevel.REGIONspecifiesthemaxregionsize.REGION=0Kor0MoromittingREGIONmeansnolimitwillbeapplied.
说明在JCL作业步中的REGION(见书86页)
Q32)WhatdoestheTIMEparametersignify?
WhatdoesTIME=1440mean?
A32)TIMEparametercanbeusedtoovercomeS322abendsforprogramsthatgenuinelyneedmoreCPUtime.TIME=1440meansnoCPUtimelimitistobeappliedtothisstep.
TIME参数的意思是甚么?
TIME=1440表示甚么
TIME当程序需要更多的CPU时间时用于克服S322abends
TIME=1440表示作业的运行没有时间限制,即24小时。
Q33)WhatisCOND=EVEN?
A33)Meansexecutethisstepevenifanyoftheprevioussteps,terminatedabnormally.
COND=EVEN
即使先前作业步异常终止,本作业步都要执行
Q34)WhatisCOND=ONLY?
A34)Meansexecutethissteponlyifanyoftheprevioussteps,terminatedabnormally.
COND=ONLY
只有先前作业步异常终止,本作业步才执行
Q35)HowdoyoucheckthesyntaxofaJCLwithoutrunningit?
A35)TYPERUN=SCANontheJOBcardoruseJSCAN.
如何在一个JCL中检查是否有语法错误
在JOB过程中,TYPERUN=SCAN或JSCAN.
Q36)WhatdoesIEBGENERdo?
A36)UsedtocopyoneQSAMfiletoanother.SourcedatasetshouldbedescribedusingSYSUT1ddname.DestinationdatasetshouldbedescribedusingSYSUT2.IEBGENRcanalsodosomereformattingofdatabysupplyingcontrolcardsviaSYSIN.
IEBGENER的作用
用于copyQSAM文件
资源数据集用SYSUT1ddname.描述,目标数据集SYSUT2描述?
?
?
?
?
?
?
IEBGENR也能用控制语句SYSIN来做一些数据的重定格式
Q38)Ihavemultiplejobs(JCLswithseveralJOBcards)inamember.WhathappensifIsubmitit?
A38)Multiplejobsaresubmitted(asmanyjobsasthenumberofJOBcards).
在一个成员中有几个JOB,如果提交了将会发生甚么
成员中的所有JOB都被提交。
Q39)IhaveaCOBOLprogramthatAcceptssomeinputdata.HowdoyoucodetheJCLstatementforthis?
(HowdoyoucodeinstreamdatainaJCL?
)
A39)//SYSINDD*
inputdata
inputdata
/*
有一个接受一些输入数据的COBOL程序,如何为它编一个JCL程序(如何在JCL中编一个流数据)
//SYSINDD*
inputdata
inputdata
/*
Q40)CanyoucodeinstreamdatainaPROC?
A40)No.
在PROC中的流数据可以编码吗
No.
Q41)Howdoyouovercomethislimitation?
A41)OnewayistocodeSYSINDDDUMMYinthePROC,andthenoverridethisfromtheJCLwithinstreamdata.
如何解决这个限制呢
在PROC内编写SYSINDDDUMMY,然后从JCL用流数据覆盖它
Q42)HowdoyourunaCOBOLbatchprogramfromaJCL?
HowdoyourunaCOBOL/DB2program?
A42)TorunanonDB2program,
//STEP001EXECPGM=MYPROG
TorunaDB2program,
//STEP001EXECPGM=IKJEFT01
//SYSTSINDD*
DSNSYSTEM(….)
RUNPROGRAM(MYPROG)
PLAN(…..)LIB(….)PARMS(…)
/*
如何从JCL运行一个COBOL批处理程序,如何运行一个COBOL/DB2
非DB2
//STEP001EXECPGM=MYPROG
DB2
//STEP001EXECPGM=IKJEFT01
//SYSTSINDD*
DSNSYSTEM(….)
RUNPROGRAM(MYPROG)
PLAN(…..)LIB(….)PARMS(…)
/*
Q43)WhatisSTEPLIB,JOBLIB?
Whatisitusedfor?
-GS
A43)Specifiesthattheprivatelibrary(orlibraries)specifiedshouldbesearchedbeforethedefaultsystemlibrariesinordertolocateaprogramtobeexecuted.STEPLIBappliesonlytotheparticularstep,JOBLIBtoallstepsinthejob.
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- JCL 经典 面试 题库 new