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

88 level variables


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

New User


Joined: 09 Mar 2006
Posts: 7
Location: India

PostPosted: Tue May 16, 2006 8:59 pm
Reply with quote

suppose
05 tom-set-switch
88 tom-set-now picX 'Y'
88 tom-set-b4 picX 'Z'
{some code}
if who-set-sw = tom-set-sw
(do something)


i wanna know that - will this code will check against both values of 05 level?
and suppose if a 10 level variable is inserted in between 05 and 88 to group various switches- wud the same condition check for all values of each 10 level variables(Y/Z/A/B)?

e.g--
05 set-switch
10 tom-sw
88 tom-set-now picX 'Y'
88 tom-set-b4 picX 'Z'
10 harry-sw
88 harry-set-now picX 'A'
88 harry-set-b4 picX 'B'

{some code}
if who-set-sw = set-sw
(do something)
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed May 17, 2006 3:16 am
Reply with quote

Abhilasha,

The 88 levels do not have ?PIC? associated with them, only values.

It doesn?t matter if it?s on 05 or 10 levels. The 88 level only applies to the item prior.



Code:


    05  TOM-SET-SWITCH        PIC X(1).
        88  TOM-SET-NOW                  VALUE ?Y?.
        88  TOM-SET-B4                   VALUE ?Z?.


    SET TOM-SET-NOW           TO TRUE.

(IS THE SAME AS)

    MOVE ?Y?                  TO TOM-SET-SWITCH.


(AND)

    IF TOM-SET-NOW
    THEN
        (DO SOMETHING)

(IS THE SAME AS)

    IF TOM-SET-SWITCH = ?Y?
    THEN
        (DO SOMETHING)



If you?re still confused, and many people are on 88 levels, please come back.

Dave
Back to top
View user's profile Send private message
Abhilasha

New User


Joined: 09 Mar 2006
Posts: 7
Location: India

PostPosted: Wed May 17, 2006 4:04 pm
Reply with quote

Thanks!! i am abs clear
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 JCL with variables JCL & VSAM 1
No new posts JCL Variables JCL & VSAM 1
No new posts reset/clear ALL application profile v... TSO/ISPF 3
Search our Forums:

Back to Top