|
|
| Author |
Message |
sree reddy
New User
Joined: 20 Jul 2007 Posts: 69 Location: bangalore
|
|
|
|
Hi,
The below is the description given in the Specification documents.
Create a pointer to copybook XXXXXXXX:cXXX-work-area
remove 4 bytes of filler for the pointer.
Can any one please let me know how to code this in the copybook as early as possible
Thanks |
|
| Back to top |
|
 |
References
|
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 13572 Location: 221 B Baker St
|
|
|
|
Hello,
You will get quicker/better replies if you more clearly explain what you want to do. . . Your intent is completely clear to you, but not to everyone else.
Post more complete info and maybe someone can help. |
|
| Back to top |
|
 |
Bill O'Boyle
Active Member
Joined: 14 Jan 2008 Posts: 986 Location: South Carolina, USA
|
|
|
|
Dick,
I'm going to guess (and this is purely a SWAG) that he needs to define something similar to an ADCON to automatically point to the "01" copybook-level as a separate "01" POINTER included in the copybook.
IE:
| Code: |
01 COPYBOOK-GROUP.
03 BLAH-BLAH-01 PIC X(10).
03 BLAH-BLAH-02 PIC X(10).
03 BLAH-BLAH-03 PIC X(10).
01 COPYBOOK-POINTER POINTER.
|
If this is what he wants to do, AFAIK (unless someone has some tricky way) it can't be done automatically in COBOL.
It can be done in the PROCEDURE DIVISION -
| Code: |
SET COPYBOOK-POINTER TO ADDRESS OF COPYBOOK-GROUP.
|
However, having said that, if this copybook resides in WORKING-STORAGE as opposed to LINKAGE, the minimum COBOL compiler to support this is OS/390 COBOL 2.2 (about 10 years ago).
If the copybook is in LINKAGE, the minimum COBOL compiler is VS/COBOL II, which was the first COBOL compiler to support POINTERS. But a S0C4 will be raised, unless 4-bytes of addressability have been allocated to COPYBOOK-POINTER. Keep in mind that if addressability has not yet been established to the "01", the resulting POINTER value will most likely be garbage.
Ah yes, the tangled web we weave....
Regards, |
|
| Back to top |
|
 |
sree reddy
New User
Joined: 20 Jul 2007 Posts: 69 Location: bangalore
|
|
|
|
| Thanks i got it |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 13572 Location: 221 B Baker St
|
|
|
|
Hi Bill,
Good catch
I'm still puzzled by this from the original post
| Quote: |
| remove 4 bytes of filler for the pointer. |
whatever it refers to. . . Sounds like it may not be an issue at this point?
d |
|
| Back to top |
|
 |
|
|