View previous topic :: View next topic
|
Author |
Message |
sanath_m
New User
Joined: 10 Mar 2006 Posts: 9
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
sanath_m
New User
Joined: 10 Mar 2006 Posts: 9
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
|