COBOL经典面试题库(中文)

合集下载

COBOL面试黄金版

COBOL面试黄金版

TSO1、什么是TSO? 答:TSO(Time Sharing Option)一个模块,是MVS的基本组件、充当命令输入器。

提供主机用户(TSO ID)与系统之间的接口。

用户在TSO终端上,用命令形式操纵和管理计算机的资源和应用。

2、我们在配置PCOM时需要设置哪些参数?答:链路参数和会话参数3、TSO的签到方式?方法一:1、画面命令行输入‘TSO ’,‘确定’显示签到画面 2、在签到画面Password 栏位后输入用户密码方法二:1、画面输入‘TSO USERID’, ‘确定’显示签到画面 2、在签到画面Password 栏位后输入用户密码 4、TSO的签退方式?方法一: 1、在签到后的第一屏(标记有“ISPF Primary Option Menu ”的屏幕)输入‘X’,退出ISPF 2、画面出现READY,在下面输入LOGOFF 方法二1、在签到第一屏,点击功能键 'F3' ,2、如果系统画面出现READY ,在下面输入‘LOGOFF’3、如果系统画面出现 '退出选项提示 ' 选择‘2’确定,来到READY 画面,之后输入LOGOFF5、以下账号有哪些权限?SYSUSER:具有对z/OS操作系统基本产品的操作功能DBAUSER:具有对z/OS操作系统基本产品和数据管理产品的操作功能 TIVUSER:具有操作Tivoli产品的功能TSOUSER:具有存取TSO READY提示信息下的使用功能 6、简述一下ISPF/PDF界面? ISPF/PDF:Interactive System Productivity Facility /Program Development Facility菜单(Panel)式的操作界面,为用户提供数据集管理、程序开发、作业(JOB)提交和监控等功能。

他的主要功能是使用菜单方式来使用TSO 命令。

7、ISPF界面分为哪几个功能区? Action Bar(行为菜单):提供了一些系统操作的选项,光标停留其上按确认键将跳出功能菜单可供选择。

COBOL搜索题库

COBOL搜索题库

Q1) Name the divisions in a COBOL program ?.A1) IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, DATA DIVISION, PROCEDURE DIVISION.Q2) What are the different data types available in COBOL?A2) Alpha-numeric (X), alphabetic (A) and numeric (9).Q3) What does the INITIALIZE verb do? - GSA3) Alphabetic, Alphanumeric fields & alphanumeric edited items are set to SPACES. Numeric, Numeric edited items set to ZERO. FILLER , OCCURS DEPENDING ON items left untouched.Q4) What is 77 level used for ?A4) Elementary level item. Cannot be subdivisions of other items (cannot be qualified), nor can they be subdivided themselves.Q5) What is 88 level used for ?A5) For condition names.Q6) What is level 66 used for ?A6) For RENAMES clause.Q7) What does the IS NUMERIC clause establish ?A7) IS NUMERIC can be used on alphanumeric items, signed numeric & packed decimal items and unsigned numeric & packed decimal items. IS NUMERIC returns TRUE if the item only consists of 0-9. However, if the item being tested is a signed item, then it may contain 0-9, + and - .Q8) How do you define a table/array in COBOL?A8) ARRAYS.05 ARRAY1 PIC X(9) OCCURS 10 TIMES.05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX.Q9) Can the OCCURS clause be at the 01 level?A9) No.Q10) What is the difference between index and subscript? - GSA10) Subscript refers to the array occurrence while index is the displacement (in no of bytes) from the beginning of thearray. An index can only be modified using PERFORM, SEARCH & SET. Need to have index for a table in order touse SEARCH, SEARCH ALL.Q11) What is the difference between SEARCH and SEARCH ALL? - GSA11) SEARCH - is a serial search.SEARCH ALL - is a binary search & the table must be sorted ( ASCENDING/DESCENDING KEY clause to be used & data loaded in this order) before using SEARCH ALL.Q12) What should be the sorting order for SEARCH ALL? - GSA12) It can be either ASCENDING or DESCENDING. ASCENDING is default. If you want the search to be done on an array sorted in descending order, then while defining the array, you should give DESCENDING KEY clause. (Youmust load the table in the specified order).Q13) What is binary search?A13) Search on a sorted array. Compare the item to be searched with the item at the center. If it matches, fine else repeat the process with the left half or the right half depending on where the item lies.Q14) My program has an array defined to have 10 items. Due to a bug, I find that even if the program access the11th item in this array, the program does not abend. What is wrong with it?A14) Must use compiler option SSRANGE if you want array bounds checking. Default is NOSSRANGE.Q15) How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning. - GSA15) Syntax: SORT file-1 ON ASCENDING/DESCENDING KEY key.... USING file-2 GIVING file-3.USING can be substituted by INPUT PROCEDURE IS para-1 THRU para-2GIVING can be substituted by OUTPUT PROCEDURE IS para-1 THRU para-2.file-1 is the sort (work) file and must be described using SD entry in FILE SECTION. file-2 is the input file for the SORT and must be described using an FD entry in FILE SECTION and SELECTclause in FILE CONTROL.file-3 is the out file from the SORT and must be described using an FD entry in FILE SECTION and SELECTclause in FILE CONTROL.file-1, file-2 & file-3 should not be opened explicitly.INPUT PROCEDURE is executed before the sort and records must be RELEASEd to the sort work file from the input procedure.OUTPUT PROCEDURE is executed after all records have been sorted. Records from the sort work file must be RETURNed one at a time to the output procedure.Q16) How do you define a sort file in JCL that runs the COBOL program?A16) Use the SORTWK01, SORTWK02,..... dd names in the step. Number of sort datasets depends on the volume of databeing sorted, but a minimum of 3 is required.Q17) What is the difference between performing a SECTION and a PARAGRAPH? - GS A17) Performing a SECTION will cause all the paragraphs that are part of the section, to be performed.Performing a PARAGRAPH will cause only that paragraph to be performed.Q18) What is the use of EVALUATE statement? - GSA18) Evaluate is like a case statement and can be used to replace nested Ifs. The difference between EVALUATE andcase is that no 'break' is required for EVALUATE i.e. control comes out of the EVALUATE as soon as one match ismade.Q19) What are the different forms of EVALUATE statement?A19)EVALUATE EVALUATE SQLCODE ALSO FILE-STATUSWHEN A=B AND C=D WHEN 100 ALSO '00'imperative stmt imperative stmtWHEN (D+X)/Y = 4 WHEN -305 ALSO '32'imperative stmt imperative stmtWHEN OTHER WHEN OTHERimperative stmt imperative stmtEND-EVALUATE END-EVALUATEEVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUEWHEN 100 ALSO TRUE WHEN 100 ALSO A=Bimperative stmt imperative stmtWHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4)imperative stmt imperative stmtEND-EVALUATE END-EVALUATEQ20) How do you come out of an EVALUATE statement? - GSA20) After the execution of one of the when clauses, the control is automatically passed on to the next sentence after theEVALUATE statement. There is no need of any extra code.Q21) In an EVALUATE statement, can I give a complex condition on a when clause? A21) Yes.Q22) What is a scope terminator? Give examples.A22) Scope terminator is used to mark the end of a verb e.g. EVALUATE, END-EVALUATE;IF, END-IF.Q23) How do you do in-line PERFORM? - GSA23) PERFORM ... <UNTIL> ...<sentences>END-PERFORMQ24) When would you use in-line perform?A24) When the body of the perform will not be used in other paragraphs. If the body of the perform is a generic type of code(used from various other places in the program), it would be better to put the code in a separate Para and usePERFORM Para name rather than in-line perform.Q25) What is the difference between CONTINUE & NEXT SENTENCE ?A25) They appear to be similar, that is, the control goes to the next sentence in the paragraph. But, Next Sentence wouldtake the control to the sentence after it finds a full stop (.). Check out by writing the following code example, one ifsentence followed by 3 display statements (sorry they appear one line here because of formatting restrictions) If 1 > 0then next sentence end if display 'line 1' display 'line 2'. display 'line 3'. *** Note- there is a dot (.) only at the end ofthe last 2 statements, see the effect by replacing Next Sentence with Continue ***Q26) What does EXIT do ?A26) Does nothing ! If used, must be the only sentence within a paragraph.Q27) Can I redefine an X(100) field with a field of X(200)?A27) Yes. Redefines just causes both fields to start at the same location. For example:01 WS-TOP PIC X(1)01 WS-TOP-RED REDEFINES WS-TOP PIC X(2).If you MOVE '12' to WS-TOP-RED,DISPLAY WS-TOP will show 1 whileDISPLAY WS-TOP-RED will show 12.A28) Can I redefine an X(200) field with a field of X(100) ?Q31)1 Yes.Q31)2 What do you do to resolve SOC-7 error? - GSQ31) Basically you need to correcting the offending data. Many times the reason for SOC7 is an un-initialized numeric item.Examine that possibility first. Many installations provide you a dump for run timeabend’s ( it can be generated alsoby calling some subroutines or OS services thru assembly language). These dumps provide the offset of the lastinstruction at which the abend occurred. Examine the compilation output XREF listing to get the verb and the linenumber of the source code at this offset. Then you can look at the source code to find the bug. To get capture theruntime dumps, you will have to define some datasets (SYSABOUT etc ) in the JCL. If none of these are helpful, usejudgement and DISPLAY to localize the source of error. Some installation might have batch program debuggingtools. Use them.Q32) How is sign stored in Packed Decimal fields and Zoned Decimal fields? Q32) Packed Decimal fields: Sign is stored as a hex value in the last nibble (4 bits ) of the storage.Zoned Decimal fields: As a default, sign is over punched with the numeric value stored in the last bite.Q33) How is sign stored in a comp-3 field? - GSQ33) It is stored in the last nibble. For example if your number is +100, it stores hex 0C in the last byte, hex 1C ifyour number is 101, hex 2C if your number is 102, hex 1D if the number is -101, hex 2D if the number is -102 etc...Q34) How is sign stored in a COMP field ? - GSQ34) In the most significant bit. Bit is ON if -ve, OFF if +ve.Q35) What is the difference between COMP & COMP-3 ?Q35) COMP is a binary storage format while COMP-3 is packed decimal format.Q36) What is COMP-1? COMP-2?Q36) COMP-1 - Single precision floating point. Uses 4 bytes.COMP-2 - Double precision floating point. Uses 8 bytes.Q37) How do you define a variable of COMP-1? COMP-2?Q37) No picture clause to be given. Example 01 WS-VAR USAGE COMP-1.Q38) How many bytes does a S9(7) COMP-3 field occupy ?Q38) Will take 4 bytes. Sign is stored as hex value in the last nibble. General formula is INT((n/2) + 1)), where n=7 in thisexample.Q39) How many bytes does a S9(7) SIGN TRAILING SEPARATE field occupy ?Q39) Will occupy 8 bytes (one extra byte for sign).Q40) How many bytes will a S9(8) COMP field occupy ?Q40) 4 bytes.Q41) What is the maximum value that can be stored in S9(8) COMP?Q41) 99999999Q42) What is COMP SYNC?Q42) Causes the item to be aligned on natural boundaries. Can be SYNCHRONIZED LEFT or RIGHT. For binary dataitems, the address resolution is faster if they are located at word boundaries in the memory. For example, on mainframe the memory word size is 4 bytes. This means that each word will start from an address divisible by 4. If myfirst variable is x(3) and next one is s9(4) comp, then if you do not specify the SYNC clause, S9(4) COMP will startfrom byte 3 ( assuming that it starts from 0 ). If you specify SYNC, then the binary data item will start from address 4.You might see some wastage of memory, but the access to this computational field is faster.Q43) What is the maximum size of a 01 level item in COBOL I? in COBOL II? Q43) In COBOL II: 16777215Q44) How do you reference the following file formats from COBOL programs: Q44)Fixed Block File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F,BLOCK CONTAINS 0 .Fixed Unblocked - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F,do not use BLOCK CONTAINSVariable Block File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS V, BLOCKCONTAINS 0. Do not code the 4 bytes for record length in FD ie JCL rec length will be max rec length in pgm + 4Variable Unblocked - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS V, do not useBLOCK CONTAINS. Do not code 4 bytes for record length in FD ie JCL rec length willbe max rec length in pgm + 4.ESDS VSAM file - Use ORGANISATION IS SEQUENTIAL.KSDS VSAM file - Use ORGANISATION IS INDEXED, RECORD KEY IS, ALTERNATERECORD KEY IS RRDS File - Use ORGANISATION IS RELATIVE, RELATIVE KEY IS Printer File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F, BLOCKCONTAINS 0. (Use RECFM=FBA in JCL DCB).Q45) What are different file OPEN modes available in COBOL?Q45) Open for INPUT, OUTPUT, I-O, EXTEND.Q46) What is the mode in which you will OPEN a file for writing? - GS Q46) OUTPUT, EXTENDQ47) In the JCL, how do you define the files referred to in a subroutine ? Q47) Supply the DD cards just as you would for files referred to in the main program.Q48) Can you REWRITE a record in an ESDS file? Can you DELETE a record from it?Q48) Can rewrite (record length must be same), but not delete.Q49) What is file status 92? - GSQ49) Logic error. e.g., a file is opened for input and an attempt is made to write to it.Q50) What is file status 39 ?Q50) Mismatch in LRECL or BLOCKSIZE or RECFM between your COBOL pgm & the JCL (or the dataset label). Youwill get file status 39 on an OPEN.Q51) What is Static and Dynamic linking ?Q51) In static linking, the called subroutine is link-edited into the calling program , while in dynamic linking, the subroutine & the main program will exist as separate load modules. You choose static/dynamic linking by choosing either the DYNAM or NODYNAM link edit option. (Even if you choose NODYNAM, a CALL identifier (as opposed to a CALL literal), will translate to a DYNAMIC call).A statically called subroutine will not be in its initial state the next time it is called unless you explicitly use INITIAL or you do a CANCEL. A dynamically called routine will always be in its initial state.Q52) What is AMODE(24), AMODE(31), RMODE(24) and RMODE(ANY)? (applicable to only MVS/ESAEnterprise Server).Q52) These are compile/link edit options. Basically AMODE stands forAddressing mode and RMODE for Residencymode.AMODE(24) - 24 bit addressing;AMODE(31) - 31 bit addressingAMODE(ANY) - Either 24 bit or 31 bit addressing depending on RMODE. RMODE(24) - Resides in virtual storage below 16 Meg line. Use this for 31 bit programs that call 24 bit programs.(OS/VS Cobol pgms use 24 bit addresses only).RMODE(ANY) - Can reside above or below 16 Meg line.Q53) What compiler option would you use for dynamic linking?Q53) DYNAM.Q54) What is SSRANGE, NOSSRANGE ?Q54) These are compiler options with respect to subscript out of range checking. NOSSRANGE is the default and if chosen,no run time error will be flagged if your index or subscript goes out of the permissible range.Q55) How do you set a return code to the JCL from a COBOL program?Q55) Move a value to RETURN-CODE register. RETURN-CODE should not be declared in your program.Q56) How can you submit a job from COBOL programs?Q56) Write JCL cards to a dataset with //xxxxxxx SYSOUT= (A,INTRDR) where 'A' is output class, and dataset should beopened for output in the program. Define a 80 byte record layout for the file.Q57) What are the differences between OS VS COBOL and VS COBOL II?Q57) OS/VS Cobol pgms can only run in 24 bit addressing mode, VS Cobol II pgms can run either in 24 bit or 31 bitaddressing modes.I. Report writer is supported only in OS/VS Cobol.II. USAGE IS POINTER is supported only in VS COBOL II.III. Reference modification e.g.: WS-VAR(1:2) is supported only in VS COBOL II.IV. EVALUATE is supported only in VS COBOL II.V. Scope terminators are supported only in VS COBOL II.VI. OS/VS Cobol follows ANSI 74 stds while VS COBOL II follows ANSI 85 stds.VII. Under CICS Calls between VS COBOL II programs are supported.Q58) What are the steps you go through while creating a COBOL program executable?Q58) DB2 precompiler (if embedded SQL used), CICS translator (if CICS pgm), Cobol compiler, Link editor. If DB2program, create plan by binding the DBRMs.Q59) Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?Q59) In non-CICS environment, it is possible. In CICS, this is not possible.Q60) What are the differences between COBOL and COBOL II?A60) There are at least five differences:COBOL II supports structured programming by using in line Performs and explicit scope terminators, It introducesnew features (EVALUATE, SET. TO TRUE, CALL. BY CONTEXT, etc) It permits programs to be loaded andaddressed above the 16-megabyte line It does not support many old features (READY TRACE, REPORT-WRITER,ISAM, Etc.), and It offers enhanced CICS support.Q61) What is an explicit scope terminator?A61) A scope terminator brackets its preceding verb, e.g. IF .. END-IF, so that all statements between the verb and its scope terminator are grouped together. Other common COBOL II verbs are READ, PERFORM, EVALUATE, SEARCH and STRING.Q62) What is an in line PERFORM? When would you use it? Anything else to say about it?A62) The PERFORM and END-PERFORM statements bracket all COBOL II statements between them. The COBOL equivalent is to PERFORM or PERFORM THRU a paragraph. In line PERFORMs work as long as there are no internal GO TOs, not even to an exit. The in line PERFORM for readability should not exceed a page length - often it will reference other PERFORM paragraphs.Q63) What is the difference between NEXT SENTENCE and CONTINUE?A63) NEXT SENTENCE gives control to the verb following the next period. CONTINUE gives control to the next verb after the explicit scope terminator. (This is not one of COBOL II's finer implementations). It's safest to use CONTINUE rather than NEXT SENTENCE in COBOL II.Q64) What COBOL construct is the COBOL II EVALUATE meant to replace?A64) EVALUATE can be used in place of the nested IF THEN ELSE statements.Q65) What is the significance of 'above the line' and 'below the line'?A65) Before IBM introduced MVS/XA architecture in the 1980's a program's virtual storage was limited to 16 megs. Programs compiled with a 24 bit mode can only address16 Mb of space, as though they were kept under an imaginary storage line. With COBOL II a program compiled with a 31 bit mode can be 'above the 16 Mb line. (This 'below the line', 'above the line' imagery confuses most mainframe programmers, who tend to be a literal minded group.)Q66) What was removed from COBOL in the COBOL II implementation?A66) Partial list: REMARKS, NOMINAL KEY, PAGE-COUNTER, CURRENT-DAY, TIME-OF-DAY, STATE, FLOW, COUNT, EXAMINE, EXHIBIT, READY TRACE and RESET TRACE.Q67) Explain call by context by comparing it to other calls.A67) The parameters passed in a call by context are protected from modification by the called program. In a normal call they are able to be modified.Q68) What is the linkage section?A68) The linkage section is part of a called program that 'links' or maps to data items in the calling program's working storage. It is the part of the called program where these share items are defined.Q69) What is the difference between a subscript and an index in a table definition? A69) A subscript is a working storage data definition item, typically a PIC (999) where a value must be moved to the subscript and then incremented or decrements by ADD TO and SUBTRACT FROM statements. An index is a register item that exists outside the program's working storage. You SET an index to a value and SET it UP BY value and DOWN BY value.Q70) If you were passing a table via linkage, which is preferable - a subscript or an index?A70) Wake up - you haven't been paying attention! It's not possible to pass an index via linkage. The index is not part of the calling programs working storage. Those of us who've made this mistake, appreciate the lesson more than others.Q71) Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc.A71) An external sort is not COBOL; it is performed through JCL and PGM=SORT. It is understandable without any code reference. An internal sort can use two different syntax’s: 1.) USING, GIVING sorts are comparable to external sorts with no extra file processing; 2) INPUT PROCEDURE, OUTPUT PROCEDURE sorts allow for data manipulation before and/or after the sort.Q72) What is the difference between comp and comp-3 usage? Explain other COBOL usage’s.A72) Comp is a binary usage, while comp-3 indicates packed decimal. The other common usage’s are binary and display. Display is the default.Q73) When is a scope terminator mandatory?A73) Scope terminators are mandatory for in-line PERFORMS and EVALUATE statements. For readability, it's recommended coding practice to always make scope terminators explicit.Q74) In a COBOL II PERFORM statement, when is the conditional tested, before or after the perform execution?A74) In COBOL II the optional clause WITH TEST BEFORE or WITH TEST AFTER can be added to all perform statements. By default the test is performed before the perform.Q75) In an EVALUTE statement is the order of the WHEN clauses significant?A75) Absolutely. Evaluation of the WHEN clauses proceeds from top to bottom and their sequence can determine results.Q76) What is the default value(s) for an INITIALIZE and what keyword allows for an override of the default.A76) INITIALIZE moves spaces to alphabetic fields and zeros to alphanumeric fields. The REPLACING option can be used to override these defaults.Q77) What is SET TO TRUE all about, anyway?A77) In COBOL II the 88 levels can be set rather than moving their associated values to the related data item. (Web note: This change is not one of COBOL II's better specifications.)Q78) What is LENGTH in COBOL II?A78) LENGTH acts like a special register to tell the length of a group or elementary item.Q79) What is the difference between a binary search and a sequential search? What are the pertinent COBOLcommands?A79) In a binary search the table element key values must be in ascending or descending sequence. The table is 'halved' to search for equal to, greater than or less than conditions until the element is found. In a sequential search the table is searched from top to bottom, so (ironically) the elements do not have to be in a specific sequence. The binary search is much faster for larger tables, while sequential works well with smaller ones. SEARCH ALL is used for binary searches; SEARCH for sequential.Q80) What is the point of the REPLACING option of a copy statement?A80) REPLACING allows for the same copy to be used more than once in the same code by changing the replace value.Q81) What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOLprogram i.e. aprogram which is not calling any other program.A81) The program will go in an infinite loop.Q82) How can I tell if a module is being called DYNAMICALLY or STATICALLY?A82) The ONLY way is to look at the output of the linkage editor (IEWL)or the load module itself. If the module is being called DYNAMICALLY then it will not exist in the main module, if it is being called STATICALLY then it will be seen in the load module. Calling a working storage variable, containing a program name, does not make a DYNAMIC call. This type of calling is known as IMPLICITE calling as the name of the module is implied by the contents of the working storage variable. Calling a program name literal (CALLQ83) What is the difference between a DYNAMIC and STATIC call in COBOL.A83) To correct an earlier answer: All called modules cannot run standalone if they require program variables passed to them via the LINKAGE section. DYNAMICally called modules are those that are not bound with the calling program at link edit time (IEWL for IBM) and so are loaded from the program library (joblib or steplib) associated with the job. For DYNAMIC calling of a module the DYNAM compiler option must be chosen, else the linkage editor will not generate an executable as it will expect u address resolution of all called modules. A STATICally called module is one that is bound with the calling module at link edit, and therefore becomes part of the executable load module.Q84) How may divisions are there in JCL-COBOL?A84) FourQ85) What is the purpose of Identification Division?A85) Documentation.Q86) What is the difference between PIC 9.99 and 9v99?A86) PIC 9.99 is a FOUR-POSITION field that actually contains a decimal point where as PIC 9v99 is THREE- POSITION numeric field with implied or assumed decimal position.Q87) what is Pic 9v99 Indicates?A87) PICTURE 9v99 is a three position Numeric field with an implied or assumed decimal point after the first position; the v means an implied decimal point.Q88) What guidelines should be followed to write a structured Cobol prg'm?A88)1) use 'evaluate' stmt for constructing cases.2) use scope terminators for nesting.3) use in line perform stmt for writing 'do ' constructions.4) use test before and test after in the perform stmt for writing do-whileconstructions.Q89) Read the following code. 01 ws-n pic 9(2) value zero. a-para move 5 to ws-n. perform b-para ws-n times. b-para.move 10 to ws-n. how many times will b-para be executed ?A89) 5 times only. it will not take the value 10 that is initialized in the loop.Q90) What is the difference between SEARCH and SEARCH ALL? What is more efficient? A90) SEARCH is a sequential search from the beginning of the table. SEARCH ALL is a binary search, continually dividing the table in two halves until a match is found. SEARCH ALL is more efficient for tables larger than 70 items.Q91) What are some examples of command terminators?A91) END-IF, END-EVALUATEQ92) What care has to be taken to force program to execute above 16 Meg line?A92) Make sure that link option is AMODE=31 and RMODE=ANY. Compile option should never have SIZE(MAX). BUFSIZE can be 2K, efficient enough.Q93) How do you submit JCL via a Cobol program?A93) Use a file //dd1 DD sysout=(*, intrdr)write your JCL to this file. Pl some on try this out.Q94) How to execute a set of JCL statements from a COBOL programA94) Using EXEC CICS SPOOL WRITE(var-name) END-EXEC command. var-name is a COBOL host structure containing JCL statements.Q95) Give some advantages of REDEFINES clause.A95)1. You can REDEFINE a Variable from one PICTURE class to another PICTURE class by using the same memorylocation.2. By REDEFINES we can INITIALISE the variable in WORKING-STORAGE Section itself.3. We can REDEFINE a Single Variable into so many sub variables. (This facility is very useful in solving Y2000Problem.)Q96) What is the difference between static call & Dynamic callA96) In the case of Static call, the called program is a stand-alone program, it is an executable program. During run time we can call it in our called program. As about Dynamic call, the called program is not an executable program it can executed through the called programQ97) What do you feel makes a good program?A97) A program that follows a top down approach. It is also one that other programmersor users can follow logically and is easy to read and understand.Q98) How do you code Cobol to access a parameter that has been defined in JCL? And do you code the PARM parameter on the EXEC line in JCL?A98)1) using JCL with sysin. //sysin dd *here u code the parameters(value) to pass in to cobol program /* and in programyou use accept variable name(one accept will read one row)/.another way.2) in jcl using parm statement ex: in exec statement parm='john','david' in cobol pgm u have to code linkage section in that for first value you code length variable and variable name say, abc pic x(4).it will take john inside to read next value u have to code another variable in the same way above mentioned.Q99) Why do we code S9(4) comp. Inspite of knowing comp-3 will occupy less space. A99) Here s9(4)comp is small integer ,so two words equal to 1 byte so totally it will occupy 2 bytes(4 words).here in s9(4) comp-3 as one word is equal to 1/2 byte.4 words equal to 2 bytes and sign will occupy 1/2 byte so totally it will occupy 3 bytes.Q100) The maximum number of dimensions that an array can have in COBOL-85 is ----------- ?A100) SEVEN in COBOL - 85 and THREE in COBOL– 84Q101) How do you declare a host variable (in COBOL) for an attribute named Emp-Name of type VARCHAR(25) ?A101)01 EMP-GRP.49 E-LEN PIC S9(4) COMP.49 E-NAME PIC X(25).Q102) What is Comm?A102) COMM - HALF WORD BINARYQ103) Differentiate COBOL and COBOL-II. (Most of our programs are written in COBOLII, so, it is good to know,how, this is different from COBOL)A103) The following features are available with VS COBOL II:1. MVS/XA and MVS/ESA support The compiler and the object programs it produces can be run in either24- or 31-bit addressing mode.2. VM/XA and VM/ESA support The compiler and the object programs it produces can be run in either24- or 31-bit addressing mode.3. VSE/ESA support The compiler and the object programs it produces can。

常见日语面试题集(日企面试必备)

常见日语面试题集(日企面试必备)
→私(わたし)が得意(とくい)な開発(かいはつ)言語(げんご)は、JAVA(じゃば)です。(我擅长的开发语言是JAVA)
○○(まるまる)のプロジェクトでは、何(なに)をされていたのですか。(在某某项目中你负责什么样的工作?)
→○○(まるまる)のプロジェクトでは、コーディングとテストを担当(たんとう)しました。(在某某项目中我但当编程和测试)
面试官:总的来说,你是养家和学问并行,打算就这样做下去吧?
小吴:是的,尤其是我们亚洲地区来的私费留学生,不打工没有办法生活。
面试官:你来留学,打工当然是可以的了,就是在大学以外,有没有觉得只有留学才会获得的感受?
小吴:从别的国家的角度来观察自己的国家,不是想象,而是亲身来到外国,感觉思维方式比以前客观了许多。
面试官:最初你来日本的时候是几年以前呢?
小吴:4年前。
面试官:你今年是修士2年,那么你对自己取得修士学位有几分把握呢?
小吴:我现在正在全力以赴做论文,论文的框架已经出来了,打算下个月赴中国调查之后,最后完成论文。有关校内研究学会的发表,预定6月上旬有一次。总之今年,我是要全力出击的。
译文
某面试官:是王同学吗?
某留学生:是。
面试官:请说一下你的指导教官和你的姓名。
小吴:我叫吴佳。我的指导老师是小泉老师。
面试官:你跟着小泉老师、嗯…?
小吴:今年是第3年。第一年是研究生预备生。
面试官:嗯、国际政治。那么,你在大学时代的专业是什么?
小吴:是日语。
鈴木: 日本語のテストをしたいんですが、この新聞の記事を日本語に翻訳してみてください。紙を上げましょ
うか。
王: はい、お願いします。
鈴木: 英語タイプはできますか。

COBOL试题答案

COBOL试题答案

一、选择题(15分)(含多项选择)1、不属于COBOL程序的部的是:(B )A.过程部。

B.程序部。

C.数据部D.环境部2、COBOL程序中的数据在哪个部中定义?(C )A.过程部。

B.环境部。

C.数据部D.标识部3、COBOL程序中如果有环境部的话,应置于:(C )A.过程部之后标识部之前。

B.标识部之后过程部之前。

C.标识部之后数据部之前。

D.数据部之后过程部之前。

4、标识部中不可缺少的段名是:(A )A.PROGRAM-IDB.AUTHORC.FILE SECTIOND.PROGRAM5、COBOL程序中一般变量在哪里定义?(D )A.标识部B.环境部C.数据部的FILE SECTIOND.数据部的WORKING-STORAGE SECTION6、下列关于过程部的说法正确的是:(C )A.过程部中可以不定义节但是必须定义段B.过程部中可以不定义段但是必须定义节C.过程部中可以不定义节和段,节和段是根据需要定义的D.所有程序都是在过程部中以STOP RUN来结束的7、下面是COBOL合法数据名的是:(ABD )A.W ANGB.TAN-1C.12345D.END-OFE.PROGRAMF.GROSS-$G.SECTION8、关系运算符的优先顺序正确的是(A )A.NOT > AND > ORB.OR> NOT > ANDC.AND > NOT > ORD.NOT > OR > AND9、下记语句表示A/B=>C的是(B )A.DIV A INTO B GIVING C.B.DIV A BY B GIVING C10、下记哪些方法可以显示出‘ABCD’六个字符(A,C )A. PIC X(6) VALUE "'ABCD'". 说明:V ALUE后依次为空格双引号单引号ABCD单引号双引号B. PIC X(6) V ALUE ''ABCD''.说明:V ALUE后依次为空格单引号单引号ABCD单引号单引号C. QUOTE ’ABCD’ QUOTE11、COBOL对文件的操作以为单位的(B )A.整个文件B.记录C.字段12、PIC 9(3) COMP-3在内存中占几BYTE?(A )A、2BYTEB、3BYTEC、6BYTE二、判断题(10分)1、在写COBOL程序时,数据名称可以随意写,只要合乎语法就行。

COBOL 练习

COBOL 练习

1.COBOL的英文缩写和中文含义。

2.COBOL语言的特点。

3.COBOL程序的编译4.COBOL程序由四个部组成,分别为。

5.标准COBOL程序每行列,被分为五个区域第1-6列为“”,第列为“续行区”,第列为“A区”,第12-72列为“”,第73-80列为“”。

6.COBOL中的相当于其它语言中的变量名,它代表一个具体的数据项。

其长度不能超过个字符。

7.分析下列数据项的值。

DISPLAY 'HELLO'. 结果为DISPLAY QUOTE 'HELLO' QUOTE. 结果为8.分析下列记录的层次。

9.部名、节名、段名、层指示符、层号、必须从A区开始书写。

层号02 ~ 49、66、88 可以从A区开始,也可以从B区开始书写。

程序的其余部分必须从B区开始书写。

10.专用层号(Special Level Number)66:77:88:11.********************** ID NAME SCORE *********************** 001 TONYD 98 ** 002 SENNE 90 **********************12.例1:77 A PIC 9(3)V9(2) VALUE 100.01.77 B PIC 9(3)V9(2) VALUE 85.71.ADD A, B TO CC=A+B+C77 C PIC 9(3)V9(2) VALUE 1.02.输出C值:186.7477 C PIC 9(3) VALUE 1.输出C值:18777 C PIC 9(3)V9 VALUE 1.0.输出C值:186.777 C PIC 9(2)V9 VALUE 1.0.输出C值:86.7例2:77 A PIC 9V9 VALUE 1.277 B PIC 9V9 VALUE 9.077 C PIC 9V9 //实际值应该是10.8 MULTIPLY A BY B GIVING C //08例3:77 A PIC 9 VALUE 477 B PIC 9 VALUE 777 C PIC 9 VALUE 877 D PIC 99 VALUE 10ADD A, B GIVING C, D ON SIZE ERROR DISPLAY C //8DISPLAY D //11GO TO S-END.例4:77 A PIC 9V9 VALUE 4.577 B PIC 9V9 VALUE 577 C PIC 9 VALUE 6ADD A, B GIVING CADD A, B GIVING C ROUNDEDADD A, B GIVING C ROUNDED ON SIZE ERROR ……例5:77 A PIC 9V9 VALUE 6.077 B PIC 99V9 VALUE 16.377 C PIC 9.9977 D PIC 9.99DIVIDE A INTO B GIVING C REMAINER DDISPLAY C //2.71DISPLAY D //0.04例6:77 A PIC 9V9 VALUE 6.077 B PIC 99V9 VALUE 16.377 E PIC 9.977 F PIC 9.9DIVIDE A INTO B GIVING E REMAINER FDISPLAY E //2.7DISPLAY F //0.1例7:77 A PIC 9V9 VALUE 6.077 B PIC 99V9 VALUE 16.377 C PIC 9.9977 D PIC 9.99DIVIDE A INTO B GIVING C ROUNDED REMAINER D DISPLAY C //2.72 (2.716四舍五入)DISPLAY D //0.04例8:77 A PIC 9 VALUE 877 B PIC 9(4) VALUE 100677 C PIC 99.977 D PIC 9. 9DIVIDE A INTO B GIVING C REMAINER DON SIZE ERRORDISPLAY C //结果125.7,C溢出仍为原值DISPLAY D //0.4。

COBOL面试题黄金版

COBOL面试题黄金版

TSO1、什么是TSO?答:TSO(Time Sharing Option)一个模块,是MVS的基本组件、充当命令输入器。

提供主机用户(TSO ID)与系统之间的接口。

用户在TSO终端上,用命令形式操纵和管理计算机的资源和应用。

2、我们在配置PCOM时需要设置哪些参数?答:链路参数和会话参数3、TSO的签到方式?方法一:1、画面命令行输入‘TSO ’,‘确定’显示签到画面2、在签到画面Password栏位后输入用户密码方法二:1、画面输入‘TSO USERID’, ‘确定’显示签到画面2、在签到画面Password栏位后输入用户密码4、TSO的签退方式?方法一:1、在签到后的第一屏(标记有“ISPF Primary Option Menu ”的屏幕)输入‘X’,退出ISPF 2、画面出现READY,在下面输入LOGOFF方法二1、在签到第一屏,点击功能键'F3' ,2、如果系统画面出现READY ,在下面输入‘LOGOFF’3、如果系统画面出现'退出选项提示' 选择‘2’确定,来到READY 画面,之后输入LOGOFF5、以下账号有哪些权限?SYSUSER:具有对z/OS操作系统基本产品的操作功能DBAUSER:具有对z/OS操作系统基本产品和数据管理产品的操作功能TIVUSER:具有操作Tivoli产品的功能TSOUSER:具有存取TSO READY提示信息下的使用功能6、简述一下ISPF/PDF界面?ISPF/PDF:Interactive System Productivity Facility /Program Development Facility菜单(Panel)式的操作界面,为用户提供数据集管理、程序开发、作业(JOB)提交和监控等功能。

他的主要功能是使用菜单方式来使用TSO 命令。

7、ISPF界面分为哪几个功能区?Action Bar(行为菜单):提供了一些系统操作的选项,光标停留其上按确认键将跳出功能菜单可供选择。

COBOL面试题黄金版

COBOL面试题黄金版

TSO1、什么是TSO?答:TSO(Time Sharing Option)一个模块,是MVS的基本组件、充当命令输入器。

提供主机用户(TSO ID)与系统之间的接口。

用户在TSO终端上,用命令形式操纵和管理计算机的资源和应用。

2、我们在配置PCOM时需要设置哪些参数?答:链路参数和会话参数3、TSO的签到方式?方法一:1、画面命令行输入‘TSO ’,‘确定’显示签到画面2、在签到画面Password栏位后输入用户密码方法二:1、画面输入‘TSO USERID’, ‘确定’显示签到画面2、在签到画面Password栏位后输入用户密码4、TSO的签退方式?方法一:1、在签到后的第一屏(标记有“ISPF Primary Option Menu ”的屏幕)输入‘X’,退出ISPF 2、画面出现READY,在下面输入LOGOFF方法二1、在签到第一屏,点击功能键'F3' ,2、如果系统画面出现READY ,在下面输入‘LOGOFF’3、如果系统画面出现'退出选项提示' 选择‘2’确定,来到READY 画面,之后输入LOGOFF5、以下账号有哪些权限?SYSUSER:具有对z/OS操作系统基本产品的操作功能DBAUSER:具有对z/OS操作系统基本产品和数据管理产品的操作功能TIVUSER:具有操作Tivoli产品的功能TSOUSER:具有存取TSO READY提示信息下的使用功能6、简述一下ISPF/PDF界面?ISPF/PDF:Interactive System Productivity Facility /Program Development Facility菜单(Panel)式的操作界面,为用户提供数据集管理、程序开发、作业(JOB)提交和监控等功能。

他的主要功能是使用菜单方式来使用TSO 命令。

7、ISPF界面分为哪几个功能区?Action Bar(行为菜单):提供了一些系统操作的选项,光标停留其上按确认键将跳出功能菜单可供选择。

COBOL经典面试题库

COBOL经典面试题库

我们经常用‎来复习用的‎,大多数版‎本只有英文‎,这个好像‎还是基地的‎同事们一起‎翻译出来的‎Q1)‎Name‎the ‎d ivis‎i ons ‎i n a ‎C OBOL‎prog‎r am ?‎.A1)‎IDEN‎T IFIC‎A TION‎DIVI‎S ION,‎ENVI‎R ONME‎N T DI‎V ISIO‎N, DA‎T A DI‎V ISIO‎N, PR‎O CEDU‎R E DI‎V ISIO‎N.Q:‎列举COB‎O L的DE‎V ISIO‎NA:标‎识部,环境‎部,数据部‎,过程部‎Q2) ‎W hat ‎a re t‎h e di‎f fere‎n t da‎t a ty‎p es a‎v aila‎b le i‎n COB‎O L?A‎2) Al‎p ha-n‎u meri‎c (X)‎, alp‎h abet‎i c (A‎) and‎nume‎r ic (‎9).Q‎:COBO‎L有哪些可‎用的数据类‎型A:字‎符型(这里‎指的是包含‎字母和数字‎),字母型‎,数字型‎Q3) ‎W hat ‎d oes ‎t he I‎N ITIA‎L IZE ‎v erb ‎d o? -‎GSA‎3) Al‎p habe‎t ic, ‎A lpha‎n umer‎i c fi‎e lds ‎& alp‎h anum‎e ric ‎e dite‎d ite‎m s ar‎e set‎to S‎P ACES‎. Num‎e ric,‎Nume‎r ic e‎d ited‎item‎s set‎to Z‎E RO. ‎F ILLE‎R , O‎C CURS‎DEPE‎N DING‎ONi‎t ems ‎l eft ‎u ntou‎c hed.‎Q:IN‎I TIAL‎I ZE这个‎词做了些什‎么A:将‎字母,字符‎,数字区域‎都置成空格‎(置空),‎将数字区置‎0, FI‎L LER和‎O CCUR‎S DEP‎E NDIN‎G ON项‎不处理‎Q4) W‎h at i‎s 77 ‎l evel‎used‎for ‎?A4)‎Elem‎e ntar‎y lev‎e l it‎e m. C‎a nnot‎be s‎u bdiv‎i sion‎s of ‎o ther‎item‎s (ca‎n not ‎b equ‎a lifi‎e d), ‎n or c‎a n th‎e y be‎subd‎i vide‎d the‎m selv‎e s.Q‎:77层有‎什么作用‎A:基本层‎数据项,不‎能用做细分‎别的层,也‎不能被细分‎(来源:‎h ttp:‎//www‎.newc‎o in.i‎n fo)‎Q5) ‎W hat ‎i s 88‎leve‎l use‎d for‎?A5‎) For‎cond‎i tion‎name‎s.Q:‎88层有什‎么作用A‎:条件逻辑‎层Q6‎) Wha‎t is ‎l evel‎66 u‎s ed f‎o r ?‎A6) F‎o r RE‎N AMES‎clau‎s e.Q‎:66层有‎什么作用‎A:重命名‎层Q7‎) Wha‎t doe‎s the‎IS N‎U MERI‎C cla‎u se e‎s tabl‎i sh ?‎A7) ‎I S NU‎M ERIC‎can ‎b e us‎e d on‎alph‎a nume‎r ic i‎t ems,‎sign‎e d nu‎m eric‎& pa‎c ked ‎d ecim‎a l it‎e ms a‎n d un‎s igne‎d num‎e ric ‎& pac‎k ed d‎e cima‎l ite‎m s. I‎S NUM‎E RIC ‎r etur‎n s TR‎U E if‎the ‎i tem ‎o nly ‎c onsi‎s ts o‎f 0-9‎. How‎e ver,‎if t‎h e it‎e m be‎i ng t‎e sted‎is a‎sign‎e d it‎e m, t‎h en i‎t may‎cont‎a in 0‎-9, +‎and ‎- .Q‎:IS N‎U MERI‎C这个子句‎怎么确定(‎也就是说确‎定句子的真‎值)A:‎I S NU‎M ERIC‎用在字符项‎,带符号数‎字,浮点数‎,不带符号‎数。

COBOL习题

COBOL习题

COBOL习题COBOL语言测试试卷二一、选择题(共20分)1.关于COBOL语言,正确的是()A.COBOL非常适合用于科学计算B.可以用COBOL写操作系统内核程序C.COBOL追求类自然英语,因此保留字较多D.COBOL程序非常强调数据类型2.关于COBOL程序结构,下面错误的是()A.COBOL程序一般由定义部、环境部、数据部和过程部组成B.COBOL程序的某个部下面不一定有节,但至少应该有一个段C.过程部里可以直接包含语句,而不必要有节或段D.COBOL程序也有顺序、分支和循环等结构3.下面变量名错误的是()A.-class B.class-1 C.SPACED.class1-4.下面不是COBOL保留字的是()A.IDENTIFICATIONB.ZEROC.ALLD.begin5.关于PIC语句,下面叙述不正确的是()A.普通PIC语句刻画了变量的数据类型及尺寸B.PIC语句可以通过VALUE短语给变量付初值C.PIC语句只出现在数据部中D.PIC语句不能定义数据的显示和打印格式6.关于记录缓冲器,下面说法正确的是()A.COBOL程序用到的每个输入或输出文件都必须有独立的记录缓冲器B.COBOL程序用到的每个输入或输出文件可以有多个记录缓冲器C.如果COBOL程序用到的多个输入或输出文件的记录内容和格式完全相同,则它们可以共用记录缓冲器D.COBOL程序用到的输入或输出文件可以没有记录缓冲器7.关于COBOL的顺序文件处理,正确的是()A.COBOL程序可以直接使用输入或输出文件的文件名B.COBOL程序只能通过内部文件名来使用输入或输出文件C.内部文件名和外部文件名之间的指代关系在数据部里说明D.用到输入或输出文件的COBOL程序可以没有环境部8.下面IF语句中的条件部分隐含的主体是()IF VarA>VarB AND VarC AND VarDDISPLAY“VarA is the Greatest”END-IFA.VarAB.VarBC.VarCD.VarA>9.关于Edited Picture语句,不正确的是()A.它极大地满足了我们对财务数据的格式化要求B.它不能包含A、9、X、V、S等普通符号C.它定义的变量不能参与四则运算D.它定义的变量可以接受四则运算结果10.关于Table和Group,不正确的是()A.Table实际上可以看成有多个同名子项目的GroupB.Table的元素可以是GroupC.Group的子项目可以是TableD.Group的子项目不能是Table二、填空题1.A变量的值及B变量的定义如下,在执行MOVEA TO B后,B的值各是多少?(20分)A的值B的定义B的值85PIC ZZZ.99_________________13PIC ZZZ.ZZ_________________120138PIC99/99/99_________________2.58PIC-*(3).99_________________5000PIC9(4)_________________-5000PIC9(4)C_________________1024PIC9999._________________123.5PIC-9(3).9_________________123.5PIC+9(3).9_________________2.58PIC$Z(3).99_________________2.要写一个COBOL程序从一个文件中输入客户信息,然后将每个客户信息分行输出到另一个文件中作为客户报告,其中输入的每一个客户输入记录包含以下数据:COLUMNS CONTENTS ――――――――――――――――――――――――――――――――――――1-6Customer Number(5digits plus1letter)7-26Customer Name27-46Street Address47-61City62-63Z-letter State Addreviation64-73Zip code(fromat:99999-9999)74-77Year of last purchase78-80unused要求输出文件中的客户报告格式如下所示(每行80字符,各项之间空2格):――――――――――――――――――――――――――――――――――――JOE SCHMOE199612345S314COLLECE DRIVEDEKALB IL601115-1342KELLY ANDERSON199412354A723420TH STREETBYRON IL61113-4218ANN WILSON199721345W2345WILSHIRE BLVDCHICAGO IL61234-21345填空完成以下COBOL程序,以达到上述目的。

宝洁面试经典八大问题(附答案范例)复习课程

宝洁面试经典八大问题(附答案范例)复习课程

宝洁面试经典八大问题(附答案范例)宝洁公司在中国高校招聘采用的面试评价测试方法主要是经历背景面谈法,即根据一些既定考察方面和问题来收集应聘者所提供的事例,从而来考核该应聘者的综合素质和能力。

宝洁的面试由8个核心问题组成。

宝洁公司招聘题号称由高级人力资源专家设计,无论您如实或编造回答, 都能反应您某一方面的能力。

核心部分的题如下:Please provide concise examples that will help us better understand your capabilities.(1)Describe an instance where you set your sights on a high/demanding goal and saw it through completion. (请你举一个具体的例子,说明你给自己确定了一个很高的目标,然后达到这个目标。

)问题分析:这个问题的考察应聘者制定高目标的勇气及完成高目标的执行力。

关键词为:demanding goal、saw it through。

回答范例:(记住,采用“What+STAR+Key Words法则”来回答)What:Designed a show to celebrate the Anniversary of Xiamen University, and won 2nd Prize out of 12 teams.Situation(Key Word:demanding)On the anniversary night, there was a huge celebration party, where songs, dances and dramas were played. Each school should design five shows, and our class volunteered to design one. It was a demanding goal as it was very close to the end of the term when most students were busy preparing for final exams.Task:As a sophomore student I was in charge of my class performance, which was a drama. I had to deal with the pressure from study, my classmates’ disinterest in acting, and my role as the king in the drama.Actions:(Key Words:how I saw it through)First, as there were only 20 students in my class, I distributed at least one task to each student; either a role, or making tools or costumes.Second, since at the end of the term each member was busy with study, the rehearsal schedule should be reasonable and periodic. All team members cooperated well because of the low frequency and short duration of each rehearsal.Third, music and scenery were added into rehearsal in order to get close to the circumstances of the party.In addition, I emphasized the value of time and ordered every actor to respect other partners.Result:In the end, our performance was very successful. Not only did I act the “king” wonderfully, but also got good marks on the final exam.(2)Summarize a situation where you took the initiative to get others on an important task or issue, and played a leading role to achieve the results you wanted. (请举例说明你在一项团队活动中如何团结他人,并且起到领导者的作用,并带领团队最终获得所希望的结果。

COBOL经典面试题库(中英文版)

COBOL经典面试题库(中英文版)

COBOL经典面试题库(中英文版)Q1)Name the divisions in a COBOL program ?。

A1) IDENTIFICATION DIVISION,ENVIRONMENT DIVISION, DATA DIVISION, PROCEDURE DIVISION。

Q:列举COBOL的DEVISIONA:标识部,环境部,数据部,过程部Q2)What are the different data types available in COBOL?A2) Alpha-numeric (X),alphabetic (A) and numeric (9)。

Q:COBOL有哪些可用的数据类型A:字符型(这里指的是包含字母和数字),字母型,数字型Q3) What does the INITIALIZE verb do?- GSA3) Alphabetic,Alphanumeric fields &alphanumeric edited items are set to SPACES. Numeric, Numeric edited items set to ZERO。

FILLER ,OCCURS DEPENDING ON items left untouched。

Q:INITIALIZE这个词做了些什么A:将字母,字符,数字区域都置成空格(置空),将数字区置0, FILLER和OCCURS DEPENDING ON项不处理Q4) What is 77 level used for ?A4)Elementary level item。

Cannot be subdivisions of other items (cannot be qualified), nor can they be subdivided themselves。

Q:77层有什么作用A:基本层数据项,不能用做细分别的层,也不能被细分Q5)What is 88 level used for ?A5)For condition names.Q:88层有什么作用A:条件逻辑层Q6)What is level 66 used for ?A6)For RENAMES clause.Q:66层有什么作用A:重命名层Q7)What does the IS NUMERIC clause establish ?A7)IS NUMERIC can be used on alphanumeric items,signed numeric & packed decimal items and unsigned numeric &packed decimal items。

JCLCOBOLDB2CICSVASM考试题

JCLCOBOLDB2CICSVASM考试题

Name: _____________ Grade: ____________
1. What is the difference between the JOBLIB and the STEPLIB statements?
The position difference.joblib adapts whole job,steplib only exec.
指定到那个proc的作业步,cond(2,eq,),nullify用even
10. How do you create a temporary dataset? Where will you use them?
Dsn=&& 参数(new,pass,delete)下去的,这样就是temporary
4. What are three major types of JCL statements? What are their functions?
Job,exec,dd statements.
5. What is the difference between catalogue procedure and In-Stream procedure?
6. What are the differences between Temporary Storage Queue (TSQ) and Transient Data Queue (TDQ)?
7. what do the following transactions do?
CEDF:
2. Name some of the JCL statements that are not allowed in PROCs.

COBOL面试问题大全

COBOL面试问题大全

COBOL面试问题大全 the divisions in a COBOL program.IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, DATA DIVISION, PROCEDURE DIVISION.1. What are the different data types available in COBOL?Alpha-numeric (X), alphabetic (A) and numeric (9).2. What does the INITIALIZE verb do? –Alphabetic, Alphanumeric fields & alphanumeric edited items are set to SPACES.Numeric, Numeric edited items set to ZERO.FILLER , OCCURS DEPENDING ON items left untouched.3. What is 77 level used for ?Elementary level item. Cannot be subdivisions of other items (cannot be qualified), nor can they be subdivided themselves.4. What is 88 level used for ?For condition names.5. What is level 66 used for ?For RENAMES clause.6. What does the IS NUMERIC clause establish ?IS NUMERIC can be used on alphanumeric items, signed numeric & pa cked decimal items and usigned numeric & packed decimal items. IS NUMERIC returns TRUE if the item only consists of 0-9. However, if th e item being tested is a signed item, then it may contain 0-9, + and - .7. What does the IS NUMERIC clause establish ?IS NUMERIC can be used on alphanumeric items, signed numeric & pa cked decimal items and usigned numeric & packed decimal items. IS NUMERIC returns TRUE if the item only consists of 0-9. However, if th e item being tested is a signed item, then it may contain 0-9, + and - .8. Can the OCCURS clause be at the 01 level?No.9. What is the difference between index and subscript?Subscript refers to the array occurrence while index is the displaceme nt (in no of bytes) from the beginning of the array. An index can only be modified using PERFORM, SEARCH & SET.Need to have index for a table in order to use SEARCH, SEARCH ALL.10. What is the difference between SEARCH and SEARCH ALL? SEARCH - is a serial search.SEARCH ALL - is a binary search & the table must be sorted ( ASCEN DING/DESCENDING KEY clause to be used & data loaded in this order) before using SEARCH ALL11. What should be the sorting order for SEARCH ALL?It can be either ASCENDING or DESCENDING. ASCENDING is default.If you want the search to be done on an array sorted in descending o rder, then while defining the array, you should give DESCENDING KEY clause. (You must load the table in the specified order).12. What is binary search?Search on a sorted array. Compare the item to be searched with the i tem at the center. If it matches, fine else repeat the process with the left half or the right half depending on where the item lies.13. My program has an array defined to have 10 items. Due to a bug,I find that even if the program access the 11th item in this array, th e program does not abend. What is wrong with it?Must use compiler option SSRANGE if you want array bounds checking. Default is NOSSRANGE.14. How do you sort in a COBOL program? Give sort file definition, so rt statement syntax and meaning.Syntax:SORT file-1 ON ASCENDING/DESCENDING KEY key....USING file-2GIVING file-3.USING can be substituted by INPUT PROCEDURE IS para-1 THRU para -2GIVING can be substituted by OUTPUT PROCEDURE IS para-1 THRU p ara-2.file-1 is the sort workfile and must be described using SD entry in FIL E SECTION.file-2 is the input file for the SORT and must be described using an F D entry in FILE SECTION and SELECT clause in FILE CONTROL.file-3 is the outfile from the SORT and must be described using an FD entry in FILE SECTION and SELECT clause in FILE CONTROL.file-1, file-2 & file-3 should not be opened explicitly.INPUT PROCEDURE is executed before the sort and records must be R ELEASEd to the sort work file from the input procedure.OUTPUT PROCEDURE is executed after all records have been sorted. R ecords from the sort work file must be RETURNed one at a time to th e output procedure.15. How do you define a sort file in JCL that runs the COBOL program?Use the SORTWK01, SORTWK02,..... dd names in the step. Number of sort datasets depends on the volume of data being sorted, but a min imum of 3 is required.16. What are the two ways of doing sorting in a COBOL program? Give the formats.See question 16.17. Give the format of USING and GIVING in SORT statement. What a re the restrictions with it?See question 16. Restrictions - Cannot massage records, canot select r ecords to be sorted.18. What is the difference between performing a SECTION and a PARA GRAPH?Performing a SECTION will cause all the paragraphs that are part of t he section, to be performed.Performing a PARAGRAPH will cause only that paragraph to be perfor med.19. What is the use of EVALUATE statement?Evaluate is like a case statement and can be used to replace nested If s. The difference between EVALUATE and case is that no 'break' is req uired for EVALUATE i.e. control comes out of the EVALUATE as soon a s one match is made.20. What are the different forms of EVALUATE statement? EVALUATE EVALUATE SQLCODE ALSO FILE-STATUSWHEN A=B AND C=D WHEN 100 ALSO '00'imperative stmt imperative stmtWHEN (D+X)/Y = 4 WHEN -305 ALSO '32'imperative stmt imperative stmtWHEN OTHER WHEN OTHERimperative stmt imperative stmtEND-EVALUATE END-EVALUATEEVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUE WHEN 100 ALSO TRUE WHEN 100 ALSO A=Bimperative stmt imperative stmtWHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4)imperative stmt imperative stmtEND-EVALUATE END-EVALUATE21. How do you come out of an EVALUATE statement?After the execution of one of the when clauses, the control is automat ically passed on to the next sentence after the EVALUATE statement. There is no need of any extra code.22. In an EVALUATE statement, can I give a complex condition on a when clause?Yes23. What is a scope terminator? Give examples.Scope terminator is used to mark the end of a verb e.g. EVALUATE, E ND-EVALUATE; IF, END-IF.24. How do you do in-line PERFORM?PERFORM ... ...END PERFORM25. When would you use in-line perform?When the body of the perform will not be used in other paragraphs. If the body of the perform is a generic type of code (used from various other places in the program), it would be better to put the code in a separate para and use PERFORM paraname rather than in-line perfor m.26. What is the difference between CONTINUE & NEXT SENTENCE ?CONTINUE is like a null statement (do nothing) , while NEXT SENTENC E transfers control to the next sentence (!!) (A sentence is terminated by a period)27. What does EXIT do ?Does nothing ! If used, must be the only sentence within a paragraph.28. Can I redefine an X(100) field with a field of X(200)?Yes. Redefines just causes both fields to start at the same location. Fo r example:01 WS-TOP PIC X(1)01 WS-TOP-RED REDEFINES WS-TOP PIC X(2).If you MOVE '12' to WS-TOP-RED,DISPLAY WS-TOP will show 1 whileDISPLAY WS-TOP-RED will show 12.30. What do you do to resolve SOC-7 error?Basically you need to correcting the offending data.Many times the reason for SOC7 is an un-initialized numeric item. Exa mine that possibility first.Many installations provide you a dump for run time abends ( it can be generated also by calling some subroutines or OS services thru asse mbly language). These dumps provide the offset of the last instruction at which the abend occurred. Examine the compilation output XREF li sting to get the verb and the line number of the source code at this o ffset. Then you can look at the source code to find the bug. To get capture the runtime dumps, you will have to define some datasets (SYS ABOUT etc ) in the JCL.If none of these are helpful, use judgement and DISPLAY to localize t he source of error.Some installtion might have batch program debugging tools. Use them.31. How is sign stored in Packed Decimal fields and Zoned Decimal fie lds?Packed Decimal fields: Sign is stored as a hex value in the last nibble (4 bits ) of the storage.Zoned Decimal fields: As a default, sign is over punched with the num eric value stored in the last bite.32. How is sign stored in a comp-3 field?It is stored in the last nibble. For example if your number is +100, it stores hex 0C in the last byte, hex 1C if your number is 101, hex 2C if your number is 102, hex 1D if the number is -101, hex 2D if the n umber is -102 etc...33. How is sign stored in a COMP field ?In the most significant bit. Bit is on if -ve, off if +ve.34. What is the difference between COMP & COMP-3 ?COMP is a binary storage format while COMP-3 is packed decimal form at.35. What is COMP-1? COMP-2?COMP-1 - Single precision floating point. Uses 4 bytes.COMP-2 - Double precision floating point. Uses 8 bytes.36. How do you define a variable of COMP-1? COMP-2?No picture clause to be given. Example 01 WS-VAR USAGE COMP-1.37. How many bytes does a S9(7) COMP-3 field occupy ?Will take 4 bytes. Sign is stored as hex value in the last nibble.General formula is INT((n/2) + 1)), where n=7 in this example38. How many bytes does a S9(7) SIGN TRAILING SEPARATE field occ upy ?Will occupy 8 bytes (one extra byte for sign).39. How many bytes will a S9(8) COMP field occupy ?4 bytes40. What is the maximum value that can be stored in S9(8) COMP? 9999999941. What is COMP SYNC?Causes the item to be aligned on natural boundaries. Can be SYNCHR ONIZED LEFT or RIGHT.For binary data items, the address resolution is faster if they are locat ed at word boundaries in the memory. For example, on main frame th e memory word size is 4 bytes. This means that each word will start f rom an address divisible by 4. If my first variable is x(3) and nextone is s9(4) comp, then if you do not specify the SYNC clause, S9(4) COMP will start from byte 3 ( assuming that it starts from 0 ). If you specify SYNC, then the binary data item will start from address 4. Yo u might see some wastage of memory, but the access to thiscomputational field is faster.42. What is the maximum size of a 01 level item in COBOL I? in COB OL II?In COBOL II: 1677721543. How do you reference the following file formats from COBOL progr ams:Fixed Block File - Use ORGANISATION IS SEQUENTIAL. Use RECORDIN G MODE IS F, BLOCK CONTAINS 0 .Fixed Unblocked - Use ORGANISATION IS SEQUENTIAL. Use RECORDI NG MODE IS F, do not use BLOCK CONTAINSVariable Block File - Use ORGANISATION IS SEQUENTIAL. Use RECOR DING MODE IS V, BLOCK CONTAINS 0. Do not code the 4 bytes for record length in FD ie JCL rec length will be max rec length in pgm + 4Variable Unblocked - Use ORGANISATION IS SEQUENTIAL. Use RECOR DING MODE IS V, do not use BLOCK CONTAINS. Do not code 4 bytes for record length in FD ie JCL rec length will be max rec length in pg m + 4.ESDS VSAM file - Use ORGANISATION IS SEQUENTIAL.KSDS VSAM file - Use ORGANISATION IS INDEXED, RECORD KEY IS, ALTERNATE RECORD KEY ISRRDS File - Use ORGANISATION IS RELATIVE, RELATIVE KEY ISPrinter File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING M ODE IS F, BLOCK CONTAINS 0. (Use RECFM=FBA in JCL DCB).44. What are different file OPEN modes available in COBOL?Open for INPUT, OUTPUT, I-O, EXTEND.45. What is the mode in which you will OPEN a file for writing? OUTPUT, EXTEND46. In the JCL, how do you define the files referred to in a subroutine ?Supply the DD cards just as you would for files referred to in the mai n program.47. Can you REWRITE a record in an ESDS file? Can you DELETE a re cord from it?Can rewrite(record length must be same), but not delete.48. What is file status 92?Logic error. e.g., a file is opened for input and an attempt is made to write to it.49. What is file status 39 ?Mismatch in LRECL or BLOCKSIZE or RECFM between your COBOL pg m & the JCL (or the dataset label). You will get file status 39 on an O PEN.50. What is Static,Dynamic linking ?In static linking, the called subroutine is link-edited into the calling pr ogram , while in dynamic linking, the subroutine & the main program will exist as separate load modules. You choose static/dynamic linking by choosing either the DYNAM or NODYNAM link edit option. (Even if you choose NODYNAM, a CALL identifier (as opposed to a CALL literal), will translate to a DYNAMIC call).A statically called subroutine will not be in its initial state the next tim e it is called unless you explicitly use INITIAL or you do a CANCEL. A dynamically called routine will always be in its initial state.51. What is AMODE(24), AMODE(31), RMODE(24) and RMODE(ANY)? ( applicable to onlyMVS/ESA Enterprise Server).These are compile/link edit options.AMODE - Addressing mode. RMODE - Residency mode.AMODE(24) - 24 bit addressing. AMODE(31) - 31 bit addressing. AMO DE(ANY) - Either 24 bit or 31 bit addressing depending on RMODE. RMODE(24) - Resides in virtual storage below 16 Meg line. Use this fo r 31 bit programs that call 24 bit programs. (OS/VS Cobol pgms use 24 bit addresses only).RMODE(ANY) - Can reside above or below 16 Meg line.52. What compiler option would you use for dynamic linking? DYNAM.53. What is SSRANGE, NOSSRANGE ?These are compiler options w.r.t subscript out of range checking. NOS SRANGE is the default and if chosen, no run time error will be flagged if your index or subscript goes out of the permissible range.54. How do you set a return code to the JCL from a COBOL program?Move a value to RETURN-CODE register. RETURN-CODE should not be declared in your program.55. How can you submit a job from COBOL programs?Write JCL cards to a dataset with//xxxxxxx SYSOUT=(A,INTRDR) where 'A' is output class, and dataset should be opened for output in the program. Define a 80 byte record layout for the file.56. What are the differences between OS VS COBOL and VS COBOL II?OS/VS Cobol pgms can only run in 24 bit addressing mode, VS Cobol II pgms can run either in 24 bit or 31 bit addressing modes.Report writer is supported only in OS/VS Cobol.USAGE IS POINTER is supported only in VS COBOL II.Reference modification eg: WS-VAR(1:2) is supported only in VS COB OL II.EVALUATE is supported only in VS COBOL II.Scope terminators are supported only in VS COBOL II.OS/VS Cobol follows ANSI 74 stds while VS COBOL II follows ANSI 85 stds.Under CICS Calls between VS COBOL II programs are supported57. What are the steps you go through while creating a COBOL progra m executable?DB2 precompiler (if embedded sql used), CICS translator (if CICS pg m), Cobol compiler, Link editor.If DB2 program, create plan by binding the DBRMs58. Can you call an OS VS COBOL pgm from a VS COBOL II pgm ? In non-CICS environment, it is possible. In CICS, this is not possible.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

COBOL经典面试题库Q1:列举COBOL的DEVISIONA1:标识部,环境部,数据部,过程部Q2:COBOL有哪些可用的数据类型A2:字符型(这里指的是包含字母和数字),字母型,数字型Q3:INITIALIZE这个词做了些什么A3:将字母,字符,数字区域都置成空格(置空),将数字区置0,FILLER和OCCURS DEPENDING ON项不处理Q4:77层有什么作用A4:基本层数据项,不能用做细分别的层,也不能被细分(来源:)Q5:88层有什么作用A5:条件逻辑层Q6:66层有什么作用A6:重命名层Q7:IS NUMERIC这个子句怎么确定(也就是说确定句子的真值)A7:IS NUMERIC用在字符项,带符号数字,浮点数,不带符号数。

如果目标项只含0~9则返回TRUE。

但是,如果待测项目是个带符号数,那么他就含有0-9还有+和-05 ARRAY1 PIC X(9) OCCURS 10 TIMES.05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEXQ8:COBOL中怎么建表/数组A8:如上.Q9:OCCURS 子句能用在第一层吗A9:不能Q10:索引和下标有什么区别A10:下标可以指定数组中任意中位置的元素(只要知道其下标),下标只能是数字型常量或者数字型变量(但是不能在指定的时候修改,如:A(K+1)这样是不行的,要修改的话要在指定的外部改,如:ADD 1 TO K,而索引的话是从表头/数组头开始检索(以BY N的指定检索规律往后滚)再者,索引只能通过PERFORM, SEARCH 和SET来修改,如果要在一个表中使用SEARCH, SEARCH ALL,那这个表就要有索引(因为SEARCH, SEARCH ALL的参数中指定索引,所以即使其有很多限制还是得用它)Q11:SERACH和SERACH ALL有什么区别A11:SEARCH是顺序查找SERACH ALL 是2叉查找(相信数据结构学过2叉树的都不会陌生),在使用SEARCH ALL前表必须有一个递增/递减的KEY,并且表已经按照其KEY值排序了,这样才能使用SEARCH ALLQ12:为了使用SEARCH ALL,存贮顺序是怎么样的A12:他必须是递增或者是递减的,默认地政。

如果你想在一个递减顺序存贮的表/数组使用搜索的话,那么当定义表/数组的时候你应该加一个DESCENDING KEY子句(这之前表要已经按指定的顺序排序了)Q13:什么是2叉查找A13:将你要找的目标项与数组的正中项比较,找到就结束搜索,没找到则继续如此循环(比较下一个中值),取哪一半取决于目标值大于中值还是小于中值PS:联想2叉树的查找规律就很好理解,因为所谓的“表“本身也就是数组Q14:我的程序有个数组定义了10项。

因为有个BUG,我发现即使访问第11项,程序也不异常终止。

那是出了什么问题A14:必须使用编译器的一个选项SSRANGE,如果你想检查数组的超界问题。

默认是NOSSRANGEQ15:怎么在一个COBOL程序中排序?给出排序文件的定义,排序语法和意思A15:语法就是SORT file-1 ON ASCENDING/DESCENDING KEY key…. USING file-2 GIVING file-3. USING后程序的输入接口,这个地方可以替换成一个输出过程,也就是说写一个过程往USING 这个接口中导数据(要在这个过程中READ,AT END,……),这个过程在将数据释放到执行排序的文件中之前执行,GIVING后是输出借口,用法类似。

此例中输入文件是file-2输出文件是file3(这样个文件必须在文件区中用FD和在文件控制中用到SELECT)真正执行排序的file-1,这里需要注意的是file-1中的文件区不能用FD,应该用SD,file-2和3还是一样(用FD),具体可以看一下书上的例子Q16:怎么在JCL中定义一个排序文件来跑这个COBOL程序A16:用SORTWK01, SORTWK02,…..作为DATA SET NAME。

用多少取决于你要排序的数量,但是至少3个。

Q17:执行一个区和一个段有什么区别A17:简单来说的话就是区的概念比段大,执行一个区就要执行其内部所有段,执行段的话只执行该段。

Q18:EVALUATE语句有什么作用A18:EVALUATE就象个CASE语句(多重开关语句,学过C的总知道吧),不同点在于EVALUATE 不需要BREAK,一旦匹配就跳出EVALUATE语句了Q19) What are the different forms of EVALUATE statement?A19)EVALUATE EVALUATE SQLCODE ALSO FILE-STATUSWHEN A=B AND C=D WHEN 100 ALSO ‘00′imperative stmt imperative stmtWHEN (D+X)/Y = 4 WHEN -305 ALSO ‘32′imperative stmt imperative stmtWHEN OTHER WHEN OTHERimperative stmt imperative stmtEND-EVALUATE END-EVALUATEEVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUEWHEN 100 ALSO TRUE WHEN 100 ALSO A=Bimperative stmt imperative stmtWHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4)imperative stmt imperative stmtEND-EVALUATE END-EVALUATEQ20:怎么跳出一条EVALUATE语句A20:象18题目说的那样,一旦匹配了某一个“WHEN“语句就自动跳出了,不需要什么额外的代码来跳出Q21:在一个EVALUATE语句的某个WHEN分支中能否再插入复杂的情况(也就是嵌套)A21:当然可以,当多个参数作为控制变量的时候1个WHEN内部可以嵌套更多的情况Q22:什么是结束终止符A22:结束终止符是搭配一些范围指令的,也就是标识一些范围指令的结束。

如:EVALUATE, END-EVALUATE; IF, END-IF 如果没有该结束符,该条语句将终止不了Q23:怎么使用内嵌的PERFORMA23:PERFORM ……END-PERFORM所谓内嵌也就是PERFORM被嵌在某些比如循环语句中担当执行主体,同时通过UNTIL来指定结束判定Q24:什么时候使用内嵌式PERFORMA24:当该段PERFORM的内容不被其他段用到,只在某些局部代码中(当然PERFORM的主体所用到的参数也都是局部的,例如循环)使用,如果PERFORM主体的代码是一般的(用到了别的程序段的变量),还是使用PERFORM Para name这样的形式比较好(也就是相对与内于PERFORM的外部PERFORM)。

Q25:CONTINUE 和NEXT SENTENCE有什么不同A25:两者比较相似,都是将程序控制权交给下一句,但是用NEXT SENTENCE的时候,只有当碰到句结束符(就是句末的‘.’)才会将执行下句这道题我用了2个例子测试了一下:1:IF TEST-NUMERIC > 0THEN NEXT SENTENCEEND-IFDISPLAY ‘LINE1′DISPLAY ‘LINE2′. DISPLAY ‘LINE3′.(请注意代码中的‘.’号)结果输出:LINE32:IF TEST-NUMERIC > 0THEN CONTINUEEND-IFDISPLAY ‘LINE1′DISPLAY ‘LINE2′. DISPLAY ‘LINE3′.结果输出:LINE1LINE2LINE3相信已经区别已经比较明显了,NEXT SENTENCE是靠句末的结束符(也就是‘.‘)来判断下一句的,而CONTINUE是通过句头的保留字(这例中是DISPLAY)来判断下一句的Q26:EXIT语句有什么作用A26:什么都不做,如果用到的话,肯定是作为一段的唯一的一句话,注意:这里不是子程序中用的EXIT PROGRAME01 WS-TOP PIC X(1)01 WS-TOP-RED REDEFINES WS-TOP PIC X(2).If you MOVE ‘12′to WS-TOP-RED,DISPLAY WS-TOP will show 1 whileDISPLAY WS-TOP-RED will show 12.Q27:能不能把X(100)的区域重定义成X(200)A27:可以,重定义只是相当于把两个区域的首地址放在一起,从上面这个例子也很好理解Q28:能不能把X(200)的区域重定义成X(100)A28:可以,原因同上Q29:怎么解决SOC-7错误A29:基本上你要看一下一些比较奇怪的数据,很多导致SOC7的原因都是因为数据项的初始化。

首先检查所有的可能性。

某些功能可能提供一个空间用来存贮那些运行时间ABEND,并且提供最近一次运行时间ABEND的偏移量的说明(也就是位于队列中的位置),检查编译器的输出XREF队列以获得一些关键字。

然后你就能看下源代码找出BUG。

为了捕获一些运行时间的信息,你需要在JCL中建一个DATASET(象SYSABOUT这样的),如果这些都没用,那么再审查一下ERROR出现的位置判断一下原因。

有些软件安装了会提供批处理程序调试工具,那么可以就可以用这些工具了。

PS:以上大意就是说SOC-7这个错误多半是因为数据项初始化造成的,然后你应该到运行后编译器的返回信息中去找这些ERROR出现的地方(我们常用的话应该就是走查LOG),查的时候多注意下数据项的初始化问题。

Q30:在内部十进制区域和显示十进制区域符号是怎么存贮的A30:内部十进制是一个数字占4位(半字节),内存中用16进制来存,最后在追加4位作为符号,如-4=01001101(末尾的1101表示负,1100表示正),而我们用于显示的十进制,符号并不占空间,只是在最后一位上标识一下Q31:COMP-3区怎么存储符号A31:COMP-3采用的是内部十进制的存储方式,所谓内部十进制就是压缩式的外部十进制存储方式,上题讲过外部十进制每个数值都用1个字节存储,但前4位是存符号的,这样比较浪费存储空间,所以内部十进制的存储方式就用半个字节(4位)存储一个数字,在最后增加4位作为符号(1100(C)为正,1101(D)为负)Q32:COMP区怎么存储符号A32:COMP是采用定点二进制的方式存储数据,也就是将一个十进制的数值转化成二进制再进行存储,因为机器存储的形式也是二进制,所以定点二进制的读取是最快速的,因为COMP型的数据是用做计算(也就是说不用再转化成十进制打印),使用定点二进制将会非常高效。

相关文档
最新文档