View previous topic :: View next topic |
Author |
Message |
Vizz0 Beginner
Joined: 20 Oct 2006 Posts: 4 Topics: 2
|
Posted: Fri Aug 22, 2008 8:04 pm Post subject: Is it possible to add 88 Level Variable outside Copybook? |
|
|
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 |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Fri Aug 22, 2008 8:13 pm Post subject: |
|
|
You can't! |
|
Back to top |
|
 |
jsharon1248 Intermediate
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
|
Posted: Mon Aug 25, 2008 7:52 am Post subject: |
|
|
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 |
|
 |
johngo_za Beginner

Joined: 14 Mar 2008 Posts: 7 Topics: 2 Location: Pretoria, SA
|
Posted: Mon Aug 25, 2008 8:16 am Post subject: |
|
|
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 |
|
 |
Vizz0 Beginner
Joined: 20 Oct 2006 Posts: 4 Topics: 2
|
Posted: Tue Sep 09, 2008 6:56 pm Post subject: |
|
|
Thanks Guys for your response. _________________ Regards,
Vizz0 |
|
Back to top |
|
 |
|
|