Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
6 views38 pages

cobol ppt

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 38

COBOL

IBM ZERO DOWNTIME OS


INTRODUCTION

• Mainframe is also a server , large size Computer, it was developed


in the year 1950 by IBM for Business requirements 70 % of
Businesses prefer mainframe
ADVANTAGES

We Can Store large volumes of Data


High processing speed
per second 4 lakh million instructions will be executed
Where lakhs of users Can use at the same time
Where mainframe has become an interface between many applications Java, Dot Net
• It has high security
DISADVANTAGES

Its a paid version


• Its an Old technology
OPERATING SYSTEM

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

• One is through Internet


• Other is through Emulator
CLASSIFICATION

• 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

• In Coding sheet to store the Data & to develop the program


• where It consists of 24 rows 80 columns
• we use Coding sheet where 24 rows are extendable 80 columns
aren’t
SYNTAX IDENTIFICATION

• 1-3 page numbers


• 4-6 line numbers
• 1-6 Sequence Number
• 7 *Comment
• / New Lime
• - Continuation
• D – De bug
DATATYPES INFORMATION

• Datatype. Range. Representation. Length quotes


• Alphabetic. ( A-z,sp,sc) A 35,535 “yes”
• Numeric 0-9 9 18bytes. No
• Alphanumeric 0-9,A-z,sc,so X 35,535 “yes”
LEVEL NUMBERS

Ο1 – Group Level / Elementary


• 02-49 -Sub group
• 77-Independent Pure Elementary
• 66-Renames
• 88-Conditional Names
• {66,88} Special Level Numbers
• NO Picture
• class
VARIABLES

Variable are where we store our values


Rules
It Contains A-Z,0-9, -HYPHEN
it should always start with a alphabet
Maximum Length is 30 characters
• It shouldn’t contain any Spaces
• Variables are uses defined not system defined
CONSTANTS

• 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

→ MULTIPLE PROGRAMS CAN BE RUN AT A TIME

→ DIRECTORY BLOCK PARAMETER SHOULD NOT BE NON-ZERO


LIBRARY

• It is a machine Level language


• It is similar to PDS Language
• The record format should be U
• which means undefined - Extend / LARGE / BASIC
DIVISIONS

• 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 simple move assigning a value to a particular variable


• 01 A PIC. 9(2)
• MOVE 10 TO A
• DISPLAY A
RELATIVE MOVE

It moves relatively from one variable to another variable

01 A PIC VALUE 9(3)


01 B PIC. VALUE 9(2)
Move 10 To A
Move A to B
Display A
Display B
REFERENCE MODIFICATION MOVE

Here we copy selected characters length. cору from Variable 1 to Variable 2


• VAR1 SEL CHAR LEN = VAR2 SEL CHAR LEN
• 01 A PIC X(25) VALUE “IBM MAINFRAME “
• O1 B PIC X (15) VALUE “MIND WAVE”
• MOVE A(5:4) TO BC1:4)
• DISPLAY A ->IBM MAINFRAME
• DISPLAY B ->MAINWAVE
GROUP 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

• Here the value moves when the data type is similar an


• 01 G-1
• 02 X PIC 9(2) VALUE 20
• 02 Y PIC 9(2) VALUE 90
• 02 Z PIC 9(2) VALUE 29
1 01 G-2
02 A PIC 9(2)
• 02 Y PIC 9(2)
02 B PIC 9(2)
MOVE CORR G-1 TO. G-2
DISPLAY G-2
QUALIFIER 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

You might also like