当前位置:文档之家› Cobol常见面试题

Cobol常见面试题

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? - GS

A3) 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? - GS

A10) Subscript refers to the array occurrence while index is the displacement (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.

Q11) What is the difference between SEARCH and SEARCH ALL? - GS

A11) 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? - GS

A12) 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. (You

must 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 the

11th 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. - GS

A15) 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-2

GIVING 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 SELECT

clause in FILE CONTROL.

file-3 is the out file 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 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 data

being 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? - GS

A18) Evaluate is like a case statement and can be used to replace nested Ifs. The difference between EVALUATE and

case is that no 'break' is required for EVALUATE i.e. control comes out of the EVALUATE as soon as one match is

made.

Q19) What are the different forms of EVALUATE statement?

A19)

EVALUATE EVALUATE SQLCODE ALSO FILE-STATUS

WHEN A=B AND C=D WHEN 100 ALSO '00'

imperative stmt imperative stmt

WHEN (D+X)/Y = 4 WHEN -305 ALSO '32'

imperative stmt imperative stmt

WHEN OTHER WHEN OTHER

imperative stmt imperative stmt

END-EVALUATE END-EVALUATE

EVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUE

WHEN 100 ALSO TRUE WHEN 100 ALSO A=B

imperative stmt imperative stmt

WHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4)

imperative stmt imperative stmt

END-EVALUATE END-EVALUATE

Q20) How do you come out of an EVALUATE statement? - GS

A20) After the execution of one of the when clauses, the control is automatically passed on to the next sentence after the

EVALUATE 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? - GS

A23) PERFORM ... <UNTIL> ...

<sentences>

END-PERFORM

Q24) 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 use

PERFORM 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 would

take the control to the sentence after it finds a full stop (.). Check out by writing the following code example, one if

sentence followed by 3 display statements (sorry they appear one line here because of formatting restrictions) If 1 > 0

then next sentence end if display 'line 1' display 'line 2'. display 'line 3'. *** Note- there is a dot (.) only at the end of

the 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 while

DISPLAY 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? - GS

Q31) 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 time abend?s ( it can be generated also

by calling some subroutines or OS services thru assembly language). These dumps provide the offset of the last

instruction at which the abend occurred. Examine the compilation output XREF listing to get the verb and the line

number of the source code at this offset. 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 (SYSABOUT etc ) in the JCL. If none of these are helpful, use

judgement and DISPLAY to localize the source of error. Some installation might have batch program debugging

tools. 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? - GS

Q33) 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 number is -102 etc...

Q34) How is sign stored in a COMP field ? - GS

Q34) 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 this

example.

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) 99999999

Q42) What is COMP SYNC?

Q42) Causes the item to be aligned on natural boundaries. Can be SYNCHRONIZED LEFT or RIGHT. For binary data

items, the address resolution is faster if they are located at word boundaries in the memory. For example, on main

frame the memory word size is 4 bytes. This means that each word will start from an address divisible by 4. If my

first variable is x(3) and next one 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.

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: 16777215

Q44) 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 CONTAINS

Variable Block File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING 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 + 4

Variable Unblocked - Use ORGANISATION IS SEQUENTIAL. Use RECORDING 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 pgm + 4.

ESDS VSAM file - Use ORGANISATION IS SEQUENTIAL.

KSDS VSAM file - Use ORGANISATION IS INDEXED, RECORD KEY IS, ALTERNATE RECORD KEY IS RRDS File - Use ORGANISATION IS RELATIVE, RELATIVE KEY IS Printer File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F, BLOCK

CONTAINS 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, EXTEND

Q47) 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? - GS

Q49) 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). You

will 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/ESA

Enterprise Server).

Q52) These are compile/link edit options. Basically AMODE stands for Addressing mode and RMODE for Residency

mode.

AMODE(24) - 24 bit addressing;

AMODE(31) - 31 bit addressing

AMODE(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 be

opened 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 bit

addressing 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 DB2

program, 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 introduces

new features (EVALUATE, SET. TO TRUE, CALL. BY CONTEXT, etc) It permits programs to be loaded and

addressed 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 address 16 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 an y 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 COBOL

commands?

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 COBOL program i.e. a

program 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 (CALL

Q83) 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) Four

Q85) 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-while constructions.

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-EVALUATE

Q92) 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 program

A94) 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 memory

location.

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 Y2000

Problem.)

Q96) What is the difference between static call & Dynamic call

A96) 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 program

Q97) What do you feel makes a good program?

A97) A program that follows a top down approach. It is also one that other programmers or 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 program

you 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 - 84

Q101) 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 BINARY

Q103) 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 either

24- or 31-bit addressing mode.

2. VM/XA and VM/ESA support The compiler and the object programs it produces can be run in either

24- or 31-bit addressing mode.

3. VSE/ESA support The compiler and the object programs it produces can be run under VSE/ESA.

Q104) What is PERFORM ? What is VARYING ? (More details about these clauses)

A104) The PERFORM statement is a PROCEDURE DIVISION statement which transfers control to one or more specified procedures and controls as specified the number of times the procedures are executed. After execution of the specified procedures is completed (i.e., for the appropriate number of times or until some specified condition is met), control is transferred to the next executable statement following the PERFORM statement. There are 5 types of PERFORM statements:

a) Basic PERFORM

b) PERFORM TIMES

c) PERFORM UNTIL

d) PERFORM VARYING

e) IN-LINE PERFORM

Q105) How many sections are there in data division?.

A105) SIX SECTIONS 1.FILE SECTION 2.WORKING-STORAGE SECTION 3.

LOCAL-STORAGE SECTION 4.SCREEN SECTION 5.REPORT SECTION 6. LINKAGE SECTION

Q106) What is Redefines clause?

A106) Redefines clause is used to allow the same storage allocation to be referenced by different data names .

Q107) How many bytes does a s9(4)comp-3 field occupy?

A107) 3Bytes (formula : n/2 + 1))

Q108) What is the different between index and subscript?

A108) Subscript refers to the array of occurrence , where as Index represents an occurrence of a table element. An index can only modified using perform, search & set. Need to have an index for a table in order to use SEARCH and SEARCH All.

Q109) What is the difference between Structured COBOL Programming and Object Oriented COBOL

programming?

A109) Structured programming is a Logical way of programming, you divide the functionalities into modules and code logically. OOP is a Natural way of programming; you identify the objects first, and then write functions, procedures around the objects. Sorry, this may not be an adequate answer, but they are two different programming paradigms, which is difficult to put in a sentence or two.

Q110) What divisions, sections and paragraphs are mandatory for a COBOL program?

A110) IDENTIFICATION DIVISION and PROGRAM-ID paragraph are mandatory for a compilation error free COBOL

program.

Q111) Can JUSTIFIED be used for all the data types?

A111) No, it can be used only with alphabetic and alphanumeric data types.

Q112) What happens when we move a comp-3 field to an edited (say z (9). ZZ-)

A112) the editing characters r to be used with data items with usage clause as display which is the default. When u tries displaying a data item with usage as computational it does not give the desired display format because the data item is stored as packed decimal. So if u want this particular data item to be edited u have to move it into a data item whose usage is display and then have that particular data item edited in the format desired.

Q113) What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a program which is not calling any other program ?

A113) Both give the same results when a program is not calling any other program. GO

BACK will give the control to the system even though it is a single program.

Q114) what is the difference between external and global variables?

A114) Global variables are accessible only to the batch program whereas external variables can be referenced from any batch program residing in the same system library.

Q115) You are writing report program with 4 levels of totals: city, state, region and country. The codes being used can be the same over the different levels, meaning a city code of 01 can be in any number of states, and the same applies to state and region code so how do you do your checking for breaks and how do you do add to each level?

A115) Always compare on the highest-level first, because if you have a break at a highest level, each level beneath it must also break. Add to the lowest level for each record but add to the higher level only on a break.

Q116) What is difference between COBOL and VS COBOL II?.

A116) In using COBOL on PC we have only flat files and the programs can access only limited storage, whereas in VS COBOL II on M/F the programs can access up to 16MB or 2GB depending on the addressing and can use VSAM

files to make I/O operations faster.

Q117) Why occurs can not be used in 01 level ?

A117) Because, Occurs clause is there to repeat fields with same format, not the records.

Q118) What is report-item?

A118) A Report-Item Is A Field To Be Printed That Contains Edit Symbols

Q119) Difference between next and continue clause

A119) The difference between the next and continue verb is that in the continue verb it is used for a situation where there in no EOF condition that is the records are to be accessed again and again in an file, whereas in the next verb the indexed file is accessed sequentially, read next record command is used.

Q120) What is the Importance of GLOBAL clause According to new standards of COBOL A120) When any data name, file-name, Record-name, condition name or Index defined in an Including Program can be referenced by a directly or indirectly in an included program, Provided the said name has been declared to be a global name by GLOBAL Format of Global Clause is01 data-1 pic 9(5) IS GLOBAL.

Q121) What is the Purpose of POINTER Phrase in STRING command

A121) The Purpose of POINTER phrase is to specify the leftmost position within receiving field where the first transferred character will be stored

Q122) How do we get current date from system with century?

A122) By using Intrinsic function, FUNCTION CURRENT-DATE

Q123) What is the maximum length of a field you can define using COMP-3?

A123) 10 Bytes (S9(18) COMP-3).

Q124) Why do we code s9 (4) comp? In spite of knowing comp-3 will occupy less space? A124) 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.

Q125) What is the LINKAGE SECTION used for?

A125) The linkage section is used to pass data from one program to another program or to pass data from a PROC to a program.

Q126) Describe the difference between subscripting and indexing ?

A126) Indexing uses binary displacement. Subscripts use the value of the occurrence.

1. What R 2 of the common forms of the EVALUATE STATEMENT ?

2. What does the initialize statement do ?

3. What is the reference modification.

4. Name some of the examples of COBOl 11?

5. What are VS COBOL 11 special features?

6. What are options have been removed in COBOL 11?

7. What is the file organization clause ?

8. What is a subscript ?

9. What is an index for tables?

10. What are the two search techniques ?

11. What is an in-line perform ?

12. What is CALL statement in COBOL?

13. When can the USING phrase be included in the call statement ?

14. In EBCDIC, how would the number 1234 be stored?

15. How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?

16. What is Alternate Index ? How is it different from regular index ?

Customer Information Control System(CICS)

IBM?s Customer Information Control System (CICS) is an on-line teleprocessing system developed by IBM. By providing a sophisticated control and service database/data communication system, the application developer can concentrate on fulfilling specific business needs rather than on communication and internal system details. CICS allows data to be transmitted from the terminal to the host computer, have the data processed, access files/databases, and then have data to be transmitted from the terminal to the host computer, have the data processed, access files/databases, and then have data transmitted back to the terminal. To accomplish that, CICS uses a telecommunication

package such as VTAM or TCAM and various file access methods: VSAM, DL/1, DB2, etc.

The latest release CICS/ESA is Release 3.3.

Some of the new functionality includes:

1. Expanded features for the system programmer

2. Improved above the line storage utilization

3. New options for many CICS commands

4. Improved cross-platform communication facilities

Functionality

CICS provides the following support:

Data Communications

? An interface between the terminal and printers with CICS via a telecommunication access method (TCAM or VTAM).

? Multi Region Operation(MRO), through which more than one CICS region of a system can communicate

? Intersystem Communication (ISC), through which one CICS region of a system can communicate with other CICS regions in other systems

Application Programming

? Interfaces with programming languages such as COB OL and Assembler

? Command level translator

? An Execution Diagnostic Facility (EDF)

? A Command Interpreter

Data Handling

? An interface with database access methods such as DB2, DL/1, and VSAM

? An interface with error checking and reporting facil ities

Terminology:

CICS has its own language. Some of the language abbreviations of CICS are:

SIT System Initialization Table

PCT Program Control Table

PPT Program Processing Table

TCT Terminal Control Table

FCT File Control Table

TCP Terminal Control Program

TCTUA Terminal Control Terminal User Area

DCT Destination Control Table

TDQ Transient Data Queue

EIP Execution Interface Program

FCP File Control Program

ICP Interval Control Program

KCT Task Control Program

PCP Program Control Program

SCP Storage Control Program

TCA Task Control Area

TCTTE Terminal Control Table Terminal Entry

TSQ Temporary Storage Queue

TWA Task Work Area

AID Attention Identifier

CWA Common Work Area

MRO Multi Region Operation

QID Queue Identifier

Q1) What are the six different types of argument values in COBOL that can be placed in various options of a CICS command?

A1)

? Data Value - EX (Literal 8 or 77 KEYLEN PIC S9(4) COMP VALUE 8.)

? Data Area - EX (01 RECORD-AREA.

05 FIELD1 PIC X(5). )

? Pointer-Ref - EX (05 POINTER-I PIC S9(8) COMP. )

? Name - EX (05 FILE-NAME PIC X(5) VALUE …FILEA?. )

? Label - Cobol paragraph name

? HHMMSS - EX (77 TIMEVAL PIC S9(7) COMP3. )

Q2) Kindly specify the PIC clause for the following

Any BLL Cell, Data type of Length Option field, HHMMSS type of data fields

A2) Any BLL Cell - S9(8) COMP

Data type of Length Option field - S9(4) COMP

HHMMSS type of data fields - S9(7) COMP3

Q3) Specify CICS transaction initiation process. (From the perspective of CICS control

programs and control tables.)

A3) TCP places data in TIOA and corresponding entry into TCT.

KCP acquires the transaction identifier from TIOA and verifies if it is present in PCT. SCP acquires Storage in Task Control Area (TCA), in which KCP prepares control data for the task.

KCP then loads the application programs mentioned in PCT by looking for it in PPT.

If resident - real storage memory location is not present in the PPT the control is passed to PCP that loads the application programs from the physical storage location address given in PPT. The control is then passed to the application program (LOAD module).

Q4) List the sequence of steps used to achieve “Modification in Skip Sequential Mode.”

A4)

I. READNEXT command

II. Issue the ENDBR command

III. Issue the READ command with UDTAE option.

IV. Manipulate the record (DELETE or REWRITE command)

V. Issue START command

VI. Issue two READNEXT commands (One for dummy skip)

VII. Go to step two.

Q5) Specify the requirements for Automatic Task Initiation. (Mention the control table, it?s entries and the corresponding Procedure division CICS command).

A5) DFHDCT TYPE=INTRA,

DESTID=MSGS,

TRANSID=MSW1,

TRIGLEV=1000

EXEC CICS WRITEQ TD

QUEUE(…MSGS?),

FROM(DATA-AREA),

LENGTH(MSG_LEN)

END-EXEC.

Q6) What are the commands used to gain exclusive control over a resource (for Ex a Temporary storage queue.)?

A6) EXEC CICS ENQ EXEC CICS DEQ

RESOURCE(QID) RESOURCE(QID)

END-EXEC END-EXEC

Q7) What is the EIB parameter and the CICS command used to implement

Pseudo-Conversational technique using single PCT - Single PPT entry?

A7) EIBCALEN - To check if COMMAREA has been passed in terurn command.

EXEC CICS RETURN

TRANSID(data-name)

01-Cobol-基础知识讲义

第一章关于COBOL的初步知识 一. COBOL语言的特点 COBOL是Common Business-Oriented Language(公用面向商业的语言)的缩写,主要供数据处理、数据收集及分析之用。COBOL自60年代初开始广泛应用于计算机应用领域(商业和其他领域)。事实上,除了商业之外,各种管理工作都广泛使用COBOL,如各种统计工作,财会工作,企业计划编制,作业制度,情报检索,人事管理等。COBOL针对商业世界的使用,是真正商用应用程序开发的首选语言。 . 1 适于数据处理领域。 . 2 采用英语语法的高级语言,可读性、可维护性、可移植性较强。 3 . 通用性强,标准化程度较高。 . 4 结构严谨,层次分明。 . 5 缺点是比较繁琐。 . 最简单的COBOL程序介绍 二例1: IDENTIFICATION DIVISION.(标识部) PROGRAM-ID. EXAM1.(程序标识段) ENVIRONMENT DIVISION.(设备部) DATA DIVISION.(数据部) PROCEDURE DIVISION.(过程部) A. DISPLAY ‘THIS IS A COBOL PROGRAM.’. STOP RUN. 例2: IDENTIFICATION DIVISION.(标识部) PROGRAM-ID. EXAM2.(程序标识段) ENVIRONMENT DIVISION.(设备部) DATA DIVISION.(数据部) WORKING-STORAGE SECTION.(工作单元节) 77 A PICTURE IS 9(3).(对A进行描述) 77 B PICTURE IS 9(3).(对B进行描述) PROCEDURE DIVISION.(过程部) S. ACCEPT A.(输入A值) ACCEPT B.(输入B值) ADD A TO B.(A+B->B) DISPLAY A,B.(显示A和B值) STOP RUN. 三.COBOL程序的结构 1.部 每个程序都包括四个部: IDENTIFICATION DIVISION (标识部)提供程序的一般性文档说明,主要用来指定源程序名。 ENVIRONMENT DIVISION (环境部)列出程序中所用到的文件。程序中不需要外部文件时,环境部为空,也可以省略部标题。 DATA DIVISION (数据部)程序中所用到的全部数据(包括:文件数据—-用于输入输出、静态数据、参数等)都应在数据部中说明它们的类型和所占内存的情况。 PROCEDURE DIVISION (过程部)包含构成程序的过程性语句,用来给出程序要执行的指令,使计算机产生相应的操作。 2.节和段 标识部下只有各个段。除标识部以外,每个部下可以有若干个节(SECTION),每个节以“节头”作标识。每个节下又可包括若干段(PARAGRAPH),每个段用“段名”标识。各个段内有各种COBOL元素。 3.句子,语句和子句 在过程部中,每一段由若干个句子(Sentence)组成。一个句子是以英文句号来结束的。句子又由语

计算机基础知识知识点归纳

计算机基础知识知识点归纳: 1、世界上第一台电子计算机诞生于 1946年 世界第一台电子计算机的英文名称是。(答案O A.ENIAC B.IBM https://www.doczj.com/doc/206581502.html, D.PC ' 世界第一台电子计算机于 _____________ 年诞生。(答案:B ) A.1940 B.1946 C.1960 D.1980 .体系。(答案:B ) A.比尔?盖茨 B.冯?诺依曼 C.唐纳德?希斯 D.温?瑟夫 2、世界上首次提出存储程序计算机体系结构的是 B _ 型计算机。 B 冯?诺依曼 C 温?瑟夫 D 唐纳德?希斯 【计算机的特点】 1.处理速度快 '现代计算机的运算速度可以达到每秒钟数千亿次 (通常以每秒钟完成基本加法指令的数目来 '表示计算机的运算速度),这不仅使得许多大型数据处理工作时间大大缩短,促成了天气预 '报、数值模拟等技术的广泛应用,更使得许多实时控制、在线检测等处理速度要求较高的工 '作得以实现。同时,计算机具有很高的逻辑运算速度, 这使得计算机在非数值数据领域中得 '到了广泛的应用。 ' 2 .运算精度高 '计算机一般都有十几位甚至更多位的有效数字,加上先进的算法,可得到很高的计算精度。 '例如,对圆周率n 的计算,在没有计算机的情况下, 数学家要经过长期的努力才能算到小数 '点后500多位,而使用第一台计算机仅仅用了 40秒钟就打破了这一记录。 ' 3 .具有逻辑运算和记忆能力 :计算机的存储器具有存储数据和程序的功能, 它可以存储的信息量越来越大。计算机不仅可 '以进行算术运算,而且可以进行逻辑运算,可以对文字、符号等进行判断、比较,因而可解 '决各种不同类型的问题。 ' 4 .具有自动控制能力 '计算机内部的操作、 运算是在程序的控制下自动进行的, 它能够按照程序规定的步骤完成指 定的任务,而不需要人工干预。 ' 5 .通用性强 '计算机是靠存储程序控制进行工作的。 在不同的应用领域中, 只要编写和运行不同的应用软 :件,计算机就能在任一领域中很好地完成工作。针对不同的需要, 设计不同的程序,这就能 '使计算机具有很强的通用性。 'I 计算机的特点有 A.运算速度快 B.具有逻辑判断功能 C.存储容量大 D.计算精度高 【计算机的发展历程】 1.第一代:电子管计算机(1946年—1958年) 1946 年 2 月,世界上第一台电子数字计算机 ENIAC (Electronic Numerical Integrator And 现代的计算机系统都属于 冯?诺依曼 现代计算机时 A 比尔?盖茨 。(答案:ABCD )

计算机软件基础知识点

计算机软件基础知识点 【篇一:计算机软件基础知识点】 电脑软件基础知识一: 软件分为几类,我们一起了解下:硬件驱动程序 光有硬件,电脑是并不能工作的。必须要有能驱使硬件工作的软件 才能让硬件工作,这种软件就是我们平常说的驱动程序。 任何都必须要有对应的驱动程序才能正常工作。驱动程序是电脑软 件之中最基本的软件,也是保障电脑顺利工作的基础。 从winows98以后的中,都了很多常见设备的驱动程序。比如usb,显卡等。不过有些设备必须单独装对应的驱动。各个驱动程序之间 极有可能产生不兼容的情况。驱动版本也不是越新越好,稳定最重要。操作系统 操作系统是大家听的最多的一种软件,它为电脑中其他应用程序提 供的操作平台,就像我们吃饭的桌子一样,为我们提供一种可以操 作的平台。 目前最常见的系统为windows xp ,win7 ,linux,其中win7将逐 渐变成主流。应用软件 应用软件就是我们日常用到的软件程序,这些程序可以帮助我们完 成生活中的很多工作,也就是真正体现电脑用途的东西。如office. 电脑发展到现在,应用软件业涉及到社会的各个行业领域,几乎在 能用到电脑工作的地方,都能对应一种以上的应用软件。 电脑软件基础知识二: 电脑软件,是人们为了告诉电脑要做什么事而编写的,电脑能够理 解的一串指令,有时也叫代码、程序。 根据功能的不同,电脑软件可以粗略地分成四个层次。最贴近电脑 硬件的是一些小巧的软件。它们实现一些最基本的功能,通常固化 在只读存储器芯片中,因此称为固件。 系统软件包括操作系统和编译器软件等。系统软件和硬件一起提供 一个平台。它们管理和优化电脑硬件资源的使用。常见的中间件 包括数据库和万维网服务器等,它们在应用软件和平台之间建立一 种桥梁。 应用软件种类最多,包括办公软件、电子商务软件、通信软件、行 业软件,软件等等。

cobol考前知识点 (1)

U1 1.COBOL是Common Business Oriented Language (通用商业语言) 2. COBOL的组成部分: (1)标识部(IDENTIFICATION DIVISION):用于标识程序名(一般不超过8位)。在标识部下面不设节.直接设段 (2)环境部(ENVIRONMENT DIVISION):用于说明程序运行的环境。 (3)数据部(DATA DIVISION):用于说明程序中涉及的所有数据。数据部下设节,节下面是描述体 (4)过程部(PROCEDURE DIVISION):是程序的核心部分,它决定计算机应进行什么操作。过程部可以设节,下面再设段,也可以直接设段(部-节-段-句子-语句-子句) 3.COBOL 源程序的书写格式: 第1 至6 列为―标号区‖。 第7列为―续行标志区‖。 第8至此11列,称为―A区‖。程序中有些内容如部头,节头,段头,层号01,层号77 及文件描述符FD等应从A区开始写。 第12至此72列,称为―B区‖。写程序中的正文部分。如过程部中的句子只能从B 区开始写。 第73至80列,称为―注释区‖。 书写注意事项:运算符(如加、减、乘、除、乘方)和等号左右两边必须各留一个空格。在过程部中左括号的左侧和右括号的右侧要留一空格,而内侧不必留空格。逗号、句号、分号的左边不能留空格,而右边应有空格。 4.COBOL语言的元素 ―#‖―!‖―?‖―%‖只能在COBOL程序中的字符串中出现。 每一个COBOL字不能超过30个字符。 5.数据名的定名规则 (1)每个数据名的长度为1-30个字符之间。 (2)只能由字母数字和连接符―-‖组成,而且其中至少应有一个字母。连接符只能出现在数据名的中间。 (3)数据名中不能出现空格。 (4)不应选择COBOL的保留字作为数据名。 (5)并不要求数据名是有意义的英文字。 6.COBOL程序的运行 JCL

it基础知识

.net .NET是一个平台,一个抽象的平台的概念。它不是什么编程方法,更不是什么编程语言之类的。通常我们所说的.NET Framework(.net框架)主要包括:.net类库和CLR。 .net类库为我们提供了丰富的类,当然这些都是已经封装好的,我们可以直接使用,不同的类具有不同的功能。类库中广泛的类为我们程序功能的实现提供了足够的资源。 CLR(公共语言运行时)则是实现程序运行的基础,任何针对于CLR的语言,最终都在CLR的托管下有序运行。语言只要是针对CLR最终都会被编译成MSIL(一种中间语言),所以,这样可以实现不同语言之间的相互操作(当然前提是这种语言有针对CLR的编译器)。 vb,https://www.doczj.com/doc/206581502.html,和C#都只是程序设计语言.程序设计语言仅仅是为了方便开发人员和计算机沟通的工具。 C#语言(微软开发的一种类Java的编程语言):C#是微软公司发布的一种面向对象的、运行于.NET Framework之上的高级程序设计语言。虽然C#语法相对C和C++要多一些,但是相对来看C#语法都比较固定,这样使用起来却都很容易。 各类主流编程语言 Java语言 1.企业级应用开发 大到全国联网的系统,小到中小企业的应用解决方案,JAVA都占有极为重要的地位 . 2.网站平台开发 JSP+Servlet+JavaBean,一直以来都相当流行模式. 3.移动领域 典型的应用是手机游戏(国内主要是这方面),大量使用到了J2ME 。 4.移动android APP开发 android 开发只用到了JAVA的语法和JAVA SE的一小部分API. javase是做电脑上的软件的,javaee是做网站的,javame是做手机软件的 虽然大多数用户很乐于将 Eclipse 当作 Java?集成开发环境(IDE)来使用,但 Eclipse 的目标却不仅限于此。Eclipse 还包括插件开发环境(Plug-in Development Environment,PDE),这个组件主要针对希望扩展 Eclipse 的软件开发人员,因为它允许他们构建与Eclipse 环境无缝集成的工具。由于 Eclipse 中的每样东西都是插件,对于给 Eclipse 提供插件,以及给用户提供一致和统一的集成开发环境而言,所有工具开发人员都具有同等的发挥场所。

软件工程基本知识总结

软件工程书上考点总结(选择、填空、判断、简答)大题没有 选择或判断或考点总结: 1、软件:在计算机系统中,与硬件相互依存的逻辑部件,它由程序、数据及相关文档组成。 2、软件工程:是指导计算机软件开发和维护的工程学科。采用工程的概念、原理、技术和方法来开发与维护软件,把经过时间考验而证明正确的管理技术和当前能够得到的最好的技术方法结合起来。 3、软件的特点: 3、可行性研究的目的:可行性研究的目的就是用最小的代价在尽可能短的时间内确定问题是否能够解决。 4、可行性研究的任务:一般都要从经济、技术、操作和法律四个方面来研究每种解法的可行性,做出明确结论来供用户参考,包括:经济可行性、技术可行性、操作可行性和法律可行性。 5、软件需求分析:软件需求分析是软件开发期的第一个阶段,是软件生存周期最重要的一步,是关系到软件开发成败的关键步骤 6、需求分析的任务:需求分析的任务还不是确定系统怎样完成它的工作。 需求分析的任务仅仅是确定系统必须完成哪些工作,也就是对目标系统提出完整、准确、清晰而且具体的需求。 7、需求获取的常用方法 (1)客户访谈:分为正式的和非正式的两种基本形式(2)建立联合分析小组(3)问题分析与确认 8、需求分析的常用方法:(1)功能分解方法(2)结构化分析方法(3)信息建模方法(4)面向对象方法(目前最主流的方法) 9、软件总体设计的目标和任务:总体设计阶段的基本目标就是回答“概括地说,系统应该如何实现?”这个问题。总体设计的另一项任务是设计软件的总体结构,即确定系统中的每个程序是由哪些模块组成的,每个模块的功能以及模块和模块之间的接口、调用关系等。 10、详细设计的根本目的:确定应该怎样具体实现所要求的系统。经过这个阶段的设计工作,应该得出对目标系统的精确描述,具体的就是为软件结构图中每一个模块确定采用的算法和块内数据结构,用某种选定的详细设计工具更清晰地描述,从而在编码阶段可以把这个描述直接翻译成用某种程序设计语言书写的程序. 11、人机界面设计原则:(1)让用户驾驭软件,而不是软件驾驭用户。(2)尽可能减少用户的记忆负担。 (3)保持界面的一致性。 12、从软件工程的角度,编程语言可分为基础语言、结构化语言和面向对象语言3 大类。 (1)基础语言:FORTRAN,COBOL,BASIC和ALGOL都属于这类语言。 (2)结构化语言:Pascal、C、 Ada等结构化语言。 (3)面向对象的语言:C++语言 Java语言 13、程序内部文档包括标识符的选取、增加注解和好的程序布局。 14、软件测试的目标:(1) 测试是为了发现程序中的错误而执行程序的过程;(2) 好的测 试方案是极可能发现迄今为止尚未发现的错误的测试方案;(3) 成功的测试是发现了至今为止尚未发现的错误的测试。 15、软件测试方法及分类:为了便于区分,一般把被测程序在机器上运行称为“动态测试”,不在机器上运行被测程序称为“静态分析”。广义地讲,它们都属于软件测试。因此,软件测试的方法一般分为动态测试和静态测试。动态测试方法中又根据测试用例的设计方法不同,分为黑盒测试法和白盒测试法两类。 16、黑盒测试:也称功能测试或数据驱动测试。它不考虑程序内部结构和处理过程。把被测程序看成一个黑盒子,只在软件接口处进行测试,依据需求规格说明书,检查程序是否满足功能要求。 17、白盒测试:也称结构测试或逻辑驱动测试。测试人员需了解程序的内部结构和处理过程,以检查处理过程的细节为基础,要求对程序的结构特性做到一定程度的覆盖,对程序中的所有逻辑路径进行测试,并检验内部控制结构是否有错,确定实际的运行状态与预期的状态是否一致。

IT基础知识

https://www.doczj.com/doc/206581502.html, .NET是一个平台,一个抽象的平台的概念。它不是什么编程方法,更不是什么编程语言之类的。通常我们所说的.NET Framework(.net框架)主要包括:.net类库和CLR。 .net类库为我们提供了丰富的类,当然这些都是已经封装好的,我们可以直接使用,不同的类具有不同的功能。类库中广泛的类为我们程序功能的实现提供了足够的资源。 CLR(公共语言运行时)则是实现程序运行的基础,任何针对于CLR的语言,最终都在CLR的托管下有序运行。语言只要是针对CLR最终都会被编译成MSIL(一种中间语言),所以,这样可以实现不同语言之间的相互操作(当然前提是这种语言有针对CLR的编译器)。 vb,https://www.doczj.com/doc/206581502.html,和C#都只是程序设计语言.程序设计语言仅仅是为了方便开发人员和计算机沟通的工具。 C#语言(微软开发的一种类Java的编程语言):C#是微软公司发布的一种面向对象的、运行于.NET Framework之上的高级程序设计语言。虽然C#语法相对C和C++要多一些,但是相对来看C#语法都比较固定,这样使用起来却都很容易。 2各类主流编程语言 2.1Java语言 1.企业级应用开发 大到全国联网的系统,小到中小企业的应用解决方案,JAVA都占有极为重要的地位 . 2.网站平台开发 JSP+Servlet+JavaBean,一直以来都相当流行模式. 3.移动领域

典型的应用是手机游戏(国内主要是这方面),大量使用到了J2ME 。 4.移动android APP开发 android 开发只用到了JAVA的语法和JAVA SE的一小部分API. javase是做电脑上的软件的,javaee是做网站的,javame是做手机软件的 虽然大多数用户很乐于将 Eclipse 当作 Java 集成开发环境(IDE)来使用,但Eclipse 的目标却不仅限于此。Eclipse 还包括插件开发环境(Plug-in Development Environment,PDE),这个组件主要针对希望扩展 Eclipse 的软件开发人员,因为它允许他们构建与 Eclipse 环境无缝集成的工具。由于 Eclipse 中的每样东西都是插件,对于给 Eclipse 提供插件,以及给用户提供一致和统一的集成开发环境而言,所有工具开发人员都具有同等的发挥场所。 这种平等和一致性并不仅限于Java 开发工具。尽管 Eclipse 是使用Java语言开发的,但它的用途并不限于 Java 语言;例如,支持诸如C/C++、COBOL、PHP、Android等编程语言的插件已经可用,或预计将会推出。Eclipse 框架还可用来作为与软件开发无关的其他应用程序类型的基础,比如内容管理系统。 2.2C语言 C语言是一门基础语言,是其他一些语言的基础,例如MATLAB,Object-C,Lua 等. C语言没有比较完善的开发框架,他是面前过程的一门语言,讲究算法跟逻辑的. 1.操作系统 类unix系统(linux/freebsd…)主要基于c开发的. 2.嵌入式领域 驱动开发大部分基于C的,嵌入式系统c开发的 3.服务器领域 大部分服务器程序也是c语言的网络核心设备(路由器,交换机,防火墙)大部分代码c开发的,用户界面可能用其他语言。

计算机基础知识讲解

计算机基础知识试讲教案 第一章计算机基础知识 【教学目的与要求】 了解计算机的发展进程及各个过程中的特点 【教学重点与难点】 本章重点:掌握计算机的发展进程、计算机的结构及基本工作原理 本章难点:掌握每个过程中计算机的特点 【教学内容】: 1.1 计算机的发展 1.2 计算机的分类及应用 1.3 计算机的结构及基本工作原理 1.4 计算机的发展趋势 1.5 信息的表示 计算机是信息化的基础。完全可以这样认为,计算机技术就是信息处理的技术。随着微电子技术、通信技术和软件技术的发展,计算机的运算速度、存储容量和信息处理能力不断提高。计算机应用领域覆盖了社会各个方面,从字表处理到数据库管理,从科学计算到多媒体应用,从工业控制到电子化、信息化的现代战争,从智能家电到航空航天,从娱乐消遣到大众化教育,从局域网到远距离通信,计算机无处不在。社会的信息化与计算机的普遍应用已经渗透到人类社会的各个领域,并导致从经济基础到上层建筑、从生产方式到生活方式的深刻变革,计算机技术的普及应用水平已经成为衡量一个国家或地区现代化程度的重要标志。 1.1 计算机的发展 早期计算机的发展 现在计算机的发展 微型计算机的发展 未来的新型计算机 1.1.2 早期计算机的发展 1946年2月,美国宾夕法尼亚大学研制成功了世界上第一台大型通用数字电子计算机ENIAC(爱尼亚克)。 18000个电子管、1500个继电器、重30吨、占地面积约170m2

通用数字电子计算机ENIAC(1946年2月) 1946年6月,冯·诺伊曼等人提出了完善的设计报告《电子计算机装置逻辑结构初探》。 电子计算机发展的萌芽时期遂告结束,开始了现代计算机的发展时期。 1.1.3 现在计算机的发展 表 1-1-1 电子计算机发展过程简表 第一代计算机(电子管) 从1946年到1958年这段时期我们称之为“电子管计算机时代”。第一代计算机的内部元件使用的是电子管。由于一部计算机需要几千个电子管,每个电子管都会散发大量的热量,因此,如何散热是一个令人头痛的问题。电子管的寿命最长只有3000小时,计算机运行时常常发生由于电子管被烧坏而使计算机死机的现象。第一代计算机主要用于科学研究和工程

cobol 知识点集锦

cobol 知识点集锦 COBOL数据类型 计息是银行的一项重要业务,包括日常代理客户收、付计算客户利息和年度计息等。目前,这些工作大多数是在IBM ES9000主机的SAFE应用系统平台上进行,该系统联 机程序和联机计息程序是用IBM 370汇编语言实现的。为方便汇编语言读写,在VSAM文 件存储的数据中,数据存放格式进行了特殊的定义。如日期存放采用X(3)型,01年03月15日,存入EBCD码为X‘010315’。在进行年度计息时,为了实现各种复杂的运算工作,一般采用COBOL语言来实现各种运算。而采用COBOL语言读取X(3)型数据时,读出的是字符型数据,不能直接进行运算,必须转换为COBOL数据类型的数据后才能进行相应处理。 如刚才的X‘010315’,需要转换为内部十进制数据X‘0010315C’。本文介绍一种用COBOL语言实现字符型X(3)与内部十进制数据相互转换的方法。 由X(3)型转换为内部十进制 由于日期数据总是大于零,在COBOL语言的工作单元节定义变量DATE-FIRST后,再追加 定义COBOL语言的最小数据单元X‘000C’,即十进制12。由于重定义DATE-CASE为DATE-CHANGE后,DATE-CHANGE是原日期数据的1000倍,于是要在过程部将DATE-CHANGE除以1000。 首先,在COBOL程序WORKING-STORAGE SECTION. 中定义如下内容: WORKING-STORAGE SECTION. 01 DATE-CASE. 02 DATE-FIRST PIC X(3). 02 DATE-SIGN PIC 9(4) COMP VALUE 12.;定点二进制数 01 DATE-CHANGE REDEFINES DATE-CASE PIC 9(9) COMP-3. ;内部十进制数据 01 DATE-HEX PIC X(3). ;转换前数据 01 DATE-DEC PIC S9(7)COMP-3 . ;转换后数据 然后,在过程部PROCEDURE DEVISION.中加入如下语句: PROCEDURE DEVISION. MOVE DATE-HEX TO DATE-FIRST . COMPUTE DATE-CHANGE = DATE- CHANGE / 1000.

COBOL 知识点集锦(上)

COBOL知识点集锦(上) cobol知识点集锦COBOL数据类型 计息是银行的一项重要业务,包括日常代理客户收、付计算客户利息和年度计息等。目前,这些工作大多数是在IBM ES9000主机的SAFE应用系统平台上进行,该系统联机程序和联机计息程序是用IBM370汇编语言实现的。为方便汇编语言读写,在VSAM文件存储的数据中,数据存放格式进行了特殊的定义。如日期存放采用X(3)型,01年03月15日,存入EBCD 码为X‘010315’。在进行年度计息时,为了实现各种复杂的运算工作,一般采用COBOL语言来实现各种运算。而采用COBOL语言读取X(3)型数据时,读出的是字符型数据,不能直接进行运算,必须转换为COBOL数据类型的数据后才能进行相应处理。如刚才的X‘010315’,需要转换为内部十进制数据X‘0010315C’。本文介绍一种用COBOL语言实现字符型X(3)与内部十进制数据相互转换的方法。 由X(3)型转换为内部十进制 由于日期数据总是大于零,在COBOL语言的工作单元节定义变量DATE-FIRST后,再追加定义COBOL语言的最小数据单元X‘000C’,即十进制12。由于重定义DATE-CASE为DATE -CHANGE后,DATE-CHANGE是原日期数据的1000倍,于是要在过程部将DATE-CHANGE除以1000。 首先,在COBOL程序WORKING-STORAGE SECTION.中定义如下内容: WORKING-STORAGE SECTION. 01DATE-CASE. 02DATE-FIRST PIC X(3). 02DATE-SIGN PIC9(4)COMP VALUE12.;定点二进制数 01DATE-CHANGE REDEFINES DATE-CASE PIC9(9)COMP-3.;内部十进制数据 01DATE-HEX PIC X(3).;转换前数据 01DATE-DEC PIC S9(7)COMP-3.;转换后数据 然后,在过程部PROCEDURE DEVISION.中加入如下语句: PROCEDURE DEVISION.

COBOLⅠ- 第1章 COBOLの基础知识(中文翻译版)

第一章COBOL的基础知识 1.1COBOL语言的定义 所谓COBOL,是Common Business Language的简称,是事务处理用的通用语言。 1.1.1特征 COBOL语言的特征如下: ①事务处理用的语言。 ②可以用日常用语接近的语言(英语)表述 ③记述内容为文章体,便于阅读。

1.1.2COBOL程序的构成 COBOL程序由以下几个部分构成。

1.2COBOL程序的作成过程 由系统设计,决定数据的形式与处理 标准。作出程序式样书。 程序员以程序式样书为基础,讨论处理的内容,用图示将处理顺序表示出来。(本书中使用的是PAD图)根据图示用COBOL语言表述系统。这种工作被称为编程。

1.3 PAD 定义 在编写程序之前,用图示将处理顺序表示出来。 根据一定的规则图示化,因此处理流程更清晰,更易理解。图示化的方法之一就是PAD 。 1.3.1 PAD 有(顺序)处理,反复(循环),选择3种基本符号。 作成的程序,通过终端或软盘,向计算机系统硬盘登录。 已登录的原始程序,通过COBOL 语言处理程序翻译,转换成机械语言程序。使用测试数据运行机械语言程序,如果运行结果正确无误,表明程序完成。

写法按照处理的实际顺序由上向下记述,反复的处理,选择的处理记述在右侧。 PAD所表示的内容: ①处理A ②在反复P中,在指定的条件下,处理B1,反复B2。 ③处理C ④在选择Q中,根据指定条件,处理D1或D2。 以这样的处理顺序进行。 练习题1-1 [1]关于COBOL程序构成部分,在()种填入适当的语句

1.4COBOL编程用纸的书写方法 1.4.1编程用纸 COBOL程序,是记述在COBOL编程用纸上面的。编程用纸1行由80位构成。 ①第1~6位 1~6位称为连续号码区,为识别行,连续号码按升序记入。 ②第7位 第7位称为标识区,为表示连接行或注释行 ③第8~72位 8~72位,记述COBOL的程序, 8~11位:A区 12~72位:B区 COBOL程序,分为写在A区的程序,和写在B区的程序。而且,必须从第8位开始写起。

计算机基础知识

计算机基础知识 1.什么是计算机? 答:计算机是一种能够按照事先存储的程序,自动、高速地对数据进行处理和存储的系统。 2.计算机有哪些主要的特点? 答:计算机具有以下主要特点。 1.运算速度快 2.运算精确度高 3.具有记忆和逻辑判断能力 4.具有自动控制能力 3.计算机发展中各个阶段的主要特点是什么? 答:第一代(1946年~1958年)是电子管计算机,计算机使用的主要逻辑器件是电子管,用穿孔卡片机作为数据和指令的输入设备;用磁鼓或磁带作为外存储器;使用机器语言编程。虽然第一代计算机的体积大、速度慢、能耗高、使用不便且经常发生故障,但是它一开始就显示了强大的生命力。这个时期的计算机主要用于科学计算,从事军事和科学研究方面的工作。 第二代(1959年~1964年)是晶体管计算机,这个时期的计算机用晶体管代替了电子管,内存储器采用了磁心体、引入了变址寄存器和浮点运算硬件、利用I/O处理器提高了输出能力,在软件方面配置了子程序库和批处理管理程序,并且推出了FORTRAN、COBOL、ALGOL等高级程序设计语言及相应的编译程序。这个时期计算机的运行速度已提高到每秒几十万次,体积已大大减小,可靠性和内存容量也有较大的提高。 第三代(1965年~1970年)是集成电路计算机,所谓集成电路是将大量的晶体管和电子线路组合在一块硅晶片上,故又称其为芯片。这个时期的计算机用中小规模集成电路代替了分立元件,用半导体存储器代替了磁芯存储器,外存储器使用磁盘。软件方面,操作系统进一步完善,高级语言数量增多,出现了并行处理、多处理器、虚拟存储系统以及面向用户的应用软件。计算机的运行速度也提高到每秒几十万次到几百万次,可靠性和存储容量进一步提高,外部设备种类繁多,计算机和通信密切结合起来,广泛地应用到科学计算、数据处理、事务管理、工业控制等领域。 第四代(1971年以后)是大规模和超大规模集成电路计算机。这个时期计算机的主要逻辑元件是大规模和超大规模集成电路,这一时期的计算机采用半导体存储器,具有大容量的软、硬磁盘,并开始引入光盘。软件方面,操作系统不断发展和完善,同时出现了数据库管理系统、通信软件等。在第四代计算机中,微型计算机最引人注目。微型计算机的诞生是超大规模集成电路应用的结果,奔腾系列处理器的产生使得现在的微型计算机体积越来越小、性能越来越强、可靠性越来越高、价格越来越低、应用范围越来越广。 目前新一代计算机正处在设想和研制阶段。新一代计算机是把信息采集、存储处理、通信和人工智能结合在一起的计算机系统。 4.计算机科学的研究范畴主要包括哪些? 答:计算机科学技术的研究范畴包括计算机理论、硬件、软件、网络及应用等,按照研究的内容,也可以划分为基础理论、专业基础和应用3个层面。在这些研究领域中,有些方面已经研究得比较透彻,取得了许多成果;有些方面还不够成熟和完备,需要进一步去研究、发展和完善。 5.欧拉是如何对“哥尼斯堡七桥问题”进行抽象的? 答:1736年,著名数学家列昂纳德?欧拉(L.Euler)发表了关于“哥尼斯堡七桥问题”的论文——《与位置几何有关的一个问题的解》,欧拉是这样解决问题的:欧拉用4个字母A、B、C、D代表4个城区,并用7条线表示7座桥,这样做是基于该问题本质考虑的,它抽象出问题最本质的东西,忽视问题非本质的东西(如桥的长度等),从而将哥尼斯堡七桥问题抽象为一个数学问题,即经过图中每边一次且仅一次的回路问题。欧拉在论文中论证了这样的回路是不存在的,后来,人们把有这样回路的图称为欧拉图,称这个问题为欧拉七桥问题。

COBOL语言知识点

1.DATA ITEM NAMING RULES: 长度为30个字节;字符包括A-Z,a-z,0-9和‘-’;横线不能出现在第一个或最后一个;COBOL 关键字用;至少包含一个字符。 2.DATA STRUCTER LEVEL NUMBER 77定义一个独立的变量 66重命名 88定义条件名 3.DATA TYPE Alphabetic, Alphanumeric, Alphanumeric-edited, Numeric, Numeric-edited https://www.doczj.com/doc/206581502.html,P-1,COMP-2,COMP-3,COMP,COMP-5 COMP-1:指定内部浮点项目(双精度),8个字节长 COMP-2:指定内部浮点项目(单精度),4个字节长 COMP-3:压缩十进制(1个字节有两位) COMP-4(COMP):二进制存储 COMP-3是IBM Mainframe特有,特意将一下: COMP-3 数据类型同样以二进制的形式保存在文件中,其占位数计算方法如下:占位数 =[ 定义长度 /2+1] [] 表示整 COMP-3 数据在文件中存储形式如下例: 例如:定义形式 -- 9(4) COMP-3, 占位数 =[ 定义长度 /2+1]=3 赋值: 1521 存储结果: 01 52 1F(F表示正数) 赋值: 0 存储结果: 00 00 0F COMP-3 带有符号位时,赋值为正时,最后半个字节为 16 进制 C ;赋值为负时,最后半个字节为 16 进制D 例如:定义形式 -- S9(4) COMP-3, 占位数 =[ 定义长度 /2+1]=3 赋值: -1521 存储结果: 01 52 1D (D 表示负数 ) 赋值: 1521 存储结果: 01 52 1C 注意:当 COMP-3 的数据定义无 S ,赋予负值时,最后半个字节仍为 F ,即无法显示负数 5.COBOL中常量 ZERO(ZEROS,ZEROES):数字令或者字符“0” SPACE(SPACES):空格 HIG-VALUE(HIGH-VALUES):将对应的二进制码全部置为1

软件基础知识、常用开发工具试题

软件基础知识、常用开发工具试题 一、单选题: 1、一般把软件分为两大类,其类别为系统软件和应用软件,如:(B). A、系统软件WORD、应用软件IE B、系统软件WINDOWS、应用软件WORD C、系统软件AUTOCA D、应用软件WORD D、系统软件EXCEL、应用软件COBOL 2、在选定文件或文件夹后,将其彻底删除的操作是(B). A、用DELETE键删除 B、用SHIFT+DELETE键删除 C、用鼠标直接将文件或文件夹拖放到"回收站"中 D、用窗口中"文件"菜单中的"删除"命令 3、浏览INTERNET上的网页,需要知道:(A) A、网页的地址(URL) B、网页制作的过程 C、网页的设计原则 D、网页的作者 4、目前最好的防病毒软件的作用是(A). A、检查计算机是否染有病毒,消除已感染的部分病毒 B、杜绝病毒对计算机的侵害 C、检查计算机是否染有病毒,消除已感染的任何病毒 D、查出计算机已感染的任何病毒,消除其中的一部分 5、计算机病毒的特征有(C). A、传播性、潜伏性、安全性 B、传播性、破坏性、易读性 C、传播性、潜伏性、破坏性 D、潜伏性、破坏性、易读性

6、INTERNET EXPLORER工具栏中的"主页"按钮的作用是(C). A、链接到微软件公司的WEB站点:https://www.doczj.com/doc/206581502.html, B、返回到前一个页面 C、链接到在"INTERNET选项……"中设定的主页地址 D、链接到当前访问站点的首页 7、在INTERNET EXPLORER中,使用文件菜单时(B). A、可以用"保存"命令保存当前页面 B、可以用"另存为……"命令保存当前页面 C、页面只能保存为HTML文档 D、页面不能保存为文本文件(*、TXT) 8、在OUTLOOK EXPRESS中设置唯一的电子邮件帐号:KAO@https://www.doczj.com/doc/206581502.html,,现发送一封电子邮件给:SHI@https://www.doczj.com/doc/206581502.html,,则发送完成后(D). A、发件箱中有KAO@https://www.doczj.com/doc/206581502.html,邮件 B、发件箱中有SHI@https://www.doczj.com/doc/206581502.html,邮件 C、已发送邮件中有KAO@https://www.doczj.com/doc/206581502.html,邮件 D、已发送邮件中有SHI@https://www.doczj.com/doc/206581502.html,邮件 9、安装拔号网络的目的是为了(B). A、使WINDOWS完整化 B、能够以拔号方式连入INTERNET C、与局域网中的其它终端互连 D、管理共享资源 10、以下列出的4项中,不属于计算机病毒特征的是(C). A、潜伏性 B、传播性 C、免疫性 D、激发性 11、当一个应用程序窗口被最小化后,该应用程序将(B). A、终止运行 B、继续运行

COBOL

COBOL简易教程 主要内容 1.COBOL语言的基本概念及程序的结构 ?关于COBOL的初步知识 ?COBOL程序的结构 ?COBOL源程序的书写格式 2.COBOL数据表示 ?常量 ?层次的概念 ?PICTURE语句 ?数据在内存中的各种形式 3.算术运算 ?变量赋值 (MOVE, MOVE CORR) ?算术运算(ADD, SUB, MUL, DIV, COMPUTE等) ?内部函数 4.字符串处理 ?合并、分离、取子串、替换等 5.程序逻辑控制 ?条件的分类 ?IF、EVALUATE ?PERFORM 6.表处理 定义、赋值、引用、查询 7.读、写多格式记录文件 8.常用语句小结 9.子程序

1.COBOL语言的基本概念及程序的结构 1.1关于COBOL的初步知识 ◆COBOL是Common Business Oriented Language (通用商业语言,或称管理语言) 的缩写 ◆最适用于数据处理 ◆比较接近于自然语言(英语) ◆COBOL的结构严谨,层次性强 ◆COBOL的缺点是比较烦琐。 1.2 COBOL 程序的结构 部(Division) 一部可包括若干节 节(Section) 一节可包含若干段 段(Paragraph) 一段可包含若干句子 句子(Sentence) 一个句子可包含若干语句 语句(Statement) 制定计算机完成一定的操作 子句(Clause) 制定完成某一方面的功能 每个程序应包含四个部 IDENTIFICATION DIVISION (标识部) 主要用来指定源程序名字,也可以写入其他用作备忘的某些信息(如日期、作者等)。 ENVIROMENT DIVISION(环境部) 主要用于指出程序中用到的数据文件名与计算机系统的设备的对应关系,即把某一文件名与一个外部设备联系起来。 DATA DIVISION(数据部〕 程序中所用到的全部数据(包括输入输出的数据和中间数据)都应在数据部中说明它们的类型和所占内存情况。 PROCEDURE DIVISION(过程部〕 用来给出程序要执行的指令,使计算机产生相应的操作,例如进行数学运算。1.3 COBOL源程序的书写格式 7 注释区(*) 8~11 A区 部头,节头,段头,层号01,层号77以及文件描述符FD应从A区开写。 12-72 B区,正文 过程部的句子只能从B区开始写,而不能写到A区去。

电脑基础知识学习(全)

计算机入门知识 计算机的诞生酝酿了很长一段时间。1946年2月,第一台电子计算机ENIAC在美国加州问世,ENIAC 用了18000个电子管和86000个其它电子元件,有两个教室那么大,运算速度却只有每秒300次各种运算或5000次加法,耗资100万美精品文档,你值得期待 元以上。尽管ENIAC有许多不足之处,但它毕竟是计算机的始祖,揭开了计算机时代的序幕。 计算机的发展到目前为止共经历了四个时代,从1946年到1959年这段时期我们称之为“电子管计算机时代”。第一代计算机的内部元件使用的是电子管。由于一部计算机需要几千个电子管,每个电子管都会散发大量的热量,因此,如何散热是一个令人头痛的问题。电子管的寿命最长只有3000小时,计算机运行时常常发生由于电子管被烧坏而使计算机死机的现象。第一代计算机主要用于科学研究和工程计算。 从1960年到1964年,由于在计算机中采用了比电子管更先进的晶体管,所以我们将这段时期称为“晶体管计算机时代”。晶体管比电子管小得多,不需要暖机时间,消耗能量较少,处理更迅速、更可靠。第二代计算机的程序语言从机器语言发展到汇编语言。接着,高级语言FORTRAN语言和cOBOL语言相继开发出来并被广泛使用。这时,开始使用磁盘和磁带作为辅助存储器。第二代计算机的体积和价格都下降了,使用的人也多起来了,计算机工业迅速发展。第二代计算机主要用于商业、大学教学和政府机关。 从1965年到1970年,集成电路被应用到计算机中来,因此这段时期被称为“中小规模集成电路计算机时代”。集成电路(Integrated Circuit,简称r)是做在晶片上的一个完整的电子电路,这个晶片比手指甲还小,却包含了几千个晶体管元件。第三代计算机的特点是体积更小、价格更低、可靠性更高、计算速度更快。第三代计算机的代表是IBM公司花了50亿美元开发的IBM 360系列。 从1971年到现在,被称之为“大规模集成电路计算机时代”。第四代计算机使用的元件依然是集成电路,不过,这种集成电路已经大大改善,它包含着几十万到上百万个晶体管,人们称之为大规模集成电路(LargeScale lntegrated Circuit,简称LSI)和超大规模集成电路(Very Large Scale lntegrated Circuit,简称VLSI)。1975年,美国1BM公司推出了个人计算机PC(PersonaI Computer),从此,人们对计算机不再陌生,计算机开始深入到人类生活的各个方面。计算机的基本组成计算机的主要组成部分可以归纳为以下五个部分:输入设备、存储器、运算器、控制器和输出设备。 输入设备 输入设备是计算机的重要组成部分,输入设备与输出设备合你为外部设备,简称外设,输入设备的作用是将程序、原始数据、文字、字符、控制命令或现场采集的数据等信息输入到计算机。常见的输入设备有键盘、鼠标器、光电输入机、磁带机、磁盘机、光盘机等。 存储器 存储器的功能是存储程序、数据和各种信号、命令等信息,并在需要时提供这些信息。 运算器 运算器的功能是对数据进行各种算术运算和逻辑运算,即对数据进行加工处理。 控制器 是整个计算机的中枢神经,其功能是对程序规定的控制信息进行解释,根据其要求进行控制,调度程序、数据、地址,协调计算机各部分工作及内存与外设的访问等。 输出设备 输出设备与输入设备同样是计算机的重要组成部分,它把外算机的中间结果或最后结果、机内的各种数据符号及文字或各种控制信号等信息输出出来。微机常用的输出设备有显示终端CRT、打印机、激光印字机、绘图仪及磁带、光盘

计算机基础知识大全

第1章计算机应用基础知识 1.1 计算机的发展概述 世界上第一台电子计算机于1946年2月在美国宾夕法尼亚大学诞生,取名为ENIAC(读作“埃尼克”),即Electronic Numerical Internal And Calculator的缩写。电子计算机的产生和迅速发展是当代科学技术最伟大的成就之一。自1946年美国研制的第一台电子计算机ENIAC以来,在半个世纪的时间里,计算机的发展取得了令人瞩目的成就。 计算机从诞生到现在,已走过了60年的发展历程,在这期间,计算机的系统结构不断发生变化。人们根据计算机所采用的物理器件,将计算机的发展划分为几个阶段,下面就来具体介绍。 1.1.1 计算机发展简史 电子计算机的发展阶段通常以构成计算机的电子器件来划分,至今已经历了四代,目前正在向第五代过渡。每一个发展阶段在技术上都是一次新的突破,在性能上都是一次质的飞跃。 1.第一代(1946~1957年),电子管计算机 它是一台电子数字积分计算机,取名为ENIAC。这台计算机是个庞然大物,共用了18 000多个电子管、1500个继电器,重达30吨,占地170平方米,每小时耗电140千瓦,计算速度为每秒5000次加法运算。尽管它的功能远不如今天的计算机,但ENIAC作为计算机大家族的鼻祖,开

辟了人类科学技术领域的先河,使信息处理技术进入了一个崭新的时代。其主要特征如下: (1)电子管元件,体积庞大、耗电量高、可靠性差、维护困难。 (2)运算速度慢,一般为每秒钟1千次到1万次。 (3)使用机器语言,没有系统软件。 (4)采用磁鼓、小磁芯作为存储器,存储空间有限。 (5)输入/输出设备简单,采用穿孔纸带或卡片。 (6)主要用于科学计算。 2.第二代(1958~1964年),晶体管计算机 晶体管的发明给计算机技术带来了革命性的变化。第二代计算机采用的主要元件是晶体管,称为晶体管计算机。计算机软件有了较大发展,采用了监控程序,这是操作系统的雏形。第二代计算机有如下特征: (1)采用晶体管元件作为计算机的器件,体积大大缩小,可靠性增强,寿命延长。 (2)运算速度加快,达到每秒几万次到几十万次。 (3)提出了操作系统的概念,开始出现了汇编语言,产生了如FORTRAN和COBOL等高级程序设计语言和批处理系统。 (4)普遍采用磁芯作为内存储器,磁盘、磁带作为外存储器,容量大大提高。 (5)计算机应用领域扩大,从军事研究、科学计算扩大到数据处理和实时过程控制等领域,并开始进入商业市场。 3.第三代(1965~1969年),中小规模集成电路计算机 20世纪60年代中期,随着半导体工艺的发展,已制造

相关主题
文本预览
相关文档 最新文档