cobol ppt
cobol ppt
cobol ppt
Operating Systems
• In which we can use mainframe (IBM)
• We use
• MVS (Multi virtual System) MVS/ESA (Multi Virtual Storage)
• ESA (Enterprise system Architecture)
• ZERO DOWNTIME OS
CONNECTING TO MAINFRAME
• Backend –BATCH :
• COBOL
• VSAM
• DB2
• JCL
FRONT END
• Online
• CICS
• CUSTOMER INFORMATION CONTROL SYSTEMS
APPLICATIONS
• Banking
• Insurance
• Retail
• Reservation
• Telecom
• Real Estate
STRUCTURE
• DIVISION
• SECTION
• PARAGRAPH
• SENTENCE
• STATEMENT
• VERB
• CHARACTER
CODING SHEET
• Where the var value should not change from starting of the program to the end of the
program
• Literal constant - user-defined
• Figurative constant -system defined
• Literals can be further divided –Numeric , Non –numeric
• Numeric –range 0-9, represented by 9, Max length 18 bytes
• Non-numeric –max length 160 characters, represented by A
SIGN ,DECIMAL
• Sign
• Ex : -18 ✓
• : 18- ×
• Decimal
• Ex : 1.2 ✓
• : . 06 ✓
• : 49. ×
•
DATA DECLARATION
• STATIC DECLARATION
• We will assign the value to the particular at the time of variable declaration
• 01 A PIC 9(2) VALUE 15
• DYNAMIC DECLARATION
• At the runtime we will pass the variable value without using value class
• 01 A PIC 9(3)
• Accept
• By using ACCEPT variable command we will accept the value
• single accept command can be used for single variable, multiple accept command is used for multiple
variable.
DATASETS
By using datasets we can create delete store programs
We can store the data
PS Physical Sequential
It is Similar to FLAT FILE
Directory Block should always be zero
To store the data & Reports
To run a single program
PDS : PARTIONED DATA SET
• Identification division
• Environment division
• Data division
• Procedure division
• Each and every program starts with ID identification division & program division
• It is mandatory without this we cannot start program.
• Date written
• Date compile- → ON which date compile
ENVIRONMENT DIVISION
Optional divisions
This should be followed by Identification division
It contains configuration division & I/0 sections
Config division
- Source computer (Input computer)
Object Computer(output computer)
Special Names (@, #)
DATA DIVISION
• Optional Division
• Classified into 3
• file section
• Working storage section
• Linkage Section
• It describes the structure
• Mandatory in Vsam
PROCEDURE DIVISION
Business Logics
User defined paragraphs
mandatory divisions
COMMANDS
F→ Find
F3 → GO BACK
F4 → SPOOL (output /ERROR MSG)
F7 → Line by line TOP OF THE PROGRAM
• F8 → Line by line BOTTOM OF THE PROGRAM
• M+ F7 → DIRECTLY GOES TO THE TOP OF THE PROGRAM
• M+FB → DIRECTLY GOES TO THE BOTTOM OF THE PROGRAM
• F9 → SWAP
• F10 → Move to the left side of the page
• F11→ Move to the Right side of the page
• F12 → SPLIT
INSIDE THE CODING SHEET
I-INSERT
R-REPEAT
D-DELETE
RES - RESET THE ROWS
COLS - RESET THE COLUMS
ARITHMETIC OPERATIONS
• There are two ways we can compute this by using symbol or by using
Verbs
• SYMBOLS - + , - ,*,/
• Verbs – ADD , SUBTRACT , MULTIPY , DIVIDE
• Compute C = A+B
• Compute C = A-B
• Compute C = A*B
• Compute C = A/B
PRE DEFINED VERBS
• ADD A TO B GIVING C
• SUBTRACT B FROM A GIVING C
• MULTIPLY A BY B GIVING C
• DIVIDE A BY B GIVING REMAINDER R
MOVE
Where more is nothing but assign the value to variable or copy/move Copy One
variable value to another variable
• Copy groups of variable into another group
• We declare move in procedure division in Area B
TYPES OF MOVES
Simple move
• Relative move
• Reference modification move
• Group move
• Corresponding move
• Qualifier move
SIMPLE MOVE
• Where we move a group of values into another variable with same datatype
• 01 G-1
• 02. A. PIC. 9(2). VALUE 10
• 02. A. PIC. 9(2). VALUE 10
• 02. A. PIC. 9(2). VALUE 10
• 02 G-2
• 02. A. PIC. 9(2).
• 02. A. PIC. 9(2).
• 02. A. PIC. 9(2).
• MOVE G-1 TO G-2
• DISPLAY
CORRESPONDING MOVE
• 01 G-1
• 02 A PIC 9(2)
• 02 B PIC 9(2)
• 02 C PIC 9(2)
• 01 G-2
• 02 P PIC 9(2)
• 02 B PIC 9(2)
• 02 R PIC 9(2)
• MOVE 50 TO B OF G -2
• DISPLAY G-2
• HERE WE MOVE THE ELEMENT FROM ONE GROUP TO ANOTHER GROUP IF VARIABLE DATATYPE MATCHES
THANK YOU
- BY SAIRAM