AS400题库.docx

上传人:b****4 文档编号:11876753 上传时间:2023-04-08 格式:DOCX 页数:10 大小:20.87KB
下载 相关 举报
AS400题库.docx_第1页
第1页 / 共10页
AS400题库.docx_第2页
第2页 / 共10页
AS400题库.docx_第3页
第3页 / 共10页
AS400题库.docx_第4页
第4页 / 共10页
AS400题库.docx_第5页
第5页 / 共10页
点击查看更多>>
下载资源
资源描述

AS400题库.docx

《AS400题库.docx》由会员分享,可在线阅读,更多相关《AS400题库.docx(10页珍藏版)》请在冰豆网上搜索。

AS400题库.docx

AS400题库

1.    在RPG程序里,不用CHAIN或READ方法,如何得知文件是否有记录存在?

SETLL  indicator=‘1’  or%Found()=‘0’

定义文件数据区  INFDS和其中的域名*RECORD,如果*RECOED<>0,记录存在

InFiledescriptioncontinuationline(IPFK),

                                          KINFDSRCDS

  IRCDSDS

  I                *RECORD      #RCDS

2    Howtodetermineiftherecordisinusedbyanotheruser?

Wecandetermineweatherarecordisinusebyeanotheruserwiththehelpofstatuscode(*STATUS).  If*STATUS=01218i.e.recordalreadylocked.

3.详细说明5种活动组分别制定,叫什么名字,什么期间结束?

(1)编译程序ACTGRP=*YES,程序属于OPM传统组,程序进入任务的组,名字是

系统生成的,任务结束时,活动组也结束了

(2)ACTGRP=*NO,NAME=*new,系统生成名字,程序退出了,活动组也结束了

  (3)ACTGRP=*NO,NAME=*CALLER,活动组定义来自被其他程序调用,那个程序的组

(4)ACTGRP=*NO名字默认为QILE,或用户,活动组在任务结束时同时结束。

或RCLACTGRPRSC

4.RPG程序不希望使用循环功能,如何定义

控制语句加入H      NOMAIN

5.如何RPG程序使用语句设置*INLR=*ON,然后是WRITE一条记录,程序会发生什么?

程序会顺利写入一个记录。

6.功能键定义CA/CF有什么区别?

CF可以返回屏幕数据和功能键的值,相当于ENTER+FUNCTIONKEY,CA仅仅是返回功能键。

7      子程序*INZSR用途?

RPG启动后首先会自动执行的一种特殊子程序,可以初始化变量

8    RPG如何调用CLPprogram?

BycallingQCMDEXCapplication

9    这两个语句有什么用?

  答,stat01,stat02定义为常量

        I    'CLOSED'    C    STAT01

        I    'OPEN'    C    STAT02

10      UDATEand*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

12    DOWXXandDOUXX区别?

DOWxx条件为真,进入循环,DOUxx条件为真退出循环,所以这个循环最少执行一次

13    LEAVEandITER的区别?

Leave推出循环,执行下句,ITER返回循环顶部第一句

14.PGMA调用PGMB,每次PGMB用RETURN返回,当第一次调用PGMB,子程序*INZSR自动执行

那第二次或以后调用,*INZSR是否还会执行?

No!

15  解释下面语句

                                                HILOEQ

        C        *YMD        Test(D)        ORDDATE                15    

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.

21    Whatisserviceprogram?

AServiceProgramisacollectionofrunnableproceduresandavailabledataitemseasilyaccessiblebyotherILEprograms.Aserviceprogramdiffersfromaprogramintwoways:

Itdoesnotcontainaprogramentryprocedure.  youcannotcallaserviceprogram.itisboundintoaprogramorotherserviceprogramsusingbindingbyreference

22    WhatistheopcodetoreleaseallthelocksonaparticularPF?

UNLCK

23    Whichofthefollowingmethodswillmakeexternallydescribefilefieldsavailabletoaprogram?

ADataStructuredefinitionspecificationthatnamesthefileontheEXTNAMEkeyword.

24    是否可以对RPGLE程序使用STRISDB?

  Error:

Programtypenotvalid

25    WhichwillbetheoutputofthefollowingILECode?

DAnswer          S              T

C          T’12:

00PM’          ADDDUR12:

*Hours        Answer

answer=00.00AM

26    WhichofthefollowingSpecs.IsnotusedinILE?

  ESpecs.

27    WhichistheBuiltinfunctiontoconvertnumericfieldtoAlphafield?

%EDITC,%EDITW,%CHAR

28    ForCHAIN,SETLL,SETGT,READE,READPE&READEwhereindicatorsaregiven&theirsuccess?

        Opcode                      Success    Indicator

        CHAIN                          OFF        HI

        READ,READE,READP,READPE              OFF        EQ

        SETLL                          ON        EQ

        SETGT                          ON        HI

29    AdvantagesofILEorRPG?

1)    InRPGIIIitisonestepcompilation

2)    RPGIVcallaprogramrecursive

3)      OperationcodeExtendedFactor2

4)    LengthofFactor1&2isincreasedto14from10

5)    Freeformatisallowed

6)    Built-in-functionsareavailable.

7)    conceptofACTIVATIONGROUP.

30    ListsomeBIFinRPGLE?

    %SIZE-Givesthesizeofthevariableorliteeral

    %TRIM-Trimstheright&leftblanksofthestring

    %REPLACE-  Replacesthespecifiednumberofcharactersfromthespecifiedposition.

    %SUBST-givesasubstringfromavariable  (%SUBST(X:

Y:

Z)

    %ELEM-Givesnumberofelementsoroccurrences

    %LEN–Returnsthelengthofvaluefromafield.

    %CHAR–ConvertsaNumericfiledtocharacter.

    %EOF–EndofFileorbeginoffile.

    %FOUND–IfrecordisFound.

31    Howtogoto*PSSR?

Wheneveranexception/erroroccursand*PSSRisdeclaredinF-specs,itisautomaticallygoesto*PSSR

    F                            INFSR(*PSSR)

*PSSR    BEGSR

            ………………

            ENDSR

ifthefactor2oftheENDSRisblankcontrolwillreturntothenextsequentialinstruction.

32    WhatisProcedure?

Aprocedureisthesetofselfcontainedhighlevellanguagestatementsthatcanperformaparticulartaskandthenreturnstoacaller.

DPROC1                PR

P    PROC1                B        Export

    ThendefineProcedureInterfacealongwithparameterandPI

D    PROC1                  PI                      5  0

D    PARMA                                  5  0

D    PARMB                                  5  0

Definealltheparametersasavariabletotheprocedure

D    PARMA            S                      5  0

D    PARMB            S                      5  0

C    PROC1                E

C        RETURN          PARMA+PARMB    

33    HowtodefineGlobalParameterinILE?

Whatisthedisadvantage?

DeclareavariablewithkeywordEXPORTandwhileusingthisvariableinantherprogramdeclarewith

    IMPORT  keyword.wecannottraceoutatwhichpointthevalueofvariableischanged.

34      EDTCDE&EDTWRD

EDTCDEcannotbeappliedtoCharacterfiled.forexample,EDTCDE(Z)suppressingtheleadingzeroY

EDTWRDcanbeusedtodefineuserdefinedformattingforafields.

35    WhatarethetwoimportantparameterwhilecreatingaSQLRPGLEprogram?

1)  CMTCTL  -*NONE(CommitmentControl)

2)  CLOSQLCR-  *ENDMOD(EndofModule)bydefaultis*ENDACTGRP

36    Whatisthedifferencebetween*LIKEand*NAMVARopcode?

*LIKEdefinesprogramvariablesameasthatofanotherpredefinedvariable.*NAMVARisusedtodefinevariableasDataarea.

37    WhatisthedifferencebetweenSKIPA  &SPACEA?

Skipagoestotheline(evennextpage)/SPACEAaddnlinesbynumber.

38    What'sthedifferencebetweenCHAINandSETLL?

Isthereaperformanceadvantage?

TherearetwoimportantdifferencesbetweenCHAINandSETLL.

1.    TheCHAINoperationappliesarecordlocktofilesthatareopenorupdate.TheSETLLoperationdoesnotapplythelock.

2.    TheCHAINoperationcopiestherecord'sdatatotheinputbufferfortheprogram.TheSETLLoperationdoesnot.

39    %sizegivesmeacompiletimeerroronmyDspecs

Answer:

%sizedoesn'tacceptanexpressioninDspecs;  Try  %leninstead.

40    Does%lencountthenullinanullterminatedstring?

Answer:

No.

41  cantheEDTCDEorEDTWRDfromthereferencedfieldignored?

Yes,byusingDLTEDTkeyword.

42空格或零值初始默认值是什么?

*BLANK/*BLANKS,*ZERO/*ZEROS,*HIVAL,*LOVAL,*ALL'X..'

43Howdoyoupassnumericparametersforsubmitjob?

Convertnumericparameterstocharacterandpass,or.passinhexadecimalformat(x’0nf’if‘n’containsoddnumberofdigitsx’nf’if‘n’containsevennunberofdigits)

44  Haveuusedbinderlanguagelikecodingexporttoprocedures?

STRPGMEXPPGMLVL(*CURRENT)        

      EXPORTSYMBOL('MSGBOX')    

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 理化生

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1