AS400题库.docx
- 文档编号:12993488
- 上传时间:2023-06-10
- 格式:DOCX
- 页数:12
- 大小:20.43KB
AS400题库.docx
《AS400题库.docx》由会员分享,可在线阅读,更多相关《AS400题库.docx(12页珍藏版)》请在冰点文库上搜索。
AS400题库
1.在RPG程序里,不用CHAIN或READ方法,如何得知文件是否有记录存在?
SETLLindicator=‘1’or%Found()=‘0’
定义文件数据区INFDS和其中的域名*RECORD,如果*RECOED<>0,记录存在
InFiledescriptioncontinuationline(IPFK),
KINFDSRCDS
IRCDSDS
I*RECORD#RCDS
2Howtodetermineiftherecordisinusedbyanotheruser?
Wecandetermineweatherarecordisinusebyeanotheruserwiththehelpofstatuscode(*STATUS).If*STATUS=01218.recordalreadylocked.
3.详细说明5种活动组分别制定,叫什么名字,什么期间结束?
(1)编译程序ACTGRP=*YES,程序属于OPM传统组,程序进入任务的组,名字是
系统生成的,任务结束时,活动组也结束了
(2)ACTGRP=*NO,NAME=*new,系统生成名字,程序退出了,活动组也结束了
(3)ACTGRP=*NO,NAME=*CALLER,活动组定义来自被其他程序调用,那个程序的组
(4)ACTGRP=*NO名字默认为QILE,或用户,活动组在任务结束时同时结束。
或RCLACTGRPRSC
4.RPG程序不希望使用循环功能,如何定义
控制语句加入HNOMAIN
5.如何RPG程序使用语句设置*INLR=*ON,然后是WRITE一条记录,程序会发生什么?
程序会顺利写入一个记录。
6.功能键定义CA/CF有什么区别?
CF可以返回屏幕数据和功能键的值,相当于ENTER+FUNCTIONKEY,CA仅仅是返回功能键。
7子程序*INZSR用途?
RPG启动后首先会自动执行的一种特殊子程序,可以初始化变量
8RPG如何调用CLPprogram?
BycallingQCMDEXCapplication
9这两个语句有什么用答,stat01,stat02定义为常量
I'CLOSED'CSTAT01
I'OPEN'CSTAT02
10UDATEand*DATE区别?
UDATE=*MDY(MMDDYY).
*DATE(systemdate)=*MDYY(MMDDYYYY).
11如何DEBUG批任务程序?
(1)编译程序DBGVIEW(*SOURCE)OPTION(*SRCSTMT:
*NODEBUGIO)
(2)Holdjobqueue,Submitjobtocallprogram,holdjob,releasejobq
(3)CopyJOB(number/user/name)fromjoblog
(4)STRSRVJOBJOB(number/user/name)
(5)STRDBGPGM(library/program)UPDPROD(*YES)(StartDebug),屏幕显示源程序,PressF12toexit
(6)ReleasethejobsothatitbecomesSTATUS(*ACTIVE).
(7)You'llseeadisplayaskingifyouwanttodebugorcontinue.PressF10todebug.
(8)DSPMODSRCtoseethesourcelistingagain.Alternately,pressF10tostepintothefirstinstruction.
(9)Nowyoucanaddyourbreakpoints.
(10)F3backtothe"debugorcontinue"display.Enter启动任务,停止在第一个断点,DEBUG
(11)Enddbg,endsrvjob
12DOWXXandDOUXX区别?
DOWxx条件为真,进入循环,DOUxx条件为真退出循环,所以这个循环最少执行一次
13LEAVEandITER的区别?
Leave推出循环,执行下句,ITER返回循环顶部第一句
14.PGMA调用PGMB,每次PGMB用RETURN返回,当第一次调用PGMB,子程序*INZSR自动执行
那第二次或以后调用,*INZSR是否还会执行?
No!
15解释下面语句
HILOEQ
C*YMDTest(D)ORDDATE15
ORDDATE如果不等于“YYMMDD’*IN15=*ON
16.WhatisthedifferencebetweenSETONLRandRETURN?
IfyouspecifySETONLR,allthefilesusedinprogramwillbeclosed.
IfyouspecifyRETRUNonly,allthefilesusedinprogramwillremainopen.
17.WhatisthemaximumnumberofparametersallowedinRPG?
255(Twohundredandfiftyfive)
18.WhatisthedifferencebetweenPackeddecimalandZoneddecimal?
Packeddecimal:
Onedigitoccupies1byte.DefaultinPF
Zoneddecimal:
Onedigitoccupies2bytes.DefaultinDatastructures
19.HowdoyouusecommitmentcontrolinRPGprogram?
UsingCOMIToperation.MakesallchangestothefilesthathavebeenspecifiedinoutputoperationsincethepreviousCOMITorthebeginingofoperationsundercommitmentcontrol(iftherehasbeennopreviousCOMITorROLBKoperation).
20.WhatdoestheopcodeFREEdo?
TheFREEoperationremovesaprogramfromthelistofactivatedprograms,freesstaticstorageandensuresprograminitialization(firstcycleprocessing)thenexttimeprogramiscalled.Itdoesnotclosefileorunlockdataarea.
21Whatisserviceprogram?
AServiceProgramisacollectionofrunnableproceduresandavailabledataitemseasilyaccessiblebyotherILEserviceprogramdiffersfromaprogramintwoways:
Itdoesnotcontainaprogramentryprocedure.youcannotcallaserviceisboundintoaprogramorotherserviceprogramsusingbindingbyreference
22WhatistheopcodetoreleaseallthelocksonaparticularPF?
UNLCK
23Whichofthefollowingmethodswillmakeexternallydescribefilefieldsavailabletoaprogram?
ADataStructuredefinitionspecificationthatnamesthefileontheEXTNAMEkeyword.
24是否可以对RPGLE程序使用STRISDBError:
Programtypenotvalid
25WhichwillbetheoutputofthefollowingILECode?
DAnswerST
CT’12:
00PM’ADDDUR12:
*HoursAnswer
answer=AM
26WhichofthefollowingSpecs.IsnotusedinILEESpecs.
27WhichistheBuiltinfunctiontoconvertnumericfieldtoAlphafield?
%EDITC,%EDITW,%CHAR
28ForCHAIN,SETLL,SETGT,READE,READPE&READEwhereindicatorsaregiven&theirsuccess?
OpcodeSuccessIndicator
CHAINOFFHI
READ,READE,READP,READPEOFFEQ
SETLLONEQ
SETGTONHI
29AdvantagesofILEorRPG?
1)InRPGIIIitisonestepcompilation
2)RPGIVcallaprogramrecursive
3)OperationcodeExtendedFactor2
4)LengthofFactor1&2isincreasedto14from10
5)Freeformatisallowed
6)Built-in-functionsareavailable.
7)conceptofACTIVATIONGROUP.
30ListsomeBIFinRPGLE?
%SIZE-Givesthesizeofthevariableorliteeral
%TRIM-Trimstheright&leftblanksofthestring
%REPLACE-Replacesthespecifiednumberofcharactersfromthespecifiedposition.
%SUBST-givesasubstringfromavariable(%SUBST(X:
Y:
Z)
%ELEM-Givesnumberofelementsoroccurrences
%LEN–Returnsthelengthofvaluefromafield.
%CHAR–ConvertsaNumericfiledtocharacter.
%EOF–EndofFileorbeginoffile.
%FOUND–IfrecordisFound.
31Howtogoto*PSSR?
Wheneveranexception/erroroccursand*PSSRisdeclaredinF-specs,itisautomaticallygoesto*PSSR
FINFSR(*PSSR)
*PSSRBEGSR
………………
ENDSR
ifthefactor2oftheENDSRisblankcontrolwillreturntothenextsequentialinstruction.
32WhatisProcedure?
Aprocedureisthesetofselfcontainedhighlevellanguagestatementsthatcanperformaparticulartaskandthenreturnstoacaller.
DPROC1PR
PPROC1BExport
ThendefineProcedureInterfacealongwithparameterandPI
DPROC1PI50
DPARMA50
DPARMB50
Definealltheparametersasavariabletotheprocedure
DPARMAS50
DPARMBS50
CPROC1E
CRETURNPARMA+PARMB
33HowtodefineGlobalParameterinILEWhatisthedisadvantage?
DeclareavariablewithkeywordEXPORTandwhileusingthisvariableinantherprogramdeclarewith
IMPORTcannottraceoutatwhichpointthevalueofvariableischanged.
34EDTCDE&EDTWRD
EDTCDEcannotbeappliedtoCharacterfiled.forexample,EDTCDE(Z)suppressingtheleadingzeroY
EDTWRDcanbeusedtodefineuserdefinedformattingforafields.
35WhatarethetwoimportantparameterwhilecreatingaSQLRPGLEprogram?
1)CMTCTL-*NONE(CommitmentControl)
2)CLOSQLCR-*ENDMOD(EndofModule)bydefaultis*ENDACTGRP
36Whatisthedifferencebetween*LIKEand*NAMVARopcode?
*LIKEdefinesprogramvariablesameasthatofanotherpredefinedvariable.*NAMVARisusedtodefinevariableasDataarea.
37WhatisthedifferencebetweenSKIPA&SPACEA?
Skipagoestotheline(evennextpage)/SPACEAaddnlinesbynumber.
38What'sthedifferencebetweenCHAINandSETLLIsthereaperformanceadvantage?
TherearetwoimportantdifferencesbetweenCHAINandSETLL.
1.TheCHAINoperationappliesarecordlocktofilesthatareopenorupdate.TheSETLLoperationdoesnotapplythelock.
2.TheCHAINoperationcopiestherecord'sdatatotheinputbufferfortheprogram.TheSETLLoperationdoesnot.
39%sizegivesmeacompiletimeerroronmyDspecs
Answer:
%sizedoesn'tacceptanexpressioninDspecs;Try%leninstead.
40Does%lencountthenullinanullterminatedstringAnswer:
No.
41cantheEDTCDEorEDTWRDfromthereferencedfieldignored?
Yes,byusingDLTEDTkeyword.
42空格或零值初始默认值是什么?
*BLANK/*BLANKS,*ZERO/*ZEROS,*HIVAL,*LOVAL,*ALL'X..'
43Howdoyoupassnumericparametersforsubmitjob?
Convertnumericparameterstocharacterandpass,inhexadecimalformat(x’0nf’if‘n’containsoddnumberofdigitsx’nf’if‘n’containsevennunberofdigits)
44Haveuusedbinderlanguagelikecodingexporttoprocedures?
STRPGMEXPPGMLVL(*CURRENT)?
EXPORTSYMBOL('MSGBOX')
EXPORTSYMBOL('ACTMETHOD')
ENDPGMEXP?
STRPGMEXPPGMLVL(*PRV)?
EXPORTSYMBOL('MSGBOX')
ENDPGMEXP?
45.HowdoucodefilefieldrenamesinILERPGPREFIXkeywordontheFspec.
46.Howdoyoufindwhetherajobisabatchjoborinteractive?
RTVJOBATYPE0=Batch,1=Interactive
47.Howtoreadrecordsfromallthemembers?
withoutusingCL(OVRDBF)ieitshouldbehandledexclusivelyinanRPGprogram?
UsetheEXTMBRkeywordontheF-specwiththemembernamecodedasavariable.Thenyouwanttoprocessadifferentmember,closethefile,changethevariabletothenewmembername,andre-openthefile.NoCLneeded.
YoucanuseEXTMBR('*ALL')aswellandgetthecurrentmembernameintheINFDS.
48.PFcontains50fiedlshowcanuupdateonly2fields?
TheoldwaywouldbetocodethefieldsonOspecsthendoanEXCEPT.ThenewwayisUPDATERecordName%FIELDS(Field1:
Field2)
49.CanindexedfilebeaccessedinarrivalsequenceinRPG
don’tspecifytheKontheFspec.
50.whenwillDUMP&DEBUGbeignoredDEBUG(*NO)
51.whatisthenecc.commandneededbeforeOPNQRYF&why
OVRDBFSHARE(*YES).
52.数据结构类型?
Adatastructureisavariablefieldwhichispartitionedbydefiningvariablefields(callasSubfields).Varioususesareconvertingcharactervalueintonumeric,splittingdatefieldintoday,monthandyear,combiningvariouskeyfieldstomakeonekeyfieldandsooccurencedatastructureisanarrayofaDatastructure.
Dataareastructuresarespecifiedtodefineanareainstorageandlayoutsofrelatedsubfields.
(1)Dataareadatastructure
thedataareaisdefinedforprocessingandwrittenbackin"U"mustbeenteredtodefinethedatastructure.
IUDS
I160ORDER#
I790LINE#
(2)Fileinformationdatastructure
Afileinformationdatastructureprovidesexception/errorinformationthatmaybeoccurredwhenprocessingafileduringprogramexecutionINFDSisaFileInformationDataStructure.
1-8Character*FILEThefirst8charactersofthefile发生错误的文件名
9-9Cha
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- AS400 题库
![提示](https://static.bingdoc.com/images/bang_tan.gif)