MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is it possible to add 88 Level Variable outside Copybook?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Vizz0
Beginner


Joined: 20 Oct 2006
Posts: 4
Topics: 2

PostPosted: Fri Aug 22, 2008 8:04 pm    Post subject: Is it possible to add 88 Level Variable outside Copybook? Reply with quote

Hi,
In a COPYBOOK: COUNTRY content as below

Code:

01 CPYBK-COUNTRY.
    05 CPYBK-STATE.
        10 CPYBK-STATE-NAME    PIC X(01).
            88 CPYBK-STATE-A      VALUE 'A'.
            88 CPYBK-STATE-B      VALUE 'B'.
            88 CPYBK-STATE-C      VALUE 'C'.
    05 CPYBK-DEMO
         10.....

Now i need to add a 88 level variable without changing the copybook

Code:
88 CPYBK-STATE-D      VALUE 'D'.


Please let me know simplest way to do this.
_________________
Regards,
Vizz0
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Fri Aug 22, 2008 8:13 pm    Post subject: Reply with quote

You can't!
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Mon Aug 25, 2008 7:52 am    Post subject: Reply with quote

If your copybook only has the one 01 level, you could REDEFINE the 01 level and define your 88 level in the redefined area. You'd be better off updating the copybook.
Back to top
View user's profile Send private message
johngo_za
Beginner


Joined: 14 Mar 2008
Posts: 7
Topics: 2
Location: Pretoria, SA

PostPosted: Mon Aug 25, 2008 8:16 am    Post subject: Reply with quote

The only way is as follows.

Create in working storage:

01 CPYBK-STE-NAME PIC X(01).
88 CPYBK-STE-C VALUE 'D'.

Procedure Division.
Move CPYBK-STATE-NAME to CPYBK-STE-NAME.

And now you can use your new level 88,

Is a bit of a workaround but this will enable you to use your new level 88 without changing the copy book.

My advice however is to change the copybook as I am sure you will probably need this 88 level in other programs as well.
Back to top
View user's profile Send private message
Vizz0
Beginner


Joined: 20 Oct 2006
Posts: 4
Topics: 2

PostPosted: Tue Sep 09, 2008 6:56 pm    Post subject: Reply with quote

Thanks Guys for your response.
_________________
Regards,
Vizz0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group