Page 1 of 1

Add 88 Level Variable outside Copybook?

Posted: Sun Nov 23, 2014 10:39 am
by Kedar Afley
Hi,

I've a COPYBOOK like this -

Code: Select all

01 COPYBK-IND. 
    05 COPYBK-CURRENCY. 
        10 COPYBK-STATE-CURRENCY    PIC X(01). 
            88 COPYBK-CURR-A      VALUE 'A'. 
            88 COPYBK-CURR-B      VALUE 'B'. 
            88 COPYBK-CURR-C      VALUE 'C'. 
    05 COPYBK-OTHER 
         10.....
Now I need to add a 88 level variable without changing the copybook

Code: Select all

88 COPYBK-CURR-D      VALUE 'D'.
Please let me know if there is any simple way to do this.

Re: Add 88 Level Variable outside Copybook?

Posted: Sun Nov 23, 2014 2:24 pm
by William Collins
Onnly by dfining another field, putting the 888 on that, and MOVEing COPYBK-STATE-CURRENCY to it. Why can't you change (or arrange to be changed) the copybook?

Re: Add 88 Level Variable outside Copybook?

Posted: Sun Nov 23, 2014 9:14 pm
by Robert Sample
Copy books are used as they are -- you can't really change them, so what you are asking (a simple way to change it) does not exist.

Your options are:
1. Change the copy book
2. Create a new copy book with the additional conditional
3. As stated, move the variable to another variable in your program and put the 88 conditional on the variable in your program.

Changing the copy book would be the easiest way.

Re: Add 88 Level Variable outside Copybook?

Posted: Tue Dec 09, 2014 6:01 pm
by Kedar Afley
William:

I'm testing a change and was thinking to add an aaditional variable for testing for future, left in the program as a comment. The value of the variable would change frequently for testing.

Robert:

Thanks. I shall check if I can change the copy book and keep the new variable as comment until we finalize on the values to be used finally.