View previous topic :: View next topic
|
Author |
Message |
ranjitbhingare
New User
Joined: 30 Nov 2005 Posts: 94 Location: PUNE
|
|
|
|
Hi,
While analyzing some programs I found 'CCOPY" verb is used to copy the copybook.
The programmer has used this CCOPY in linkage section.
Could anyone explain what is 'CCOPY' and how it can be used ?
Regards,
Ranjit |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Please post the piece of code.
My guess is there is no verb called CCOPY in COBOL. |
|
Back to top |
|
|
ranjitbhingare
New User
Joined: 30 Nov 2005 Posts: 94 Location: PUNE
|
|
|
|
Hi,
Please see the below code for reference :
LINKAGE SECTION.
01 L-FUNCTION-CODE PIC X(01).
88 L-FUNCTION-INITIAL VALUE 'I'.
88 L-FUNCTION-MAIN-PROCESS VALUE 'P'.
88 L-FUNCTION-FINAL VALUE 'F'.
01 L-CLAIM-RECORD.
04 L-CLAIM-RDW PIC X(04).
01 CCOPY HNRYC008 PREFIX L ALL.
EJECT |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
Back to top |
|
|
ranjitbhingare
New User
Joined: 30 Nov 2005 Posts: 94 Location: PUNE
|
|
|
|
Hi,
HNRYC008 is a copybook.
Actually as per business this is the layout for the input file. But there are no FD entries for that file.
In procedure division, without reading a file directly the value from the variable from copybook is moved to output file variable.
Thats why its kinda confusing.
Regards,
Ranjit |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Definitely not a COBOL sentence.
Can you check if this kind of program, when compiled, has to pass through some kind of preprocessor ? |
|
Back to top |
|
|
ykishor Currently Banned New User
Joined: 11 Aug 2007 Posts: 24 Location: my pc
|
|
|
|
this is not a COBOL verb... i guess some kind of sub routine(it could even be an assembler routine) gets invoked when this particular program is compiled and executed.
I would sugesst u to search for this in the compile listing of the program..
if u get something let me know... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Code: |
LINKAGE SECTION.
01 L-FUNCTION-CODE PIC X(01).
88 L-FUNCTION-INITIAL VALUE 'I'.
88 L-FUNCTION-MAIN-PROCESS VALUE 'P'.
88 L-FUNCTION-FINAL VALUE 'F'.
01 L-CLAIM-RECORD.
04 L-CLAIM-RDW PIC X(04).
01 CCOPY HNRYC008 PREFIX L ALL.
|
What does this part of the code look like in the output of the compile? |
|
Back to top |
|
|
ykishor Currently Banned New User
Joined: 11 Aug 2007 Posts: 24 Location: my pc
|
|
|
|
Hello
The code looks exactly the same .....but the compile listing can provide a wealth of information about the program...any external calls/code expansions can be found through the offset information....also all the libraries refrenced by the program can be found...that's why i suggested that this could be found in the compile listing.... if that's an external call that can be definately found. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
The code looks exactly the same |
Hopefully, not. . . Hopefully, the expansion of the ccopy would be seen. . . |
|
Back to top |
|
|
ykishor Currently Banned New User
Joined: 11 Aug 2007 Posts: 24 Location: my pc
|
|
|
|
could not get you sir... wish to know your views |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
could not get you sir... |
It is my suspicion that this (01 CCOPY HNRYC008 PREFIX L ALL. ) is expanded at some point - it might might be from a pre-processor or something like Metacobol.
Quote: |
01 CCOPY HNRYC008 PREFIX L ALL. |
If Ranjit posts more/useful information we may be able to offer suggestions. As it is now, we're just groping in the dark |
|
Back to top |
|
|
ranjitbhingare
New User
Joined: 30 Nov 2005 Posts: 94 Location: PUNE
|
|
|
|
Hi,
Sorry for the delayed reply.
Thanks for the valuable suggestions.
I checked in the compile listing, below are the findings :
1. CCOPY is has nothing to do with COBOL. Its used only in my company(Assumption) .
2. The macro used in compile JCL expands the copybook. Thus this CCOPY is used by th macro which is used in provided compile JCL.
3. It function in the same way as COPY verb.
Thanks,
Ranjit |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Thanks for the update
d |
|
Back to top |
|
|
|