Hi,
By using the 01 level we can define the variables as elementary and group. so what is the only use of 77.
thanks®ards
Naresh D
What is the difference between 01 and 77 levels
Moderators: dbzTHEdinosauer, Moderator Group
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
by definition a 01-level is a group-item
by definition a 77-level is an elementary item.
both are mapped on mod4 (or mod8) addresses - i forget which.
in the old days, certain instructions, as well as parameters for services that were CALLed,
required that variables be on mod4 or mod8 boundries.
This is no-longer true for COBOL
(if the bounding is necessary, the compiler will map a temporary field for the CALL)
a problem with using 77-levels is that unless the variable is a double word,
there will be unused memory between the 77-lvl definitions.
There really is no reason to use 77-levels anymore.
by definition a 77-level is an elementary item.
both are mapped on mod4 (or mod8) addresses - i forget which.
in the old days, certain instructions, as well as parameters for services that were CALLed,
required that variables be on mod4 or mod8 boundries.
This is no-longer true for COBOL
(if the bounding is necessary, the compiler will map a temporary field for the CALL)
a problem with using 77-levels is that unless the variable is a double word,
there will be unused memory between the 77-lvl definitions.
There really is no reason to use 77-levels anymore.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
a lvl-77 is addressed at a mod4
(or mod8 - i forget and am unwilling to look at a listing to find out)
let us say it is mod4.
that means address 0001 thru 0003 and 0005 thru 0007 are unused.
where as:
there are no unsued memory bytes in the above
if the addressing is allocated at mod8 (which i think it is)
there would be an additional 4 bytes between the lvl-77's
that would not be used.
(or mod8 - i forget and am unwilling to look at a listing to find out)
let us say it is mod4.
Code: Select all
77 flag1 pic x(01). address 0000
77 flag2 pic x(01). address 0004
77 flag3 pic x(01). address 0008
where as:
Code: Select all
01 flags. address 0000
02 flag1 pic x(01). address 0000
02 flag2 pic x(01). address 0001
02 flag3 pic x(01). address 0002
if the addressing is allocated at mod8 (which i think it is)
there would be an additional 4 bytes between the lvl-77's
that would not be used.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page