IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

wht is differenece b/w 77 level and 01 ?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sanath_m

New User


Joined: 10 Mar 2006
Posts: 9

PostPosted: Mon Mar 20, 2006 10:17 am
Reply with quote

hi

wht is differenece b/w 77 level and 01 ?......

Title changed from "vscobol ii" to "wht is differenece b/w 77 level and 01 ?" : Priyesh.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Mar 20, 2006 10:31 am
Reply with quote

77 level number is used for declaring elementary data items.
01 level number can be used for both elementary data items and sub-group.

Like...


Code:
77 WS-DATE   PIC X(10).

01 WS-DATE1.
   05 WS-DAY   PIC X(2).
   05 FILLER   PIC X(1) VALUE '-'.
   05 WS-MONTH   PIC X(2).
   05 FILLER   PIC X(1) VALUE '-'.
     05 WS-YEAR   PIC X(4).


Regards,
Priyesh.
Back to top
View user's profile Send private message
sanath_m

New User


Joined: 10 Mar 2006
Posts: 9

PostPosted: Mon Mar 20, 2006 10:59 am
Reply with quote

01 a pic 99.
77 b pic 99.

move 0 to a b.

how much memory occupied 77 level and 01 level.....Both are same.....
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Mar 20, 2006 11:49 am
Reply with quote

Quote:
how much memory occupied 77 level and 01 level.....Both are same.....

Yes in terms of memory occupied both would be same. But coding a 01 gives you advantage that you can further sub-group the variable.

In earlier versions of COBOL it was different for 01 & 77 in terms of storage but these are same for VS COBOL II.

Regards,
Priyesh.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to load to DB2 with column level ... DB2 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts JPM Reports for each DB2 V12 Function... DB2 0
No new posts Program level statistics CICS 6
No new posts Feild level validation to test first ... JCL & VSAM 10
Search our Forums:

Back to Top