IBM Mainframe Tutorials - COBOL Cheat Sheet
IBM Mainframe Tutorials - COBOL Cheat Sheet
IBM Mainframe Tutorials - COBOL Cheat Sheet
More
CICS
(2)
COBOL cheat sheet COBOL
(12)
DB2
(11)
JCL
(11)
1. ENVIRONMENT DIVISION is optional. Mainframe Tips & Tricks
(6)
2. DATA DIVISION is optional. MQ Series
(1)
3. In IDENTIFICATION DIVISION, except PROGRAM-ID. everything else is optional. MVS
(1)
4. From Column 8-11, we call AREA-A where we should code DIVISIONS, SECTIONS, SDSF
(1)
PARAGRAPHS and 01 group level items. VSAM
(3)
present physically then the program will NOT abend. Files with OPTIONAL can be
▼
2018
(2)
▼
opened with EXTEND, I/O or INPUT mode so that the file will be created else it
▼
August
(2)
▼
declare two variables in linkage section viz., one is to store length of the data and ►
2016
(1)
►
10. Main program will have 'PROCEDURE DIVISION' where as sub-program or called
program will have 'PROCEDURE DIVISION using [data-items]...'
11. USAGE clause reduce the storage space indirectly increasing the efficiency of the
program. The default usage is DISPLAY and its not applicable for 66,77 and 88
level items.
12. COMP-1 => Left most 8 bits for exponent and remaining 24 bits for mantissa.
COMP-2 => Left most 12 bits for exponent and 52 bits for mantissa. Both of the
items store data in the format of Mantissa and exponent.
13. Comp-3 => also called as packed decimal form where the data will be stored in
memory as BCD (Binary Coded Decimal) format. Two digits can be stored in each
byte and the number of bytes required for a variable is calculated using formula
(n+1)/2. The low nybble of the least significant byte contains a sign. So even
though we didn't define sign variable for COMP-3, a nibble is reserved for it.
Examples:
14. START command is used in DYNAMIC mode to read the KSDS file. It will set the
pointer to the next read for reading the record.
ibmmainframetutorials.blogspot.com/2018/08/cobol-cheat-sheet.html 1/2
11/28/21, 1:50 AM IBM Mainframe Tutorials: COBOL cheat sheet
START file-name KEY <relational-operator> <data-name>
END-EVALUATE.
First key-value will be moved to data name and once START commands executes,
the pointer will be placed at the starting of matched record.
15. READ NEXT is used to read the records sequentially after the record to which
pointer was set by the START command based on key value.
Posted by
Azhar
at
21:24
Labels:
COBOL
No comments:
Post a Comment
Comment as:
sundar.emailbo Sign out
Publish Preview
Notify me
Subscribe to:
Post Comments (Atom)
ibmmainframetutorials.blogspot.com/2018/08/cobol-cheat-sheet.html 2/2