PROGRAMMING 3 QUIZ 1

0.0(0)
studied byStudied by 21 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/93

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

94 Terms

1
New cards

COBOL

  • Developed in 1959 by the CODASYL committee

  • Still widely used in business, insurance, and government systems

  • Remains the backbone of mainframe computing and essential for the global economy

  • It is simple, portable, and maintainable but is wordy, has rigid format and not for scientific use

2
New cards

1960

  • COBOL’s first compilers got released

3
New cards

1968

  • It is when the first standard version of cobol was released

4
New cards

1974

  • The second version was released and was made for efficiency

5
New cards

1985

  • Cobol got enhanced had more versatility and structure

6
New cards

2002

  • Object-oriented features got added to cobol

7
New cards

2014

  • Method overloading got introduced to cobol

8
New cards

Machine Dependent, Easy to understand, Easy to maintain, Uniquely organized in 4 divisions, can handle voluminous data using few statements

Features of cobol language

9
New cards

Uses english like syntax, Unusual lenght, Column sensitive, spacing sensitive, uses indentation

Features of cobol program

10
New cards

Abend

  • An unexpected or abnormal termination of the program due to some problem in code or data

11
New cards

Syntax

  • It is a system-defined standard that should be followed while coding the cobol statements like MOVE, IF, PERFORM, etc.

12
New cards

Character String

  • It is a set of characters used to name something

13
New cards

Statement

  • It is a synthetically valid combination of words and characters written in the procedure division of cobol program and beginning with a verb.

  • Individual instructions or commands in COBOL, like MOVE, ADD, DISPLAY, etc.

14
New cards

Sentence

  • It refers to the group of statements ending in a period 

15
New cards

Paragraph

  • It is a set of statements that are coded together separately from procedure division to perform a task

16
New cards

Section

  • It is a set of paragraph that are coded together separately from the procedure division

17
New cards

Division

  • Major parts used to code the cobol program

  • Consists of one or more paragraph or section

18
New cards

Identification, Environment, Data, Procedure

Four major divisions in a cobol program

19
New cards

Separator

  • These are characters that are used to separate strings

20
New cards

Delimiter

  • It is used to specify the start or the end of the strings

21
New cards

Condition

  • It is the expression that results in True or False 

  • Based on the return value, the program flow gets decided

22
New cards

Variable

  • It is a data name used to hold the value for processing in the program

  • It holds a pointer to the memory location where the value is actually stored

  • These are defined and declared in the data division

  • These must be prepared so they can be recognized in the procedure division

23
New cards

Constant

  • It is a variable that has only one value throughout the execution of the program

24
New cards

Figurative Constants

  • These are system-defined keywords with predefined values

25
New cards

Literal

  • It is the value that is assigned to the variable

26
New cards

Scope terminator

  • It is a cobol reserved word that specifies the end of the specific cobol statements

27
New cards

Arithmetic Expressions

  • It is the coding form of arithmetic calculations and it is a combination of two or more variables with arithmetic operators

28
New cards

Physical file

  • It is the actual file that contains the data in the form of records

29
New cards

Logical file

  • It is a named used in the program that refers the actual physical file

30
New cards

Array

  • It is a set of similar elements arranged in sequential order and can access with the position

  • It is called a table in COBOL 

31
New cards

Binary Search

  • It is an algorithm used on sorted arrays to search the element quickly

  • Uses the technique of repeatedly dividing the entire array into two parts until it finds the element

32
New cards

Compiler

  • It is a utility that converts source code into object code

33
New cards

Load modules

  • It is an executable component of the program that is generated by the compiler

34
New cards

Character

  • Lowest form in the paragraph structure

35
New cards

Word

  • It is made up of one or more characters

36
New cards

Clause

  • Consists of characters and words, and is used to specify an attribute of an entry

37
New cards

Identification Division

  • The first division of the COBOL program

  • Contains the identification of the program and its author or programmer

  • The function of this division is to supply information about the program to others who may use it as reference

  • Its purpose is to identify the program and its author and to provide other general information about the program, such as the dates the program is written, any program security, etc.

38
New cards

Environment Division

  • It describes the computing environment of the program

  • This division describes the types of hardware in which the program is written and executed

  • It supplies information about the computer equipment used in the program

  • Contains the Configuration section and the Input and output section

39
New cards

Configuration Section

  • It supplies the information about the computer on which the cobol program will be compiled and executed

  • Provides documentation information which includes the computer manufacturer, computer number, and computer number model

  • This defines the source and the object computer

40
New cards

Source Computer

  • The computer that will be used for compiling the program

41
New cards

Object computer

  • The computer that will be used for executing or running the program

42
New cards

Special Names

  • A third paragraph that is optional in the configuration section 

  • This focuses on special used for reading or displaying data

43
New cards

Input and output section

  • Defines the files to be used in the program

  • starts with the FILE-CONTROL paragraph, which uses SELECT statements

  • Includes input file, where the source data is stored for processing, and the output file, where the report or result file is stored.

44
New cards

Data division

  • This contains the file section which declares the logical input and output file to be used in the program and the working storage section which declares all the variables to be used in the program

45
New cards

File section

  • declares the logical input and output files to be used in the program

46
New cards

Working storage section

  • This is where all the variables to be used in the program are declared.

47
New cards

Procedure Division

  • This division contains used defined section, paragraphs, clauses, and statements

  • This is where the problem logic is developed

48
New cards

Cobol Coding Sheet

  • It specifies from where each statement coding should start and how it differentiates from other statements

49
New cards

Sequence Number Area

  • Columns 1-6

  • Cobol compiler does not consider these columns part of the code

  • Is divided in 2 parts: Page number (column 1-3), which represents the current page number and line number (4-6), which represents the current line number on the page.

50
New cards

Indicator Area

  • It is the column 7 in the coding sheet split

51
New cards

Continuation Line

  • uses “-” symbol

  • Used to continue any sentence, entry, clause or phrase in Area B of the next line that is neither a comment or a blank line

52
New cards

Comment Line

  • Uses “*“ symbol

  • It can be written anywhere in area A and B of that line and can consists of any combination of characters from the character set of the computer

53
New cards

Forward slash

  • Uses “/“ symbol

  • Used to go to the top of the next page when printing a report

54
New cards

Area A

  • Columns 8-11

  • Contains division headers, section headers, paragraph headers or paragraph names, level indicators, declarative and end declaratives, and end program, end class, and end method markers.

55
New cards

Area B

  • Columns 12-72

  • Contains the entries, sentences, statements, and clauses

  • Also contains the continuation lines

56
New cards

System Generated Number

  • Columns 73-80

  • Gets excluded by the cobol compiler during compilation time

57
New cards

User-defined words and reserved words

2 types of words

58
New cards

User-defined words

  • Any word that is defined by the developer and it is used to store the data

  • It can have a maximum length of 30 bytes

59
New cards

Reserved words

  • It is a system-defined word with proper meaning or task assigned in COBOL language

  • It can be keywords, optional words, figurative constants, special character words and special registers

60
New cards

Non-numeric and numeric

2 types of Literals

61
New cards

Non-numeric Literal

  • Are strings enclosed by quotation marks or apostrophes

  • It can contain all valid characters that are allowed by COBOL

62
New cards

Numeric Literals

  • It is a number that is a combination of a sign and a decimal point

  • Coded directly without quotation marks and apostrophes

63
New cards

Numeric, Alphanumeric, Figurative

3 types of constants

64
New cards

Alphanumeric constants

  • Alphanumeric variables with only one value throughout the program execution

65
New cards

Numeric Constants

  • Numeric values that have one value throughout the program execution

66
New cards

Level Number

  • Is used to specify the level of data in a record

  • Can be group or elementary items

67
New cards

Elementary items

  • These items cannot be divided even further

  • Level number, data name, Picture clause, and value clause are used to describe this

68
New cards

Group Items

  • Consists of one or more elementary items

  • The level number of this item is always 01

69
New cards

Picture clause

  • Is used to describe the format and characteristics of a data item

  • It tells the compiler what type of data will be stored and how it will be displayed

70
New cards

Data type

  • Picture clause defines this whether it is numeric, alphabetic, or alphanumeric

71
New cards

Sign

  • Whether the values can be positive or negative

72
New cards

Decimal point position

  • Where the decimal is placed in numeric data

73
New cards

Length

  • Refers to how many characters or digits are allowed

74
New cards

PIC

  • Keyword for picture clause

75
New cards

X

  • May contain any character including special or unprintable characters

76
New cards

9

  • May contain only numeric characters from 0-9

77
New cards

A

  • May only contain alphabetic characters from A-Z, a-z, and space

78
New cards

S

  • Numeric sign

  • Does not use any actual storage, without this character, a numeric item would be treated as unsigned

79
New cards

V

  • Implied decimal Point

  • It separates the integer portion of a numeric item from its decimal portion 

  • Used to keep track of the decimal point for arithmetic calculations

80
New cards

P

  • Numeric Placeholder

  • Used to change the precision and can also be used to represent positions after the decimal

81
New cards

-

  • Used to display a sign in a printed item

  • This character will be showed if the numeric value is negative

82
New cards

+

  • Used to display a sign in a printed item, it will be showed if the value is positive

83
New cards

.

  • Actual decimal point

  • Separates the integer portion of a numeric item from its decimal portion

  • This character cannot be used in an item involved in calculations

84
New cards

Z

  • Zero Suppress

  • Replaces leading zeros with blanks, has no effect on non-zero positions or zero in not leading positions

85
New cards

,

  • Commonly used as a separator in numeric data items

86
New cards

$

  • Inserts a dollar sign into the first position in the data item

  • Commonly used for currency but can also be used to suppress 0s

87
New cards

*

  • Replaces leading zeros with asterisks

  • Commonly used in check writing

88
New cards

CR

  • Credit

  • Used at the end of a PICTURE clause

  • This will appear in the position indicated if the item is negative

89
New cards

DB

  • Debit

  • This will appear in the position indicated if the item is positive

90
New cards

/

  • Commonly used as a separator in date fields

91
New cards

0

  • Inserts a zero into the data item in this position

  • Not commonly used

92
New cards

Value Clause

  • It is an optional clause which is used to initialize the data items

  • The values can be numeric, literal, alphanumeric literal, or figurative constant

93
New cards

Rounded clause

  • Provides automatic rounding

94
New cards

On Size Error clause

  • Is a conditional statement that implies “if there the size of a value does not fit in the field”, do whatever is indicated in the statement that follows the statement.

  • The following statement must be imperative