Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Disadvantages of using 77 Level variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Souparno

New User


Joined: 09 Sep 2008
Posts: 7
Location: India

PostPosted: Wed Sep 24, 2008 9:31 am    Post subject: Disadvantages of using 77 Level variable
Reply with quote

Can you please help me in knowing the disadvantages of using 77 level variables in COBOL ?

Is / are there similar concern(s) with using 66 level as well ?

Thanks in advance for your time and help.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 24, 2008 10:46 am    Post subject:
Reply with quote

Hello,

Quote:
Can you please help me in knowing the disadvantages of using 77 level variables in COBOL ?
I know of no disadvantages with 77s. Use of them would be contorlled by standards (if any apply for your organization) and personal preference. My preference is to make "one of a kind" fields 77 level entries.

Quote:
Is / are there similar concern(s) with using 66 level as well ?
Other than local standards, none that i know. More often redefines is used, but there may be situations where a renames is just what you want.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Wed Sep 24, 2008 11:07 am    Post subject:
Reply with quote

If you declare a variable in 77 level, you cannot declare any elementary items for that particular variable if you want to do so in future. But note that this is not a disadvantage, just difference from other levels e.g., 01,02,... etc.
Back to top
View user's profile Send private message
Souparno

New User


Joined: 09 Sep 2008
Posts: 7
Location: India

PostPosted: Wed Sep 24, 2008 11:43 am    Post subject: More details
Reply with quote

Thanks for the replies.. Just to elaborate on my question.. I am aware of the differences between 01 and 77 level variables, in fact as per my knowledge 77 might help reduce usage of memory during runtime with no extra byte being used to store the memory requirement of underlying variables if any.

But having said that I am not able to appreciate why many of the shops as standard practice prefer not use in 77 level variables in COBOL programs.

Not sure, it might just be more to do with software maintenance advantages rather than pure technical.

Can you please help me in understanding the rationale behind.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Wed Sep 24, 2008 12:04 pm    Post subject:
Reply with quote

From google I found the following points.

Code:

Level 77's can only be used to define individual elementary items. The use of 77's is banned in some shops who take the view that instead of declaring large numbers of indistinguishable 77's it is better to collect the individual items into groups.

Level 66's (RENAMES clause) are used to apply a new name to an identifier or group of identifiers. It is not generally used in modern COBOL programs
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Sep 24, 2008 2:12 pm    Post subject:
Reply with quote

back in the days when everything numeric had to mod4/mod8 bounded, 77 levels were the answer. nowadays the machines are fast enough that if an element must be bounded, the internal code will perform the function.

nowadays the machines are fast enough, that the simplest common denominator is usually a shop standard, since so many coders have no idea what is happening in the machine when they code an instruction.

a display comp or comp-3 variable will now be converted to usage display before the data is actually sent to the output. used to be, you had to convert it your self or hope your spool display allowed hex display options.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Sep 24, 2008 3:32 pm    Post subject: Re: Disadvantages of using 77 Level variable
Reply with quote

They are aligned on a doubleword boundary.

Regards,

Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts OPC JCL Variable passion_sujesh IBM Tools 5 Fri Jul 01, 2016 4:21 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us